// CRC32: CEA1CB36 | Unity headers extracted from Internal-PrePassCollectShadows.shader
// Shader "Hidden/Internal-PrePassCollectShadows" {
//   Properties {
//    _ShadowMapTexture ("", any) = "" { }
//   }
//   Fallback Off
//   SubShader 1/2 {
//     Pass 1/1 {
//       ZTest Always
//       ZWrite Off
//       Cull Off
//       GpuProgramID 58189
//       Program "fp" {
//         SubProgram "d3d9 " {
//           Keywords { "SHADOWS_NATIVE" "SHADOWS_SINGLE_CASCADE" "SHADOWS_SPLIT_SPHERES" }
//           Matrix 0 [_CameraToWorld]
//           Matrix 4 [unity_World2Shadow0] 3
//           Vector 9 [_LightShadowData]
//           Vector 7 [_ZBufferParams]
//           Vector 8 [unity_OrthoParams]
//           Vector 10 [unity_ShadowFadeCenterAndType]
//           SetTexture 0 [_CameraDepthTexture] 2D 0
//           SetTexture 1 [_ShadowMapTexture] 2D 1
//         }
//       }
//     }
//   }
// }
// 
// Headers extracted with DarkStarSword's extract_unity_shaders.py
// https://raw.githubusercontent.com/DarkStarSword/3d-fixes/master/extract_unity_shaders.py

    ps_3_0 // Converted from ps_2_0 with DarkStarSword's shadertool.py
    def c11, 1, 0, 0, 0
    dcl_texcoord v0.xy
    dcl_texcoord1 v1.xyz
    dcl_texcoord2 v2
    dcl_2d s0
    dcl_2d s1

def c220, 0, 1, 0.0625, 0.5
dcl_2d s13

texldl r31, c220.z, s13

    texld r0, v0, s0
    mov r1.w, c11.x
    mov r2.xy, v2
    mad r2.w, c7.x, r0.x, c7.y
    rcp r2.w, r2.w
    lrp r3.w, c8.w, r0.x, r2.w
    lrp r2.z, r0.x, v2.w, v2.z
    mad r0.xyz, v1, -r3.w, r2
    mul r2.xyz, r3.w, v1
    mad r0.xyz, c8.w, r0, r2
    mov r0.w, c11.x
    dp4 r2.w, c3, r0
    dp4 r2.x, c0, r0
    dp4 r2.y, c1, r0
    dp4 r2.z, c2, r0 // depth in r0.z

// Unity light/shadow fix (pixel shader stage, world-space variant) inserted with DarkStarSword's shadertool.py:
// shadertool.py -I ../.. --fix-unity-lighting-ps-world --only-autofixed ./Hidden_Internal-PrePassCollectShadows/fp/CEA1CB36.txt
mov r29, c220.x
add r29.x, r0.z, -r31.y
mul r29.x, r29.x, r31.x
dp4 r28.x, c180, r29
dp4 r28.y, c181, r29
dp4 r28.z, c182, r29
dp4 r28.w, c183, r29
dp4 r29.x, c190, r28
dp4 r29.y, c191, r28
dp4 r29.z, c192, r28
add r2.xyz, r2, -r29

    dp4 r1.x, c4, r2
    dp4 r1.y, c5, r2
    dp4 r1.z, c6, r2
    add r0.xyz, r2, -c10
    dp3 r0.x, r0, r0
    rsq r0.x, r0.x
    rcp r0.x, r0.x
    mad_sat_pp r0.x, r0.x, c9.z, c9.w
    texldp_pp r1, r1, s1
    mov r2.x, c9.x
    add_pp r0.y, -r2.x, c11.x
    mad_pp r0.y, r1.x, r0.y, c9.x
    add_pp r0, r0.x, r0.y
    mov_pp oC0, r0
