//++++++++++++++++++++++++++++++++++++
// QuantV 3.0.0 shader
// Original code by Rockstar Games
//++++++++++++++++++++++++++++++++++++
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB2[14], immediateIndexed
dcl_constantbuffer CB3[50], immediateIndexed
dcl_constantbuffer CB5[4], immediateIndexed
dcl_constantbuffer CB12[5], immediateIndexed
dcl_constantbuffer CB11[5], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s3, mode_default
dcl_sampler s4, mode_default
dcl_sampler s5, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t3
dcl_resource_texture2d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t5
dcl_input_ps linear v1.xy
dcl_input_ps linear v2.xyz
dcl_input_ps linear v3.xyzw
dcl_input_ps linear v5.xyz
dcl_input_ps linear v6.xyz
dcl_input_ps_sgv v7.x, is_front_face
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_temps 3
mul r0.x, cb5[3].z, cb11[2].z
ld_indexable(texture2d)(float,float,float,float) r0.y, l(0, 0, 0, 0), t3.xwyz
lt r0.z, l(0.490000), r0.y
lt r0.y, r0.y, l(0.510000)
and r0.y, r0.y, r0.z
add r0.zw, l(0.000000, 0.000000, 1.000000, 2.000000), -cb11[2].zzzz
mul r1.xy, r0.wwww, v1.xyxx
sample_indexable(texture2d)(float,float,float,float) r1.xyz, r1.xyxx, t3.xyzw, s3
movc r0.y, r0.y, r1.y, r1.z
add r0.w, -r1.x, r0.y
mad r1.x, r0.x, r0.w, r1.x
mul r1.y, r0.z, v3.z
mul r0.xw, r1.xxxy, cb11[2].xxxx
mad r1.x, v3.z, r0.z, l(-1.000000)
mad r0.z, r0.z, r1.x, l(1.000000)
mul r0.x, r0.z, r0.x
mul r1.xyz, cb11[2].yyyy, cb11[3].xyzx
sample_indexable(texture2d)(float,float,float,float) r2.xyzw, v1.xyxx, t0.xyzw, s0
mul r2.xyz, r2.xyzx, cb11[0].xyzx
mul r2.xyzw, r2.xyzw, v3.xxxw
mad r1.xyz, r1.xyzx, l(1.075583, 0.994183, 0.930234, 0.000000), -r2.xyzx
mad r1.xyz, r0.xxxx, r1.xyzx, r2.xyzx
mul r2.w, r2.w, cb2[12].x
add r0.xyz, r0.yyyy, -r1.xyzx
mad r2.xyz, r0.wwww, r0.xyzx, r1.xyzx
movc o0.xyzw, cb12[4].xxxx, v3.xyzw, r2.xyzw
max r0.x, l(0.001000), cb11[4].w
sample_indexable(texture2d)(float,float,float,float) r0.yz, v1.xyxx, t4.zxyw, s4
mad r0.yz, r0.yyzy, l(0.000000, 2.000000, 2.000000, 0.000000), l(0.000000, -1.000000, -1.000000, 0.000000)
mul r0.xw, r0.xxxx, r0.yyyz
dp2 r0.y, r0.yzyy, r0.yzyy
add r0.y, -r0.y, l(1.000000)
sqrt r0.y, |r0.y|
mul r1.xyz, r0.wwww, v6.xyzx
mad r0.xzw, r0.xxxx, v5.xxyz, r1.xxyz
movc r1.x, v7.x, l(-1.000000), l(1.000000)
mul r1.xyz, r1.xxxx, v2.xyzx
mad r0.xyz, r0.yyyy, r1.xyzx, r0.xzwx
dp3 r0.w, r0.xyzx, r0.xyzx
rsq r0.w, r0.w
mul r0.xyz, r0.wwww, r0.xyzx
mad o1.xyz, r0.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
mov o1.w, l(0)
sample_indexable(texture2d)(float,float,float,float) r0.x, v1.xyxx, t5.wxyz, s5
mul r0.x, r0.x, l(0.019531)
sqrt o2.y, r0.x
mov o2.xw, l(0,0,0,1.000000)
mov o2.z, cb11[3].w
mul r0.x, v3.x, cb2[12].y
add_sat r0.y, cb2[13].z, cb3[49].w
mul r0.y, r0.y, r0.x
mad r0.x, cb2[12].z, v3.x, cb3[45].w
mul r0.xy, r0.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
sqrt o3.xy, r0.xyxx
mov o3.zw, l(0,0,0,0)
ret