//water reflections
// ---- Created with 3Dmigoto v0.6.164 on Tue Mar 17 08:40:38 2026
Texture2D<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[1];
}

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




// 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,
  float4 v5 : TEXCOORD4,
  float3 v6 : TEXCOORD5,
  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);  

  r0.xyzw = t1.Sample(s0_s, v1.xy).xyzw;
  r0.x = cb0[7].x * r0.x;
  r0.yzw = cb0[6].xyz + -cb0[5].xyz;
  r0.xyz = r0.xxx * r0.yzw + cb0[5].xyz;
  r0.xyz = cb0[4].xxx * r0.xyz;
  o0.xyz = r0.xyz;
  o0.w = 1;
  o1.xyzw = float4(0,0,0,0);
  o2.xyz = v2.xyz * float3(0.5,0.5,0.5) + float3(0.5,0.5,0.5);
  o2.w = 1;
  r1.xy = cb1[0].xx * cb0[4].ww + v1.zw;
  r1.xyzw = t0.Sample(s1_s, r1.xy).xyzw;
  r1.x = r1.x * r1.w;
  r1.xy = r1.xy * float2(2,2) + float2(-1,-1);
  r1.xy = r1.xy * cb0[4].zz + v4.xy;
  r1.xy = r1.xy / v4.ww;
  
r1.x += s.x * (1 - s.y / v4.w) * 0.5;  
  
  r1.xyzw = t2.Sample(s2_s, r1.xy).xyzw;
  r2.xyz = cb0[9].xyz + -cb0[8].xyz;
  r2.xyz = cb0[10].yyy * r2.xyz + cb0[8].xyz;
  r1.xyz = r1.xyz * cb0[4].yyy + -r2.xyz;
  r1.xyz = cb0[10].xxx * r1.xyz + r2.xyz;
  o3.xyz = r0.xyz * v6.xyz + r1.xyz;
  o3.w = 1;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v0.6.164 on Tue Mar 17 08:40:38 2026
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float
// TEXCOORD                 0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 1   xyz         2     NONE   float   xyz
// TEXCOORD                 2   xyz         3     NONE   float
// TEXCOORD                 3   xyzw        4     NONE   float   xy w
// TEXCOORD                 4   xyzw        5     NONE   float
// TEXCOORD                 5   xyz         6     NONE   float   xyz
//
//
// 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_4_0
dcl_constantbuffer CB0[11], immediateIndexed
dcl_constantbuffer CB1[1], 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_texture2d (float,float,float,float) t2
dcl_input_ps linear v1.xyzw
dcl_input_ps linear v2.xyz
dcl_input_ps linear v4.xyw
dcl_input_ps linear v6.xyz
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_temps 3
sample r0.xyzw, v1.xyxx, t1.xyzw, s0
mul r0.x, r0.x, cb0[7].x
add r0.yzw, -cb0[5].xxyz, cb0[6].xxyz
mad r0.xyz, r0.xxxx, r0.yzwy, cb0[5].xyzx
mul r0.xyz, r0.xyzx, cb0[4].xxxx
mov o0.xyz, r0.xyzx
mov o0.w, l(1.000000)
mov o1.xyzw, l(0,0,0,0)
mad o2.xyz, v2.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
mov o2.w, l(1.000000)
mad r1.xy, cb1[0].xxxx, cb0[4].wwww, v1.zwzz
sample r1.xyzw, r1.xyxx, t0.xyzw, s1
mul r1.x, r1.w, r1.x
mad r1.xy, r1.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mad r1.xy, r1.xyxx, cb0[4].zzzz, v4.xyxx
div r1.xy, r1.xyxx, v4.wwww
sample r1.xyzw, r1.xyxx, t2.xyzw, s2
add r2.xyz, -cb0[8].xyzx, cb0[9].xyzx
mad r2.xyz, cb0[10].yyyy, r2.xyzx, cb0[8].xyzx
mad r1.xyz, r1.xyzx, cb0[4].yyyy, -r2.xyzx
mad r1.xyz, cb0[10].xxxx, r1.xyzx, r2.xyzx
mad o3.xyz, r0.xyzx, v6.xyzx, r1.xyzx
mov o3.w, l(1.000000)
ret
// Approximately 0 instruction slots used

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