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