Debian Codegraph @

third_party/spirv-cross/reference/shaders/asm/frag/image-fetch-no-sampler.no-samplerless.asm.vk.frag.vk

raw
1 #version 450
2
3 layout(set = 0, binding = 0) uniform sampler Sampler;
4 layout(set = 0, binding = 0) uniform texture2D SampledImage;
5 layout(set = 0, binding = 0) uniform sampler SPIRV_Cross_DummySampler;
6
7 layout(location = 0) out vec4 _entryPointOutput;
8
9 vec4 sample_fetch(texture2D tex, ivec3 UV)
10 {
11 return texelFetch(sampler2D(tex, SPIRV_Cross_DummySampler), UV.xy, UV.z);
12 }
13
14 vec4 sample_sampler(texture2D tex, vec2 UV)
15 {
16 return texture(sampler2D(tex, Sampler), UV);
17 }
18
19 vec4 _main(vec4 xIn)
20 {
21 ivec3 coord = ivec3(int(xIn.x * 1280.0), int(xIn.y * 720.0), 0);
22 ivec3 param = coord;
23 vec4 value = sample_fetch(SampledImage, param);
24 value += texelFetch(sampler2D(SampledImage, SPIRV_Cross_DummySampler), coord.xy, coord.z);
25 vec2 param_1 = xIn.xy;
26 value += sample_sampler(SampledImage, param_1);
27 value += texture(sampler2D(SampledImage, Sampler), xIn.xy);
28 return value;
29 }
30
31 void main()
32 {
33 vec4 xIn = gl_FragCoord;
34 vec4 param = xIn;
35 _entryPointOutput = _main(param);
36 }
37