Files
test/source/blender/gpu/shaders/gpu_shader_fx_depth_resolve.glsl
2017-05-17 10:46:42 +10:00

17 lines
249 B
GLSL

uniform sampler2D depthbuffer;
in vec4 uvcoordsvar;
#define texture2D texture
void main(void)
{
float depth = texture2D(depthbuffer, uvcoordsvar.xy).r;
/* XRay background, discard */
if (depth >= 1.0) {
discard;
}
gl_FragDepth = depth;
}