third_party/spirv-cross/shaders-msl/frag/array-of-texture-swizzle.msl2.swizzle.frag
raw| 1 | #version 450 |
| 2 | |
| 3 | layout(set = 0, binding = 0) uniform sampler2D uSampler[4]; |
| 4 | layout(set = 0, binding = 1) uniform sampler2D uSamp; |
| 5 | layout(location = 0) in vec2 vUV; |
| 6 | |
| 7 | layout(location = 0) out vec4 FragColor; |
| 8 | |
| 9 | vec4 sample_in_func() |
| 10 | { |
| 11 | return texture(uSampler[2], vUV); |
| 12 | } |
| 13 | |
| 14 | vec4 sample_single_in_func(sampler2D s) |
| 15 | { |
| 16 | return texture(s, vUV); |
| 17 | } |
| 18 | |
| 19 | void main() |
| 20 | { |
| 21 | FragColor = sample_in_func(); |
| 22 | FragColor += sample_single_in_func(uSampler[1]); |
| 23 | } |