1#version 450 2 3layout(set = 0, binding = 0) uniform texture2D tex0; 4layout(set = 0, binding = 1) uniform sampler samp0; 5layout(set = 0, binding = 2) uniform ParamBuffer { 6 int cond; 7} paramBuffer; 8 9layout(location = 0) out vec4 fragColor; 10layout(location = 0) in flat ivec2 texCoord; 11 12void main() { 13 // get input 14 15 const vec4 texel = texelFetch(sampler2D(tex0, samp0), 16 paramBuffer.cond == 0 ? texCoord.xy : texCoord.yx, 17 0); 18 19 fragColor = vec4(texel.xyz, 1.0); 20 21} 22