vertex_fragment.glsl 563 B

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