//wind sand
// ---- Created with 3Dmigoto v0.6.164 on Mon Aug  5 06:36:05 2024
Texture3D<float4> t3 : register(t3);

Texture3D<float4> t2 : register(t2);

Texture2D<float4> t1 : register(t1);

Texture2D<float4> t0 : register(t0);

SamplerState s3_s : register(s3);

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[8];
}




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


void main(
  float4 v0 : SV_POSITION0,
  float4 v1 : COLOR0,
  float4 v2 : TEXCOORD0,
  float4 v3 : TEXCOORD2,
  float3 v4 : TEXCOORD3,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r2;
  uint4 bitmask, uiDest;
  float4 fDest;
  
float4 s = StereoParams.Load(0);
float4 texFilter = IniParams.Load(int2(14,0));
float4 testeo = IniParams.Load(int2(90,0));
float cursor_showing  = IniParams[1].z;
float4 diagx = IniParams.Load(int2(20,0));  


  r0.xy = v3.xy / v3.ww;
  r0.xyzw = t0.Sample(s3_s, r0.xy).xyzw;
  r0.x = cb1[7].z * r0.x + cb1[7].w;
  r0.x = 1 / r0.x;
  r0.x = -v3.z + r0.x;
  r0.x = saturate(cb0[7].x * r0.x);
  r0.w = v1.w * r0.x;
  r0.xyz = v1.xyz;
  r0.xyzw = r0.xyzw + r0.xyzw;
  r0.xyzw = cb0[5].xyzw * r0.xyzw;
  r1.xyzw = t1.Sample(s2_s, v2.xy).xyzw;
  r0.xyzw = r1.xyzw * r0.xyzw;
  r1.x = -cb0[2].x + v3.z;
  r1.x = saturate(cb0[2].w * r1.x);
  r1.x = log2(r1.x);
  r1.x = 0.25 * r1.x;
  r1.z = exp2(r1.x);
  r1.xy = v0.xy / cb1[6].xy;
  
r1.x -= s.x  * 0.5;
  
  r2.xyzw = t2.Sample(s1_s, r1.xyz).xyzw;
  r1.xyzw = t3.Sample(s0_s, r1.xyz).xyzw;
  r1.xyz = r2.xyz * r0.xyz;
  r1.xyz = cb0[7].yyy * r1.xyz;
  r2.x = 1 + -cb0[7].y;
  r0.xyz = r0.xyz * r2.xxx + r1.xyz;
  o0.w = saturate(r0.w);
  o0.xyz = r1.www * r0.xyz;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v0.6.164 on Mon Aug  5 06:36:05 2024
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xy
// COLOR                    0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 0   xy          2     NONE   float   xy
// TEXCOORD                 2   xyzw        3     NONE   float   xyzw
// TEXCOORD                 3   xyz         4     NONE   float
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_4_0
dcl_constantbuffer CB0[8], immediateIndexed
dcl_constantbuffer CB1[8], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, 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_texture3d (float,float,float,float) t3
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_input_ps linear v1.xyzw
dcl_input_ps linear v2.xy
dcl_input_ps linear v3.xyzw
dcl_output o0.xyzw
dcl_temps 3
div r0.xy, v3.xyxx, v3.wwww
sample r0.xyzw, r0.xyxx, t0.xyzw, s3
mad r0.x, cb1[7].z, r0.x, cb1[7].w
div r0.x, l(1.000000, 1.000000, 1.000000, 1.000000), r0.x
add r0.x, r0.x, -v3.z
mul_sat r0.x, r0.x, cb0[7].x
mul r0.w, r0.x, v1.w
mov r0.xyz, v1.xyzx
add r0.xyzw, r0.xyzw, r0.xyzw
mul r0.xyzw, r0.xyzw, cb0[5].xyzw
sample r1.xyzw, v2.xyxx, t1.xyzw, s2
mul r0.xyzw, r0.xyzw, r1.xyzw
add r1.x, v3.z, -cb0[2].x
mul_sat r1.x, r1.x, cb0[2].w
log r1.x, r1.x
mul r1.x, r1.x, l(0.250000)
exp r1.z, r1.x
div r1.xy, v0.xyxx, cb1[6].xyxx
sample r2.xyzw, r1.xyzx, t2.xyzw, s1
sample r1.xyzw, r1.xyzx, t3.xyzw, s0
mul r1.xyz, r0.xyzx, r2.xyzx
mul r1.xyz, r1.xyzx, cb0[7].yyyy
add r2.x, -cb0[7].y, l(1.000000)
mad r0.xyz, r0.xyzx, r2.xxxx, r1.xyzx
mov_sat o0.w, r0.w
mul o0.xyz, r0.xyzx, r1.wwww
ret
// Approximately 0 instruction slots used

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