//P5S cel shading PS 3.
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//   using 3Dmigoto v1.3.16 on Mon Mar 14 00:03:25 2022
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
//   float4 ambLit;                     // Index:    0.xyzw           Components:     4
//   int hFogType[3];                   // Index:    1-3.x            Components:     9
//   float4 cHFog[3];                   // Index:    4 5 6            Components:    12
//   float4 hFogParam[3];               // Index:    7 8 9            Components:    12
//   float hFogFlucPrms[60];            // Index:   10-69.x           Components:   237
//   float vATest;                      // Index:   69.y              Components:     1
//   int nMMLocalTCI[2];                // Index:   70-71.x           Components:     5
//   float4 vMMPrms[6];                 // Index:   72-77             Components:    24
//   float4 vMMBld;                     // Index:   78.xyzw           Components:     4
//      = 0x00000000 0x00000000 0x00000000 0x00000000
//   float fOLLtEfFade;                 // Index:   79.x              Components:     1
//      = 0x00000000
//   float3 vOLAmbEfScaler;             // Index:   79.yzw            Components:     3
//      = 0x3f800000 0x3f800000 0x3f800000
//   float3 vOLColorScaler;             // Index:   80.xyz            Components:     3
//      = 0x3f800000 0x3f800000 0x3f800000
//   float fOLCSatFade;                 // Index:   80.w              Components:     1
//      = 0x00000000
//   float fOLPtnFade;                  // Index:   81.x              Components:     1
//      = 0x00000000
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// __smpsLit                         sampler      NA          NA    3        1
// __smpsMMArray2                    sampler      NA          NA    4        1
// __smpsMMArray                     sampler      NA          NA    5        1
// __smpsOutlineColor                sampler      NA          NA    6        1
// sLit                              texture  float4          2d    3        1
// sMMArray2                         texture  float4     2darray    4        1
// sMMArray                          texture  float4     2darray    5        1
// sOutlineColor                     texture  float4          2d    6        1
// sOutlineAutoHDRScaleExposure      texture  float4          2d    8        1
// $Globals                          cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float
// TEXCOORD                 0   xyzw        1     NONE   float      w
// TEXCOORD                 1   xyzw        2     NONE   float   xyz
// TEXCOORD                 2   xyzw        3     NONE   float     zw
// TEXCOORD                 3   xyzw        4     NONE   float   xyzw
// TEXCOORD                 4   x           5     NONE     int   x
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[82], dynamicIndexed
dcl_sampler s3, mode_default
dcl_sampler s4, mode_default
dcl_sampler s5, mode_default
dcl_sampler s6, mode_default
dcl_resource_texture2d (float,float,float,float) t3
dcl_resource_texture2darray (float,float,float,float) t4
dcl_resource_texture2darray (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t6
dcl_resource_texture2d (float,float,float,float) t8
dcl_input_ps linear v1.w
dcl_input_ps linear v2.xyz
dcl_input_ps linear v3.zw
dcl_input_ps linear v4.xyzw
dcl_input_ps constant v5.x
dcl_output o0.xyzw
dcl_temps 24
dcl_resource_texture1d (float,float,float,float) t120
ld_indexable(texture1d)(float,float,float,float) r20.xyzw, l(6, 0, 0, 0), t120.xyzw

discard_nz r20.x

dcl_indexableTemp x0[2], 4
dcl_indexableTemp x1[2], 4
dcl_indexableTemp x2[2], 4
mov x2[0].xy, v4.zwzz
mov x2[1].xy, v3.wzww
mov r0.x, l(0)
loop
  ige r0.y, r0.x, l(2)
  breakc_nz r0.y
  mov r0.y, cb0[r0.x + 70].x
  mov r0.yz, x2[r0.y + 0].xxyx
  mov x1[r0.x + 0].xy, r0.yzyy
  mov x0[r0.x + 0].xy, r0.yzyy
  iadd r0.x, r0.x, l(1)
endloop
mov r0.xy, x1[0].xyxx
mov r0.zw, x1[1].xxxy
add r0.zw, r0.zzzw, cb0[75].xxxy
mul r1.xy, r0.zwzz, cb0[75].zwzz
add r0.xy, r0.xyxx, cb0[72].xyxx
mul r0.xy, r0.xyxx, cb0[72].zwzz
mov r2.xy, x0[0].xyxx
mov r3.xy, x0[1].xyxx
mov r1.zw, l(0,0,5.000000,1.000000)
sample_indexable(texture2darray)(float,float,float,float) r0.w, r1.xyzx, t4.xzwy, s4
mov r3.z, l(5.000000)
sample_indexable(texture2darray)(float,float,float,float) r1.z, r3.xyzx, t4.xyzw, s4
mul r1.z, r1.z, cb0[78].y
mul r2.w, r0.w, r1.z
mov r0.z, l(2.000000)
sample_indexable(texture2darray)(float,float,float,float) r0.x, r0.xyzx, t4.yxzw, s4
mov r2.z, l(2.000000)
sample_indexable(texture2darray)(float,float,float,float) r0.y, r2.xyzx, t4.xzyw, s4
ge r0.y, cb0[78].x, r0.y
itof r0.z, v5.x
add r0.z, r0.z, l(0.500000)
mul r2.x, r0.z, l(0.00390625000)
mov r2.y, l(0.500000)
sample_indexable(texture2d)(float,float,float,float) r2.xyz, r2.xyxx, t6.xyzw, s6
add r0.z, r0.w, l(-1.000000)
max r0.z, r0.z, l(0.000000)
mad r0.z, r2.w, r0.z, l(1.000000)
movc r0.x, r0.y, r0.x, r0.z
add r0.y, r0.x, -cb0[69].y
lt r0.y, r0.y, l(0.000000)
discard_nz r0.y
lt r0.y, l(0.000000), r1.z
sample_indexable(texture2darray)(float,float,float,float) r1.xyz, r1.xywx, t5.xyzw, s5
if_nz r0.y
  lt r0.yzw, r2.xxyz, l(0.000000, 0.500000, 0.500000, 0.500000)
  add r3.xyz, r2.xyzx, r2.xyzx
  mul r3.xyz, r1.xyzx, r3.xyzx
  add r4.xyz, -r2.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
  add r4.xyz, r4.xyzx, r4.xyzx
  add r5.xyz, -r1.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
  mad r4.xyz, -r4.xyzx, r5.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
  movc r0.yzw, r0.yyzw, r3.xxyz, r4.xxyz
  add r0.yzw, -r1.xxyz, r0.yyzw
  mad r0.yzw, cb0[77].xxxx, r0.yyzw, r1.xxyz
  add r0.yzw, -r2.xxyz, r0.yyzw
  mad r2.xyz, r2.wwww, r0.yzwy, r2.xyzx
endif
sample_indexable(texture2d)(float,float,float,float) r0.y, v4.xyxx, t3.yxzw, s3
mul r1.xyz, r2.xyzx, cb0[80].xyzx
mov_sat r0.z, cb0[79].x
mad r2.xyz, cb0[0].xyzx, cb0[79].yzwy, l(-1.000000, -1.000000, -1.000000, 0.000000)
mad r2.xyz, r0.zzzz, r2.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mul r1.xyz, r1.xyzx, r2.xyzx
mov_sat r0.z, cb0[81].x
add r0.y, r0.y, l(-1.000000)
mad r0.y, r0.z, r0.y, l(1.000000)
mul r0.yzw, r0.yyyy, r1.xxyz
max r1.x, r0.w, r0.z
max r1.x, r0.y, r1.x
add_sat r1.x, r1.x, l(-0.001960)
ge r1.xyz, r0.yzwy, r1.xxxx
and r1.xyz, r1.xyzx, l(0x3f800000, 0x3f800000, 0x3f800000, 0)
mov_sat r1.w, cb0[80].w
mad r1.xyz, r0.yzwy, r1.xyzx, -r0.yzwy
mad r0.yzw, r1.wwww, r1.xxyz, r0.yyzw
ld_indexable(texture2d)(float,float,float,float) r1.x, l(0, 0, 0, 0), t8.xyzw
div r1.x, l(1.000000, 1.000000, 1.000000, 1.000000), r1.x
min r1.x, r1.x, l(340282306073709650000000000000000000000.000000)
mul r1.yzw, r0.yyzw, r1.xxxx
mov r2.xy, l(0,0,0,0)
loop
  ige r2.z, r2.y, l(20)
  breakc_nz r2.z
  mad r2.z, v2.x, cb0[r2.y + 11].x, cb0[r2.y + 12].x
  mul r2.z, r2.z, l(6.283185)
  mad r2.w, v2.z, cb0[r2.y + 13].x, cb0[r2.y + 14].x
  mul r2.w, r2.w, l(6.283185)
  sincos null, r2.zw, r2.zzzw
  add r2.z, r2.w, r2.z
  mad r2.x, r2.z, cb0[r2.y + 10].x, r2.x
  iadd r2.y, r2.y, l(5)
endloop
add r2.x, r2.x, v2.y
mad_sat r2.x, r2.x, cb0[7].x, cb0[7].y
mul r2.y, r2.x, l(-1.442695)
exp r2.y, r2.y
add r2.y, -r2.y, l(1.000000)
ieq r2.zw, cb0[1].xxxx, l(0, 0, 1, 2)
mul r3.x, r2.x, r2.x
mul r3.x, r3.x, l(-1.442695)
exp r3.x, r3.x
add r3.x, -r3.x, l(1.000000)
and r2.w, r2.w, r3.x
movc r2.y, r2.z, r2.y, r2.w
movc r2.x, cb0[1].x, r2.y, r2.x
mov_sat r2.y, cb0[4].w
mul r2.x, r2.y, r2.x
mad_sat r2.y, v1.w, cb0[7].z, cb0[7].w
mul r2.x, r2.y, r2.x
mad r0.yzw, -r0.yyzw, r1.xxxx, cb0[4].xxyz
mad r0.yzw, r2.xxxx, r0.yyzw, r1.yyzw
mov r1.xy, l(0,0,0,0)
loop
  ige r1.z, r1.y, l(20)
  breakc_nz r1.z
  mad r1.z, v2.x, cb0[r1.y + 31].x, cb0[r1.y + 32].x
  mul r1.z, r1.z, l(6.283185)
  mad r1.w, v2.z, cb0[r1.y + 33].x, cb0[r1.y + 34].x
  mul r1.w, r1.w, l(6.283185)
  sincos null, r1.zw, r1.zzzw
  add r1.z, r1.w, r1.z
  mad r1.x, r1.z, cb0[r1.y + 30].x, r1.x
  iadd r1.y, r1.y, l(5)
endloop
add r1.x, r1.x, v2.y
mad_sat r1.x, r1.x, cb0[8].x, cb0[8].y
mul r1.y, r1.x, l(-1.442695)
exp r1.y, r1.y
add r1.y, -r1.y, l(1.000000)
ieq r1.zw, cb0[2].xxxx, l(0, 0, 1, 2)
mul r2.x, r1.x, r1.x
mul r2.x, r2.x, l(-1.442695)
exp r2.x, r2.x
add r2.x, -r2.x, l(1.000000)
and r1.w, r1.w, r2.x
movc r1.y, r1.z, r1.y, r1.w
movc r1.x, cb0[2].x, r1.y, r1.x
mov_sat r1.y, cb0[5].w
mul r1.x, r1.y, r1.x
mad_sat r1.y, v1.w, cb0[8].z, cb0[8].w
mul r1.x, r1.y, r1.x
add r1.yzw, -r0.yyzw, cb0[5].xxyz
mad r0.yzw, r1.xxxx, r1.yyzw, r0.yyzw
mov r1.xy, l(0,0,0,0)
loop
  ige r1.z, r1.y, l(20)
  breakc_nz r1.z
  mad r1.z, v2.x, cb0[r1.y + 51].x, cb0[r1.y + 52].x
  mul r1.z, r1.z, l(6.283185)
  mad r1.w, v2.z, cb0[r1.y + 53].x, cb0[r1.y + 54].x
  mul r1.w, r1.w, l(6.283185)
  sincos null, r1.zw, r1.zzzw
  add r1.z, r1.w, r1.z
  mad r1.x, r1.z, cb0[r1.y + 50].x, r1.x
  iadd r1.y, r1.y, l(5)
endloop
add r1.x, r1.x, v2.y
mad_sat r1.x, r1.x, cb0[9].x, cb0[9].y
mul r1.y, r1.x, l(-1.442695)
exp r1.y, r1.y
add r1.y, -r1.y, l(1.000000)
ieq r1.zw, cb0[3].xxxx, l(0, 0, 1, 2)
mul r2.x, r1.x, r1.x
mul r2.x, r2.x, l(-1.442695)
exp r2.x, r2.x
add r2.x, -r2.x, l(1.000000)
and r1.w, r1.w, r2.x
movc r1.y, r1.z, r1.y, r1.w
movc r1.x, cb0[3].x, r1.y, r1.x
mov_sat r1.y, cb0[6].w
mul r1.x, r1.y, r1.x
mad_sat r1.y, v1.w, cb0[9].z, cb0[9].w
mul r1.x, r1.y, r1.x
add r1.yzw, -r0.yyzw, cb0[6].xxyz
mad o0.xyz, r1.xxxx, r1.yzwy, r0.yzwy
mov o0.w, r0.x
ret
// Approximately 179 instruction slots used

///////////////////////////////// HLSL Code /////////////////////////////////
// // ---- Created with 3Dmigoto v1.3.16 on Mon Mar 14 00:03:25 2022
//
// cbuffer _Globals : register(b0)
// {
//   float4 ambLit : packoffset(c0);
//   int hFogType[3] : packoffset(c1);
//   float4 cHFog[3] : packoffset(c4);
//   float4 hFogParam[3] : packoffset(c7);
//   float hFogFlucPrms[60] : packoffset(c10);
//   float vATest : packoffset(c69.y);
//   int nMMLocalTCI[2] : packoffset(c70);
//   float4 vMMPrms[6] : packoffset(c72);
//   float4 vMMBld : packoffset(c78) = {0,0,0,0};
//   float fOLLtEfFade : packoffset(c79) = {0};
//   float3 vOLAmbEfScaler : packoffset(c79.y) = {1,1,1};
//   float3 vOLColorScaler : packoffset(c80) = {1,1,1};
//   float fOLCSatFade : packoffset(c80.w) = {0};
//   float fOLPtnFade : packoffset(c81) = {0};
// }
//
// SamplerState __smpsLit_s : register(s3);
// SamplerState __smpsMMArray2_s : register(s4);
// SamplerState __smpsMMArray_s : register(s5);
// SamplerState __smpsOutlineColor_s : register(s6);
// Texture2D<float4> sLit : register(t3);
// Texture2DArray<float4> sMMArray2 : register(t4);
// Texture2DArray<float4> sMMArray : register(t5);
// Texture2D<float4> sOutlineColor : register(t6);
// Texture2D<float4> sOutlineAutoHDRScaleExposure : register(t8);
//
//
// // 3Dmigoto declarations
// #define cmp -
// Texture1D<float4> IniParams : register(t120);
// Texture2D<float4> StereoParams : register(t125);
//
//
// void main(
//   float4 v0 : SV_Position0,
//   float4 v1 : TEXCOORD0,
//   float4 v2 : TEXCOORD1,
//   float4 v3 : TEXCOORD2,
//   float4 v4 : TEXCOORD3,
//   nointerpolation int v5 : TEXCOORD4,
//   out float4 o0 : SV_Target0)
// {
//   float4 r0,r1,r2,r3,r4,r5;
//   uint4 bitmask, uiDest;
//   float4 fDest;
//
//   float4 x0[2];
//   float4 x1[2];
//   float4 x2[2];
//   x2[0].xy = v4.zw;
//   x2[1].xy = v3.wz;
//   r0.x = 0;
//   while (true) {
//     r0.y = cmp((int)r0.x >= 2);
//     if (r0.y != 0) break;
//     r0.y = nMMLocalTCI[r0.x];
//     r0.yz = x2[r0.y+0].xy;
//     x1[r0.x+0].xy = r0.yz;
//     x0[r0.x+0].xy = r0.yz;
//     r0.x = (int)r0.x + 1;
//   }
//   r0.xy = x1[0].xy;
//   r0.zw = x1[1].xy;
//   r0.zw = vMMPrms[3].xy + r0.zw;
//   r1.xy = vMMPrms[3].zw * r0.zw;
//   r0.xy = vMMPrms[0].xy + r0.xy;
//   r0.xy = vMMPrms[0].zw * r0.xy;
//   r2.xy = x0[0].xy;
//   r3.xy = x0[1].xy;
//   r1.zw = float2(5,1);
//   r0.w = sMMArray2.Sample(__smpsMMArray2_s, r1.xyz).y;
//   r3.z = 5;
//   r1.z = sMMArray2.Sample(__smpsMMArray2_s, r3.xyz).z;
//   r1.z = vMMBld.y * r1.z;
//   r2.w = r1.z * r0.w;
//   r0.z = 2;
//   r0.x = sMMArray2.Sample(__smpsMMArray2_s, r0.xyz).y;
//   r2.z = 2;
//   r0.y = sMMArray2.Sample(__smpsMMArray2_s, r2.xyz).z;
//   r0.y = cmp(vMMBld.x >= r0.y);
//   r0.z = (int)v5.x;
//   r0.z = 0.5 + r0.z;
//   r2.x = 0.00390625 * r0.z;
//   r2.y = 0.5;
//   r2.xyz = sOutlineColor.Sample(__smpsOutlineColor_s, r2.xy).xyz;
//   r0.z = -1 + r0.w;
//   r0.z = max(0, r0.z);
//   r0.z = r2.w * r0.z + 1;
//   r0.x = r0.y ? r0.x : r0.z;
//   r0.y = -vATest + r0.x;
//   r0.y = cmp(r0.y < 0);
//   if (r0.y != 0) discard;
//   r0.y = cmp(0 < r1.z);
//   r1.xyz = sMMArray.Sample(__smpsMMArray_s, r1.xyw).xyz;
//   if (r0.y != 0) {
//     r0.yzw = cmp(r2.xyz < float3(0.5,0.5,0.5));
//     r3.xyz = r2.xyz + r2.xyz;
//     r3.xyz = r3.xyz * r1.xyz;
//     r4.xyz = float3(1,1,1) + -r2.xyz;
//     r4.xyz = r4.xyz + r4.xyz;
//     r5.xyz = float3(1,1,1) + -r1.xyz;
//     r4.xyz = -r4.xyz * r5.xyz + float3(1,1,1);
//     r0.yzw = r0.yzw ? r3.xyz : r4.xyz;
//     r0.yzw = r0.yzw + -r1.xyz;
//     r0.yzw = vMMPrms[5].xxx * r0.yzw + r1.xyz;
//     r0.yzw = r0.yzw + -r2.xyz;
//     r2.xyz = r2.www * r0.yzw + r2.xyz;
//   }
//   r0.y = sLit.Sample(__smpsLit_s, v4.xy).x;
//   r1.xyz = vOLColorScaler.xyz * r2.xyz;
//   r0.z = saturate(fOLLtEfFade);
//   r2.xyz = ambLit.xyz * vOLAmbEfScaler.xyz + float3(-1,-1,-1);
//   r2.xyz = r0.zzz * r2.xyz + float3(1,1,1);
//   r1.xyz = r2.xyz * r1.xyz;
//   r0.z = saturate(fOLPtnFade);
//   r0.y = -1 + r0.y;
//   r0.y = r0.z * r0.y + 1;
//   r0.yzw = r1.xyz * r0.yyy;
//   r1.x = max(r0.z, r0.w);
//   r1.x = max(r1.x, r0.y);
//   r1.x = saturate(-0.00196000002 + r1.x);
//   r1.xyz = cmp(r0.yzw >= r1.xxx);
//   r1.xyz = r1.xyz ? float3(1,1,1) : 0;
//   r1.w = saturate(fOLCSatFade);
//   r1.xyz = r0.yzw * r1.xyz + -r0.yzw;
//   r0.yzw = r1.www * r1.xyz + r0.yzw;
//   r1.x = sOutlineAutoHDRScaleExposure.Load(float4(0,0,0,0)).x;
//   r1.x = 1 / r1.x;
//   r1.x = min(3.40282306e+038, r1.x);
//   r1.yzw = r1.xxx * r0.yzw;
//   r2.xy = float2(0,0);
//   while (true) {
//     r2.z = cmp((int)r2.y >= 20);
//     if (r2.z != 0) break;
//     r2.z = v2.x * hFogFlucPrms[r2.y+11] + hFogFlucPrms[r2.y+12];
//     r2.z = 6.28318501 * r2.z;
//     r2.w = v2.z * hFogFlucPrms[r2.y+13] + hFogFlucPrms[r2.y+14];
//     r2.w = 6.28318501 * r2.w;
//     r2.zw = cos(r2.zw);
//     r2.z = r2.z + r2.w;
//     r2.x = r2.z * hFogFlucPrms[r2.y] + r2.x;
//     r2.y = (int)r2.y + 5;
//   }
//   r2.x = v2.y + r2.x;
//   r2.x = saturate(r2.x * hFogParam[0].x + hFogParam[0].y);
//   r2.y = -1.44269502 * r2.x;
//   r2.y = exp2(r2.y);
//   r2.y = 1 + -r2.y;
//   r2.zw = cmp(hFogType[0] == int2(1,2));
//   r3.x = r2.x * r2.x;
//   r3.x = -1.44269502 * r3.x;
//   r3.x = exp2(r3.x);
//   r3.x = 1 + -r3.x;
//   r2.w = r2.w ? r3.x : 0;
//   r2.y = r2.z ? r2.y : r2.w;
//   r2.x = hFogType[0] ? r2.y : r2.x;
//   r2.y = saturate(cHFog[0].w);
//   r2.x = r2.x * r2.y;
//   r2.y = saturate(v1.w * hFogParam[0].z + hFogParam[0].w);
//   r2.x = r2.x * r2.y;
//   r0.yzw = -r0.yzw * r1.xxx + cHFog[0].xyz;
//   r0.yzw = r2.xxx * r0.yzw + r1.yzw;
//   r1.xy = float2(0,0);
//   while (true) {
//     r1.z = cmp((int)r1.y >= 20);
//     if (r1.z != 0) break;
//     r1.z = v2.x * hFogFlucPrms[r1.y+31] + hFogFlucPrms[r1.y+32];
//     r1.z = 6.28318501 * r1.z;
//     r1.w = v2.z * hFogFlucPrms[r1.y+33] + hFogFlucPrms[r1.y+34];
//     r1.w = 6.28318501 * r1.w;
//     r1.zw = cos(r1.zw);
//     r1.z = r1.z + r1.w;
//     r1.x = r1.z * hFogFlucPrms[r1.y+30] + r1.x;
//     r1.y = (int)r1.y + 5;
//   }
//   r1.x = v2.y + r1.x;
//   r1.x = saturate(r1.x * hFogParam[1].x + hFogParam[1].y);
//   r1.y = -1.44269502 * r1.x;
//   r1.y = exp2(r1.y);
//   r1.y = 1 + -r1.y;
//   r1.zw = cmp(hFogType[1] == int2(1,2));
//   r2.x = r1.x * r1.x;
//   r2.x = -1.44269502 * r2.x;
//   r2.x = exp2(r2.x);
//   r2.x = 1 + -r2.x;
//   r1.w = r1.w ? r2.x : 0;
//   r1.y = r1.z ? r1.y : r1.w;
//   r1.x = hFogType[1] ? r1.y : r1.x;
//   r1.y = saturate(cHFog[1].w);
//   r1.x = r1.x * r1.y;
//   r1.y = saturate(v1.w * hFogParam[1].z + hFogParam[1].w);
//   r1.x = r1.x * r1.y;
//   r1.yzw = cHFog[1].xyz + -r0.yzw;
//   r0.yzw = r1.xxx * r1.yzw + r0.yzw;
//   r1.xy = float2(0,0);
//   while (true) {
//     r1.z = cmp((int)r1.y >= 20);
//     if (r1.z != 0) break;
//     r1.z = v2.x * hFogFlucPrms[r1.y+51] + hFogFlucPrms[r1.y+52];
//     r1.z = 6.28318501 * r1.z;
//     r1.w = v2.z * hFogFlucPrms[r1.y+53] + hFogFlucPrms[r1.y+54];
//     r1.w = 6.28318501 * r1.w;
//     r1.zw = cos(r1.zw);
//     r1.z = r1.z + r1.w;
//     r1.x = r1.z * hFogFlucPrms[r1.y+50] + r1.x;
//     r1.y = (int)r1.y + 5;
//   }
//   r1.x = v2.y + r1.x;
//   r1.x = saturate(r1.x * hFogParam[2].x + hFogParam[2].y);
//   r1.y = -1.44269502 * r1.x;
//   r1.y = exp2(r1.y);
//   r1.y = 1 + -r1.y;
//   r1.zw = cmp(hFogType[2] == int2(1,2));
//   r2.x = r1.x * r1.x;
//   r2.x = -1.44269502 * r2.x;
//   r2.x = exp2(r2.x);
//   r2.x = 1 + -r2.x;
//   r1.w = r1.w ? r2.x : 0;
//   r1.y = r1.z ? r1.y : r1.w;
//   r1.x = hFogType[2] ? r1.y : r1.x;
//   r1.y = saturate(cHFog[2].w);
//   r1.x = r1.x * r1.y;
//   r1.y = saturate(v1.w * hFogParam[2].z + hFogParam[2].w);
//   r1.x = r1.x * r1.y;
//   r1.yzw = cHFog[2].xyz + -r0.yzw;
//   o0.xyz = r1.xxx * r1.yzw + r0.yzw;
//   o0.w = r0.x;
//   return;
// }
//////////////////////////////// HLSL Errors ////////////////////////////////
// F:\SteamLibrary\steamapps\common\P5S\ShaderFixes\d204df868ae1ec1f-ps_replace.txt(131,10-59): warning X3206: 'Load': implicit truncation of vector type
// F:\SteamLibrary\steamapps\common\P5S\ShaderFixes\d204df868ae1ec1f-ps_replace.txt(209,19-39): error X3504: literal loop terminated early due to out of bounds array access
// F:\SteamLibrary\steamapps\common\P5S\ShaderFixes\d204df868ae1ec1f-ps_replace.txt(200,10-13): error X3696: infinite loop detected - loop never exits
/////////////////////////////////////////////////////////////////////////////
