// hlsltool.py -I ../112 --auto-fix-vertex-halo --fix-unity-reflection --only-autofixed --no-validate --ignore-other-errors 8aac46628a36db17-vs_replace.txt
// 3DMigoto: 8aac46628a36db17 | Matched 18 variants of 1 shaders: UBER - Specular Setup/ Triplanar Selective
//
//           Unity headers extracted from _UBERShader_Specular_TriplanarSelective.shader
//           Shader "UBER - Specular Setup/ Triplanar Selective" {
//             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
//              _SpecColor ("Specular", Color) = (1,1,1,1)
//              _SpecColor2 ("Specular2", Color) = (1,1,1,1)
//              _SpecGlossMap ("Specular", 2D) = "white" { }
//              _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
//             [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
//             [NoKeywordToggle]  _Snow ("Snow", Float) = 0
//             [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
//              _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
//             [Foldout]  _TriplanarShown ("", Float) = 1
//              _MainTexAverageColor ("Albdeo texture average color", Color) = (0.5,0.5,0.5,0)
//              _MainTex2AverageColor ("Albdeo 2 texture average color", Color) = (0.5,0.5,0.5,0)
//              _TriplanarBlendSharpness ("Blend sharpness", Range(1,100)) = 10
//              _TriplanarNormalBlendSharpness ("Blend sharpness normal", Range(0,1)) = 0
//              _TriplanarHeightmapBlendingValue ("Heightmap blending value", Range(0,1)) = 0.3
//              _TriplanarBlendAmbientOcclusion ("Ambient occlusion", Range(0,1)) = 0.5
//             [NoKeywordToggle]  _TriplanarWorldMapping ("World mapping", Float) = 0
//             [Foldout]  _MainShown ("", Float) = 1
//             [Foldout]  _SecondaryShown ("", Float) = 1
//             [Foldout]  _PresetsShown ("", Float) = 0
//             [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)
//             }
//             Fallback "Standard (Specular setup)"
//             SubShader 1/1 {
//               LOD 700
//               Tags { "QUEUE"="Geometry+1" "RenderType"="Opaque" "PerformanceChecks"="False" "REFR"="Off" "TWO_LAYERS"="Off" "TRIPLANAR"="On" }
//               Pass 4/4 {
//                 Name "DEFERRED"
//                 Tags { "LIGHTMODE"="Deferred" "QUEUE"="Geometry+1" "RenderType"="Opaque" "PerformanceChecks"="False" "REFR"="Off" "TWO_LAYERS"="Off" "TRIPLANAR"="On" }
//                 GpuProgramID 246969
//                 Program "vp" {
//                   SubProgram "d3d11 " {
// 00001:              GpuProgramIndex 105
// 00002:              GpuProgramIndex 107
// 00004:              GpuProgramIndex 109
// 00008:              GpuProgramIndex 111
// 00010:              GpuProgramIndex 113
// 00020:              GpuProgramIndex 115
// 00040:              GpuProgramIndex 117
// 00080:              GpuProgramIndex 119
// 00100:              GpuProgramIndex 121
// 00200:              GpuProgramIndex 123
// 00400:              GpuProgramIndex 125
// 00800:              GpuProgramIndex 127
// 01000:              GpuProgramIndex 129
// 02000:              GpuProgramIndex 131
// 04000:              GpuProgramIndex 133
// 08000:              GpuProgramIndex 135
// 10000:              GpuProgramIndex 137
// 20000:              GpuProgramIndex 139
//                   }
//                 }
//               }
//             }
//           }
//
//        Unity 5.3 headers extracted from _UBERShader_Specular_TriplanarSelective.shader.decompressed:
//          API d3d11
//          Shader model vs_4_0
//          undeciphered1: 201509030 54 0 0
// 04000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_OCCLUSION_FROM_ALBEDO_ALPHA" "_WETNESS_NONE" "_EMISSION_ANIMATED" "_PARALLAX_MAP" "_TRIPLANAR_WORLD_MAPPING" }
// 02000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_WETNESS_NONE" "_EMISSION_ANIMATED" "_PARALLAX_MAP" "_TRIPLANAR_WORLD_MAPPING" }
// 01000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_WETNESS_NONE" "_PARALLAX_MAP" "_TRIPLANAR_WORLD_MAPPING" }
// 00020:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_OCCLUSION_FROM_ALBEDO_ALPHA" "_WETNESS_NONE" "_EMISSION_ANIMATED" "_PARALLAX_MAP" "_TRIPLANAR_WORLD_MAPPING" }
// 00010:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_WETNESS_NONE" "_EMISSION_ANIMATED" "_PARALLAX_MAP" "_TRIPLANAR_WORLD_MAPPING" }
// 00008:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_WETNESS_NONE" "_PARALLAX_MAP" "_TRIPLANAR_WORLD_MAPPING" }
// 00800:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_OCCLUSION_FROM_ALBEDO_ALPHA" "_WETNESS_NONE" "_EMISSION_ANIMATED" "_PARALLAX_MAP" "_TRIPLANAR_WORLD_MAPPING" }
// 00400:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_WETNESS_NONE" "_EMISSION_ANIMATED" "_PARALLAX_MAP" "_TRIPLANAR_WORLD_MAPPING" }
// 00200:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_WETNESS_NONE" "_PARALLAX_MAP" "_TRIPLANAR_WORLD_MAPPING" }
// 00004:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "_OCCLUSION_FROM_ALBEDO_ALPHA" "_WETNESS_NONE" "_EMISSION_ANIMATED" "_PARALLAX_MAP" "_TRIPLANAR_WORLD_MAPPING" }
// 00002:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "_WETNESS_NONE" "_EMISSION_ANIMATED" "_PARALLAX_MAP" "_TRIPLANAR_WORLD_MAPPING" }
// 00001:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "_WETNESS_NONE" "_PARALLAX_MAP" "_TRIPLANAR_WORLD_MAPPING" }
// 20000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_OCCLUSION_FROM_ALBEDO_ALPHA" "_WETNESS_NONE" "_EMISSION_ANIMATED" "_PARALLAX_MAP" "_TRIPLANAR_WORLD_MAPPING" }
// 10000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_WETNESS_NONE" "_EMISSION_ANIMATED" "_PARALLAX_MAP" "_TRIPLANAR_WORLD_MAPPING" }
// 08000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_WETNESS_NONE" "_PARALLAX_MAP" "_TRIPLANAR_WORLD_MAPPING" }
// 00100:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_OCCLUSION_FROM_ALBEDO_ALPHA" "_WETNESS_NONE" "_EMISSION_ANIMATED" "_PARALLAX_MAP" "_TRIPLANAR_WORLD_MAPPING" }
// 00080:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_WETNESS_NONE" "_EMISSION_ANIMATED" "_PARALLAX_MAP" "_TRIPLANAR_WORLD_MAPPING" }
// 00040:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_WETNESS_NONE" "_PARALLAX_MAP" "_TRIPLANAR_WORLD_MAPPING" }
//          undeciphered2: 1 0 4 0 0
//          undeciphered3: 23 4 0 0 2 1 1 2 4 5
// 09249:   ConstBuffer "$Globals" 576
// 36db6:   ConstBuffer "$Globals" 592
//          Vector 48 [unity_ColorSpaceLuminance]
//          ConstBuffer "UnityPerCamera" 144
//          Vector 64 [_WorldSpaceCameraPos] 3
//          ConstBuffer "UnityLighting" 720
//          Vector 656 [unity_SHBr]
//          Vector 672 [unity_SHBg]
//          Vector 688 [unity_SHBb]
//          Vector 704 [unity_SHC]
//          ConstBuffer "UnityPerDraw" 352
//          Matrix 0 [glstate_matrix_mvp]
//          Matrix 192 [_Object2World]
//          Matrix 256 [_World2Object]
//          BindCB "$Globals" 0
//          BindCB "UnityPerCamera" 1
//          BindCB "UnityLighting" 2
//          BindCB "UnityPerDraw" 3
//
// 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:30:19 2017
cbuffer cb3 : register(b3)
{
  float4 cb3[22];
}

