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

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

uniform sampler2D depthTex;
uniform sampler2D xrayDepthTex;
uniform float opacity;

in vec4 uvcoordsvar;

out vec4 fragColor;

void main()
{
  float depth = texture(depthTex, uvcoordsvar.xy).r;
  float depth_xray = texture(xrayDepthTex, uvcoordsvar.xy).r;
  fragColor = vec4((depth < 1.0 && depth > depth_xray) ? opacity : 1.0);
}