// AUTOMATICALLY CONVERTED FROM SHADER FIXES 
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v0.6.164 on Mon Jul 20 01:18:07 2026
//
//
// Buffer Definitions:
//
// cbuffer cb2
// {
//
//   float4 cb2[22];                    // Offset:    0 Size:   352
//
// }
//
// cbuffer cb1
// {
//
//   float4 cb1[8];                     // Offset:    0 Size:   128
//
// }
//
// cbuffer cb0
// {
//
//   float4 cb0[12];                    // Offset:    0 Size:   192
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// s0_s                              sampler      NA          NA    0        1
// s2_s                              sampler      NA          NA    2        1
// s3_s                              sampler      NA          NA    3        1
// s4_s                              sampler      NA          NA    4        1
// t0                                texture  float4          2d    0        1
// t2                                texture  float4          2d    2        1
// t3                                texture  float4          2d    3        1
// t4                                texture  float4          2d    4        1
// cb0                               cbuffer      NA          NA    0        1
// cb1                               cbuffer      NA          NA    1        1
// cb2                               cbuffer      NA          NA    2        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float
// TEXCOORD                 0   xyzw        1     NONE   float   xy w
// TEXCOORD                 1   xyz         2     NONE   float   xyz
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_4_0
dcl_constantbuffer CB2[22], immediateIndexed
dcl_constantbuffer CB1[8], immediateIndexed
dcl_constantbuffer CB0[12], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, mode_default
dcl_sampler s4, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t3
dcl_resource_texture2d (float,float,float,float) t4
dcl_input_ps linear v1.xyw
dcl_input_ps linear v2.xyz
dcl_output o0.xyzw
dcl_temps 6
div r0.x, cb1[5].z, v2.z
mul r0.xyz, r0.xxxx, v2.xyzx
div r1.xy, v1.xyxx, v1.wwww
sample r2.xyzw, r1.xyxx, t0.xyzw, s0
mad r0.w, cb1[7].x, r2.x, cb1[7].y
div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w
mul r0.xyz, r0.wwww, r0.xyzx
mul r2.xyz, r0.yyyy, cb2[19].xyzx
mad r0.xyw, cb2[18].xyxz, r0.xxxx, r2.xyxz
mad r0.xyz, cb2[20].xyzx, r0.zzzz, r0.xywx
add r0.xyz, r0.xyzx, cb2[21].xyzx
add r0.xyz, r0.xyzx, -cb1[4].xyzx
dp3 r0.w, r0.xyzx, r0.xyzx
rsq r0.w, r0.w
mad r2.xyz, -r0.xyzx, r0.wwww, -cb0[3].xyzx
mul r0.xyz, r0.wwww, r0.xyzx
dp3 r0.w, r2.xyzx, r2.xyzx
max r0.w, r0.w, l(0.001000)
rsq r0.w, r0.w
mul r2.xyz, r0.wwww, r2.xyzx
sample r3.xyzw, r1.xyxx, t4.xyzw, s4
mad r3.xyz, r3.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
dp3 r0.w, r3.xyzx, r3.xyzx
rsq r0.w, r0.w
mul r3.xyz, r0.wwww, r3.xyzx
dp3_sat r0.w, r3.xyzx, r2.xyzx
dp3_sat r1.z, -cb0[3].xyzx, r2.xyzx
sample r2.xyzw, r1.xyxx, t3.xyzw, s3
sample r4.xyzw, r1.xyxx, t2.xyzw, s2
add r5.xyzw, -r2.wxyz, l(1.000000, 1.000000, 1.000000, 1.000000)
mul r1.x, r5.x, r5.x
max r1.x, r1.x, l(0.002000)
mul r1.y, r1.x, r1.x
mad r1.w, r0.w, r1.y, -r0.w
mad r0.w, r1.w, r0.w, l(1.000000)
mad r0.w, r0.w, r0.w, l(1.000000012E-07)
mul r1.y, r1.y, l(0.318309873)
div r0.w, r1.y, r0.w
dp3 r0.x, r3.xyzx, -r0.xyzx
dp3_sat r0.y, r3.xyzx, -cb0[3].xyzx
add r0.z, -r1.x, l(1.000000)
mad r1.y, |r0.x|, r0.z, r1.x
mad r0.z, r0.y, r0.z, r1.x
mul r0.z, r0.z, |r0.x|
add r0.x, -|r0.x|, l(1.000000)
mad r0.z, r0.y, r1.y, r0.z
add r0.z, r0.z, l(0.000010)
div r0.z, l(0.500000), r0.z
mul r0.z, r0.w, r0.z
mul r0.z, r0.z, l(3.14159274)
max r0.z, r0.z, l(0.000100)
sqrt r0.z, r0.z
mul r0.z, r0.y, r0.z
dp3 r0.w, r2.xyzx, r2.xyzx
ne r0.w, r0.w, l(0.000000)
and r0.w, r0.w, l(0x3f800000)
mul r0.z, r0.w, r0.z
add_sat r0.w, cb0[11].y, l(0.500000)
add r0.w, r0.w, l(-1.000000)
mad r0.w, cb0[11].x, r0.w, l(1.000000)
mul r1.xyw, r0.wwww, cb0[5].xyxz
mul r3.xyz, r0.zzzz, r1.xywx
add r0.z, -r1.z, l(1.000000)
mul r0.w, r0.z, r0.z
mul r0.w, r0.w, r0.w
mul r0.z, r0.z, r0.w
mad r2.xyz, r5.yzwy, r0.zzzz, r2.xyzx
mul r2.xyz, r2.xyzx, r3.xyzx
add r0.z, r1.z, r1.z
mul r0.z, r1.z, r0.z
mad r0.z, r0.z, r5.x, l(-0.500000)
mul r0.w, r0.x, r0.x
mul r0.w, r0.w, r0.w
mul r0.x, r0.x, r0.w
mad r0.x, r0.z, r0.x, l(1.000000)
add r0.w, -r0.y, l(1.000000)
mul r1.z, r0.w, r0.w
mul r1.z, r1.z, r1.z
mul r0.w, r0.w, r1.z
mad r0.z, r0.z, r0.w, l(1.000000)
mul r0.x, r0.x, r0.z
mul r0.x, r0.y, r0.x
mul r0.xyz, r0.xxxx, r1.xywx
mad o0.xyz, r4.xyzx, r0.xyzx, r2.xyzx
mov o0.w, l(1.000000)
ret
// Approximately 86 instruction slots used