cbuffer cb2 : register(b2)
{
  float4 cb2[45];
}

cbuffer cb1 : register(b1)
{
  float4 cb1[9];
}

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




// 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 : TEXCOORD5,
  out float4 o7 : COLOR0,
  out float3 o8 : TEXCOORD6)
{
  float4 r0,r1,r2;
  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 8aac46628a36db17-vs_replace.txt
float4 _WorldSpaceCameraPos = cb1[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 = cb3[1].xyzw * v0.yyyy;
  r0.xyzw = cb3[0].xyzw * v0.xxxx + r0.xyzw;
  r0.xyzw = cb3[2].xyzw * v0.zzzz + r0.xyzw;
  o0.xyzw = cb3[3].xyzw * v0.wwww + r0.xyzw;
  o1.w = v3.x;
  r0.x = cb3[16].x * v1.x;
  r0.y = cb3[17].x * v1.x;
  r0.z = cb3[18].x * v1.x;
  r1.x = cb3[16].y * v1.y;
  r1.y = cb3[17].y * v1.y;
  r1.z = cb3[18].y * v1.y;
  r0.xyz = r1.xyz + r0.xyz;
  r1.x = cb3[16].z * v1.z;
  r1.y = cb3[17].z * v1.z;
  r1.z = cb3[18].z * v1.z;
  r0.xyz = r1.xyz + r0.xyz;
  r0.w = dot(r0.xyz, r0.xyz);
  r0.w = rsqrt(r0.w);
  r0.xyz = r0.xyz * r0.www;
  o1.xyz = r0.xyz;
  r1.xyz = cb3[13].xyz * v0.yyy;
  r1.xyz = cb3[12].xyz * v0.xxx + r1.xyz;
  r1.xyz = cb3[14].xyz * v0.zzz + r1.xyz;
  r1.xyz = cb3[15].xyz * v0.www + r1.xyz;
  o2.xyz = -_WorldSpaceCameraPos.xyz + r1.xyz;
  o8.xyz = r1.xyz;
  o2.w = v3.y;
  r1.xyz = float3(0,1,0) * r0.zxy;
  r1.xyz = r0.zxy * float3(0,0,1) + -r1.yzx;
  r2.xyz = r1.xyz * r0.zxy;
  r1.xyz = r0.yzx * r1.yzx + -r2.xyz;
  r2.xy = cmp(r0.xy < float2(0,0));
  r2.xy = r2.xy ? float2(-1,-1) : float2(1,1);
  o3.xyz = r2.xxx * r1.xyz;
  o3.w = 0;
  r1.xyz = float3(0,1,0) * r0.xyz;
  r1.xyz = r0.zxy * float3(1,0,0) + -r1.xyz;
  r2.xzw = r1.xyz * r0.zxy;
  r1.xyz = r0.yzx * r1.yzx + -r2.xzw;
  o4.xyz = r1.xyz * r2.yyy;
  o4.w = 0;
  r1.xyz = float3(0,0,1) * r0.xyz;
  r1.xyz = r0.zxy * float3(0,1,0) + -r1.xyz;
  r2.xyz = r1.xyz * r0.zxy;
  r1.xyz = r0.yzx * r1.yzx + -r2.xyz;
  r0.w = cmp(0 < r0.z);
  r0.w = r0.w ? 1 : -1;
  o5.xyz = r1.xyz * r0.www;
  o5.w = 0;
  r0.w = r0.y * r0.y;
  r0.w = r0.x * r0.x + -r0.w;
  r1.xyzw = r0.xyzz * r0.yzzx;
  r0.x = dot(cb2[41].xyzw, r1.xyzw);
  r0.y = dot(cb2[42].xyzw, r1.xyzw);
  r0.z = dot(cb2[43].xyzw, r1.xyzw);
  r0.xyz = cb2[44].xyz * r0.www + r0.xyz;
  r1.xyz = max(float3(0,0,0), r0.xyz);
  r1.xyz = log2(r1.xyz);
  r1.xyz = float3(0.416666657,0.416666657,0.416666657) * r1.xyz;
  r1.xyz = exp2(r1.xyz);
  r1.xyz = r1.xyz * float3(1.05499995,1.05499995,1.05499995) + float3(-0.0549999997,-0.0549999997,-0.0549999997);
  r1.xyz = max(float3(0,0,0), r1.xyz);
  r0.w = cmp(cb0[3].w == 0.000000);
  o6.xyz = r0.www ? r1.xyz : r0.xyz;
  o6.w = 0;
  o7.xyzw = v5.xyzw;
  return;
}
 