[require] GL >= 4.5 GLSL >= 4.50 SSO ENABLE [fragment shader] #version 450 core // ps_5_0 // Checksum: 070e3814_b21370ed_18e674a4_10844453 // Name: DecalDither_PS bool discarded = false; layout(location = 1) in idx_Varying1 { vec4 v; } v1; layout(location = 2) in idx_Varying2 { vec4 v; } v2; layout(location = 3) in idx_Varying3 { vec4 v; } v3; layout(location = 4) in idx_Varying4 { vec4 v; } v4; layout(location = 5) in idx_Varying5 { vec4 v; } v5; layout(location = 6) in idx_Varying6 { vec4 v; } v6; layout(location = 0) out vec4 o0; layout(location = 1) out vec4 o1; layout(location = 2) out vec4 o2; layout(location = 3) out vec4 o3; vec4 r0, r1, r2, r3, r4, r5; // Uniform buffer declarations (dcl_constant_buffer) layout (std140) uniform cb_ps0 { vec4 cb0[6]; } idx_uniforms0_ps; layout (std140) uniform cb_ps1 { vec4 cb1[8]; } idx_uniforms1_ps; layout (std140) uniform cb_ps2 { vec4 cb2[24]; } idx_uniforms2_ps; // Sampler/resource pairs uniform sampler2D resourceSamplerPair_0_ps; // res2, s5 uniform sampler2D resourceSamplerPair_1_ps; // res2, s12 uniform sampler2D resourceSamplerPair_2_ps; // res1, s9 uniform sampler2D resourceSamplerPair_3_ps; // res3, s9 uniform sampler2D resourceSamplerPair_4_ps; // res0, s1 void Initialise() { } uvec4 movc(in uvec4 src0, in uvec4 src1, in uvec4 src2) { return mix(src2, src1, bvec4(src0)); } uvec3 movc(in uvec3 src0, in uvec3 src1, in uvec3 src2) { return mix(src2, src1, bvec3(src0)); } uvec2 movc(in uvec2 src0, in uvec2 src1, in uvec2 src2) { return mix(src2, src1, bvec2(src0)); } uint movc(in uint src0, in uint src1, in uint src2) { return mix(src2, src1, bool(src0)); } void PixelEpilog() { if (discarded) discard; } float saturate(float rhs) { return clamp(rhs, 0.0, 1.0); } vec2 saturate(vec2 rhs) { return clamp(rhs, 0.0, 1.0); } vec3 saturate(vec3 rhs) { return clamp(rhs, 0.0, 1.0); } vec4 saturate(vec4 rhs) { return clamp(rhs, 0.0, 1.0); } int saturate(int rhs) { return floatBitsToInt(clamp(intBitsToFloat(rhs), 0.0, 1.0)); } ivec2 saturate(ivec2 rhs) { return floatBitsToInt(clamp(intBitsToFloat(rhs), 0.0, 1.0)); } ivec3 saturate(ivec3 rhs) { return floatBitsToInt(clamp(intBitsToFloat(rhs), 0.0, 1.0)); } ivec4 saturate(ivec4 rhs) { return floatBitsToInt(clamp(intBitsToFloat(rhs), 0.0, 1.0)); } uint saturate(uint rhs) { return floatBitsToUint(clamp(uintBitsToFloat(rhs), 0.0, 1.0)); } uvec2 saturate(uvec2 rhs) { return floatBitsToUint(clamp(uintBitsToFloat(rhs), 0.0, 1.0)); } uvec3 saturate(uvec3 rhs) { return floatBitsToUint(clamp(uintBitsToFloat(rhs), 0.0, 1.0)); } uvec4 saturate(uvec4 rhs) { return floatBitsToUint(clamp(uintBitsToFloat(rhs), 0.0, 1.0)); } void main() { Initialise(); r0.x = (textureQueryLod(resourceSamplerPair_0_ps, v2.v.xy)).x; r0.y = idx_uniforms0_ps.cb0[5].x * float(0.00999999978f); r1.x = dot(v4.v.xyz, -v1.v.xyz); r1.y = dot(v5.v.xyz, -v1.v.xyz); r0.z = dot(v3.v.xyz, -v1.v.xyz); r0.yw = -r0.yy * r1.xy; r0.yz = mix(r0.yw/r0.zz, vec2(uintBitsToFloat(uint(0x70000000))) * sign(r0.yw), equal(r0.zz, vec2(0.0))); r0.w = dot(r0.yz, r0.yz); r0.w = sqrt(r0.w); r1.x = exp2(r0.x); r1.x = r1.x * float(0.159999996f); r1.y = intBitsToFloat(r1.x < r0.w ? int(0xffffffff) : int(0x00000000)); r1.z = (r0.w != 0.0) ? r1.x/r0.w : uintBitsToFloat(uint(0x70000000)) * sign(r1.x); r1.z = min(r1.z, float(1.00000000f)); r1.y = uintBitsToFloat(movc(floatBitsToUint(r1.y), floatBitsToUint(r1.z), uint(0x3f800000))); r0.w = (r1.x != 0.0) ? r0.w/r1.x : uintBitsToFloat(uint(0x70000000)) * sign(r0.w); r0.w = min(r0.w, float(1.00000000f)); r0.w = fma(r0.w, float(31.0000000f), float(1.00000000f)); r1.x = intBitsToFloat(int(r0.w)); r2.xy = r0.yz * r1.yy; r0.y = trunc(r0.w); r2.z = uintBitsToFloat(uint(0xbf800000)); r0.yzw = mix(r2.xyz/r0.yyy, vec3(uintBitsToFloat(uint(0x70000000))) * sign(r2.xyz), equal(r0.yyy, vec3(0.0))); r2.xy = v2.v.xy; r2.z = uintBitsToFloat(uint(0x3f800000)); r1.y = uintBitsToFloat(uint(0x00000000)); while (true) { r1.z = intBitsToFloat(floatBitsToInt(r1.y) >= floatBitsToInt(r1.x) ? int(0xffffffff) : int(0x00000000)); if (floatBitsToUint(r1.z) != uint(0)) break; r3.xyz = r0.yzw + r2.xyz; r1.z = ((textureLod(resourceSamplerPair_1_ps, r3.xy, r0.x)).yzxw).z; r1.z = intBitsToFloat(r1.z >= r3.z ? int(0xffffffff) : int(0x00000000)); if (floatBitsToUint(r1.z) != uint(0)) { r2.xyz = r3.xyz; break; } r1.y = intBitsToFloat(floatBitsToInt(r1.y) + int(1)); r2.xyz = r3.xyz; } r0.yzw = -r0.yzw + r2.xyz; r1.xy = r0.yz; r3.x = r0.w; r3.yzw = r2.xyz; r1.z = uintBitsToFloat(uint(0x00000000)); while (true) { r1.w = intBitsToFloat(floatBitsToInt(r1.z) >= int(4) ? int(0xffffffff) : int(0x00000000)); if (floatBitsToUint(r1.w) != uint(0)) break; r4.zw = r1.xy; r4.x = r3.x; r5.xyz = r3.yzw + r4.zwx; r4.yzw = r5.xyz * vec3(0.500000000f, 0.500000000f, 0.500000000f); r1.w = ((textureLod(resourceSamplerPair_0_ps, r4.yz, r0.x)).yzwx).w; r1.w = intBitsToFloat(r1.w >= r4.w ? int(0xffffffff) : int(0x00000000)); r1.xy = uintBitsToFloat(movc(floatBitsToUint(r1.ww), floatBitsToUint(r1.xy), floatBitsToUint(r4.yz))); r3.x = r4.w; r3 = uintBitsToFloat(movc(floatBitsToUint(r1.wwww), floatBitsToUint(r4), floatBitsToUint(r3))); r1.z = intBitsToFloat(floatBitsToInt(r1.z) + int(1)); } r0.xy = r1.xy + r3.yz; r0.xy = r0.xy * vec2(0.500000000f, 0.500000000f); r0.z = ((texture(resourceSamplerPair_0_ps, r0.xy)).yzxw).z; r0.w = -r0.z + float(1.00000000f); r1.x = -idx_uniforms0_ps.cb0[1].y + idx_uniforms0_ps.cb0[1].x; r1.y = r0.w + -idx_uniforms0_ps.cb0[1].y; r1.x = (r1.x != 0.0) ? float(1.00000000f)/r1.x : uintBitsToFloat(uint(0x70000000)) * sign(float(1.00000000f)); r1.x = saturate(r1.x * r1.y); r1.y = fma(r1.x, float(-2.00000000f), float(3.00000000f)); r1.x = r1.x * r1.x; r1.x = r1.x * r1.y; r1.y = -idx_uniforms0_ps.cb0[0].w + idx_uniforms0_ps.cb0[0].z; r0.w = r0.w + -idx_uniforms0_ps.cb0[0].w; r1.y = (r1.y != 0.0) ? float(1.00000000f)/r1.y : uintBitsToFloat(uint(0x70000000)) * sign(float(1.00000000f)); r0.w = saturate(r0.w * r1.y); r1.y = fma(r0.w, float(-2.00000000f), float(3.00000000f)); r0.w = r0.w * r0.w; r1.z = r0.w * r1.y; r2.xy = ((texture(resourceSamplerPair_2_ps, r0.xy))).xy; r2.xy = fma(r2.xy, vec2(2.00000000f, 2.00000000f), vec2(-1.00000000f, -1.00000000f)); r2.xy = r2.xy * idx_uniforms0_ps.cb0[5].yy; r1.w = dot(r2.xy, r2.xy); r1.w = -r1.w + float(1.00000000f); r1.w = max(r1.w, float(0.00000000f)); r1.w = sqrt(r1.w); r2.yzw = r2.yyy * -v5.v.xyz; r2.xyz = fma(v4.v.xyz, r2.xxx, r2.yzw); r2.xyz = fma(v3.v.xyz, r1.www, r2.xyz); r1.w = dot(r2.xyz, r2.xyz); r1.w = inversesqrt(r1.w); r2.xyz = r1.www * r2.xyz; r3.xyz = ((texture(resourceSamplerPair_3_ps, r0.xy))).xyz; r3.yzw = r3.xyz * v6.v.xyz; r3.yzw = r3.yzw * idx_uniforms0_ps.cb0[2].xyz; o1.xyz = r3.yzw + r3.yzw; o2.xyz = r0.zzz * idx_uniforms0_ps.cb0[2].www; r0.x = -idx_uniforms0_ps.cb0[3].x + idx_uniforms0_ps.cb0[4].x; o3.x = fma(r3.x, r0.x, idx_uniforms0_ps.cb0[3].x); o0.xyz = fma(r2.xyz, vec3(0.500000000f, 0.500000000f, 0.500000000f), vec3(0.500000000f, 0.500000000f, 0.500000000f)); r0.x = fma(r1.y, r0.w, float(-0.0500000007f)); r0.y = intBitsToFloat(float(0.00000000f) >= idx_uniforms1_ps.cb1[7].y ? int(0xffffffff) : int(0x00000000)); r0.z = uintBitsToFloat(floatBitsToUint(r0.y) & uint(0x3f800000)); r2.xyz = v1.v.yyy * idx_uniforms2_ps.cb2[5].xyw; r2.xyz = fma(v1.v.xxx, idx_uniforms2_ps.cb2[4].xyw, r2.xyz); r2.xyz = fma(v1.v.zzz, idx_uniforms2_ps.cb2[6].xyw, r2.xyz); r2.xyz = fma(v1.v.www, idx_uniforms2_ps.cb2[7].xyw, r2.xyz); r1.yw = mix(r2.xy/r2.zz, vec2(uintBitsToFloat(uint(0x70000000))) * sign(r2.xy), equal(r2.zz, vec2(0.0))); r1.yw = r1.yw * idx_uniforms2_ps.cb2[23].zw; r1.yw = r1.yw * vec2(0.250000000f, 0.250000000f); r0.w = ((textureLod(resourceSamplerPair_4_ps, r1.yw, float(0.00000000f))).yzwx).w; r0.w = intBitsToFloat(abs(idx_uniforms1_ps.cb1[7].y) >= r0.w ? int(0xffffffff) : int(0x00000000)); r0.y = uintBitsToFloat(movc(floatBitsToUint(r0.y), uint(0x00000000), uint(0x3f800000))); r0.y = uintBitsToFloat(movc(floatBitsToUint(r0.w), floatBitsToUint(r0.y), floatBitsToUint(r0.z))); r0.x = r0.x + r0.y; r0.x = r0.x + float(-0.999000013f); r0.x = intBitsToFloat(r0.x < float(0.00000000f) ? int(0xffffffff) : int(0x00000000)); discarded = discarded || floatBitsToUint(r0.x) != uint(0); o0.w = r1.z; o1.w = r1.x; o2.w = r1.x; o3.yz = uintBitsToFloat(uvec2(0x3f800000, 0x00000000)); o3.w = r1.x; PixelEpilog(); return; } [test] link success