// hlsltool.py -I ../112 --auto-fix-vertex-halo --fix-unity-reflection --only-autofixed --no-validate --ignore-other-errors f8bd253e64382163-vs_replace.txt
// 3DMigoto: f8bd253e64382163 | Matched 102 variants of 1 shaders: Standard (Specular setup)
//
//                                Unity headers extracted from StandardSpecular.shader
//                                Shader "Standard (Specular setup)" {
//                                  Properties {
//                                   _Color ("Color", Color) = (1,1,1,1)
//                                   _MainTex ("Albedo", 2D) = "white" { }
//                                   _Cutoff ("Alpha Cutoff", Range(0,1)) = 0.5
//                                   _Glossiness ("Smoothness", Range(0,1)) = 0.5
//                                   _SpecColor ("Specular", Color) = (0.2,0.2,0.2,1)
//                                   _SpecGlossMap ("Specular", 2D) = "white" { }
//                                   _BumpScale ("Scale", Float) = 1
//                                   _BumpMap ("Normal Map", 2D) = "bump" { }
//                                   _Parallax ("Height Scale", Range(0.005,0.08)) = 0.02
//                                   _ParallaxMap ("Height Map", 2D) = "black" { }
//                                   _OcclusionStrength ("Strength", Range(0,1)) = 1
//                                   _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
//                                  [HideInInspector]  _Mode ("__mode", Float) = 0
//                                  [HideInInspector]  _SrcBlend ("__src", Float) = 1
//                                  [HideInInspector]  _DstBlend ("__dst", Float) = 0
//                                  [HideInInspector]  _ZWrite ("__zw", Float) = 1
//                                  }
//                                  Fallback "VertexLit"
//                                  SubShader 1/2 {
//                                    LOD 300
//                                    Tags { "RenderType"="Opaque" "PerformanceChecks"="False" }
//                                    Pass 4/4 {
//                                      Name "DEFERRED"
//                                      Tags { "LIGHTMODE"="Deferred" "RenderType"="Opaque" "PerformanceChecks"="False" }
//                                      GpuProgramID 213026
//                                      Program "vp" {
//                                        SubProgram "d3d11 " {
// 00000000000000000000004000:              GpuProgramIndex 1001
// 00000000000000000000008000:              GpuProgramIndex 1003
// 00000000000000000000010000:              GpuProgramIndex 1005
// 00000000000000000000020000:              GpuProgramIndex 1007
// 00000000000000000000040000:              GpuProgramIndex 1009
// 00000000000000000000080000:              GpuProgramIndex 1011
// 00000000000000000000100000:              GpuProgramIndex 1013
// 00000000000000000000200000:              GpuProgramIndex 1015
// 00000000000000000000400000:              GpuProgramIndex 1017
// 00000000000000000000800000:              GpuProgramIndex 1019
// 00000000000000000001000000:              GpuProgramIndex 1023
// 00000000000000000002000000:              GpuProgramIndex 1025
// 00000000000000000004000000:              GpuProgramIndex 1027
// 00000000000000000008000000:              GpuProgramIndex 1029
// 00000000000000000010000000:              GpuProgramIndex 1031
// 00000000000000000020000000:              GpuProgramIndex 1033
// 00000000000000000040000000:              GpuProgramIndex 1035
// 00000000000000000080000000:              GpuProgramIndex 1037
// 00000000000000000100000000:              GpuProgramIndex 1039
// 00000000000000000200000000:              GpuProgramIndex 1041
// 00000000000000000400000000:              GpuProgramIndex 1043
// 00000000000000000800000000:              GpuProgramIndex 1045
// 00000000000000001000000000:              GpuProgramIndex 1047
// 00000000000000002000000000:              GpuProgramIndex 1049
// 00000000000000004000000000:              GpuProgramIndex 1051
// 00000000000000008000000000:              GpuProgramIndex 1053
// 00000000000000010000000000:              GpuProgramIndex 1055
// 00000000000000020000000000:              GpuProgramIndex 1057
// 00000000000000040000000000:              GpuProgramIndex 1059
// 00000000000000080000000000:              GpuProgramIndex 1061
// 00000000000000100000000000:              GpuProgramIndex 1065
// 00000000000000200000000000:              GpuProgramIndex 1067
// 00000000000000400000000000:              GpuProgramIndex 1069
// 00000000000000800000000000:              GpuProgramIndex 1071
// 00000000000001000000000000:              GpuProgramIndex 1073
// 00000000000002000000000000:              GpuProgramIndex 1075
// 00000000000004000000000000:              GpuProgramIndex 1077
// 00000000000008000000000000:              GpuProgramIndex 1097
// 00000000000010000000000000:              GpuProgramIndex 1099
// 00000000000020000000000000:              GpuProgramIndex 1101
// 00000000000040000000000000:              GpuProgramIndex 1103
// 00000000000080000000000000:              GpuProgramIndex 1107
// 00000000000100000000000000:              GpuProgramIndex 1109
// 00000000000200000000000000:              GpuProgramIndex 1111
// 00000000000400000000000000:              GpuProgramIndex 1113
// 00000000000800000000000000:              GpuProgramIndex 1115
// 00000000001000000000000000:              GpuProgramIndex 1117
// 00000000002000000000000000:              GpuProgramIndex 1119
// 00000000004000000000000000:              GpuProgramIndex 1121
// 00000000008000000000000000:              GpuProgramIndex 1123
// 00000000010000000000000000:              GpuProgramIndex 1125
// 00000000020000000000000000:              GpuProgramIndex 1127
// 00000000040000000000000000:              GpuProgramIndex 1129
// 00000000080000000000000000:              GpuProgramIndex 1131
// 00000000100000000000000000:              GpuProgramIndex 1133
// 00000000200000000000000000:              GpuProgramIndex 1135
// 00000000400000000000000000:              GpuProgramIndex 1137
// 00000000800000000000000000:              GpuProgramIndex 1139
// 00000001000000000000000000:              GpuProgramIndex 1141
// 00000002000000000000000000:              GpuProgramIndex 1143
// 00000004000000000000000000:              GpuProgramIndex 1145
// 00000008000000000000000000:              GpuProgramIndex 1149
// 00000010000000000000000000:              GpuProgramIndex 1151
// 00000020000000000000000000:              GpuProgramIndex 1153
// 00000040000000000000000000:              GpuProgramIndex 1155
// 00000080000000000000000000:              GpuProgramIndex 1157
// 00000100000000000000000000:              GpuProgramIndex 1159
// 00000200000000000000000000:              GpuProgramIndex 1161
// 00000400000000000000000000:              GpuProgramIndex 1163
// 00000800000000000000000000:              GpuProgramIndex 1165
// 00001000000000000000000000:              GpuProgramIndex 1167
// 00002000000000000000000000:              GpuProgramIndex 1169
// 00004000000000000000000000:              GpuProgramIndex 1171
// 00008000000000000000000000:              GpuProgramIndex 1173
// 00010000000000000000000000:              GpuProgramIndex 1175
// 00020000000000000000000000:              GpuProgramIndex 1177
// 00040000000000000000000000:              GpuProgramIndex 1179
// 00080000000000000000000000:              GpuProgramIndex 1181
// 00100000000000000000000000:              GpuProgramIndex 1183
// 00200000000000000000000000:              GpuProgramIndex 1185
// 00400000000000000000000000:              GpuProgramIndex 1187
// 00800000000000000000000000:              GpuProgramIndex 1191
// 01000000000000000000000000:              GpuProgramIndex 1193
// 02000000000000000000000000:              GpuProgramIndex 1195
// 04000000000000000000000000:              GpuProgramIndex 1197
// 08000000000000000000000000:              GpuProgramIndex 1199
// 10000000000000000000000000:              GpuProgramIndex 1201
// 20000000000000000000000000:              GpuProgramIndex 1203
// 00000000000000000000000001:              GpuProgramIndex 971
// 00000000000000000000000002:              GpuProgramIndex 973
// 00000000000000000000000004:              GpuProgramIndex 975
// 00000000000000000000000008:              GpuProgramIndex 977
// 00000000000000000000000010:              GpuProgramIndex 981
// 00000000000000000000000020:              GpuProgramIndex 983
// 00000000000000000000000040:              GpuProgramIndex 985
// 00000000000000000000000080:              GpuProgramIndex 987
// 00000000000000000000000100:              GpuProgramIndex 989
// 00000000000000000000000200:              GpuProgramIndex 991
// 00000000000000000000000400:              GpuProgramIndex 993
// 00000000000000000000000800:              GpuProgramIndex 995
// 00000000000000000000001000:              GpuProgramIndex 997
// 00000000000000000000002000:              GpuProgramIndex 999
//                                        }
//                                      }
//                                    }
//                                  }
//                                }
//
//                             Unity 5.3 headers extracted from StandardSpecular.shader.decompressed:
//                               API d3d11
//                               Shader model vs_4_0
//                               undeciphered1: 201509030 43 0 0
// 00000100000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_ALPHABLEND_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000400000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_ALPHABLEND_ON" }
// 00000040000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_ALPHATEST_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000200000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_ALPHATEST_ON" }
// 00000004000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_DETAIL_MULX2" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000001000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_DETAIL_MULX2" "_NORMALMAP" }
// 00000000020000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_DETAIL_MULX2" "_SPECGLOSSMAP" }
// 00000000008000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_DETAIL_MULX2" }
// 00000002000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000800000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_NORMALMAP" }
// 00000000010000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_SPECGLOSSMAP" }
// 00000000004000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" }
// 00000000000000000020000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_ALPHABLEND_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000000000000080000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_ALPHABLEND_ON" }
// 00000000000000000008000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_ALPHATEST_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000000000000040000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_ALPHATEST_ON" }
// 00000000000000000000800000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_DETAIL_MULX2" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000000000000200000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_DETAIL_MULX2" "_NORMALMAP" }
// 00000000000000000000004000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_DETAIL_MULX2" "_SPECGLOSSMAP" }
// 00000000000000000000001000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_DETAIL_MULX2" }
// 00000200000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "UNITY_HDR_ON" "_ALPHABLEND_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000080000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "UNITY_HDR_ON" "_ALPHATEST_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000020000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "UNITY_HDR_ON" "_DETAIL_MULX2" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000100000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "UNITY_HDR_ON" "_DETAIL_MULX2" "_SPECGLOSSMAP" }
// 00000010000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "UNITY_HDR_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000008000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "UNITY_HDR_ON" "_NORMALMAP" }
// 00000000080000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "UNITY_HDR_ON" "_SPECGLOSSMAP" }
// 00000000040000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "UNITY_HDR_ON" }
// 00000000000000000040000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "_ALPHABLEND_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000000000010000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "_ALPHATEST_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000000000004000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "_DETAIL_MULX2" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000000000000020000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "_DETAIL_MULX2" "_SPECGLOSSMAP" }
// 00000000000000000002000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000000000001000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "_NORMALMAP" }
// 00000000000000000000010000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "_SPECGLOSSMAP" }
// 00000000000000000000008000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_EMISSION" }
// 00000000000000000000400000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000000000000100000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_NORMALMAP" }
// 00000000000000000000002000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "_SPECGLOSSMAP" }
// 00000000000000000000000800:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" }
// 00000000001000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_ALPHABLEND_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000400000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_ALPHATEST_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000040000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_DETAIL_MULX2" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000010000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_DETAIL_MULX2" "_NORMALMAP" }
// 00000000000020000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000008000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_NORMALMAP" }
// 00000000000000000000000200:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "_ALPHABLEND_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000000000000000080:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "_ALPHATEST_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000000000000000008:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "_DETAIL_MULX2" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000000000000000002:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "_DETAIL_MULX2" "_NORMALMAP" }
// 00000000002000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "UNITY_HDR_ON" "_ALPHABLEND_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000800000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "UNITY_HDR_ON" "_ALPHATEST_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000200000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "UNITY_HDR_ON" "_DETAIL_MULX2" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000100000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "UNITY_HDR_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000080000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "UNITY_HDR_ON" "_NORMALMAP" }
// 00000000000000000000000400:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "_ALPHABLEND_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000000000000000100:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "_ALPHATEST_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000000000000000040:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "_DETAIL_MULX2" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000000000000000020:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000000000000000010:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "_NORMALMAP" }
// 00000000000000000000000004:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000000000000000001:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "_NORMALMAP" }
// 10000000000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_ALPHABLEND_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00040000000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_ALPHABLEND_ON" }
// 04000000000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_ALPHATEST_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00020000000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_ALPHATEST_ON" }
// 00400000000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_DETAIL_MULX2" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00100000000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_DETAIL_MULX2" "_NORMALMAP" }
// 00002000000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_DETAIL_MULX2" "_SPECGLOSSMAP" }
// 00000800000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_DETAIL_MULX2" }
// 00200000000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00080000000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_NORMALMAP" }
// 00001000000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" "_SPECGLOSSMAP" }
// 00000400000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" }
// 00000000000002000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_ALPHABLEND_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000000008000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_ALPHABLEND_ON" }
// 00000000000000800000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_ALPHATEST_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000000004000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_ALPHATEST_ON" }
// 00000000000000080000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_DETAIL_MULX2" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000000020000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_DETAIL_MULX2" "_NORMALMAP" }
// 00000000000000000400000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_DETAIL_MULX2" "_SPECGLOSSMAP" }
// 00000000000000000100000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_DETAIL_MULX2" }
// 20000000000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "UNITY_HDR_ON" "_ALPHABLEND_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 08000000000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "UNITY_HDR_ON" "_ALPHATEST_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 02000000000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "UNITY_HDR_ON" "_DETAIL_MULX2" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00010000000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "UNITY_HDR_ON" "_DETAIL_MULX2" "_SPECGLOSSMAP" }
// 01000000000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "UNITY_HDR_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00800000000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "UNITY_HDR_ON" "_NORMALMAP" }
// 00008000000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "UNITY_HDR_ON" "_SPECGLOSSMAP" }
// 00004000000000000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "UNITY_HDR_ON" }
// 00000000000004000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "_ALPHABLEND_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000001000000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "_ALPHATEST_ON" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000000400000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "_DETAIL_MULX2" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000000002000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "_DETAIL_MULX2" "_SPECGLOSSMAP" }
// 00000000000000200000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000000100000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "_NORMALMAP" }
// 00000000000000001000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_EMISSION" "_SPECGLOSSMAP" }
// 00000000000000000800000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_EMISSION" }
// 00000000000000040000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_NORMALMAP" "_SPECGLOSSMAP" }
// 00000000000000010000000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_NORMALMAP" }
// 00000000000000000200000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "_SPECGLOSSMAP" }
// 00000000000000000080000000:   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" }
//                               undeciphered2: 1 0 4 0 0
//                               undeciphered3: 155 5 0 0 1 2 3 4 4 5 7 8
//                               ConstBuffer "$Globals" 240
//                               Vector 160 [_MainTex_ST]
//                               Vector 176 [_DetailAlbedoMap_ST]
//                               Float 216 [_UVSec]
//                               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
//                               Vector 336 [unity_WorldTransformParams]
//                               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:35:25 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[14];
}




