// hlsltool.py -I ../112 --auto-fix-vertex-halo --fix-unity-reflection --only-autofixed --no-validate --ignore-other-errors b4e87ecae14f95ce-vs_replace.txt
// 3DMigoto: b4e87ecae14f95ce | Matched 6 variants of 2 shaders: UBER - Metallic Setup/2 Sided/ Core, UBER - Specular Setup/ Core
//
// 0f:    Unity headers extracted from _UBERShader_Metallic_2Sided.shader
// 30:    Unity headers extracted from _UBERShader_Specular.shader
// 0f:    Shader "UBER - Metallic Setup/2 Sided/ Core" {
// 30:    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
// 30:       _SpecColor ("Specular", Color) = (1,1,1,1)
// 0f:      [Gamma]  _Metallic ("Metallic", Range(0,1)) = 1
// 30:       _SpecColor2 ("Specular2", Color) = (1,1,1,1)
// 0f:      [Gamma]  _Metallic2 ("Metallic2", Range(0,1)) = 1
// 0f:       _MetallicGlossMap ("Metallic", 2D) = "white" { }
// 30:       _SpecGlossMap ("Specular", 2D) = "white" { }
// 0f:       _MetallicGlossMap2 ("Metallic2", 2D) = "white" { }
// 30:       _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
// 0f:      [NoKeywordToggle]  _RainIntensityFromGlobal ("Rain Intensity controlled globally (multiplied)", Float) = 0
// 30:      [NoKeywordToggle]  _WetDroplets ("Droplets (vertex color B)", Float) = 0
// 0f:      [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
// 0f:      [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
// 30:      [Foldout]  _MainShown ("", Float) = 1
// 0f:      [HideInInspector]  _ShadowCull ("__shadowcull", Float) = 2
// 0f:      [Foldout]  _MainShown ("", Float) = 1
//          [Foldout]  _SecondaryShown ("", Float) = 1
//          [Foldout]  _PresetsShown ("", Float) = 0
// 30:      [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)
//          }
// 30:      Fallback "Standard (Specular setup)"
// 0f:      Fallback "Standard"
//          SubShader 1/1 {
//            LOD 700
//            Tags { "QUEUE"="Geometry+1" "RenderType"="Opaque" "PerformanceChecks"="False" "REFR"="Off" "TWO_LAYERS"="Off" }
//            Pass 2/4 {
//              Name "FORWARD_DELTA"
//              Tags { "LIGHTMODE"="ForwardAdd" "QUEUE"="Geometry+1" "SHADOWSUPPORT"="true" "RenderType"="Opaque" "PerformanceChecks"="False" "REFR"="Off" "TWO_LAYERS"="Off" }
//              ZWrite Off
// 0f:          Cull Off
//              Blend [_SrcBlend] One
// 30:          GpuProgramID 78503
// 0f:          GpuProgramID 84315
//              Program "vp" {
//                SubProgram "d3d11 " {
// 01:              GpuProgramIndex 131
// 02:              GpuProgramIndex 157
// 04:              GpuProgramIndex 183
// 08:              GpuProgramIndex 209
// 10:              GpuProgramIndex 47
// 20:              GpuProgramIndex 73
//                }
//              }
//            }
//          }
//        }
//
// 0f: Unity 5.3 headers extracted from _UBERShader_Metallic_2Sided.shader.decompressed:
// 30: Unity 5.3 headers extracted from _UBERShader_Specular.shader.decompressed:
//       API d3d11
//       Shader model vs_4_0
//       undeciphered1: 201509030 45 0 0
// 08:   Keywords { "SPOT" "SHADOWS_DEPTH" "SHADOWS_NATIVE" "_ALPHABLEND_ON" "_WETNESS_NONE" }
// 04:   Keywords { "SPOT" "SHADOWS_DEPTH" "SHADOWS_NATIVE" "_ALPHATEST_ON" "_WETNESS_NONE" }
// 22:   Keywords { "SPOT" "SHADOWS_DEPTH" "SHADOWS_NATIVE" "_WETNESS_NONE" "_DETAIL_TEXTURED" }
// 11:   Keywords { "SPOT" "SHADOWS_DEPTH" "SHADOWS_NATIVE" "_WETNESS_NONE" }
//       undeciphered2: 1 0 4 0 0
//       undeciphered3: 159 6 0 0 2 1 1 2 3 4 4 5 7 8
//       ConstBuffer "$Globals" 608
//       Matrix 544 [_LightMatrix0]
//       ConstBuffer "UnityPerCamera" 144
//       Vector 64 [_WorldSpaceCameraPos] 3
//       ConstBuffer "UnityShadows" 416
//       Matrix 128 [unity_World2Shadow0]
//       Matrix 192 [unity_World2Shadow1]
//       Matrix 256 [unity_World2Shadow2]
//       Matrix 320 [unity_World2Shadow3]
//       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 "UnityShadows" 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:32:20 2017
cbuffer cb3 : register(b3)
{
  float4 cb3[22];
}

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

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

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




// 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 float4 o8 : TEXCOORD6,
  out float3 o9 : TEXCOORD8)
{
  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 b4e87ecae14f95ce-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.xy = v2.xy;
  o1.zw = v3.xy;
  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;
  o9.xyz = r0.xyz;
  o2.w = 0;
  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;
  o5.xyz = r1.xyz;
  r0.w = cb3[21].w * v4.w;
  o4.xyz = r0.xyz * r0.www;
  o4.w = 0;
  o5.w = 0;
  o6.xyzw = v5.xyzw;
  r0.xyzw = cb3[13].xyzw * v0.yyyy;
  r0.xyzw = cb3[12].xyzw * v0.xxxx + r0.xyzw;
  r0.xyzw = cb3[14].xyzw * v0.zzzz + r0.xyzw;
  r0.xyzw = cb3[15].xyzw * v0.wwww + r0.xyzw;
  r1.xyzw = cb0[35].xyzw * r0.yyyy;
  r1.xyzw = cb0[34].xyzw * r0.xxxx + r1.xyzw;
  r1.xyzw = cb0[36].xyzw * r0.zzzz + r1.xyzw;
  o7.xyzw = cb0[37].xyzw * r0.wwww + r1.xyzw;
  r1.xyzw = cb2[9].xyzw * r0.yyyy;
  r1.xyzw = cb2[8].xyzw * r0.xxxx + r1.xyzw;
  r1.xyzw = cb2[10].xyzw * r0.zzzz + r1.xyzw;
  o8.xyzw = cb2[11].xyzw * r0.wwww + r1.xyzw;
  return;
}
