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

workbench_merge_infront_frag.glsl « shaders « workbench « engines « draw « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b77e168889f779bfe32f8bf307b75bea35e5590d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

uniform sampler2D depthBuffer;

in vec4 uvcoordsvar;

out vec4 fragColor;

void main()
{
  float depth = texture(depthBuffer, uvcoordsvar.st).r;
  /* 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;
}