vertex_fragment.glsl 517 B

1234567891011121314151617181920212223242526272829303132333435
  1. #include "_included.glsl"
  2. #[modes]
  3. mode_ninepatch = #define USE_NINEPATCH
  4. #[specializations]
  5. DISABLE_LIGHTING = false
  6. #[vertex]
  7. precision highp float;
  8. precision highp int;
  9. layout(location = 0) in highp vec3 vertex;
  10. out highp vec4 position_interp;
  11. void main() {
  12. position_interp = vec4(vertex.x,1,0,1);
  13. }
  14. #[fragment]
  15. precision highp float;
  16. precision highp int;
  17. in highp vec4 position_interp;
  18. void main() {
  19. highp float depth = ((position_interp.z / position_interp.w) + 1.0);
  20. frag_color = vec4(depth);
  21. }