This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source/blender/gpu/shaders/gpu_shader_fx_depth_resolve.glsl

16 lines
221 B
GLSL
Raw Normal View History

uniform sampler2D depthbuffer;
2017-05-17 10:46:42 +10:00
in vec4 uvcoordsvar;
void main(void)
{
float depth = texture(depthbuffer, uvcoordsvar.xy).r;
/* XRay background, discard */
if (depth >= 1.0) {
discard;
}
gl_FragDepth = depth;
}