///////////////////////////////// HLSL Code /////////////////////////////////
// // ---- Created with 3Dmigoto v0.6.164 on Mon Jul 20 01:18:07 2026
//
// cbuffer cb2 : register(b2)
// {
//   float4 cb2[22] : packoffset(c0);
// }
//
// cbuffer cb1 : register(b1)
// {
//   float4 cb1[8] : packoffset(c0);
// }
//
// cbuffer cb0 : register(b0)
// {
//   float4 cb0[12] : packoffset(c0);
// }
//
// SamplerState s0_s_s : register(s0);
// SamplerState s2_s_s : register(s2);
// SamplerState s3_s_s : register(s3);
// SamplerState s4_s_s : register(s4);
// Texture2D<float4> t0 : register(t0);
// Texture2D<float4> t2 : register(t2);
// Texture2D<float4> t3 : register(t3);
// Texture2D<float4> t4 : register(t4);
//
//
// // 3Dmigoto declarations
// #define cmp -
// Texture1D<float4> IniParams : register(t120);
// Buffer<float4> StereoParams : register(t125);
//
//
// void main(
//   float4 v0 : SV_POSITION0,
//   float4 v1 : TEXCOORD0,
//   float3 v2 : TEXCOORD1,
//   out float4 o0 : SV_Target0)
// {
//   float4 r0,r1,r2,r3,r4,r5;
//   uint4 bitmask, uiDest;
//   float4 fDest;
//
//   r0.x = cb1[5].z / v2.z;
//   r0.xyz = v2.xyz * r0.xxx;
//   r1.xy = v1.xy / v1.ww;
//   r2.xyzw = t0.Sample(s0_s_s, r1.xy).xyzw;
//   r0.w = cb1[7].x * r2.x + cb1[7].y;
//   r0.w = 1 / r0.w;
//   r0.xyz = r0.xyz * r0.www;
//   r2.xyz = cb2[19].xyz * r0.yyy;
//   r0.xyw = cb2[18].xyz * r0.xxx + r2.xyz;
//   r0.xyz = cb2[20].xyz * r0.zzz + r0.xyw;
//   r0.xyz = cb2[21].xyz + r0.xyz;
//   r0.xyz = -cb1[4].xyz + r0.xyz;
//   r0.w = dot(r0.xyz, r0.xyz);
//   r0.w = rsqrt(r0.w);
//   r2.xyz = -r0.xyz * r0.www + -cb0[3].xyz;
//   r0.xyz = r0.xyz * r0.www;
//   r0.w = dot(r2.xyz, r2.xyz);
//   r0.w = max(0.00100000005, r0.w);
//   r0.w = rsqrt(r0.w);
//   r2.xyz = r2.xyz * r0.www;
//   r3.xyzw = t4.Sample(s4_s_s, r1.xy).xyzw;
//   r3.xyz = r3.xyz * float3(2,2,2) + float3(-1,-1,-1);
//   r0.w = dot(r3.xyz, r3.xyz);
//   r0.w = rsqrt(r0.w);
//   r3.xyz = r3.xyz * r0.www;
//   r0.w = saturate(dot(r3.xyz, r2.xyz));
//   r1.z = saturate(dot(-cb0[3].xyz, r2.xyz));
//   r2.xyzw = t3.Sample(s3_s_s, r1.xy).xyzw;
//   r4.xyzw = t2.Sample(s2_s_s, r1.xy).xyzw;
//   r5.xyzw = float4(1,1,1,1) + -r2.wxyz;
//   r1.x = r5.x * r5.x;
//   r1.x = max(0.00200000009, r1.x);
//   r1.y = r1.x * r1.x;
//   r1.w = r0.w * r1.y + -r0.w;
//   r0.w = r1.w * r0.w + 1;
//   r0.w = r0.w * r0.w + 1.00000001e-07;
//   r1.y = 0.318309873 * r1.y;
//   r0.w = r1.y / r0.w;
//   r0.x = dot(r3.xyz, -r0.xyz);
//   r0.y = saturate(dot(r3.xyz, -cb0[3].xyz));
//   r0.z = 1 + -r1.x;
//   r1.y = abs(r0.x) * r0.z + r1.x;
//   r0.z = r0.y * r0.z + r1.x;
//   r0.z = abs(r0.x) * r0.z;
//   r0.x = 1 + -abs(r0.x);
//   r0.z = r0.y * r1.y + r0.z;
//   r0.z = 9.99999975e-06 + r0.z;
//   r0.z = 0.5 / r0.z;
//   r0.z = r0.z * r0.w;
//   r0.z = 3.14159274 * r0.z;
//   r0.z = max(9.99999975e-05, r0.z);
//   r0.z = sqrt(r0.z);
//   r0.z = r0.z * r0.y;
//   r0.w = dot(r2.xyz, r2.xyz);
//   r0.w = cmp(r0.w != 0.000000);
//   r0.w = r0.w ? 1.000000 : 0;
//   r0.z = r0.z * r0.w;
//   r0.w = saturate(0.5 + cb0[11].y);
//   r0.w = -1 + r0.w;
//   r0.w = cb0[11].x * r0.w + 1;
//   r1.xyw = cb0[5].xyz * r0.www;
//   r3.xyz = r1.xyw * r0.zzz;
//   r0.z = 1 + -r1.z;
//   r0.w = r0.z * r0.z;
//   r0.w = r0.w * r0.w;
//   r0.z = r0.w * r0.z;
//   r2.xyz = r5.yzw * r0.zzz + r2.xyz;
//   r2.xyz = r3.xyz * r2.xyz;
//   r0.z = r1.z + r1.z;
//   r0.z = r0.z * r1.z;
//   r0.z = r0.z * r5.x + -0.5;
//   r0.w = r0.x * r0.x;
//   r0.w = r0.w * r0.w;
//   r0.x = r0.w * r0.x;
//   r0.x = r0.z * r0.x + 1;
//   r0.w = 1 + -r0.y;
//   r1.z = r0.w * r0.w;
//   r1.z = r1.z * r1.z;
//   r0.w = r1.z * r0.w;
//   r0.z = r0.z * r0.w + 1;
//   r0.x = r0.z * r0.x;
//   r0.x = r0.x * r0.y;
//   r0.xyz = r1.xyw * r0.xxx;
//   o0.xyz = r4.xyz * r0.xyz + r2.xyz;
//   o0.w = 1;
//   return;
// }
/////////////////////////////////////////////////////////////////////////////
