|
| 1 | +#version 430 |
| 2 | +#extension GL_ARB_texture_gather : enable |
| 3 | +#extension GL_ARB_separate_shader_objects : enable |
| 4 | +// shader 9f1ac253de80a927 |
| 5 | +// Used for: Removing the blinking button in the HUD |
| 6 | + |
| 7 | + |
| 8 | +#ifdef VULKAN |
| 9 | +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) |
| 10 | +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) |
| 11 | +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) |
| 12 | +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) |
| 13 | +#else |
| 14 | +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) |
| 15 | +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) |
| 16 | +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) |
| 17 | +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) |
| 18 | +#endif |
| 19 | +#ifdef VULKAN |
| 20 | +layout(set = 1, binding = 1) uniform ufBlock |
| 21 | +{ |
| 22 | +uniform ivec4 uf_remappedPS[2]; |
| 23 | +uniform vec4 uf_fragCoordScale; |
| 24 | +}; |
| 25 | +#else |
| 26 | +uniform ivec4 uf_remappedPS[2]; |
| 27 | +uniform vec2 uf_fragCoordScale; |
| 28 | +#endif |
| 29 | +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; |
| 30 | +layout(location = 0) in vec4 passParameterSem0; |
| 31 | +layout(location = 1) in vec4 passParameterSem2; |
| 32 | +layout(location = 0) out vec4 passPixelColor0; |
| 33 | +int clampFI32(int v) |
| 34 | +{ |
| 35 | +if( v == 0x7FFFFFFF ) |
| 36 | + return floatBitsToInt(1.0); |
| 37 | +else if( v == 0xFFFFFFFF ) |
| 38 | + return floatBitsToInt(0.0); |
| 39 | +return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0)); |
| 40 | +} |
| 41 | +float mul_nonIEEE(float a, float b){return mix(0.0, a*b, (a != 0.0) && (b != 0.0));} |
| 42 | +void main() |
| 43 | +{ |
| 44 | +vec4 R0f = vec4(0.0); |
| 45 | +vec4 R1f = vec4(0.0); |
| 46 | +vec4 R123f = vec4(0.0); |
| 47 | +vec4 R125f = vec4(0.0); |
| 48 | +vec4 R126f = vec4(0.0); |
| 49 | +vec4 R127f = vec4(0.0); |
| 50 | +float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f; |
| 51 | +vec4 PV0f = vec4(0.0), PV1f = vec4(0.0); |
| 52 | +float PS0f = 0.0, PS1f = 0.0; |
| 53 | +vec4 tempf = vec4(0.0); |
| 54 | +float tempResultf; |
| 55 | +int tempResulti; |
| 56 | +ivec4 ARi = ivec4(0); |
| 57 | +bool predResult = true; |
| 58 | +vec3 cubeMapSTM; |
| 59 | +int cubeMapFaceId; |
| 60 | +R0f = passParameterSem0; |
| 61 | +R1f = passParameterSem2; |
| 62 | +R1f.xyzw = (texture(textureUnitPS0, R1f.xy).xyzw); |
| 63 | +// 0 |
| 64 | +PV0f.x = intBitsToFloat(uf_remappedPS[0].w) * intBitsToFloat(0x3f7f0000); |
| 65 | +PV0f.y = intBitsToFloat(uf_remappedPS[0].z) * intBitsToFloat(0x3f7f0000); |
| 66 | +PV0f.z = intBitsToFloat(uf_remappedPS[0].y) * intBitsToFloat(0x3f7f0000); |
| 67 | +PV0f.w = intBitsToFloat(uf_remappedPS[0].x) * intBitsToFloat(0x3f7f0000); |
| 68 | +// 1 |
| 69 | +PV1f.x = fract(PV0f.w); |
| 70 | +R127f.y = fract(PV0f.x); |
| 71 | +R127f.z = fract(PV0f.y); |
| 72 | +PV1f.w = fract(PV0f.z); |
| 73 | +R127f.w = intBitsToFloat(uf_remappedPS[1].x) * intBitsToFloat(0x3f7f0000); |
| 74 | +PS1f = R127f.w; |
| 75 | +// 2 |
| 76 | +R127f.x = intBitsToFloat(uf_remappedPS[1].w) * intBitsToFloat(0x3f7f0000); |
| 77 | +PV0f.y = intBitsToFloat(uf_remappedPS[1].z) * intBitsToFloat(0x3f7f0000); |
| 78 | +PV0f.z = intBitsToFloat(uf_remappedPS[1].y) * intBitsToFloat(0x3f7f0000); |
| 79 | +R126f.w = PV1f.x * intBitsToFloat(0x3f808081); |
| 80 | +R126f.x = PV1f.w * intBitsToFloat(0x3f808081); |
| 81 | +PS0f = R126f.x; |
| 82 | +// 3 |
| 83 | +R125f.x = R127f.y * intBitsToFloat(0x3f808081); |
| 84 | +PV1f.y = fract(R127f.w); |
| 85 | +PV1f.z = fract(PV0f.z); |
| 86 | +R127f.w = R127f.z * intBitsToFloat(0x3f808081); |
| 87 | +PV1f.w = R127f.w; |
| 88 | +PS1f = fract(PV0f.y); |
| 89 | +// 4 |
| 90 | +PV0f.x = fract(R127f.x); |
| 91 | +R123f.y = (PS1f * intBitsToFloat(0x3f808081) + -(PV1f.w)); |
| 92 | +PV0f.y = R123f.y; |
| 93 | +R123f.z = (PV1f.z * intBitsToFloat(0x3f808081) + -(R126f.x)); |
| 94 | +PV0f.z = R123f.z; |
| 95 | +R123f.w = (PV1f.y * intBitsToFloat(0x3f808081) + -(R126f.w)); |
| 96 | +PV0f.w = R123f.w; |
| 97 | +// 5 |
| 98 | +R123f.x = (mul_nonIEEE(PV0f.w,R1f.x) + R126f.w); |
| 99 | +R123f.x = clamp(R123f.x, 0.0, 1.0); |
| 100 | +PV1f.x = R123f.x; |
| 101 | +R123f.y = (PV0f.x * intBitsToFloat(0x3f808081) + -(R125f.x)); |
| 102 | +PV1f.y = R123f.y; |
| 103 | +R123f.z = (mul_nonIEEE(PV0f.y,R1f.z) + R127f.w); |
| 104 | +R123f.z = clamp(R123f.z, 0.0, 1.0); |
| 105 | +PV1f.z = R123f.z; |
| 106 | +R123f.w = (mul_nonIEEE(PV0f.z,R1f.y) + R126f.x); |
| 107 | +R123f.w = clamp(R123f.w, 0.0, 1.0); |
| 108 | +PV1f.w = R123f.w; |
| 109 | +// 6 |
| 110 | +R123f.x = (mul_nonIEEE(PV1f.y,R1f.w) + R125f.x); |
| 111 | +R123f.x = clamp(R123f.x, 0.0, 1.0); |
| 112 | +PV0f.x = R123f.x; |
| 113 | +R1f.y = mul_nonIEEE(R0f.y, PV1f.w); |
| 114 | +R1f.y = clamp(R1f.y, 0.0, 1.0); |
| 115 | +R1f.z = mul_nonIEEE(R0f.z, PV1f.z); |
| 116 | +R1f.z = clamp(R1f.z, 0.0, 1.0); |
| 117 | +R1f.x = mul_nonIEEE(R0f.x, PV1f.x); |
| 118 | +R1f.x = clamp(R1f.x, 0.0, 1.0); |
| 119 | +PS0f = R1f.x; |
| 120 | +// 7 |
| 121 | +R1f.w = mul_nonIEEE(R0f.w, PV0f.x); |
| 122 | +R1f.w = clamp(R1f.w, 0.0, 1.0); |
| 123 | +// export |
| 124 | +passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, 0.0); |
| 125 | +} |
0 commit comments