//water waves
// ---- Created with 3Dmigoto v0.6.164 on Tue Apr 28 15:38:28 2026
Texture2D<float4> t1 : register(t1);

Texture2D<float4> t0 : register(t0);

SamplerState s1_s : register(s1);

SamplerState s0_s : register(s0);

cbuffer cb2 : register(b2)
{
  float4 cb2[6];
}

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

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




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


void main(
  float4 v0 : TEXCOORD0,
  float4 v1 : SV_Position0,
  out float4 o0 : SV_Target0,
  out float4 o1 : SV_Target1,
  out float4 o2 : SV_Target2,
  out float4 o3 : SV_Target3)
{
  float4 r0,r1,r2;
  uint4 bitmask, uiDest;
  float4 fDest;

float4 s = StereoParams.Load(0);
float4 testeo = IniParams.Load(int2(90,0));  



  r0.xy = v0.xy / v0.ww;
  r0.zw = r0.xy * cb1[41].xy + cb1[41].wz;
  r0.z = t1.SampleLevel(s1_s, r0.zw, 0).x;
  r0.z = r0.z * cb1[40].z + -cb1[40].w;
  r0.z = 1 / r0.z;
  
r0.x -= s.x * (1 - s.y / r0.z);  
  
  r0.xy = r0.xy * r0.zz;
  r1.xyzw = cb0[1].xyzw * r0.yyyy;
  r1.xyzw = r0.xxxx * cb0[0].xyzw + r1.xyzw;
  r0.xyzw = r0.zzzz * cb0[2].xyzw + r1.xyzw;
  r0.xyzw = cb0[3].xyzw + r0.xyzw;
  r0.xyz = r0.xyz / r0.www;
  r1.xyz = float3(1,1,1) + r0.xyz;
  r1.xyz = cmp(r1.xyz < float3(0,0,0));
  r0.w = (int)r1.y | (int)r1.x;
  r0.w = (int)r1.z | (int)r0.w;
  if (r0.w != 0) discard;
  r1.xyz = float3(1,1,1) + -r0.xyz;
  r0.xyz = r0.xyz * float3(0.5,0.5,0.5) + float3(0.5,0.5,0.5);
  r1.xyz = cmp(r1.xyz < float3(0,0,0));
  r0.w = (int)r1.y | (int)r1.x;
  r0.w = (int)r1.z | (int)r0.w;
  if (r0.w != 0) discard;
  r0.x = r0.x * 2 + -1;
  r1.xyzw = t0.Sample(s0_s, r0.zy).xyzw;
  r0.x = saturate(-abs(r0.x) * 4 + 4);
  r0.y = saturate(cb2[5].x * r1.w);
  o3.xyz = saturate(cb2[3].xyz * r1.xyz);
  r0.x = r0.y * r0.x;
  r0.x = cb0[28].x * r0.x;
  o0.w = r0.x;
  o0.xyz = max(float3(0,0,0), cb2[2].xyz);
  o1.w = r0.x;
  r1.xyz = cb1[50].www * float3(0,0,1) + cb1[50].xyz;
  r1.w = -r1.z;
  r2.x = dot(r1.wyx, cb0[8].xyz);
  r0.yzw = float3(-1,1,1) * r1.zyx;
  r2.y = dot(r0.yzw, cb0[9].xyz);
  r2.z = dot(r0.yzw, cb0[10].xyz);
  r0.y = dot(r2.xyz, r2.xyz);
  r0.y = rsqrt(r0.y);
  r0.yzw = r2.xyz * r0.yyy;
  o1.xyz = r0.yzw * float3(0.5,0.5,0.5) + float3(0.5,0.5,0.5);
  o2.w = r0.x;
  o3.w = r0.x;
  r0.x = cb1[51].y * 0.5 + cb1[51].x;
  o2.z = max(0.0399999991, r0.x);
  o2.xy = float2(0,0.5);
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v0.6.164 on Tue Apr 28 15:38:28 2026
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xyzw        0     NONE   float   xy w
// SV_Position              0   xyzw        1      POS   float
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
// SV_Target                1   xyzw        1   TARGET   float   xyzw
// SV_Target                2   xyzw        2   TARGET   float   xyzw
// SV_Target                3   xyzw        3   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB0[29], immediateIndexed
dcl_constantbuffer CB1[52], immediateIndexed
dcl_constantbuffer CB2[6], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_input_ps linear v0.xyw
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_temps 3
div r0.xy, v0.xyxx, v0.wwww
mad r0.zw, r0.xxxy, cb1[41].xxxy, cb1[41].wwwz
sample_l_indexable(texture2d)(float,float,float,float) r0.z, r0.zwzz, t1.yzxw, s1, l(0.000000)
mad r0.z, r0.z, cb1[40].z, -cb1[40].w
div r0.z, l(1.000000, 1.000000, 1.000000, 1.000000), r0.z
mul r0.xy, r0.zzzz, r0.xyxx
mul r1.xyzw, r0.yyyy, cb0[1].xyzw
mad r1.xyzw, r0.xxxx, cb0[0].xyzw, r1.xyzw
mad r0.xyzw, r0.zzzz, cb0[2].xyzw, r1.xyzw
add r0.xyzw, r0.xyzw, cb0[3].xyzw
div r0.xyz, r0.xyzx, r0.wwww
add r1.xyz, r0.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
lt r1.xyz, r1.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
or r0.w, r1.y, r1.x
or r0.w, r1.z, r0.w
discard_nz r0.w
add r1.xyz, -r0.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mad r0.xyz, r0.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
lt r1.xyz, r1.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
or r0.w, r1.y, r1.x
or r0.w, r1.z, r0.w
discard_nz r0.w
mad r0.x, r0.x, l(2.000000), l(-1.000000)
sample_indexable(texture2d)(float,float,float,float) r1.xyzw, r0.zyzz, t0.xyzw, s0
mad_sat r0.x, -|r0.x|, l(4.000000), l(4.000000)
mul_sat r0.y, r1.w, cb2[5].x
mul_sat o3.xyz, r1.xyzx, cb2[3].xyzx
mul r0.x, r0.x, r0.y
mul r0.x, r0.x, cb0[28].x
mov o0.w, r0.x
max o0.xyz, cb2[2].xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
mov o1.w, r0.x
mad r1.xyz, cb1[50].wwww, l(0.000000, 0.000000, 1.000000, 0.000000), cb1[50].xyzx
mov r1.w, -r1.z
dp3 r2.x, r1.wyxw, cb0[8].xyzx
mul r0.yzw, r1.zzyx, l(0.000000, -1.000000, 1.000000, 1.000000)
dp3 r2.y, r0.yzwy, cb0[9].xyzx
dp3 r2.z, r0.yzwy, cb0[10].xyzx
dp3 r0.y, r2.xyzx, r2.xyzx
rsq r0.y, r0.y
mul r0.yzw, r0.yyyy, r2.xxyz
mad o1.xyz, r0.yzwy, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
mov o2.w, r0.x
mov o3.w, r0.x
mad r0.x, cb1[51].y, l(0.500000), cb1[51].x
max o2.z, r0.x, l(0.040000)
mov o2.xy, l(0,0.500000,0,0)
ret
// Approximately 0 instruction slots used

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