This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/draw/engines/overlay/shaders/xray_fade_frag.glsl
Clément Foucault ed21506f26 Overlay: Remove Xray dithering noise
We now use a better smoother technique that uses correct alpha blending.
This is possible now that we render overlays in a separate buffer.
2020-02-24 13:48:38 +01:00

16 lines
332 B
GLSL

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);
}