//Mission decals. White dotted lines.
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v0.6.181 on Thu Jul 13 10:34:12 2023
//
//
// Buffer Definitions:
//
// cbuffer RenderPassConstBuffer
// {
//
//   float4 ambientSH9[9];              // Index:    0-8              Components:    36 [unused]
//   float4 ambient;                    // Index:    9.xyzw           Components:     4 [unused]
//   float3 fogData;                    // Index:   10.xyz            Components:     3 [unused]
//   float accumTime;                   // Index:   10.w              Components:     1 [unused]
//   float4 fogColor;                   // Index:   11.xyzw           Components:     4 [unused]
//   float4 oneOverFarplane;            // Index:   12.xyzw           Components:     4 [unused]
//   float4x4 worldToCamera;            // Index:   13 14 15 16       Components:    16 [unused]
//   float4x4 worldToCameraPos0;        // Index:   17 18 19 20       Components:    16 [unused]
//   float4x4 worldToScreenPos0;        // Index:   21 22 23 24       Components:    16 [unused]
//   float3 cameraRemainder;            // Index:   25.xyz            Components:     3 [unused]
//   float _padding_00;                 // Index:   25.w              Components:     1 [unused]
//   float4x4 cameraToScreen;           // Index:   26 27 28 29       Components:    16 [unused]
//   float4x4 viewProj;                 // Index:   30 31 32 33       Components:    16 [unused]
//   float3 vEye;                       // Index:   34.xyz            Components:     3
//   float _padding0;                   // Index:   34.w              Components:     1 [unused]
//   float3 eyePosWorld;                // Index:   35.xyz            Components:     3
//   float _padding1;                   // Index:   35.w              Components:     1 [unused]
//   float4x4 eyeMat;                   // Index:   36 37 38 39       Components:    16 [unused]
//   float3 diffuseEyePosWorld;         // Index:   40.xyz            Components:     3 [unused]
//   float _padding2;                   // Index:   40.w              Components:     1 [unused]
//   float4 clipPlane0;                 // Index:   41.xyzw           Components:     4 [unused]
//   float4 projectionParams;           // Index:   42.xyzw           Components:     4
//   int4 viewportParams;               // Index:   43.xyzw           Components:     4 [unused]
//   float4 lightInfoBufferParams;      // Index:   44.xyzw           Components:     4 [unused]
//   float4 lightParams;                // Index:   45.xyzw           Components:     4 [unused]
//   float2 atlasScale;                 // Index:   46.xy             Components:     2 [unused]
//   uint renderPassFlags;              // Index:   46.z              Components:     1 [unused]
//   uint renderPassCustomFlags;        // Index:   46.w              Components:     1 [unused]
//   float4x4 worldToLightProj;         // Index:   47 48 49 50       Components:    16 [unused]
//   float4 scaleX;                     // Index:   51.xyzw           Components:     4 [unused]
//   float4 scaleY;                     // Index:   52.xyzw           Components:     4 [unused]
//   float4 offsetX;                    // Index:   53.xyzw           Components:     4 [unused]
//   float4 offsetY;                    // Index:   54.xyzw           Components:     4 [unused]
//   float4 atlasXOffset;               // Index:   55.xyzw           Components:     4 [unused]
//   float4 atlasYOffset;               // Index:   56.xyzw           Components:     4 [unused]
//   float4 farPlaneScalePSSM;          // Index:   57.xyzw           Components:     4 [unused]
//   float4 overDarkPSSM;               // Index:   58.xyzw           Components:     4 [unused]
//   float2 atlasScalePSSM;             // Index:   59.xy             Components:     2 [unused]
//   float2 fadeStartLength;            // Index:   59.zw             Components:     2 [unused]
//   float shadowSoftness;              // Index:   60.x              Components:     1 [unused]
//   float3 _padding4;                  // Index:   60.yzw            Components:     3 [unused]
//   float4x4 viewProjPrevFrame;        // Index:   61 62 63 64       Components:    16 [unused]
//
// }
//
// Resource bind info for decals
// {
//
//   struct DecalInstance_t
//   {
//
//       float4x4 woldMatrix;           // Index:    0
//       float4x4 invWoldMatrix;        // Index:    4
//       float4 instanceColor;          // Index:    8
//
//   } $Element;                        // Index:    0-8              Components:    36
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// diffuseMap_sampler_               sampler      NA          NA    1        1
// depthMap                          texture  float4          2d    0        1
// diffuseMapTex                     texture  float4          2d    1        1
// decals                            texture  struct         r/o    2        1
// RenderPassConstBuffer             cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xy
// TEXCOORD                 0   xyz         1     NONE   float   xyz
// SV_InstanceID            0   x           2     NONE    uint   x
//
//
// 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[43], immediateIndexed
dcl_sampler s1, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_structured t2, 144
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_input_ps linear v1.xyz
dcl_input_ps constant v2.x
dcl_output o0.xyzw
dcl_temps 29
dcl_resource_texture2d (float,float,float,float) t125
ld_indexable(texture2d)(float,float,float,float) r25.xyzw, l(0, 0, 0, 0), t125.xyzw
ftoi r0.xy, v0.xyxx
mov r0.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r0.x, r0.xyzw, t0.xyzw
add r0.x, r0.x, -cb0[42].z
div r0.x, cb0[42].w, r0.x
dp3 r0.y, cb0[34].xyzx, cb0[34].xyzx
rsq r0.y, r0.y
mul r0.yzw, r0.yyyy, cb0[34].xxyz
add r1.xyz, v1.xyzx, -cb0[35].xyzx

