//God Rays
// ---- Created with 3Dmigoto v0.6.164 on Tue Jul 14 23:56:13 2026
Texture2DArray<float4> t3 : register(t3);

Texture3D<float4> t2 : register(t2);

Texture2D<float4> t1 : register(t1);

Texture2D<float4> t0 : register(t0);

SamplerState s2_s : register(s2);

SamplerState s1_s : register(s1);

SamplerState s0_s : register(s0);

cbuffer cb1 : register(b1)
{
  float4 cb1[8];
}

cbuffer cb0 : register(b0)
{
  float4 cb0[9];
}




// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);


void main(
  float2 v0 : TEXCOORD0,
  float4 v1 : SV_POSITION0,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r2,r3,r10;
  uint4 bitmask, uiDest;
  float4 fDest;
  
float4 s = StereoParams.Load(0);
float4 testeo = IniParams.Load(int2(90,0));   




  r0.xy = cb1[6].xy * v0.xy;
  t3.GetDimensions(0, uiDest.x, uiDest.y, uiDest.z, uiDest.w);
  r1.xyz = uiDest.xyz;
  r0.zw = (uint2)r1.xy;
  r1.xy = r0.xy * r0.zw;
  r1.xy = cmp(r1.xy >= -r1.xy);
  r1.xy = r1.xy ? r0.zw : -r0.zw;
  r2.xy = float2(1,1) / r1.xy;
  r0.xy = r2.xy * r0.xy;
  r0.xy = frac(r0.xy);
  r0.xy = r1.xy * r0.xy;
  r2.xy = (uint2)r0.xy;
  r2.w = 0;
  r0.xy = asint(cb0[7].ww) + int2(3,4);
  r1.xz = (uint2)r0.xy % (uint2)r1.zz;
  r2.z = r1.x;
  r0.xy = t3.Load(r2.xyzw).xy;
  r0.xy = r0.xy * float2(2,2) + float2(-1,-1);
  r2.xy = cmp(float2(0,0) < r0.xy);
  r2.zw = cmp(r0.xy < float2(0,0));
  r0.xy = float2(1,1) + -abs(r0.xy);
  r0.xy = sqrt(r0.xy);
  r0.xy = float2(1,1) + -r0.xy;
  r2.xy = (int2)-r2.xy + (int2)r2.zw;
  r2.xy = (int2)r2.xy;
  r0.xy = r2.xy * r0.xy;
  r2.xy = r0.xy * float2(0.00392156886,0.00392156886) + v0.xy;
  r0.xy = cb1[6].xy * r2.xy;
  r3.xy = r0.xy * r0.zw;
  r3.xy = cmp(r3.xy >= -r3.xy);
  r0.zw = r3.xy ? r0.zw : -r0.zw;
  r3.xy = float2(1,1) / r0.zw;
  r0.xy = r3.xy * r0.xy;
  r0.xy = frac(r0.xy);
  r0.xy = r0.zw * r0.xy;
  r1.xy = (uint2)r0.xy;
  r1.w = 0;
  r0.xyzw = t3.Load(r1.xyzw).xyzw;
  r0.xyzw = r0.wxyz * float4(2,2,2,2) + float4(-1,-1,-1,-1);
  r1.xyzw = cmp(float4(0,0,0,0) < r0.xyzw);
  r3.xyzw = cmp(r0.xyzw < float4(0,0,0,0));
  r0.xyzw = float4(1,1,1,1) + -abs(r0.xyzw);
  r0.xyzw = sqrt(r0.xyzw);
  r0.xyzw = float4(1,1,1,1) + -r0.xyzw;
  r1.xyzw = (int4)-r1.xyzw + (int4)r3.xyzw;
  r1.xyzw = (int4)r1.xyzw;
  r0.xyzw = r1.xyzw * r0.xyzw;
  r1.x = t0.Sample(s2_s, v0.xy).x;
  r1.x = cb1[7].z * r1.x + cb1[7].w;
  r1.x = 1 / r1.x;
  r1.x = -cb0[8].x + r1.x;
  r1.y = cb0[8].y + -cb0[8].x;
  r2.z = r1.x / r1.y;
  
r2.x -= s.x * 0.5;  
  
  r1.xyzw = t2.SampleLevel(s0_s, r2.xyz, 0).xyzw;
  r0.xyzw = r0.xyzw * float4(0.00392156886,0.00392156886,0.00392156886,0.00392156886) + r1.wxyz;
  r1.xyzw = t1.Sample(s1_s, v0.xy).xyzw;
  o0.xyz = r1.xyz * r0.xxx + r0.yzw;
  o0.w = r1.w;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v0.6.164 on Tue Jul 14 23:56:13 2026
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xy          0     NONE   float   xy
// SV_POSITION              0   xyzw        1      POS   float
//
//
// 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[9], immediateIndexed
dcl_constantbuffer CB1[8], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture3d (float,float,float,float) t2
dcl_resource_texture2darray (float,float,float,float) t3
dcl_input_ps linear v0.xy
dcl_output o0.xyzw
dcl_temps 4
mul r0.xy, v0.xyxx, cb1[6].xyxx
resinfo_indexable(texture2darray)(float,float,float,float)_uint r1.xyz, l(0), t3.xyzw
utof r0.zw, r1.xxxy
mul r1.xy, r0.zwzz, r0.xyxx
ge r1.xy, r1.xyxx, -r1.xyxx
movc r1.xy, r1.xyxx, r0.zwzz, -r0.zwzz
div r2.xy, l(1.000000, 1.000000, 1.000000, 1.000000), r1.xyxx
mul r0.xy, r0.xyxx, r2.xyxx
frc r0.xy, r0.xyxx
mul r0.xy, r0.xyxx, r1.xyxx
ftou r2.xy, r0.xyxx
mov r2.w, l(0)
iadd r0.xy, cb0[7].wwww, l(3, 4, 0, 0)
udiv null, r1.xz, r0.xxyx, r1.zzzz
mov r2.z, r1.x
ld_indexable(texture2darray)(float,float,float,float) r0.xy, r2.xyzw, t3.xyzw
mad r0.xy, r0.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
lt r2.xy, l(0.000000, 0.000000, 0.000000, 0.000000), r0.xyxx
lt r2.zw, r0.xxxy, l(0.000000, 0.000000, 0.000000, 0.000000)
add r0.xy, -|r0.xyxx|, l(1.000000, 1.000000, 0.000000, 0.000000)
sqrt r0.xy, r0.xyxx
add r0.xy, -r0.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
iadd r2.xy, -r2.xyxx, r2.zwzz
itof r2.xy, r2.xyxx
mul r0.xy, r0.xyxx, r2.xyxx
mad r2.xy, r0.xyxx, l(0.00392156886, 0.00392156886, 0.000000, 0.000000), v0.xyxx
mul r0.xy, r2.xyxx, cb1[6].xyxx
mul r3.xy, r0.zwzz, r0.xyxx
ge r3.xy, r3.xyxx, -r3.xyxx
movc r0.zw, r3.xxxy, r0.zzzw, -r0.zzzw
div r3.xy, l(1.000000, 1.000000, 1.000000, 1.000000), r0.zwzz
mul r0.xy, r0.xyxx, r3.xyxx
frc r0.xy, r0.xyxx
mul r0.xy, r0.xyxx, r0.zwzz
ftou r1.xy, r0.xyxx
mov r1.w, l(0)
ld_indexable(texture2darray)(float,float,float,float) r0.xyzw, r1.xyzw, t3.xyzw
mad r0.xyzw, r0.wxyz, l(2.000000, 2.000000, 2.000000, 2.000000), l(-1.000000, -1.000000, -1.000000, -1.000000)
lt r1.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000), r0.xyzw
lt r3.xyzw, r0.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
add r0.xyzw, -|r0.xyzw|, l(1.000000, 1.000000, 1.000000, 1.000000)
sqrt r0.xyzw, r0.xyzw
add r0.xyzw, -r0.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
iadd r1.xyzw, -r1.xyzw, r3.xyzw
itof r1.xyzw, r1.xyzw
mul r0.xyzw, r0.xyzw, r1.xyzw
sample_indexable(texture2d)(float,float,float,float) r1.x, v0.xyxx, t0.xyzw, s2
mad r1.x, cb1[7].z, r1.x, cb1[7].w
div r1.x, l(1.000000, 1.000000, 1.000000, 1.000000), r1.x
add r1.x, r1.x, -cb0[8].x
add r1.y, -cb0[8].x, cb0[8].y
div r2.z, r1.x, r1.y
sample_l_indexable(texture3d)(float,float,float,float) r1.xyzw, r2.xyzx, t2.xyzw, s0, l(0.000000)
mad r0.xyzw, r0.xyzw, l(0.00392156886, 0.00392156886, 0.00392156886, 0.00392156886), r1.wxyz
sample_indexable(texture2d)(float,float,float,float) r1.xyzw, v0.xyxx, t1.xyzw, s1
mad o0.xyz, r1.xyzx, r0.xxxx, r0.yzwy
mov o0.w, r1.w
ret
// Approximately 0 instruction slots used

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
