#version 150
#extension GL_ARB_cull_distance : enable
#extension GL_ARB_gpu_shader5 : enable
#extension GL_ARB_shader_atomic_counters : enable
#extension GL_ARB_shader_bit_encoding : enable
#extension GL_ARB_shader_image_load_store : enable
#extension GL_ARB_shader_image_size : enable
#extension GL_ARB_shader_storage_buffer_object : enable
#extension GL_ARB_shader_texture_image_samples : enable
#extension GL_ARB_shading_language_420pack : enable
#extension GL_ARB_shading_language_packing : enable
#extension GL_ARB_texture_cube_map_array : enable
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_texture_query_levels : enable
#extension GL_ARB_uniform_buffer_object : enable
#extension GL_ARB_viewport_array : enable
#extension GL_EXT_texture_array : enable
#extension GL_ARB_conservative_depth : enable
#extension GL_ARB_derivative_control : enable
#extension GL_ARB_explicit_attrib_location : enable
#extension GL_ARB_fragment_coord_conventions : enable
#extension GL_ARB_fragment_layer_viewport : enable
#extension GL_ARB_sample_shading : enable
#extension GL_ARB_shader_texture_lod : enable
layout(std140, binding = 0) uniform block_ps_cb0 { vec4 ps_cb0[10]; };
layout(std140, binding = 1) uniform block_ps_cb1 { vec4 ps_cb1[9]; };
layout(std140, binding = 2) uniform block_ps_cb2 { vec4 ps_cb2[3]; };
layout(std140, binding = 4) uniform block_ps_cb4 { vec4 ps_cb4[16]; };
layout(std140, binding = 12) uniform block_ps_cb12 { vec4 ps_cb12[68]; };
layout(std140, binding = 13) uniform block_ps_cb13 { vec4 ps_cb13[35]; };
layout(binding = 0)
uniform sampler2D ps_sampler0;
layout(binding = 1)
uniform sampler2D ps_sampler1;
layout(binding = 2)
uniform sampler2D ps_sampler2;
layout(binding = 3)
uniform sampler2D ps_sampler3;
vec4 R0;
vec4 R1;
vec4 R2;
vec4 R3;
vec4 R4;
vec4 tmp0;
vec4 tmp1;
in shader_in_out {
    vec4 reg0;
    vec4 reg1;
    vec4 reg2;
    vec4 reg3;
    vec4 reg4;
    vec4 reg5;
    vec4 reg6;
    vec4 reg7;
    vec4 reg8;
    vec4 reg9;
    vec4 reg10;
    vec4 reg11;
    vec4 reg12;
    vec4 reg13;
    vec4 reg14;
    vec4 reg15;
    vec4 reg16;
    vec4 reg17;
    vec4 reg18;
    vec4 reg19;
    vec4 reg20;
    vec4 reg21;
    vec4 reg22;
    vec4 reg23;
    vec4 reg24;
    vec4 reg25;
    vec4 reg26;
    vec4 reg27;
    vec4 reg28;
    vec4 reg29;
    vec4 reg30;
} shader_in;
vec4 ps_in[31];
vec4 vpos;
vec4 ps_out[8];
layout(location = 0) out vec4 color_out0;
void main()
{
vpos = gl_FragCoord;
ps_in[0].xyzw = shader_in.reg0.xyzw;
ps_in[1].xyzw = shader_in.reg1.xyzw;
ps_in[2].xyzw = shader_in.reg2.xyzw;
ps_in[3].xyzw = shader_in.reg3.xyzw;
ps_in[4].xyzw = shader_in.reg4.xyzw;
ps_in[5].xyzw = shader_in.reg5.xyzw;
ps_in[6].xyzw = shader_in.reg6.xyzw;
ps_in[7].xyzw = shader_in.reg7.xyzw;
ps_in[8].xyzw = vpos.xyzw;
R0.x = (dot(abs(ps_cb0[9].xyz), uintBitsToFloat(uvec4(0x3e991687u, 0x3f1645a2u, 0x3de978d5u, 0u)).xyz));
R1.x = (ps_in[5].w);
R1.y = (ps_in[6].w);
R1.z = (ps_in[7].w);
R0.yzw = (R1.xyz + -ps_in[5].xyz);
R0.y = (dot(ps_cb0[9].xyz, R0.yzw));
R0.x = (R0.y + R0.x);
R0.x = clamp(R0.x, 0.0, 1.0);
R0.y = (dot(-ps_cb0[9].xyz, -ps_cb0[9].xyz));
R0.y = (inversesqrt(abs(R0.y)));
R0.yzw = (R0.yyy * -ps_cb0[9].xyz);
R1.xyz = (-ps_in[7].xyz + ps_cb1[8].xyz);
R1.w = (dot(R1.xyz, R1.xyz));
R2.x = (inversesqrt(abs(R1.w)));
R1.xyz = (R1.xyz * R2.xxx);
R0.y = (dot(R0.yzw, R1.xyz));
R0.y = clamp(R0.y, 0.0, 1.0);
R0.z = (R0.y * R0.y);
R1.xy = (uintBitsToFloat(uvec4(0x3f800000u, 0x3f800000u, 0x3f800000u, 0x3f800000u)).xy / ps_cb4[3].xx);
R1.z = (uintBitsToFloat(uvec4(0x3f800000u, 0x3f800000u, 0x3f800000u, 0x3f800000u)).z / ps_cb4[4].x);
R0.w = (floor(ps_in[1].x));
R2.x = (R1.y * R0.w);
R0.w = (R1.x * ps_in[1].x);
R0.w = (floor(R0.w));
R2.y = (R1.z * R0.w);
R2.xy = ((ps_in[1].yz * R1.yz) + R2.xy);
R2.xyzw = (texture(ps_sampler0, R2.xy).xyzw);
R0.w = (ps_in[1].x + uintBitsToFloat(0x3f800000u));
R1.x = (floor(R0.w));
R3.x = (R1.y * R1.x);
R0.w = (R1.y * R0.w);
R0.w = (floor(R0.w));
R3.y = (R1.z * R0.w);
R1.xy = ((ps_in[1].yz * R1.yz) + R3.xy);
R3.xyzw = (texture(ps_sampler0, R1.xy).xyzw);
R0.w = (fract(ps_in[1].x));
R3.xyzw = (-R2.xyzw + R3.xyzw);
R2.xyzw = ((R0.wwww * R3.xyzw) + R2.xyzw);
R1.xyz = (-R2.xyz + R2.xxx);
R1.xyz = ((ps_cb4[5].xxx * R1.xyz) + R2.xyz);
R2.xy = (ps_cb0[0].xx * ps_cb4[7].xy);
R2.xy = ((ps_in[1].yz * ps_cb4[6].xy) + R2.xy);
R2.xyz = (texture(ps_sampler1, R2.xy).xyz);
R2.xyz = (log2(abs(R2.xyz)));
R2.xyz = (R2.xyz * uintBitsToFloat(uvec4(0x400ccccdu, 0x400ccccdu, 0x400ccccdu, 0u)).xyz);
R2.xyz = (exp2(R2.xyz));
R1.xyz = (log2(abs(R1.xyz)));
R1.xyz = (R1.xyz * uintBitsToFloat(uvec4(0x400ccccdu, 0x400ccccdu, 0x400ccccdu, 0u)).xyz);
R1.xyz = (exp2(R1.xyz));
R0.x = ((R0.y * R0.z) + -R0.x);
R0.x = (R0.x + uintBitsToFloat(0x3f800000u));
R0.x = (R0.x + -ps_cb4[2].x);
R0.x = ((ps_cb0[9].w * R0.x) + ps_cb4[2].x);
R0.y = (-ps_cb4[0].x + ps_cb4[1].x);
R0.x = ((R0.x * R0.y) + ps_cb4[0].x);
R0.yzw = ((R2.xyz * R1.xyz) + -R1.xyz);
R0.yzw = ((ps_cb4[8].xxx * R0.yzw) + R1.xyz);
R0.xyz = (R0.yzw * R0.xxx);
R1.xyz = (ps_in[3].xyz + uintBitsToFloat(uvec4(0xbf800000u, 0xbf800000u, 0xbf800000u, 0u)).xyz);
R1.xyz = ((ps_cb4[9].xxx * R1.xyz) + uintBitsToFloat(uvec4(0x3f800000u, 0x3f800000u, 0x3f800000u, 0u)).xyz);
R2.xyz = (R0.xyz * R1.xyz);
R0.w = (dot(R2.xyz, uintBitsToFloat(uvec4(0x3e991687u, 0x3f1645a2u, 0x3de978d5u, 0u)).xyz));
R0.xyz = ((-R0.xyz * R1.xyz) + R0.www);
R0.xyz = ((ps_cb4[10].xxx * R0.xyz) + R2.xyz);
R0.xyz = (R0.xyz * ps_in[4].xyz);
R1.xy = (ps_in[8].xy * ps_cb0[1].zw);
R0.w = uintBitsToFloat(ps_cb12[67].w >= uintBitsToFloat(0u) ? 0xffffffffu : 0u);
if (bool(floatBitsToUint(R0).w))
{
R2.xy = (texture(ps_sampler2, R1.xy).xy);
R3.xyz = (ps_in[7].xyz + -ps_cb12[0].xyz);
R0.w = (dot(R3.xyz, R3.xyz));
R0.w = (sqrt(R0.w));
R4.x = (ps_cb12[1].z);
R4.y = (ps_cb12[2].z);
R4.z = (ps_cb12[3].z);
R1.z = (dot(R4.xyz, R3.xyz));
R2.z = (uintBitsToFloat(uvec4(0x3f800000u, 0x3f800000u, 0x3f800000u, 0x3f800000u)).z / ps_cb12[21].y);
R2.z = (R0.w * R2.z);
R1.z = (R2.z / R1.z);
R1.z = (R0.w + -R1.z);
R1.z = (R1.z * ps_cb13[33].w);
R1.z = clamp(R1.z, 0.0, 1.0);
R1.z = (R1.z * ps_cb13[33].z);
R1.z = (max(R1.z, uintBitsToFloat(0x3a83126fu)));
R0.w = (R0.w / ps_cb13[34].z);
R2.z = uintBitsToFloat(R2.x < R2.y ? 0xffffffffu : 0u);
if (bool(floatBitsToUint(R2).z))
{
R2.z = uintBitsToFloat(R0.w < R2.x ? 0xffffffffu : 0u);
R3.x = uintBitsToFloat(R2.y < R0.w ? 0xffffffffu : 0u);
R3.y = ((ps_cb13[34].z * R2.x) + -ps_cb13[34].x);
R3.y = ((-R3.y * ps_cb13[34].y) + uintBitsToFloat(0x3f800000u));
R3.y = clamp(R3.y, 0.0, 1.0);
R3.z = (-R2.x + R0.w);
R3.z = (R3.z * ps_cb13[34].z);
R3.z = (R3.z / R1.z);
R3.z = clamp(R3.z, 0.0, 1.0);
R4.y = (R3.z * R3.y);
R2.z = uintBitsToFloat(floatBitsToUint(R2).z | floatBitsToUint(R3).x);
R4.x = (uintBitsToFloat(0x3f800000u));
R3.xy = (bool(floatBitsToUint(R2).z) ? uintBitsToFloat(uvec4(0u, 0x3f800000u, 0u, 0u)).xy : R4.xy);
} else {
R2.z = uintBitsToFloat(R2.y < R2.x ? 0xffffffffu : 0u);
R3.z = uintBitsToFloat(R0.w < R2.y ? 0xffffffffu : 0u);
R3.w = uintBitsToFloat(R2.x < R0.w ? 0xffffffffu : 0u);
R2.x = ((ps_cb13[34].z * R2.x) + -ps_cb13[34].x);
R4.y = ((-R2.x * ps_cb13[34].y) + uintBitsToFloat(0x3f800000u));
R4.y = clamp(R4.y, 0.0, 1.0);
R0.w = (-R2.y + R0.w);
R0.w = (R0.w * ps_cb13[34].z);
R0.w = (R0.w / R1.z);
R0.w = clamp(R0.w, 0.0, 1.0);
R4.w = (-R0.w + uintBitsToFloat(0x3f800000u));
R4.xz = (uintBitsToFloat(uvec4(0x3f800000u, 0u, 0x3f800000u, 0u)).xz);
R2.xy = (bool(floatBitsToUint(R3).w) ? R4.xy : R4.zw);
tmp0.xy = (bool(floatBitsToUint(R3).z) ? uintBitsToFloat(uvec4(0x3f800000u, 0x3f800000u, 0u, 0u)).xy : R2.xy);
R2.xy = (tmp0.xy);
R3.xy = (bool(floatBitsToUint(R2).z) ? R2.xy : uintBitsToFloat(uvec4(0u, 0x3f800000u, 0u, 0u)).xy);
}
R0.w = ((-R3.y * R3.x) + uintBitsToFloat(0x3f800000u));
} else {
R0.w = (uintBitsToFloat(0u));
}
R0.w = ((R0.w * R2.w) + -R2.w);
R0.w = ((ps_cb4[13].x * R0.w) + R2.w);
R0.w = (R0.w * ps_in[4].w);
R1.x = (textureLod(ps_sampler3, R1.xy, uintBitsToFloat(0u)).x);
R1.x = ((R1.x * ps_cb12[22].x) + ps_cb12[22].y);
R1.x = ((R1.x * ps_cb12[21].x) + ps_cb12[21].y);
R1.x = (max(R1.x, uintBitsToFloat(0x38d1b717u)));
R1.x = (uintBitsToFloat(uvec4(0x3f800000u, 0x3f800000u, 0x3f800000u, 0x3f800000u)).x / R1.x);
R1.x = (R1.x + -ps_in[1].w);
R1.x = (R1.x * ps_cb4[14].x);
R1.x = clamp(R1.x, 0.0, 1.0);
R0.w = (R0.w * R1.x);
R1.x = (sqrt(R1.w));
R1.x = (R1.x + -ps_cb4[11].x);
R1.y = (-ps_cb4[11].x + ps_cb4[12].x);
R1.x = (R1.x / R1.y);
R1.x = clamp(R1.x, 0.0, 1.0);
R0.w = (R0.w * R1.x);
R0.w = (R0.w * ps_cb4[15].x);
R0.w = clamp(R0.w, 0.0, 1.0);
R0.xyz = (R0.xyz * ps_cb2[2].xyz);
R0.w = (R0.w * ps_cb2[2].w);
R1.x = (dot(uintBitsToFloat(uvec4(0x3eaa7efau, 0x3f0e147bu, 0x3e6353f8u, 0u)).xyz, R0.xyz));
R1.xyz = ((R1.xxx * ps_in[0].xyz) + -R0.xyz);
R0.xyz = ((ps_in[0].www * R1.xyz) + R0.xyz);
R1.xyz = (-R0.xyz + ps_in[2].xyz);
R0.xyz = ((ps_in[2].www * R1.xyz) + R0.xyz);
ps_out[0].xyz = (R0.www * R0.xyz);
ps_out[0].w = (R0.w);
color_out0 = ps_out[0];
return;
}