You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

47 line
809 B

  1. -- GLSL.Vert --
  2. #version 120\n
  3. attribute vec3 in_Vertex;
  4. attribute vec3 in_Color;
  5. uniform mat4 in_Matrix;
  6. varying vec3 pass_Color;
  7. void main(void)
  8. {
  9. gl_Position = in_Matrix * vec4(in_Vertex, 1.0);
  10. pass_Color = in_Color;
  11. }
  12. -- GLSL.Frag --
  13. #version 120
  14. varying vec3 pass_Color;
  15. void main(void)
  16. {
  17. gl_FragColor = vec4(pass_Color, 1.0);
  18. }
  19. -- HLSL.Vert --
  20. void main(float3 in_Vertex : POSITION,
  21. float3 in_Color : COLOR,
  22. uniform float4x4 in_Matrix,
  23. out float4 out_Position : POSITION,
  24. out float3 pass_Color : COLOR)
  25. {
  26. pass_Color = in_Color;
  27. out_Position = mul(in_Matrix, float4(in_Vertex, 1.0));
  28. }
  29. -- HLSL.Frag --
  30. void main(float3 pass_Color : COLOR,
  31. out float4 out_FragColor : COLOR)
  32. {
  33. out_FragColor = float4(pass_Color, 1.0);
  34. }