// hlsltool.py -I ../112 --auto-fix-vertex-halo --fix-unity-reflection --only-autofixed --no-validate --ignore-other-errors 4d0c8fa4d55c9d66-vs_replace.txt
// 3DMigoto: 4d0c8fa4d55c9d66 | Matched 16 variants of 4 shaders: UBER - DynSnow - Metallic Setup/ Core, UBER - DynSnow - Specular Setup/ Core, UBER - Metallic Setup/2 Sided/ Core, UBER - Specular Setup/ Core
//
// 1800:    Unity headers extracted from _UBERShader_DynSnow_Metallic.shader
// 001f:    Unity headers extracted from _UBERShader_DynSnow_Specular.shader
// 07e0:    Unity headers extracted from _UBERShader_Metallic_2Sided.shader
// e000:    Unity headers extracted from _UBERShader_Specular.shader
// 1800:    Shader "UBER - DynSnow - Metallic Setup/ Core" {
// 001f:    Shader "UBER - DynSnow - Specular Setup/ Core" {
// 07e0:    Shader "UBER - Metallic Setup/2 Sided/ Core" {
// e000:    Shader "UBER - Specular Setup/ Core" {
//            Properties {
//            [HDR]  _Color ("Color", Color) = (1,1,1,1)
//            [HDR]  _Color2 ("Color2", Color) = (1,1,1,1)
//             _MainTex ("Albedo", 2D) = "white" { }
//             _MainTex2 ("Albedo2", 2D) = "white" { }
//             _Cutoff ("Alpha Cutoff", Range(0,1)) = 0.5
//             _CutoffEdgeGlow ("Edge glow", Color) = (0,0,0,0.02)
//             _Glossiness ("Smoothness", Range(0,1)) = 1
//             _Glossiness2 ("Smoothness2", Range(0,1)) = 1
// e01f:       _SpecColor ("Specular", Color) = (1,1,1,1)
// 1fe0:      [Gamma]  _Metallic ("Metallic", Range(0,1)) = 1
// e01f:       _SpecColor2 ("Specular2", Color) = (1,1,1,1)
// 1fe0:      [Gamma]  _Metallic2 ("Metallic2", Range(0,1)) = 1
// 1fe0:       _MetallicGlossMap ("Metallic", 2D) = "white" { }
// e01f:       _SpecGlossMap ("Specular", 2D) = "white" { }
// 1fe0:       _MetallicGlossMap2 ("Metallic2", 2D) = "white" { }
// e01f:       _SpecGlossMap2 ("Specular2", 2D) = "white" { }
//             _BumpScale ("Scale", Float) = 1
//             _BumpScale2 ("Scale2", Float) = 1
//             _BumpMap ("Normal Map", 2D) = "bump" { }
//             _BumpMap2 ("Normal Map2", 2D) = "bump" { }
//             _Parallax ("Height Scale", Range(0,0.2)) = 0.04
//             _Parallax2 ("Height Scale2", Range(0,0.2)) = 0.04
//             _ParallaxMap ("Height Map", 2D) = "black" { }
//             _ParallaxMap2 ("Height Map2", 2D) = "black" { }
//             _OcclusionStrength ("Strength", Range(0,1)) = 0
//             _OcclusionStrength2 ("Strength2", Range(0,1)) = 0
//             _SecOcclusionStrength ("Strength (secondary)", Range(0,1)) = 0
//             _OcclusionMap ("Occlusion", 2D) = "white" { }
//             _EmissionColor ("Color", Color) = (0,0,0,1)
//             _EmissionMap ("Emission", 2D) = "white" { }
//             _DetailMask ("Detail Mask", 2D) = "white" { }
//             _DetailAlbedoMap ("Detail Albedo x2", 2D) = "grey" { }
//             _DetailNormalMapScale ("Scale", Float) = 1
//             _DetailNormalMap ("Normal Map", 2D) = "bump" { }
//            [Enum(UV0,0,UV1,1)]  _UVSec ("UV Set for secondary textures", Float) = 0
//            [Enum(UV0,0,UV1,1)]  _UVSecOcclusion ("UV Set for occlusion", Float) = 0
//            [NoKeywordToggle]  _UVSecOcclusionLightmapPacked ("2ndary occlusion from UV1 - apply lightmap transform", Float) = 0
//            [HideInInspector]  _Mode ("__mode", Float) = 0
//            [HideInInspector]  _SrcBlend ("__src", Float) = 1
//            [HideInInspector]  _DstBlend ("__dst", Float) = 0
//            [HideInInspector]  _ZWrite ("__zw", Float) = 1
//             _DiffuseScatter ("Diffuse Scatter", Float) = 1
//             _DiffuseScatteringColor ("Diffuse scattering", Color) = (0,0,0,0)
//             _DiffuseScatteringColor2 ("Diffuse scattering2", Color) = (0,0,0,0)
//             _DiffuseScatteringExponent ("Diffuse scattering exponent", Range(2,20)) = 8
//             _DiffuseScatteringOffset ("Diffuse scattering offset", Range(-0.5,0.5)) = 0
//             _GlossMin ("Gloss Min", Range(0,1)) = 0
//             _GlossMax ("Gloss Max", Range(0,1)) = 1
//             _BendNormalsFreq ("Bend normals frequency", Float) = 4
//             _BendNormalsStrength ("Bend normals strangth", Range(0,0.2)) = 0.05
//             _DetailUVMult ("Detail mask tiling mult", Float) = 1
//             _DetailNormalLerp ("Detail normalmap override", Range(0,1)) = 0
//             _DetailColor ("Tint (RGB+A - opacity)", Color) = (1,1,1,1)
//             _DetailEmissiveness ("Detail emissiveness", Range(0,1)) = 0
//             _SpecularRGBGlossADetail ("Specular(RGB) Gloss(A)", 2D) = "white" { }
//             _DetailSpecLerp ("Spec/Gloss override", Range(0,1)) = 1
//             _DetailSpecGloss ("Spec/gloss Tint (RGB,A)", Color) = (1,1,1,1)
//             _MetallicGlossMapDetail ("Metallic(R) Gloss(A)", 2D) = "white" { }
//             _DetailMetalness ("Detail metallic", Range(0,1)) = 1
//             _DetailGloss ("Detail smoothness", Range(0,1)) = 1
//            [NoKeywordToggle]  _PanEmissionMask ("Pan Emission Mask", Float) = 0
//             _PanUSpeed ("   Pan U Speed", Float) = 0
//             _PanVSpeed ("   Pan V Speed", Float) = 0
//            [NoKeywordToggle]  _PulsateEmission ("Pulsate Emission", Float) = 0
//             _EmissionPulsateSpeed ("   Emission Pulsate Frequency", Float) = 0
//             _MinPulseBrightness ("   Min Pulse Brightness", Range(0,1)) = 0
//            [NoKeywordToggle]  _Translucency ("Translucency", Float) = 0
//            [Foldout]  _TranslucencyShown ("", Float) = 1
//             _TranslucencyColor ("Translucency color", Color) = (1,1,1,1)
//             _TranslucencyColor2 ("Translucency color2", Color) = (1,1,1,1)
//             _TranslucencyStrength ("Translucency strength", Float) = 4
//             _TranslucencyPointLightDirectionality ("Point lights directionality", Range(0,1)) = 0.7
//             _TranslucencyConstant ("Translucency constant", Range(0,0.5)) = 0.1
//             _TranslucencyNormalOffset ("Translucency normal offset", Range(0,0.3)) = 0.05
//             _TranslucencyExponent ("Translucency exponent", Range(2,100)) = 30
//             _TranslucencyOcclusion ("Translucency occlusion", Range(0,1)) = 0
//             _TranslucencySuppressRealtimeShadows ("Translucency shadows suppression", Range(0,20)) = 0.5
//             _TranslucencyNDotL ("Translucency NdotL", Range(0,1)) = 0
//            [Enum(TranslucencyColor1,0,TranslucencyColor2,1,TranslucencyColor3,2,TranslucencyColor4,3)]  _TranslucencyDeferredLightIndex ("Translucency deferred light index", Float) = 0
//            [NoKeywordToggle]  _POM ("POM", Float) = 0
//            [Foldout]  _POMShown ("", Float) = 1
//            [NoKeywordToggle]  _DepthWrite ("Zwrite", Float) = 0
//             _Depth ("Depth", Range(0.001,2)) = 0.1
//             _DistSteps ("Max relief steps", Float) = 64
//             _ReliefMIPbias ("Relief MIP offset", Range(0,2)) = 0
//             _ObjectNormalsTex ("Object normals tex", 2D) = "grey" { }
//             _ObjectTangentsTex ("Object tangents tex", 2D) = "grey" { }
//             _CurvatureMultOffset ("Curvature", Vector) = (1,1,0,0)
//             _Tan2ObjectMultOffset ("Tex2Object", Vector) = (1,1,0,0)
//             _UV_Clip_Borders ("UV clip borders", Vector) = (0,0,1,1)
//             _POM_BottomCut ("Bottom cut value", Range(0,1)) = 0
//            [NoKeywordToggle]  _POM_MeshIsVolume ("Depth per vertex", Float) = 0
//            [NoKeywordToggle]  _POM_ExtrudeVolume ("Extruded mesh", Float) = 0
//            [NoKeywordToggle]  _POMPrecomputedFlag ("POM precomputed", Float) = 0
//            [Enum(Basic,0,Mapped,1)]  _POMCurvatureType ("Type of curvature mapping", Float) = 0
//             _DepthReductionDistance ("Depth reduction distance", Range(1,100)) = 20
//             _CurvatureCustomU ("Curvature custom U", Float) = 0
//             _CurvatureCustomV ("Curvature custom V", Float) = 0
//             _CurvatureMultU ("Curvature mult U", Float) = 1
//             _CurvatureMultV ("Curvature mult V", Float) = 1
//             _Tan2ObjCustomU ("Tex U to Object space", Float) = 1
//             _Tan2ObjCustomV ("Tex V to Object space", Float) = 1
//             _Tan2ObjMultU ("Tex U to Object space mult", Float) = 1
//             _Tan2ObjMultV ("Tex V to Object space mult", Float) = 1
//            [NoKeywordToggle]  _UV_Clip ("UV Clip", Float) = 0
//            [NoKeywordToggle]  _POMShadows ("Self-shadowing", Float) = 0
//             _ShadowStrength ("   Self-shadow strength", Range(0,1)) = 1
//             _DistStepsShadows ("   Max shadow steps", Float) = 64
//             _ShadowMIPbias ("   Shadow MIP offset", Range(0,2)) = 0
//             _Softness ("   Softness", Range(6,0)) = 2
//             _SoftnessFade ("   Softness fade", Range(0.2,1.5)) = 0.4
//             _Refraction ("Refration", Range(0,0.5)) = 0.02
//             _RefractionBumpScale ("Refraction bump scale", Range(0,2)) = 0.5
//             _RefractionChromaticAberration ("Chromatic Aberration", Range(0,0.1)) = 0
//            [NoKeywordToggle]  _Wetness ("Wetness", Float) = 0
//            [Foldout]  _WetnessShown ("", Float) = 1
//             _WetnessLevel ("Level (Height Map dependent)", Range(0,1.25)) = 1
//             _WetnessConst ("Const (Height Map independent)", Range(0,1)) = 0
//             _WetnessColor ("Wetness Color (RGB Tint, A Opacity)", Color) = (0,0,0,0)
//             _WetnessDarkening ("Wetness darkening", Range(0,8)) = 2
//             _WetnessSpecGloss ("Wetness Specular (RGB) Gloss (A)", Color) = (0.05,0.05,0.05,0.7)
//             _WetnessEmissiveness ("Wetness emissiveness", Range(0,20)) = 0
//             _WetnessNormalInfluence ("Wetness normal override", Range(0,1)) = 0.5
//             _WetnessUVMult ("Wetness - Detail mask tiling", Float) = 1
//             _RippleMap ("Ripple Map", 2D) = "bump" { }
//            [NoKeywordToggle]  _WetRipples ("Ripples (vertex color B)", Float) = 0
//             _RippleMapWet ("Ripple Map wet (UI)", 2D) = "bump" { }
//             _RippleStrength ("Strength", Range(0.01,2)) = 0.5
//             _RippleTiling ("Tiling", Float) = 1
//             _RippleSpecFilter ("Spec filtering", Float) = 0.02
//             _RippleAnimSpeed ("Anim speed", Float) = 0.5
//             _FlowCycleScale ("Cycle scale", Float) = 2
//             _RippleRefraction ("Refraction", Range(0,2)) = 0.3
//             _WetnessNormMIP ("Flow normal MIP level", Range(1,8)) = 5
//             _WetnessNormStrength ("Flow normal strength", Range(0,4)) = 2
//            [NoKeywordToggle]  _WetnessEmissivenessWrap ("Emissiveness normal wrap", Float) = 0
//            [NoKeywordToggle]  _WetnessLevelFromGlobal ("Water level controlled globally", Float) = 0
//            [NoKeywordToggle]  _WetnessConstFromGlobal ("Water const controlled globally", Float) = 0
//            [NoKeywordToggle]  _WetnessFlowGlobalTime ("Water flow global time", Float) = 1
//            [NoKeywordToggle]  _WetnessMergeWithSnowPerMaterial ("Water level from snow level (per material)", Float) = 0
//            [NoKeywordToggle]  _RippleStrengthFromGlobal ("Flow ripple normal strength controlled globally", Float) = 0
// 1fe0:      [NoKeywordToggle]  _RainIntensityFromGlobal ("Rain Intensity controlled globally (multiplied)", Float) = 0
// e01f:      [NoKeywordToggle]  _WetDroplets ("Droplets (vertex color B)", Float) = 0
// 1fe0:      [NoKeywordToggle]  _WetDroplets ("Droplets (vertex color B)", Float) = 0
//             _DropletsMap ("Droplets Map", 2D) = "bump" { }
//             _RainIntensity ("Rain Intensity", Range(0,1)) = 1
//             _DropletsTiling ("Tiling", Float) = 1
//             _DropletsAnimSpeed ("Anim speed", Float) = 10
//            [NoKeywordToggle]  _RainIntensityFromGlobal ("Rain Intensity controlled globally (multiplied)", Float) = 0
//             _TessDepth ("Depth", Float) = 0.05
//             _TessOffset ("Offset", Range(0,1)) = 0.1
//             _Tess ("Tessellation", Range(1,60)) = 9
//             _TessEdgeLengthLimit ("Tessellation edge limit", Range(2,50)) = 5
//             minDist ("Min camera disance", Float) = 1
//             maxDist ("Max camera disance", Float) = 10
//             _Phong ("Phong", Range(0,1)) = 0
// e7e0:      [NoKeywordToggle]  _Snow ("Snow", Float) = 0
// 181f:      [NoKeywordToggle]  _Snow ("Snow", Float) = 1
//            [Foldout]  _SnowShown ("", Float) = 1
//             _RippleMapSnow ("Ripple Map snow (UI)", 2D) = "bump" { }
//             _SnowColorAndCoverage ("Color (RGB Tint, A Level)", Color) = (1,1,1,1)
//             _Frost ("Frost", Range(0,1)) = 0
//             _SnowSpecGloss ("Specular (RGB) Gloss (A)", Color) = (0.1,0.1,0.1,0.15)
//             _SnowSlopeDamp ("Slope damp", Range(0,6)) = 2
//             _SnowDiffuseScatteringColor ("Diffuse scattering", Color) = (1,1,1,0)
//             _SnowDiffuseScatteringExponent ("Diffuse scattering exponent", Range(2,20)) = 6
//             _SnowDiffuseScatteringOffset ("Diffuse scattering offset", Range(-0.5,0.5)) = 0.4
//             _SnowDeepSmoothen ("Deep smoothen", Range(0,8)) = 4
//             _SparkleMapSnow ("Snow detail (UI)", 2D) = "black" { }
//             _SnowEmissionTransparency ("Snow emission transparency", Color) = (0.1,0.1,0.1,1)
//             _SnowMicroTiling ("Micro tiling", Float) = 4
//             _SnowBumpMicro ("  Bumps micro", Range(0.001,0.2)) = 0.08
//             _SnowMacroTiling ("Macro tiling", Float) = 1
//             _SnowBumpMacro ("  Bumps macro", Range(0.001,0.5)) = 0.1
//            [NoKeywordToggle]  _SnowWorldMapping ("Snow World mapping", Float) = 0
// 1fe0:      [NoKeywordToggle]  _SnowWorldMapping ("Snow World mapping", Float) = 0
//             _SnowDissolve ("Dissolve", Range(0,4)) = 2
//             _SnowDissolveMaskOcclusion ("Dissolve mask occlusion", Range(0,1)) = 0
//             _SnowTranslucencyColor ("Translucency color", Color) = (0.75,1,1,1)
//             _SnowGlitterColor ("Glitter Color", Color) = (0.8,0.8,0.8,0.2)
//             _SnowHeightThreshold ("Height threshold", Float) = -10000
//             _SnowHeightThresholdTransition ("Height threshold transition", Range(10,4000)) = 1000
//            [NoKeywordToggle]  _SnowLevelFromGlobal ("Snow level controlled globally", Float) = 0
//            [NoKeywordToggle]  _FrostFromGlobal ("Frost controlled globally", Float) = 0
//            [NoKeywordToggle]  _SnowBumpMicroFromGlobal ("Snow bumps micro controlled globally", Float) = 0
//            [NoKeywordToggle]  _SnowDissolveFromGlobal ("Snow dissolve controlled globally", Float) = 0
//            [NoKeywordToggle]  _SnowSpecGlossFromGlobal ("Snow spec/gloss controlled globally", Float) = 0
//            [NoKeywordToggle]  _SnowGlitterColorFromGlobal ("Snow glitter color controlled globally", Float) = 0
//            [NoKeywordToggle]  _Glitter ("Glitter", Float) = 0
//            [Foldout]  _GlitterShown ("", Float) = 1
//             _SparkleMap ("Sparkle & snow detail", 2D) = "black" { }
//             _SparkleMapGlitter ("Glitter map (UI)", 2D) = "black" { }
//             _GlitterColor ("Glitter Color", Color) = (0.8,0.8,0.8,0.2)
//             _GlitterColor2 ("Glitter Color2", Color) = (0.8,0.8,0.8,0.2)
//             _GlitterColorization ("Random colorization", Range(0,1)) = 0.2
//             _GlitterDensity ("Density", Range(0,1)) = 0.2
//             _GlitterTiling ("Tiling", Float) = 1
//             _GlitterAnimationFrequency ("Animation frequency", Float) = 0.02
//             _GlitterFilter ("Filtering", Range(-4,4)) = -1
//             _GlitterMask ("Masking", Range(0,1)) = 0
// e01f:      [Foldout]  _MainShown ("", Float) = 1
// 1fe0:      [HideInInspector]  _ShadowCull ("__shadowcull", Float) = 2
// 1fe0:      [Foldout]  _MainShown ("", Float) = 1
//            [Foldout]  _SecondaryShown ("", Float) = 1
//            [Foldout]  _PresetsShown ("", Float) = 0
// e01f:      [HideInInspector]  _ShadowCull ("__shadowcull", Float) = 2
//             heightMapTexelSize ("heightMap TexelSize fix for substance", Vector) = (1,1,1,1)
//             bumpMapTexelSize ("bumpMap TexelSize fix for substance", Vector) = (1,1,1,1)
//             bumpMap2TexelSize ("bumpMap2 TexelSize fix for substance", Vector) = (1,1,1,1)
//            }
// e01f:      Fallback "Standard (Specular setup)"
// 1fe0:      Fallback "Standard"
//            SubShader 1/1 {
//              LOD 700
// 181f:        Tags { "QUEUE"="Geometry+1" "RenderType"="Opaque" "PerformanceChecks"="False" "REFR"="Off" "TWO_LAYERS"="Off" "SNOW"="On" }
// e7e0:        Tags { "QUEUE"="Geometry+1" "RenderType"="Opaque" "PerformanceChecks"="False" "REFR"="Off" "TWO_LAYERS"="Off" }
//              Pass 2/4 {
//                Name "FORWARD_DELTA"
// 181f:          Tags { "LIGHTMODE"="ForwardAdd" "QUEUE"="Geometry+1" "SHADOWSUPPORT"="true" "RenderType"="Opaque" "PerformanceChecks"="False" "REFR"="Off" "TWO_LAYERS"="Off" "SNOW"="On" }
// e7e0:          Tags { "LIGHTMODE"="ForwardAdd" "QUEUE"="Geometry+1" "SHADOWSUPPORT"="true" "RenderType"="Opaque" "PerformanceChecks"="False" "REFR"="Off" "TWO_LAYERS"="Off" }
//                ZWrite Off
// 07e0:          Cull Off
//                Blend [_SrcBlend] One
// 1800:          GpuProgramID 118692
// e000:          GpuProgramID 78503
// 07e0:          GpuProgramID 84315
// 001f:          GpuProgramID 91578
//                Program "vp" {
//                  SubProgram "d3d11 " {
// 8000:              GpuProgramIndex 101
// 0001:              GpuProgramIndex 121
// 0020:              GpuProgramIndex 133
// 0002:              GpuProgramIndex 147
// 0040:              GpuProgramIndex 159
// 0004:              GpuProgramIndex 173
// 0080:              GpuProgramIndex 185
// 0008:              GpuProgramIndex 199
// 0100:              GpuProgramIndex 211
// 0010:              GpuProgramIndex 225
// 0200:              GpuProgramIndex 237
// 0400:              GpuProgramIndex 263
// 2000:              GpuProgramIndex 49
// 0800:              GpuProgramIndex 61
// 4000:              GpuProgramIndex 75
// 1000:              GpuProgramIndex 87
//                  }
//                }
//              }
//            }
//          }
//
// 1800: Unity 5.3 headers extracted from _UBERShader_DynSnow_Metallic.shader.decompressed:
// 001f: Unity 5.3 headers extracted from _UBERShader_DynSnow_Specular.shader.decompressed:
// 07e0: Unity 5.3 headers extracted from _UBERShader_Metallic_2Sided.shader.decompressed:
// e000: Unity 5.3 headers extracted from _UBERShader_Specular.shader.decompressed:
//         API d3d11
//         Shader model vs_4_0
//         undeciphered1: 201509030 36 0 0
// 0400:   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "_ALPHABLEND_ON" "_WETNESS_NONE" "_TRANSLUCENCY" "_DETAIL_TEXTURED" }
// 0200:   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "_ALPHABLEND_ON" "_WETNESS_NONE" "_TRANSLUCENCY" }
// 0100:   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "_ALPHABLEND_ON" "_WETNESS_NONE" }
// 0080:   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "_ALPHATEST_ON" "_WETNESS_NONE" }
// 0010:   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "_DETAIL_TEXTURED" "_WETNESS_FULL" }
// 0002:   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "_WETNESS_FULL" }
// 8008:   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "_WETNESS_NONE" "_DETAIL_TEXTURED" "_GLITTER" }
// 5044:   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "_WETNESS_NONE" "_DETAIL_TEXTURED" }
// 2821:   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "_WETNESS_NONE" }
//         undeciphered2: 1 0 2 0 0
//         undeciphered3: 159 6 0 0 2 1 1 2 3 4 4 5 7 8
//         ConstBuffer "UnityPerCamera" 144
//         Vector 64 [_WorldSpaceCameraPos] 3
//         Vector 80 [_ProjectionParams]
//         ConstBuffer "UnityPerDraw" 352
//         Vector 336 [unity_WorldTransformParams]
//         Matrix 0 [glstate_matrix_mvp]
//         Matrix 192 [_Object2World]
//         Matrix 256 [_World2Object]
//         BindCB "UnityPerCamera" 0
//         BindCB "UnityPerDraw" 1
//
// Headers extracted with DarkStarSword's extract_unity53_shaders.py
// https://raw.githubusercontent.com/DarkStarSword/3d-fixes/master/extract_unity53_shaders.py

