You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
242 B
Plaintext
17 lines
242 B
Plaintext
|
4 years ago
|
varying vec4 vertex_depth;
|
||
|
|
|
||
|
|
uniform sampler2D tex;
|
||
|
|
varying vec2 uv;
|
||
|
|
|
||
|
|
void main()
|
||
|
|
{
|
||
|
|
if (texture2D(tex, uv).a < 0.5)
|
||
|
|
{
|
||
|
|
discard;
|
||
|
|
}
|
||
|
|
|
||
|
|
float depth = (vertex_depth.z) / vertex_depth.w;
|
||
|
|
|
||
|
|
gl_FragColor = vec4(depth, depth, depth, 1.0);
|
||
|
|
}
|