// CRC32: 9DD839BB | Matched 2 variants of 2 shaders: Custom/Spherical Billboard, Custom/Spherical Billboard (Additive)
// 
//    Unity headers extracted from Billboard, Spherical.shader
//    Shader "Custom/Spherical Billboard" {
//      Properties {
//       _MainTex ("Base (RGBA)", 2D) = "white" { }
//       _RadiusTex ("Radius (R)", 2D) = "white" { }
//       _ParticleRadius ("Radius (must match particle size!)", Float) = 1.5
//       _Density ("Density", Float) = 0.4
//       _FadeOutDistance ("Fade-out Distance", Float) = 7.5
//      }
//      Fallback Off
//      SubShader 1/1 {
//        Tags { "QUEUE"="Transparent+5" "RenderType"="Transparent" }
//        Pass 1/1 {
//          Tags { "QUEUE"="Transparent+5" "RenderType"="Transparent" }
//          ZTest Always
//          ZWrite Off
//          Blend SrcAlpha OneMinusSrcAlpha
//          GpuProgramID 53058
//          Program "fp" {
//            SubProgram "d3d9 " {
//              Float 4 [_Density]
//              Float 5 [_FadeOutDistance]
//              Float 3 [_ParticleRadius]
//              Vector 1 [_ProjectionParams]
//              Vector 0 [_WorldSpaceCameraPos]
//              Vector 2 [_ZBufferParams]
//              SetTexture 0 [_MainTex] 2D 0
//              SetTexture 1 [_RadiusTex] 2D 1
//              SetTexture 2 [_CameraDepthTexture] 2D 2
//            }
//          }
//        }
//      }
//    }
// 
//    Unity headers extracted from Billboard, Spherical (Additive).shader
//    Shader "Custom/Spherical Billboard (Additive)" {
//      Properties {
//       _MainTex ("Base (RGBA)", 2D) = "white" { }
//       _RadiusTex ("Radius (R)", 2D) = "white" { }
//       _ParticleRadius ("Radius (must match particle size!)", Float) = 1.5
//       _Density ("Density", Float) = 0.4
//       _FadeOutDistance ("Fade-out Distance", Float) = 7.5
//      }
//      Fallback Off
//      SubShader 1/1 {
//        Tags { "QUEUE"="Transparent+5" "RenderType"="Transparent" }
//        Pass 1/1 {
//          Tags { "QUEUE"="Transparent+5" "RenderType"="Transparent" }
//          ZTest Always
//          ZWrite Off
//          Blend SrcAlpha One
//          GpuProgramID 53058
//          Program "fp" {
//            SubProgram "d3d9 " {
//              Float 4 [_Density]
//              Float 5 [_FadeOutDistance]
//              Float 3 [_ParticleRadius]
//              Vector 1 [_ProjectionParams]
//              Vector 0 [_WorldSpaceCameraPos]
//              Vector 2 [_ZBufferParams]
//              SetTexture 0 [_MainTex] 2D 0
//              SetTexture 1 [_RadiusTex] 2D 1
//              SetTexture 2 [_CameraDepthTexture] 2D 2
//            }
//          }
//        }
//      }
//    }
// 
// 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 c6, -1, 1, 1.44269502, 0
    dcl_texcoord v0.xy
    dcl_texcoord1 v1
    dcl_texcoord2 v2.x
    dcl_texcoord3 v3.xyz
    dcl_2d s0
    dcl_2d s1
    dcl_2d s2

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

texldl r31, c220.z, s13

// Unity reflection/specular fix inserted with DarkStarSword's shadertool.py:
// shadertool.py -I ../.. --only-autofixed --add-fog-on-sm3-update --fix-unity-reflection --ignore-register-errors --force Custom_Spherical Billboard\fp\9DD839BB.txt
mov r30, c0
mov r29, c220.x
mul r29.x, r31.x, -r31.y
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 r30.xyz, r30, -r29

    texldp r0, v1, s2
    texld r1, v0, s1
    texld r2, v0, s0
    mad r0.x, c2.x, r0.x, c2.y
    rcp r0.x, r0.x
    mul r0.x, r0.x, c1.z
    mad r0.y, r1.x, -r1.x, c6.y
    rsq r0.y, r0.y
    rcp r0.y, r0.y
    mad r0.z, c3.x, r0.y, v2.x
    mad r0.y, c3.x, -r0.y, v2.x
    max r1.y, c1.y, r0.y
    min r1.z, r0.z, r0.x
    add r0.x, -r1.y, r1.z
    add r0.y, -r1.x, c6.y
    add r0.z, r1.x, c6.x
    mul r0.y, r0.y, -c4.x
    mul r0.x, r0.x, r0.y
    mul r0.x, r0.x, c6.z
    exp r0.x, r0.x
    add r0.x, -r0.x, c6.y
    add r1.xyz, -v3, r30
    dp3 r0.y, r1, r1
    rsq r0.y, r0.y
    rcp r0.y, r0.y
    rcp r0.w, c5.x
    mul_sat r0.y, r0.w, r0.y
    add r0.y, -r0.y, c6.y
    mul r0.x, r0.y, r0.x
    cmp r0.w, r0.z, c6.w, r0.x
    mov r0.xyz, c6.y
    mul r0, r0, r2
    mov oC0, r0
