Skip to content

Commit

Permalink
Actually add the test file.
Browse files Browse the repository at this point in the history
  • Loading branch information
arcady-lunarg committed Apr 18, 2024
1 parent c60bbfc commit 10a26ab
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Test/spv.sampledImageBlock.frag
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#version 450

layout(set = 0, binding = 0) uniform texture2D tex0;
layout(set = 0, binding = 1) uniform sampler samp0;
layout(set = 0, binding = 2) uniform ParamBuffer {
int cond;
} paramBuffer;

layout(location = 0) out vec4 fragColor;
layout(location = 0) in flat ivec2 texCoord;

void main() {
// get input

const vec4 texel = texelFetch(sampler2D(tex0, samp0),
paramBuffer.cond == 0 ? texCoord.xy : texCoord.yx,
0);

fragColor = vec4(texel.xyz, 1.0);

}

0 comments on commit 10a26ab

Please sign in to comment.