// ---- Created with 3Dmigoto v1.2.38 on Thu Feb 09 12:27:30 2017
cbuffer cb1 : register(b1)
{
  float4 cb1[22];
}

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




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



cbuffer UnityPerDraw : register(b11) {
	float4x4 glstate_matrix_mvp;
	float4x4 glstate_matrix_modelview0;
	float4x4 glstate_matrix_invtrans_modelview0;
	#define UNITY_MATRIX_MVP glstate_matrix_mvp
	#define UNITY_MATRIX_MV glstate_matrix_modelview0
	#define UNITY_MATRIX_IT_MV glstate_matrix_invtrans_modelview0

	uniform float4x4 _Object2World;
	uniform float4x4 _World2Object;
	uniform float4 unity_LODFade; // x is the fade value ranging within [0,1]. y is x quantized into 16 levels
	uniform float4 unity_WorldTransformParams; // w is usually 1.0, or -1.0 for odd-negative scale transforms
}


#include <matrix.hlsl>

void main( 
  float4 v0 : POSITION0,
  float3 v1 : NORMAL0,
  float4 v2 : TEXCOORD0,
  float2 v3 : TEXCOORD1,
  float4 v4 : TANGENT0,
  float4 v5 : COLOR0,
  out float4 o0 : SV_POSITION0,
  out float4 o1 : TEXCOORD0,
  out float4 o2 : TEXCOORD1,
  out float4 o3 : TEXCOORD2,
  out float4 o4 : TEXCOORD3,
  out float4 o5 : TEXCOORD4,
  out float4 o6 : COLOR0,
  out float4 o7 : TEXCOORD5,
  out float3 o8 : TEXCOORD8)
{
  float4 r0,r1,r2,r3;
  uint4 bitmask, uiDest;
  float4 fDest;

float4 stereo = StereoParams.Load(0);
float separation = stereo.x, convergence = stereo.y, eye = stereo.z;

// Unity reflection/specular fix inserted with DarkStarSword's hlsltool.py:
// hlsltool.py -I ../112 --auto-fix-vertex-halo --fix-unity-reflection --only-autofixed --no-validate --ignore-other-errors 4d0c8fa4d55c9d66-vs_replace.txt
float4 _WorldSpaceCameraPos = cb0[4];
float4 clip_space_adj = float4(-separation * convergence, 0, 0, 0);
float4 local_space_adj = mul(inverse(glstate_matrix_mvp), clip_space_adj);
float4 world_space_adj = mul(_Object2World, local_space_adj);
_WorldSpaceCameraPos.xyz -= world_space_adj.xyz;

  r0.xyzw = cb1[1].xyzw * v0.yyyy;
  r0.xyzw = cb1[0].xyzw * v0.xxxx + r0.xyzw;
  r0.xyzw = cb1[2].xyzw * v0.zzzz + r0.xyzw;
  r0.xyzw = cb1[3].xyzw * v0.wwww + r0.xyzw;
  o0.xyzw = r0.xyzw;

// Automatic vertex shader halo fix inserted with DarkStarSword's hlsltool.py:
// hlsltool.py -I ../112 --auto-fix-vertex-halo --fix-unity-reflection --only-autofixed --no-validate --ignore-other-errors 4d0c8fa4d55c9d66-vs_replace.txt
if (r0.w != 1.0) { r0.x += separation * (r0.w - convergence); }

  o1.xy = v2.xy;
  o1.zw = v3.xy;
  r1.xyz = cb1[13].xyz * v0.yyy;
  r1.xyz = cb1[12].xyz * v0.xxx + r1.xyz;
  r1.xyz = cb1[14].xyz * v0.zzz + r1.xyz;
  r1.xyz = cb1[15].xyz * v0.www + r1.xyz;
  o2.xyz = -_WorldSpaceCameraPos.xyz + r1.xyz;
  o8.xyz = r1.xyz;
  o2.w = 0;
  r1.xyz = cb1[13].xyz * v4.yyy;
  r1.xyz = cb1[12].xyz * v4.xxx + r1.xyz;
  r1.xyz = cb1[14].xyz * v4.zzz + r1.xyz;
  r1.w = dot(r1.xyz, r1.xyz);
  r1.w = rsqrt(r1.w);
  r1.xyz = r1.xyz * r1.www;
  o3.xyz = r1.xyz;
  o3.w = 0;
  r2.x = cb1[16].x * v1.x;
  r2.y = cb1[17].x * v1.x;
  r2.z = cb1[18].x * v1.x;
  r3.x = cb1[16].y * v1.y;
  r3.y = cb1[17].y * v1.y;
  r3.z = cb1[18].y * v1.y;
  r2.xyz = r3.xyz + r2.xyz;
  r3.x = cb1[16].z * v1.z;
  r3.y = cb1[17].z * v1.z;
  r3.z = cb1[18].z * v1.z;
  r2.xyz = r3.xyz + r2.xyz;
  r1.w = dot(r2.xyz, r2.xyz);
  r1.w = rsqrt(r1.w);
  r2.xyz = r2.xyz * r1.www;
  r3.xyz = r2.zxy * r1.yzx;
  r1.xyz = r2.yzx * r1.zxy + -r3.xyz;
  o5.xyz = r2.xyz;
  r1.w = cb1[21].w * v4.w;
  o4.xyz = r1.xyz * r1.www;
  o4.w = 0;
  o5.w = 0;
  o6.xyzw = v5.xyzw;
  r0.y = cb0[5].x * r0.y;
  r1.xzw = float3(0.5,0.5,0.5) * r0.xwy;
  o7.zw = r0.zw;
  o7.xy = r1.xw + r1.zz;
  return;
}
