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: 9380044f2b93c99cfe765e826ddcba7ea4d8e2e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
uniform int object_id = 0;
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
	vec4 diffuse_color = texture(image, uv_interp);
	if (diffuse_color.a < ImageTransparencyCutoff) {
		discard;
	}
#endif

	objectId = uint(object_id);
}