16 lines
221 B
GLSL
16 lines
221 B
GLSL
uniform sampler2D depthbuffer;
|
|
|
|
in vec4 uvcoordsvar;
|
|
|
|
void main(void)
|
|
{
|
|
float depth = texture(depthbuffer, uvcoordsvar.xy).r;
|
|
|
|
/* XRay background, discard */
|
|
if (depth >= 1.0) {
|
|
discard;
|
|
}
|
|
|
|
gl_FragDepth = depth;
|
|
}
|