3 layout(set=1) uniform AlphaCutoff
8 layout(set=1) uniform sampler2D alpha_map;
10 layout(constant_id=auto) const bool use_alpha_cutoff = false;
11 layout(constant_id=auto) const bool use_instancing = false;
13 #pragma MSP stage(vertex)
14 virtual vec4 get_vertex_position()
19 virtual mat4 get_vertex_transform()
22 return transpose(mat4(instance_transform[0], instance_transform[1], instance_transform[2], vec4(0.0, 0.0, 0.0, 1.0)));
24 return world_obj_matrix;
27 virtual void clipping(vec3 eye_vertex)
33 vec4 eye_vertex = eye_world_matrix*get_vertex_transform()*get_vertex_position();
34 clipping(eye_vertex.xyz);
35 gl_Position = clip_eye_matrix*eye_vertex;
39 #pragma MSP stage(fragment)
40 layout(location=0) out vec4 frag_color;
46 float alpha = texture(alpha_map, texcoord.xy).a;
47 if(alpha<alpha_cutoff)
49 frag_color = vec4(1.0);