1 #pragma MSP stage(vertex)
2 layout(binding=0) uniform sampler2D heightmap;
3 layout(location=0) uniform mat4 mvp;
4 layout(location=0) in vec2 position;
5 layout(location=1) in vec3 texcoord;
8 gl_Position = mvp*vec4(position, texture(heightmap, texcoord.xy).r, 1.0);
12 #pragma MSP stage(fragment)
13 layout(binding=1) uniform sampler2DArray heightmap;
14 layout(location=3) uniform vec4 color;
15 layout(location=0) out vec4 frag_color;
18 frag_color = color*texture(heightmap, texcoord).r;
22 <test>:13: Mismatched binding 1 for uniform 'heightmap'
23 <test>:2: Previously declared here with binding 0
24 <test>:13: Mismatched type 'sampler2DArray' for uniform 'heightmap'
25 <test>:2: Previously declared here with type 'sampler2D'
26 <test>:14: Overlapping location 3 for 'color'
27 <test>:3: Previously used here for 'mvp'