mul r26.x, r25.y, cb0[30].x
mul r26.y, r25.y, cb0[31].x
mul r26.z, r25.y, cb0[32].x
mul r26.w, cb0[30].x, cb0[30].x
mad r26.w, cb0[31].x, cb0[31].x, r26.w
mad r26.w, cb0[32].x, cb0[32].x, r26.w
div r26.xyz, r26.xyzx, r26.wwww
mad r1.xyz, -r25.xxxx, r26.xyzx, r1.xyz

dp3 r1.w, r1.xyzx, r1.xyzx
rsq r1.w, r1.w
mul r1.xyz, r1.wwww, r1.xyzx
dp3 r0.y, r0.yzwy, r1.xyzx
max r0.y, r0.y, l(0.000000)
div r0.x, r0.x, r0.y
mad r0.xyz, r1.xyzx, r0.xxxx, cb0[35].xyzx

mul r26.x, r25.y, cb0[30].x
mul r26.y, r25.y, cb0[31].x
mul r26.z, r25.y, cb0[32].x
mul r26.w, cb0[30].x, cb0[30].x
mad r26.w, cb0[31].x, cb0[31].x, r26.w
mad r26.w, cb0[32].x, cb0[32].x, r26.w
div r26.xyz, r26.xyzx, r26.wwww
mad r0.xyz, r25.xxxx, r26.xyzx, r0.xyz

ld_structured_indexable(structured_buffer, stride=144)(mixed,mixed,mixed,mixed) r1.xyz, v2.x, l(64), t2.yxzx
mov r2.x, r1.z
ld_structured_indexable(structured_buffer, stride=144)(mixed,mixed,mixed,mixed) r3.xyz, v2.x, l(80), t2.xyzx
mov r2.y, r3.z
ld_structured_indexable(structured_buffer, stride=144)(mixed,mixed,mixed,mixed) r4.xyz, v2.x, l(96), t2.xyzx
mov r2.z, r4.z
ld_structured_indexable(structured_buffer, stride=144)(mixed,mixed,mixed,mixed) r5.xyz, v2.x, l(112), t2.xyzx
mov r2.w, r5.z
mov r0.w, l(1.000000)
dp4 r2.z, r2.xyzw, r0.xyzw
mov r6.x, r1.y
mov r6.y, r3.x
mov r1.y, r3.y
mov r6.z, r4.x
mov r1.z, r4.y
mov r6.w, r5.x
mov r1.w, r5.y
dp4 r2.y, r1.xyzw, r0.xyzw
dp4 r2.x, r6.xyzw, r0.xyzw
add r0.xyz, -|r2.xyzx|, l(0.500000, 0.500000, 0.500000, 0.000000)
add r1.xy, r2.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
lt r0.xyz, r0.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
or r0.x, r0.y, r0.x
or r0.x, r0.z, r0.x
discard_nz r0.x
add r1.z, -r1.y, l(1.000000)
sample_indexable(texture2d)(float,float,float,float) r0.xyzw, r1.xzxx, t1.xyzw, s1
ld_structured_indexable(structured_buffer, stride=144)(mixed,mixed,mixed,mixed) r1.xyzw, v2.x, l(128), t2.xyzw
mul o0.xyzw, r0.xyzw, r1.xyzw
ret
// Approximately 46 instruction slots used
