Debian Codegraph @

third_party/spirv-cross/shaders-msl/frag/swizzle.frag

raw
1 #version 310 es
2 precision mediump float;
3
4 layout(binding = 0) uniform sampler2D samp;
5 layout(location = 0) out vec4 FragColor;
6 layout(location = 1) in vec3 vNormal;
7 layout(location = 2) in vec2 vUV;
8
9 void main()
10 {
11 FragColor = vec4(texture(samp, vUV).xyz, 1.0);
12 FragColor = vec4(texture(samp, vUV).xz, 1.0, 4.0);
13 FragColor = vec4(texture(samp, vUV).xx, texture(samp, vUV + vec2(0.1)).yy);
14 FragColor = vec4(vNormal, 1.0);
15 FragColor = vec4(vNormal + 1.8, 1.0);
16 FragColor = vec4(vUV, vUV + 1.8);
17 }