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

grid_background_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: f09918da6dc8a6abd030308527c70951a3a2bab0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12

uniform vec4 color;
uniform sampler2D depthBuffer;

out vec4 fragColor;

void main()
{
  fragColor = color;
  float scene_depth = texelFetch(depthBuffer, ivec2(gl_FragCoord.xy), 0).r;
  fragColor.a = (scene_depth == 1.0) ? 1.0 : 0.0;
}