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

workbench_forward_depth_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: abd8c1f6579ee92f2fdbd4b065ca7fbe4f157d23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

layout(location = 0) out uint objectId;

uniform float ImageTransparencyCutoff = 0.1;
#ifdef V3D_SHADING_TEXTURE_COLOR
uniform sampler2D image;

in vec2 uv_interp;
#endif

void main()
{
#ifdef V3D_SHADING_TEXTURE_COLOR
  if (texture(image, uv_interp).a < ImageTransparencyCutoff) {
    discard;
  }
#endif

  objectId = uint(resource_id + 1) & 0xFFu;
}