Small updates to remove warnings Testing nonuniform descriptor access in shader
16 lines
349 B
GLSL
16 lines
349 B
GLSL
#version 460 core
|
|
|
|
#extension GL_EXT_nonuniform_qualifier : enable
|
|
|
|
layout(location = 0) in vec2 frag_uv;
|
|
layout(location = 1) in vec4 frag_c;
|
|
layout(location = 2) in flat uint idx;
|
|
|
|
layout(location = 0) out vec4 framebuffer;
|
|
|
|
layout(binding = 1) uniform sampler2D u_image[];
|
|
|
|
void main() {
|
|
framebuffer = frag_c * texture(u_image[idx], frag_uv);
|
|
}
|