//DBSZ decals. Destroyed Namek.
// ---- Created with geo-11 v0.6.198 on Sat Oct 12 19:24:24 2024
Texture2D<float4> t1 : register(t1);

struct t0_t {
  float val[4];
};
StructuredBuffer<t0_t> t0 : register(t0);

SamplerState s0_s : register(s0);

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

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




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


void main(
  float4 v0 : SV_Position0,
  nointerpolation uint v1 : PRIMITIVE_ID0,
  uint v2 : SV_IsFrontFace0,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r10,r20;
  uint4 bitmask, uiDest;
  float4 fDest;
  
  float4 stereo = StereoParams.Load(0);
  
  r20.xy = cb0[49].zw * v0.yy;
  r20.xy = v0.xx * cb0[48].zw + r20.xy;
  r20.xy = v0.zz * cb0[50].zw + r20.xy;
  r20.xy = cb0[51].zw + r20.xy;
  
  r10.xy = v0.xy;
  r10.x+=stereo.x*(stereo.y*r20.y-1)*cb0[129].x*0.5;
  
  r0.xy = cb0[49].zw * v0.yy;
  r0.xy = r10.xx * cb0[48].zw + r0.xy;
  r0.xy = v0.zz * cb0[50].zw + r0.xy;
  r0.xy = cb0[51].zw + r0.xy;
  r0.x = r0.x / r0.y;
  r0.x = -cb0[76].z + r0.x;
  r0.y = mad((int)v1.x, 42, 19);
  r0.y = t0[r0.y].val[8/4];
  r0.x = r0.y + -r0.x;
  r0.x = r0.x * cb1[16].x + -cb1[16].y;
  r0.x = 1 + -r0.x;
  r0.y = mad((int)v1.x, 42, 1);
  r0.y = t0[r0.y].val[8/4];
  r0.y = -cb0[64].z + r0.y;
  r0.y = cb1[16].x * r0.y;
  r0.x = saturate(r0.y * -2097152 + r0.x);
  r0.yz = -cb0[128].xy + v0.xy;
  r1.xy = cb0[153].xx + r0.yz;
  r0.yz = float2(0.015625,0.015625) * r0.yz;
  r0.y = t1.SampleBias(s0_s, r0.yz, cb0[144].x).x;
  r0.zw = (uint2)r1.xy;
  r0.w = (uint)r0.w << 1;
  r0.z = (int)r0.w + (int)r0.z;
  r0.z = (uint)r0.z % 5;
  r0.z = (uint)r0.z;
  r0.y = r0.z + r0.y;
  r0.x = r0.y * 0.166666672 + r0.x;
  r0.x = -0.833299994 + r0.x;
  r0.x = cmp(r0.x < 0);
  if (r0.x != 0) discard;
  o0.xyzw = float4(0,0,0,0);
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v0.6.198 on Sat Oct 12 19:24:24 2024
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyz
// PRIMITIVE_ID             0   x           1     NONE    uint   x
// SV_IsFrontFace           0   x           2    FFACE    uint
//
//
// 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[154], immediateIndexed
dcl_constantbuffer CB1[17], immediateIndexed
dcl_sampler s0, mode_default
dcl_resource_structured t0, 16
dcl_resource_texture2d (float,float,float,float) t1
dcl_input_ps_siv linear noperspective v0.xyz, position
dcl_input_ps constant v1.x
dcl_output o0.xyzw
dcl_temps 2
mul r0.xy, v0.yyyy, cb0[49].zwzz
mad r0.xy, v0.xxxx, cb0[48].zwzz, r0.xyxx
mad r0.xy, v0.zzzz, cb0[50].zwzz, r0.xyxx
add r0.xy, r0.xyxx, cb0[51].zwzz
div r0.x, r0.x, r0.y
add r0.x, r0.x, -cb0[76].z
imad r0.y, v1.x, l(42), l(19)
ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r0.y, r0.y, l(8), t0.xxxx
add r0.x, -r0.x, r0.y
mad r0.x, r0.x, cb1[16].x, -cb1[16].y
add r0.x, -r0.x, l(1.000000)
imad r0.y, v1.x, l(42), l(1)
ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r0.y, r0.y, l(8), t0.xxxx
add r0.y, r0.y, -cb0[64].z
mul r0.y, r0.y, cb1[16].x
mad_sat r0.x, r0.y, l(-2097152.000000), r0.x
add r0.yz, v0.xxyx, -cb0[128].xxyx
add r1.xy, r0.yzyy, cb0[153].xxxx
mul r0.yz, r0.yyzy, l(0.000000, 0.015625, 0.015625, 0.000000)
sample_b_indexable(texture2d)(float,float,float,float) r0.y, r0.yzyy, t1.yxzw, s0, cb0[144].x
ftou r0.zw, r1.xxxy
ishl r0.w, r0.w, l(1)
iadd r0.z, r0.w, r0.z
udiv null, r0.z, r0.z, l(5)
utof r0.z, r0.z
add r0.y, r0.y, r0.z
mad r0.x, r0.y, l(0.166666672), r0.x
add r0.x, r0.x, l(-0.833300)
lt r0.x, r0.x, l(0.000000)
discard_nz r0.x
mov o0.xyzw, l(0,0,0,0)
ret
// Approximately 0 instruction slots used

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