1
0

pass1_fragment.glsl 241 B

12345678910111213
  1. uniform sampler2D ColorMapSampler;
  2. varying vec4 tPos;
  3. void main()
  4. {
  5. vec4 col = texture2D(ColorMapSampler, gl_TexCoord[0].st);
  6. if (col.a < 0.70)
  7. discard;
  8. float depth = 0.5 + tPos.z * 0.5;
  9. gl_FragColor = vec4(depth, 0.0, 0.0, 1.0);
  10. }