12 uniform sampler2DShadow shadow_map;
13 const bool use_light = false;
15 #pragma MSP stage(vertex)
16 layout(location=0) in vec4 vertex;
17 layout(location=1) in vec3 normal;
20 vec4 world_vertex = model*vertex;
21 out vec3 world_normal = mat3(model)*normal;
22 gl_Position = vp*world_vertex;
25 out vec3 shadow_coord = (shadow_matrix*world_vertex).xyz;
29 #pragma MSP stage(fragment)
30 layout(location=0) out vec4 frag_color;
33 vec3 color = vec3(1.0);
36 float intensity = max(dot(normalize(world_normal), light_dir), 0.0);
38 intensity *= texture(shadow_map, shadow_coord);
41 frag_color = vec4(color, 1.0);
44 /* Expected output: vertex
45 layout(binding=48) uniform Transform
50 layout(location=0) in vec4 vertex;
53 gl_Position = vp*model*vertex;
57 /* Expected output: fragment
58 layout(location=0) out vec4 frag_color;
61 frag_color = vec4(vec3(1.0), 1.0);