blob: 856654549ca1bc6654ca23d7e73b163114e9e834 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
uniform sampler2D depthBuffer;
in vec4 uvcoordsvar;
out vec4 fragColor;
void main()
{
float depth = texture(depthBuffer, uvcoordsvar.st).r;
/* Fix issues with Intel drivers (see T80023). */
fragColor = vec4(0.0);
/* Discard background pixels. */
if (depth == 1.0) {
discard;
}
/* Make this fragment occlude any fragment that will try to
* render over it in the normal passes. */
gl_FragDepth = 0.0;
}
|