//shadows 3
// ---- Created with 3Dmigoto v1.3.16 on Fri Oct 17 00:16:10 2025

cbuffer camera : register(b0)
{
  row_major float4x4 c0 : packoffset(c0);
  row_major float4x4 c1 : packoffset(c4);
  row_major float4x4 c2 : packoffset(c8);
  row_major float4x4 c3 : packoffset(c12);
  row_major float4x4 c4 : packoffset(c16);
  float c5 : packoffset(c20);
  float c6 : packoffset(c20.y);
  float c7 : packoffset(c20.z);
  float c8 : packoffset(c20.w);
}

cbuffer object : register(b1)
{
  row_major float4x4 c9 : packoffset(c0);
  row_major float3x3 c10 : packoffset(c4);
  float c11 : packoffset(c6.w);
}

cbuffer skinning : register(b3)
{
  row_major float3x4 c27[64] : packoffset(c0);
}



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


void main(
  float4 v0 : position0,
  float4 v1 : normal0,
  float4 v2 : tangent0,
  float2 v3 : texcoord0,
  float4 v4 : color0,
  int4 v5 : bone_indices0,
  float4 v6 : bone_weights0,
  out float4 o0 : sv_position0,
  out float2 o1 : texcoord0,
  out float3 o2 : view_pos0)
{
  float4 r0,r1,r2;
  uint4 bitmask, uiDest;
  float4 fDest;
  
float4 stereo = StereoParams.Load(0);
float4 params = IniParams.Load(0);  

  r0.xyzw = (int4)v5.xyzw * int4(3,3,3,3);
  r1.xyzw = c27[v5.y]._m00_m01_m02_m03 * v6.yyyy;
  r1.xyzw = c27[v5.x]._m00_m01_m02_m03 * v6.xxxx + r1.xyzw;
  r1.xyzw = c27[v5.z]._m00_m01_m02_m03 * v6.zzzz + r1.xyzw;
  r1.xyzw = c27[v5.w]._m00_m01_m02_m03 * v6.wwww + r1.xyzw;
  r1.x = dot(r1.xyzw, v0.xyzw);
  r2.xyzw = c27[v5.y]._m10_m11_m12_m13 * v6.yyyy;
  r2.xyzw = c27[v5.x]._m10_m11_m12_m13 * v6.xxxx + r2.xyzw;
  r2.xyzw = c27[v5.z]._m10_m11_m12_m13 * v6.zzzz + r2.xyzw;
  r2.xyzw = c27[v5.w]._m10_m11_m12_m13 * v6.wwww + r2.xyzw;
  r1.y = dot(r2.xyzw, v0.xyzw);
  r2.xyzw = c27[v5.y]._m20_m21_m22_m23 * v6.yyyy;
  r2.xyzw = c27[v5.x]._m20_m21_m22_m23 * v6.xxxx + r2.xyzw;
  r2.xyzw = c27[v5.z]._m20_m21_m22_m23 * v6.zzzz + r2.xyzw;
  r0.xyzw = c27[v5.w]._m20_m21_m22_m23 * v6.wwww + r2.xyzw;
  r1.z = dot(r0.xyzw, v0.xyzw);
  r1.w = v0.w;
  r0.x = dot(c9._m00_m01_m02_m03, r1.xyzw);
  r0.y = dot(c9._m10_m11_m12_m13, r1.xyzw);
  r0.z = dot(c9._m20_m21_m22_m23, r1.xyzw);
  r0.w = dot(c9._m30_m31_m32_m33, r1.xyzw);
  o0.x = dot(c0._m00_m01_m02_m03, r0.xyzw);
  o0.y = dot(c0._m10_m11_m12_m13, r0.xyzw);
  o0.z = dot(c0._m20_m21_m22_m23, r0.xyzw);
  o0.w = dot(c0._m30_m31_m32_m33, r0.xyzw);
//o0.x += stereo.x * stereo.y;
o0=0;  
  o1.xy = v3.xy;
  o2.x = dot(c1._m00_m01_m02_m03, r0.xyzw);
  o2.y = dot(c1._m10_m11_m12_m13, r0.xyzw);
  o2.z = dot(c1._m20_m21_m22_m23, r0.xyzw);
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//   using 3Dmigoto v1.3.16 on Fri Oct 17 00:16:10 2025
//
//
// Buffer Definitions:
//
// cbuffer camera
// {
//
//   row_major float4x4 c0;             // Offset:    0 Size:    64
//   row_major float4x4 c1;             // Offset:   64 Size:    64
//   row_major float4x4 c2;             // Offset:  128 Size:    64 [unused]
//   row_major float4x4 c3;             // Offset:  192 Size:    64 [unused]
//   row_major float4x4 c4;             // Offset:  256 Size:    64 [unused]
//   float c5;                          // Offset:  320 Size:     4 [unused]
//   float c6;                          // Offset:  324 Size:     4 [unused]
//   float c7;                          // Offset:  328 Size:     4 [unused]
//   float c8;                          // Offset:  332 Size:     4 [unused]
//
// }
//
// cbuffer object
// {
//
//   row_major float4x4 c9;             // Offset:    0 Size:    64
//   row_major float3x3 c10;            // Offset:   64 Size:    44 [unused]
//   float c11;                         // Offset:  108 Size:     4 [unused]
//
// }
//
// cbuffer skinning
// {
//
//   row_major float3x4 c27[64];        // Offset:    0 Size:  3072
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// camera                            cbuffer      NA          NA    0        1
// object                            cbuffer      NA          NA    1        1
// skinning                          cbuffer      NA          NA    3        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// position                 0   xyzw        0     NONE   float   xyzw
// normal                   0   xyzw        1     NONE   float
// tangent                  0   xyzw        2     NONE   float
// texcoord                 0   xy          3     NONE   float   xy
// color                    0   xyzw        4     NONE   float
// bone_indices             0   xyzw        5     NONE     int   xyzw
// bone_weights             0   xyzw        6     NONE   float   xyzw
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// sv_position              0   xyzw        0      POS   float   xyzw
// texcoord                 0   xy          1     NONE   float   xy
// view_pos                 0   xyz         2     NONE   float   xyz
//
vs_4_0
dcl_constantbuffer cb0[7], immediateIndexed
dcl_constantbuffer cb1[4], immediateIndexed
dcl_constantbuffer cb3[192], dynamicIndexed
dcl_input v0.xyzw
dcl_input v3.xy
dcl_input v5.xyzw
dcl_input v6.xyzw
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_output o2.xyz
dcl_temps 3
imul null, r0.xyzw, v5.xyzw, l(3, 3, 3, 3)
mul r1.xyzw, v6.yyyy, cb3[r0.y + 0].xyzw
mad r1.xyzw, cb3[r0.x + 0].xyzw, v6.xxxx, r1.xyzw
mad r1.xyzw, cb3[r0.z + 0].xyzw, v6.zzzz, r1.xyzw
mad r1.xyzw, cb3[r0.w + 0].xyzw, v6.wwww, r1.xyzw
dp4 r1.x, r1.xyzw, v0.xyzw
mul r2.xyzw, v6.yyyy, cb3[r0.y + 1].xyzw
mad r2.xyzw, cb3[r0.x + 1].xyzw, v6.xxxx, r2.xyzw
mad r2.xyzw, cb3[r0.z + 1].xyzw, v6.zzzz, r2.xyzw
mad r2.xyzw, cb3[r0.w + 1].xyzw, v6.wwww, r2.xyzw
dp4 r1.y, r2.xyzw, v0.xyzw
mul r2.xyzw, v6.yyyy, cb3[r0.y + 2].xyzw
mad r2.xyzw, cb3[r0.x + 2].xyzw, v6.xxxx, r2.xyzw
mad r2.xyzw, cb3[r0.z + 2].xyzw, v6.zzzz, r2.xyzw
mad r0.xyzw, cb3[r0.w + 2].xyzw, v6.wwww, r2.xyzw
dp4 r1.z, r0.xyzw, v0.xyzw
mov r1.w, v0.w
dp4 r0.x, cb1[0].xyzw, r1.xyzw
dp4 r0.y, cb1[1].xyzw, r1.xyzw
dp4 r0.z, cb1[2].xyzw, r1.xyzw
dp4 r0.w, cb1[3].xyzw, r1.xyzw
dp4 o0.x, cb0[0].xyzw, r0.xyzw
dp4 o0.y, cb0[1].xyzw, r0.xyzw
dp4 o0.z, cb0[2].xyzw, r0.xyzw
dp4 o0.w, cb0[3].xyzw, r0.xyzw
mov o1.xy, v3.xyxx
dp4 o2.x, cb0[4].xyzw, r0.xyzw
dp4 o2.y, cb0[5].xyzw, r0.xyzw
dp4 o2.z, cb0[6].xyzw, r0.xyzw
ret
// Approximately 30 instruction slots used

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