#version 450 struct strct_50_0_9 { float _m0; float _m1; float _m2; float _m3; vec3 _m4; float _m5; float _m6; float _m7; float _m8; float _m9; }; struct strct_50_0 { vec4 _m0; float _m1; float _m2; float _m3; float _m4; uint _m5; uint _m6; uint _m7; float _m8; strct_50_0_9 _m9; }; struct strct_60_0 { mat4 _m0; mat4 _m1; mat4 _m2; mat4 _m3; mat4 _m4; mat4 _m5; mat4 _m6; mat4 _m7; mat4 _m8; mat4 _m9; vec3 _m10; float _m11; vec2 _m12; float _m13; float _m14; vec4 _m15; vec2 _m16; uint _m17; float _m18; }; vec2 _2216; layout(binding = 5, std140) uniform strct_50 { strct_50_0 _m0; } ubo_50; layout(binding = 6, std140) uniform strct_60 { strct_60_0 _m0; } ubo_60; layout(binding = 36) uniform sampler2D tex_360; layout(binding = 39) uniform sampler2D tex_390; layout(binding = 41) uniform sampler2D tex_410; layout(binding = 37) uniform sampler2D tex_370; layout(binding = 42) uniform sampler2D tex_420; layout(binding = 76) uniform sampler2D tex_760; layout(location = 0) in vec2 in_00; layout(location = 0) out vec4 out_00; void main() { float _112 = float(max(1, int(0.02999999932944774627685546875 * ubo_50._m0._m0.x))); vec4 _2247; do { vec4 _1255 = texture(tex_370, in_00); float _1258 = clamp(_1255.x, 0.039999999105930328369140625, 1.0); if (!(int(round(_1255.w * 255.0)) < 80)) { discard; } vec4 _1111 = ubo_60._m0._m4 * vec4((in_00 * 2.0) - vec2(1.0), 1.0, 1.0); vec4 _1345 = textureLod(tex_420, in_00, 0.0); float _1346 = _1345.x; vec3 _1130 = (_1111 / vec4(_1111.w)).xyz * ((((_1346 != 0.0) ? _1346 : 0.0) - ubo_60._m0._m13) / (ubo_60._m0._m14 - ubo_60._m0._m13)); vec3 _1132 = normalize(_1130); vec4 _1359 = texture(tex_360, in_00); vec2 _1364 = (_1359.xy * 4.0) - vec2(2.0); float _2276 = -dot(_1364, _1364); vec3 _1138 = normalize(reflect(_1132, normalize(vec3(_1364 * sqrt(fma(_2276, 0.25, 1.0)), fma(_2276, 0.5, 1.0))))); float _1141 = dot(_1138, _1132); if (_1141 < 0.0) { _2247 = vec4(0.0); break; } vec2 _1150 = in_00 * ubo_50._m0._m0.xy; float _2165; if (_112 > 1.0) { _2165 = float(int(_1150.x + _1150.y) & 1) * 0.5; } else { _2165 = 0.0; } float _1426 = _1130.z; float _1428 = _1138.z; float _1431 = ubo_60._m0._m14 * 0.5; float _1436 = -ubo_60._m0._m13; float _2166; if (fma(_1428, _1431, _1426) > _1436) { _2166 = (_1436 - _1426) / _1428; } else { _2166 = _1431; } vec3 _1458 = _1130 + (_1138 * _2166); vec4 _1466 = ubo_60._m0._m3 * vec4(_1130.xy, _1426, 1.0); vec4 _1474 = ubo_60._m0._m3 * vec4(_1458, 1.0); float _1477 = 1.0 / _1466.w; float _1480 = 1.0 / _1474.w; vec3 _1483 = _1130 * _1477; vec2 _1496 = (_1466.xy * _1477) * 0.5; vec2 _1498 = _1496 + vec2(0.5); vec2 _1502 = _1498 * ubo_50._m0._m0.xy; vec2 _1506 = ((_1474.xy * _1480) * 0.5) + vec2(0.5); vec2 _1766 = fma(_1498, ubo_50._m0._m0.xy, -(_1506 * ubo_50._m0._m0.xy)); vec2 _1521 = fma(vec2(-0.5) - _1496, ubo_50._m0._m0.xy, fma(_1506, ubo_50._m0._m0.xy, mix(vec2(0.0), vec2(0.00999999977648258209228515625), bvec2(dot(_1766, _1766) < 9.9999997473787516355514526367188e-05)))); bool _1528 = abs(_1521.x) < abs(_1521.y); vec2 _2167; vec2 _2170; if (_1528) { _2170 = _1502.yx; _2167 = _1521.yx; } else { _2170 = _1502; _2167 = _1521; } bool _2284 = _1528 ? true : false; float _1539 = sign(_2167.x); float _1543 = _1539 / _2167.x; float _1572 = fma(1.0 - min(1.0, abs(_1426 / ubo_60._m0._m14) * 0.00999999977648258209228515625), _112, 1.0); vec2 _1575 = vec2(_1539, _2167.y * _1543) * _1572; vec3 _1578 = (((_1458 * _1480) - _1483) * _1543) * _1572; float _1581 = ((_1480 - _1477) * _1543) * _1572; float _1606 = _1578.z; vec4 _1610 = vec4(_1575, _1606, _1581); vec4 _2174; vec2 _2211; _2174 = vec4(_2170 + (_1575 * _2165), (_1483 + (_1578 * _2165)).z, fma(_1581, _2165, _1477)); _2211 = _2216; vec4 _1623; float _1636; vec2 _1650; bool _1805; bool _2187; vec4 _2192; vec2 _2210; float _2171 = 0.0; float _2172 = 0.0; bool _2188 = false; for (;;) { if (_2171 < 8.0) { _1623 = _2174 + _1610; _1636 = fma(_1606, 0.5, _1623.z) / fma(_1581, 0.5, _1623.w); vec2 _2177; if (_2284) { _2177 = _1623.yx; } else { _2177 = _1623.xy; } _1650 = _2177 * ubo_50._m0._m0.zw; bool _1779 = _2172 > _1636; vec4 _1816 = textureLod(tex_420, _1650, 0.0); float _1817 = _1816.x; float _1821 = (_1817 != 0.0) ? _1817 : 0.0; float _1797 = (-_1821) - (50.0 + mix(0.0, 2.0, min(1.0, _1821 * (-0.00999999977648258209228515625)))); _1805 = (((_1779 ? _2172 : _1636) + 50.0) > _1797) && ((_1779 ? _1636 : _2172) < _1797); if (_1805) { _2210 = _1650; _2192 = _1623; _2187 = _1805; break; } _2174 = _1623; _2172 = _1636; _2171 += 1.0; _2211 = _1650; _2188 = _1805; continue; } else { _2210 = _2211; _2192 = _2174; _2187 = _2188; break; } } vec2 _2209; if ((true && (_1572 > 1.0)) && _2187) { vec4 _1672 = _2192 - _1610; vec4 _1676 = _1610 / vec4(_1572); float _1678 = _1572 * 0.5; float _1684 = _1672.z / _1672.w; vec4 _2206; vec2 _2218; _2218 = _2210; _2206 = _1672; vec4 _1696; float _1709; vec2 _1723; float _1725; float _2243; for (float _2195 = 0.0, _2228 = _1684, _2230 = _1678, _2237 = _1678; _2195 < 4.0; _2237 = _1725, _2230 = _2243, _2228 = _1709, _2218 = _1723, _2206 = _1696, _2195 += 1.0) { _1696 = _2206 + (_1676 * _2230); _1709 = fma(_1676.z, 0.5, _1696.z) / fma(_1676.w, 0.5, _1696.w); vec2 _2235; if (_2284) { _2235 = _1696.yx; } else { _2235 = _1696.xy; } _1723 = _2235 * ubo_50._m0._m0.zw; _1725 = _2237 * 0.5; bool _1831 = _2228 > _1709; vec4 _1868 = textureLod(tex_420, _1723, 0.0); float _1869 = _1868.x; float _1873 = (_1869 != 0.0) ? _1869 : 0.0; float _1849 = (-_1873) - (50.0 + mix(0.0, 2.0, min(1.0, _1873 * (-0.00999999977648258209228515625)))); if ((((_1831 ? _2228 : _1709) + 50.0) > _1849) && ((_1831 ? _1709 : _2228) < _1849)) { _2243 = _2237 * (-0.5); } else { _2243 = _1725; } } _2209 = _2218; } else { _2209 = _2210; } bool _1174 = _2209.x > 1.0; bool _1181; if (!_1174) { _1181 = _2209.x < 0.0; } else { _1181 = _1174; } bool _1188; if (!_1181) { _1188 = _2209.y > 1.0; } else { _1188 = _1181; } bool _1195; if (!_1188) { _1195 = _2209.y < 0.0; } else { _1195 = _1188; } vec4 _2227; if (_1195 ? false : _2187) { vec4 _1878 = texture(tex_390, _2209); vec3 _2223; do { vec4 _1963 = texture(tex_410, in_00); float _1964 = _1963.x; if (_1964 >= 1.0) { _2223 = vec3(0.0); break; } vec4 _1984 = ubo_60._m0._m4 * vec4((vec3(in_00, _1964) * 2.0) - vec3(1.0), 1.0); _2223 = (_1984 / vec4(_1984.w)).xyz; break; } while(false); vec3 _2224; do { vec4 _2003 = texture(tex_410, _2209); float _2004 = _2003.x; if (_2004 >= 1.0) { _2224 = vec3(0.0); break; } vec4 _2024 = ubo_60._m0._m4 * vec4((vec3(_2209, _2004) * 2.0) - vec3(1.0), 1.0); _2224 = (_2024 / vec4(_2024.w)).xyz; break; } while(false); vec2 _1907 = abs(_2209 - vec2(0.5)) * 2.0; float _2061 = clamp(((smoothstep(0.0, 1.0, (1.0 - clamp((_1907.x - 0.100000001490116119384765625) * 1.25, 0.0, 1.0)) * (1.0 - clamp((_1907.y - 0.100000001490116119384765625) * 1.25, 0.0, 1.0))) * (1.0 - clamp(distance(_2223, _2224) / _1431, 0.0, 1.0))) * clamp(mix(0.0, 1.0, clamp(_1141 * 4.0, 0.0, 1.0)), 0.0, 1.0)) * clamp(mix(0.0, 1.0, (0.60000002384185791015625 - _1258) * 2.0), 0.0, 1.0), 0.0, 1.0); vec4 _2281 = vec4(textureLod(tex_760, _2209 - (-_1878.xy), 0.0).xyz, _2061); _2281.w = _2061 * pow(1.0 - _1258, 5.0); _2227 = _2281; } else { _2227 = vec4(0.0); } _2247 = _2227; break; } while(false); out_00 = _2247; }