Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gpu_shader_fx_depth_resolve.glsl « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9221e3def2cc29fc12dc0ca82e0171d2410b1214 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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;
}