SPIRV-Cross/shaders-no-opt/frag/nonuniform-constructor.vk.nocompat.frag
Hans-Kristian Arntzen a11c4780d0 GLSL: Emit nonuniformEXT in correct place for late-combined samplers.
Need to emit nonuniformEXT(sampler2D()) since constructor expressions in
Vulkan GLSL do not propgate the nonuniform qualifier.
2020-12-07 13:00:15 +01:00

15 lines
378 B
GLSL

#version 450
#extension GL_EXT_nonuniform_qualifier : require
layout(location = 0) out vec4 FragColor;
layout(location = 0) in vec2 vUV;
layout(location = 1) flat in int vIndex;
layout(set = 0, binding = 0) uniform texture2D uTex[];
layout(set = 1, binding = 0) uniform sampler Immut;
void main()
{
FragColor = texture(nonuniformEXT(sampler2D(uTex[vIndex], Immut)), vUV);
}