// 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,
  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 float3 o7 : 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 f8bd253e64382163-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;
  r0.x = cmp(cb0[13].z == 0.000000);
  r0.xy = r0.xx ? v2.xy : v3.xy;
  o1.zw = r0.xy * cb0[11].xy + cb0[11].zw;
  o1.xy = v2.xy * cb0[10].xy + cb0[10].zw;
  r0.xyz = cb3[13].xyz * v0.yyy;
  r0.xyz = cb3[12].xyz * v0.xxx + r0.xyz;
  r0.xyz = cb3[14].xyz * v0.zzz + r0.xyz;
  r0.xyz = cb3[15].xyz * v0.www + r0.xyz;
  o2.xyz = -_WorldSpaceCameraPos.xyz + r0.xyz;
  o7.xyz = r0.xyz;
  r0.xyz = cb3[13].xyz * v4.yyy;
  r0.xyz = cb3[12].xyz * v4.xxx + r0.xyz;
  r0.xyz = cb3[14].xyz * v4.zzz + r0.xyz;
  r0.w = dot(r0.xyz, r0.xyz);
  r0.w = rsqrt(r0.w);
  r0.xyz = r0.xyz * r0.www;
  o3.xyz = r0.xyz;
  o3.w = 0;
  r1.x = cb3[16].x * v1.x;
  r1.y = cb3[17].x * v1.x;
  r1.z = cb3[18].x * v1.x;
  r2.x = cb3[16].y * v1.y;
  r2.y = cb3[17].y * v1.y;
  r2.z = cb3[18].y * v1.y;
  r1.xyz = r2.xyz + r1.xyz;
  r2.x = cb3[16].z * v1.z;
  r2.y = cb3[17].z * v1.z;
  r2.z = cb3[18].z * v1.z;
  r1.xyz = r2.xyz + r1.xyz;
  r0.w = dot(r1.xyz, r1.xyz);
  r0.w = rsqrt(r0.w);
  r1.xyz = r1.xyz * r0.www;
  r2.xyz = r1.zxy * r0.yzx;
  r0.xyz = r1.yzx * r0.zxy + -r2.xyz;
  r0.w = cb3[21].w * v4.w;
  o4.xyz = r0.xyz * r0.www;
  o4.w = 0;
  o5.xyz = r1.xyz;
  o5.w = 0;
  r0.x = r1.y * r1.y;
  r0.x = r1.x * r1.x + -r0.x;
  r1.xyzw = r1.xyzz * r1.yzzx;
  r2.x = dot(cb2[41].xyzw, r1.xyzw);
  r2.y = dot(cb2[42].xyzw, r1.xyzw);
  r2.z = dot(cb2[43].xyzw, r1.xyzw);
  o6.xyz = cb2[44].xyz * r0.xxx + r2.xyz;
  o6.w = 0;
  return;
}
  