blob: 59f2df11086ef213dc5347dfe0811b8bbae7281d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
uniform sampler2D depthBuffer;
void main(void)
{
float depth = texelFetch(depthBuffer, ivec2(gl_FragCoord.xy), 0).r;
/* background, discard */
if (depth >= 1.0) {
discard;
}
gl_FragDepth = depth;
}
|