xray.shader 1019 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. [shaders]
  2. vertex =
  3. uniform highp mat4 u_modelMatrix;
  4. uniform highp mat4 u_viewMatrix;
  5. uniform highp mat4 u_projectionMatrix;
  6. attribute highp vec4 a_vertex;
  7. void main()
  8. {
  9. gl_Position = u_projectionMatrix * u_viewMatrix * u_modelMatrix * a_vertex;
  10. }
  11. fragment =
  12. uniform lowp vec4 u_color;
  13. void main()
  14. {
  15. gl_FragColor = u_color;
  16. }
  17. vertex41core =
  18. #version 410
  19. uniform highp mat4 u_modelMatrix;
  20. uniform highp mat4 u_viewMatrix;
  21. uniform highp mat4 u_projectionMatrix;
  22. in highp vec4 a_vertex;
  23. void main()
  24. {
  25. gl_Position = u_projectionMatrix * u_viewMatrix * u_modelMatrix * a_vertex;
  26. }
  27. fragment41core =
  28. #version 410
  29. uniform lowp vec4 u_color;
  30. out vec4 frag_color;
  31. void main()
  32. {
  33. frag_color = u_color;
  34. }
  35. [defaults]
  36. u_color = [0.02, 0.02, 0.02, 1.0]
  37. [bindings]
  38. u_modelMatrix = model_matrix
  39. u_viewMatrix = view_matrix
  40. u_projectionMatrix = projection_matrix
  41. [attributes]
  42. a_vertex = vertex