Debian Codegraph @

third_party/spirv-cross/shaders-msl/frag/bitcasting.1d-as-2d.frag

raw
1 #version 450
2
3 layout(binding = 0) uniform sampler1D TextureBase;
4 layout(binding = 1) uniform sampler1D TextureDetail;
5
6 layout(location = 0) in vec4 VertGeom;
7
8 layout(location = 0) out vec4 FragColor0;
9 layout(location = 1) out vec4 FragColor1;
10
11 void main()
12 {
13 vec4 texSample0 = texture(TextureBase, VertGeom.x);
14 vec4 texSample1 = textureOffset(TextureDetail, VertGeom.x, 3);
15
16 ivec4 iResult0 = floatBitsToInt(texSample0);
17 ivec4 iResult1 = floatBitsToInt(texSample1);
18 FragColor0 = (intBitsToFloat(iResult0) * intBitsToFloat(iResult1));
19
20 uvec4 uResult0 = floatBitsToUint(texSample0);
21 uvec4 uResult1 = floatBitsToUint(texSample1);
22 FragColor1 = (uintBitsToFloat(uResult0) * uintBitsToFloat(uResult1));
23 }