test.kong 340 B

123456789101112131415161718192021222324
  1. struct vert_in {
  2. pos: float3;
  3. }
  4. struct vert_out {
  5. pos: float4;
  6. }
  7. fun test_vert(input: vert_in): vert_out {
  8. var output: vert_out;
  9. output.pos = float4(input.pos, 1.0);
  10. return output;
  11. }
  12. fun test_frag(input: vert_out): float4 {
  13. return float4(1.0, 0.0, 0.0, 1.0);
  14. }
  15. #[pipe]
  16. struct pipe {
  17. vertex = test_vert;
  18. fragment = test_frag;
  19. }