1 #pragma MSP stage(vertex)
2 layout(binding=0) uniform Transform
7 layout(binding=1) uniform Lighting
11 layout(location=0) in vec4 position;
12 layout(location=1) in vec3 normal;
15 vec4 world_pos = model*position;
16 gl_Position = vp*world_pos;
17 out vec3 light_dir = world_pos.xyz-light.position;
21 #pragma MSP stage(fragment)
22 layout(binding=1) uniform Lighting
26 layout(binding=0) uniform Material
30 layout(location=0) out vec4 frag_color;
33 frag_color = color*vec4(vec3(max(dot(normalize(normal), normalize(light_dir)), 0.0)), 1.0);
37 <test>:23: Mismatched structure for uniform 'Lighting'
38 <test>:8: Previously declared here
39 <test>:27: Overlapping binding 0 for 'Material'
40 <test>:3: Previously used here for 'Transform'