Shader "PBR Master" { Properties { Vector1_B9797993("Smoothness", Range(0, 1)) = 0.5 Vector1_F1BE6F9F("Metalness", Range(0, 1)) = 0.5 Color_120283E2("Dark Colour", Color) = (0.2196079,0.3529412,0.509804,1) Color_3974F997("Light Colour", Color) = (0.145098,0.9490197,1,1) Vector2_7922229F("Top Colour Min/Max", Vector) = (0.1,1,0,0) Vector1_8D2F509D("Smaller Wave/Scale", Float) = 5.65 Vector1_5685904E("Smaller Wave/Speed", Float) = 1.9 Vector1_11C8BE5D("Smaller Wave/Height", Float) = 0.133 Vector1_A04E5E21("Smaller Wave/Power", Float) = 1 Vector1_E58F6327("Smaller Wave/Rotate X", Range(0, 1)) = 0.76 Vector1_5721F4C2("Smaller Wave/Rotate Z", Range(0, 1)) = 1 Vector1_5D17CBA2("Medium Wave/Colour Blend", Float) = 0.56 Vector1_72D9B0C5("Medium Wave/Scale", Float) = 2.6 Vector1_C800E0A4("Medium Wave/Speed", Float) = 2.12 Vector1_1C76134F("Medium Wave/Height", Float) = 0.1 Vector1_221E0A39("Medium Wave/Power", Float) = 1.67 Vector1_F44D25A0("Medium Wave/Rotate X", Range(0, 1)) = 1 Vector1_F68B8AAF("Medium Wave/Rotate Z", Range(0, 1)) = 0.63 Vector1_8403193C("Bigger Wave/Scale", Float) = 1 Vector1_B4A117B7("Bigger Wave/Speed", Float) = 0.9 Vector1_4735D5E2("Bigger Wave/Height", Float) = 0.3 Vector1_632F7C2E("Bigger Wave/Power", Float) = 0.97 Vector1_730BBE62("Bigger Wave/Rotate X", Range(0, 1)) = 0.37 Vector1_608CA392("Bigger Wave/Rotate Z", Range(0, 1)) = 0.77 Vector1_961065ED("Refraction Strength", Range(0, 0.3)) = 0 Vector1_F9DF03AF("Refraction Scale", Float) = 35 Vector1_2067D572("Refraction Blend", Range(0, 1)) = 0.5 Vector1_40E2F0ED("Normal Rotation", Float) = 0.5 Vector2_113ECD47("Normal Tiling", Vector) = (9,9,0,0) Vector1_137DC7ED("Normal Strength", Range(0, 1)) = 1 Vector2_BE5D86FE("Normal Speed", Vector) = (0.1,0.1,0,0) Vector1_A6C44B0B("Gradient Scale", Float) = 0.5 Vector2_1000B2F1("Gradient Min Max", Vector) = (0.5,1,0,0) Vector2_FA95DCD5("Gradient Speed", Vector) = (0.2,0.2,0,0) Vector1_95BDBEC1("Fresnel Power", Float) = 3 [NonModifiableTextureData] [NoScaleOffset] _SampleTexture2D_24F4BB82_Texture("Texture2D", 2D) = "white" {} } SubShader { Tags{ "RenderPipeline" = "LightweightPipeline"} Tags { "RenderPipeline"="HDRenderPipeline" "RenderType"="Transparent" "Queue"="Transparent" } Pass { Tags{"LightMode" = "LightweightForward"} // Material options generated by graph Blend SrcAlpha OneMinusSrcAlpha Cull Back ZTest LEqual ZWrite On HLSLPROGRAM // Required to compile gles 2.0 with standard srp library #pragma prefer_hlslcc gles #pragma exclude_renderers d3d11_9x #pragma target 2.0 // ------------------------------------- // Lightweight Pipeline keywords #pragma multi_compile _ _ADDITIONAL_LIGHTS #pragma multi_compile _ _VERTEX_LIGHTS #pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE #pragma multi_compile _ _SHADOWS_ENABLED #pragma multi_compile _ _LOCAL_SHADOWS_ENABLED #pragma multi_compile _ _SHADOWS_SOFT #pragma multi_compile _ _SHADOWS_CASCADE // ------------------------------------- // Unity defined keywords #pragma multi_compile _ DIRLIGHTMAP_COMBINED #pragma multi_compile _ LIGHTMAP_ON #pragma multi_compile_fog //-------------------------------------- // GPU Instancing #pragma multi_compile_instancing #pragma vertex vert #pragma fragment frag // Defines generated by graph #define _NORMALMAP 1 #include "LWRP/ShaderLibrary/Core.hlsl" #include "LWRP/ShaderLibrary/Lighting.hlsl" #include "CoreRP/ShaderLibrary/Color.hlsl" #include "CoreRP/ShaderLibrary/UnityInstancing.hlsl" #include "ShaderGraphLibrary/Functions.hlsl" float Vector1_B9797993; float Vector1_F1BE6F9F; float4 Color_120283E2; float4 Color_3974F997; float2 Vector2_7922229F; float Vector1_8D2F509D; float Vector1_5685904E; float Vector1_11C8BE5D; float Vector1_A04E5E21; float Vector1_E58F6327; float Vector1_5721F4C2; float Vector1_5D17CBA2; float Vector1_72D9B0C5; float Vector1_C800E0A4; float Vector1_1C76134F; float Vector1_221E0A39; float Vector1_F44D25A0; float Vector1_F68B8AAF; float Vector1_8403193C; float Vector1_B4A117B7; float Vector1_4735D5E2; float Vector1_632F7C2E; float Vector1_730BBE62; float Vector1_608CA392; float Vector1_961065ED; float Vector1_F9DF03AF; float Vector1_2067D572; float Vector1_40E2F0ED; float2 Vector2_113ECD47; float Vector1_137DC7ED; float2 Vector2_BE5D86FE; float Vector1_A6C44B0B; float2 Vector2_1000B2F1; float2 Vector2_FA95DCD5; TEXTURE2D(_CameraOpaqueTexture); SAMPLER(sampler_CameraOpaqueTexture); float Vector1_95BDBEC1; TEXTURE2D(_SampleTexture2D_24F4BB82_Texture); SAMPLER(sampler_SampleTexture2D_24F4BB82_Texture); struct VertexDescriptionInputs { float3 ObjectSpacePosition; float3 WorldSpacePosition; float4 VertexColor; }; struct SurfaceDescriptionInputs { float3 WorldSpacePosition; float4 VertexColor; float4 ScreenPosition; half4 uv0; half4 uv1; }; void Unity_Multiply_float (float A, float B, out float Out) { Out = A * B; } void Unity_Add_float(float A, float B, out float Out) { Out = A + B; } void Unity_Sine_float(float In, out float Out) { Out = sin(In); } void Unity_Absolute_float(float In, out float Out) { Out = abs(In); } void Unity_OneMinus_float(float In, out float Out) { Out = 1 - In; } void Unity_Power_float(float A, float B, out float Out) { Out = pow(A, B); } void Unity_Combine_float(float R, float G, float B, float A, out float4 RGBA, out float3 RGB, out float2 RG) { RGBA = float4(R, G, B, A); RGB = float3(R, G, B); RG = float2(R, G); } void Unity_Multiply_float (float2 A, float2 B, out float2 Out) { Out = A * B; } void Unity_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out) { Out = UV * Tiling + Offset; } float2 unity_gradientNoise_dir(float2 p) { // Permutation and hashing used in webgl-nosie goo.gl/pX7HtC p = p % 289; float x = (34 * p.x + 1) * p.x % 289 + p.y; x = (34 * x + 1) * x % 289; x = frac(x / 41) * 2 - 1; return normalize(float2(x - floor(x + 0.5), abs(x) - 0.5)); } float unity_gradientNoise(float2 p) { float2 ip = floor(p); float2 fp = frac(p); float d00 = dot(unity_gradientNoise_dir(ip), fp); float d01 = dot(unity_gradientNoise_dir(ip + float2(0, 1)), fp - float2(0, 1)); float d10 = dot(unity_gradientNoise_dir(ip + float2(1, 0)), fp - float2(1, 0)); float d11 = dot(unity_gradientNoise_dir(ip + float2(1, 1)), fp - float2(1, 1)); fp = fp * fp * fp * (fp * (fp * 6 - 15) + 10); return lerp(lerp(d00, d01, fp.y), lerp(d10, d11, fp.y), fp.x); } void Unity_GradientNoise_float(float2 UV, float Scale, out float Out) { Out = unity_gradientNoise(UV * Scale) + 0.5; } void Unity_Remap_float(float In, float2 InMinMax, float2 OutMinMax, out float Out) { Out = OutMinMax.x + (In - InMinMax.x) * (OutMinMax.y - OutMinMax.x) / (InMinMax.y - InMinMax.x); } void Unity_Lerp_float3(float3 A, float3 B, float3 T, out float3 Out) { Out = lerp(A, B, T); } void Unity_Lerp_float4(float4 A, float4 B, float4 T, out float4 Out) { Out = lerp(A, B, T); } void Unity_Preview_float(float In, out float Out) { Out = In; } void Unity_Subtract_float(float A, float B, out float Out) { Out = A - B; } void Unity_Blend_Overlay_float4(float4 Base, float4 Blend, out float4 Out, float Opacity) { float4 result1 = 1.0 - 2.0 * (1.0 - Base) * (1.0 - Blend); float4 result2 = 2.0 * Base * Blend; float4 zeroOrOne = step(Base, 0.5); Out = result2 * zeroOrOne + (1 - zeroOrOne) * result1; Out = lerp(Base, Out, Opacity); } void Unity_Preview_float4(float4 In, out float4 Out) { Out = In; } void Unity_Rotate_Radians_float(float2 UV, float2 Center, float Rotation, out float2 Out) { //rotation matrix UV -= Center; float s = sin(Rotation); float c = cos(Rotation); //center rotation matrix float2x2 rMatrix = float2x2(c, -s, s, c); rMatrix *= 0.5; rMatrix += 0.5; rMatrix = rMatrix*2 - 1; //multiply the UVs by the rotation matrix UV.xy = mul(UV.xy, rMatrix); UV += Center; Out = UV; } void Unity_Step_float(float Edge, float In, out float Out) { Out = step(Edge, In); } struct VertexDescription { float3 Position; }; VertexDescription PopulateVertexData(VertexDescriptionInputs IN) { VertexDescription description = (VertexDescription)0; float _Split_85D79FAF_R = IN.ObjectSpacePosition[0]; float _Split_85D79FAF_G = IN.ObjectSpacePosition[1]; float _Split_85D79FAF_B = IN.ObjectSpacePosition[2]; float _Split_85D79FAF_A = 0; float _Property_76EBDFB4_Out = Vector1_1C76134F; float _Property_6F727335_Out = Vector1_F44D25A0; float _Split_1FCA8336_R = IN.WorldSpacePosition[0]; float _Split_1FCA8336_G = IN.WorldSpacePosition[1]; float _Split_1FCA8336_B = IN.WorldSpacePosition[2]; float _Split_1FCA8336_A = 0; float _Multiply_FA212AA9_Out; Unity_Multiply_float(_Property_6F727335_Out, _Split_1FCA8336_R, _Multiply_FA212AA9_Out); float _Property_D24D4052_Out = Vector1_F68B8AAF; float _Multiply_DD586B4F_Out; Unity_Multiply_float(_Split_1FCA8336_B, _Property_D24D4052_Out, _Multiply_DD586B4F_Out); float _Add_9955F712_Out; Unity_Add_float(_Multiply_FA212AA9_Out, _Multiply_DD586B4F_Out, _Add_9955F712_Out); float _Property_D670E1C1_Out = Vector1_72D9B0C5; float _Multiply_E978714F_Out; Unity_Multiply_float(_Add_9955F712_Out, _Property_D670E1C1_Out, _Multiply_E978714F_Out); float _Property_1DB93E5B_Out = Vector1_C800E0A4; float _Multiply_B6BCE94B_Out; Unity_Multiply_float(_Property_1DB93E5B_Out, _Time.y, _Multiply_B6BCE94B_Out); float _Add_93C00E2C_Out; Unity_Add_float(_Multiply_E978714F_Out, _Multiply_B6BCE94B_Out, _Add_93C00E2C_Out); float _Sine_B3E85844_Out; Unity_Sine_float(_Add_93C00E2C_Out, _Sine_B3E85844_Out); float _Absolute_FD2BA96C_Out; Unity_Absolute_float(_Sine_B3E85844_Out, _Absolute_FD2BA96C_Out); float _OneMinus_E054867B_Out; Unity_OneMinus_float(_Absolute_FD2BA96C_Out, _OneMinus_E054867B_Out); float _Property_EDAEC3B4_Out = Vector1_221E0A39; float _Power_89128DC7_Out; Unity_Power_float(_OneMinus_E054867B_Out, _Property_EDAEC3B4_Out, _Power_89128DC7_Out); float _Multiply_456312AC_Out; Unity_Multiply_float(_Property_76EBDFB4_Out, _Power_89128DC7_Out, _Multiply_456312AC_Out); float _Property_AC775712_Out = Vector1_E58F6327; float _Split_DFB50EAE_R = IN.WorldSpacePosition[0]; float _Split_DFB50EAE_G = IN.WorldSpacePosition[1]; float _Split_DFB50EAE_B = IN.WorldSpacePosition[2]; float _Split_DFB50EAE_A = 0; float _Multiply_FA91F999_Out; Unity_Multiply_float(_Property_AC775712_Out, _Split_DFB50EAE_R, _Multiply_FA91F999_Out); float _Property_CCCFB6C5_Out = Vector1_608CA392; float _Multiply_E9F86F95_Out; Unity_Multiply_float(_Split_DFB50EAE_B, _Property_CCCFB6C5_Out, _Multiply_E9F86F95_Out); float _Add_8AD491B3_Out; Unity_Add_float(_Multiply_FA91F999_Out, _Multiply_E9F86F95_Out, _Add_8AD491B3_Out); float _Property_3F20CEFF_Out = Vector1_8D2F509D; float _Multiply_6BF97013_Out; Unity_Multiply_float(_Add_8AD491B3_Out, _Property_3F20CEFF_Out, _Multiply_6BF97013_Out); float _Property_D3C80BA0_Out = Vector1_5685904E; float _Multiply_29383B2_Out; Unity_Multiply_float(_Property_D3C80BA0_Out, _Time.y, _Multiply_29383B2_Out); float _Add_E3E06F02_Out; Unity_Add_float(_Multiply_6BF97013_Out, _Multiply_29383B2_Out, _Add_E3E06F02_Out); float _Sine_8E517BF5_Out; Unity_Sine_float(_Add_E3E06F02_Out, _Sine_8E517BF5_Out); float _Absolute_931AE881_Out; Unity_Absolute_float(_Sine_8E517BF5_Out, _Absolute_931AE881_Out); float _OneMinus_1E5C6612_Out; Unity_OneMinus_float(_Absolute_931AE881_Out, _OneMinus_1E5C6612_Out); float _Property_49B432CE_Out = Vector1_A04E5E21; float _Power_9AE27DEE_Out; Unity_Power_float(_OneMinus_1E5C6612_Out, _Property_49B432CE_Out, _Power_9AE27DEE_Out); float _Property_4660BD4E_Out = Vector1_11C8BE5D; float _Multiply_6470DEA3_Out; Unity_Multiply_float(_Power_9AE27DEE_Out, _Property_4660BD4E_Out, _Multiply_6470DEA3_Out); float _Add_824718F6_Out; Unity_Add_float(_Multiply_456312AC_Out, _Multiply_6470DEA3_Out, _Add_824718F6_Out); float _Property_210419CE_Out = Vector1_730BBE62; float _Split_847C2C1D_R = IN.WorldSpacePosition[0]; float _Split_847C2C1D_G = IN.WorldSpacePosition[1]; float _Split_847C2C1D_B = IN.WorldSpacePosition[2]; float _Split_847C2C1D_A = 0; float _Multiply_FF63FCF9_Out; Unity_Multiply_float(_Property_210419CE_Out, _Split_847C2C1D_R, _Multiply_FF63FCF9_Out); float _Property_BE4DF16B_Out = Vector1_608CA392; float _Multiply_39F59106_Out; Unity_Multiply_float(_Split_847C2C1D_B, _Property_BE4DF16B_Out, _Multiply_39F59106_Out); float _Add_BCC6A16F_Out; Unity_Add_float(_Multiply_FF63FCF9_Out, _Multiply_39F59106_Out, _Add_BCC6A16F_Out); float _Property_871072B4_Out = Vector1_8403193C; float _Multiply_8117D6AC_Out; Unity_Multiply_float(_Add_BCC6A16F_Out, _Property_871072B4_Out, _Multiply_8117D6AC_Out); float _Property_5B1CDF26_Out = Vector1_B4A117B7; float _Multiply_ADD9E620_Out; Unity_Multiply_float(_Property_5B1CDF26_Out, _Time.y, _Multiply_ADD9E620_Out); float _Add_79F60FE7_Out; Unity_Add_float(_Multiply_8117D6AC_Out, _Multiply_ADD9E620_Out, _Add_79F60FE7_Out); float _Sine_85F022E9_Out; Unity_Sine_float(_Add_79F60FE7_Out, _Sine_85F022E9_Out); float _Absolute_4F8844FD_Out; Unity_Absolute_float(_Sine_85F022E9_Out, _Absolute_4F8844FD_Out); float _OneMinus_8F4F4A1C_Out; Unity_OneMinus_float(_Absolute_4F8844FD_Out, _OneMinus_8F4F4A1C_Out); float _Property_AD6B071E_Out = Vector1_632F7C2E; float _Power_9DCB8C4C_Out; Unity_Power_float(_OneMinus_8F4F4A1C_Out, _Property_AD6B071E_Out, _Power_9DCB8C4C_Out); float _Property_167E6FA5_Out = Vector1_4735D5E2; float _Multiply_9E4F1BD7_Out; Unity_Multiply_float(_Power_9DCB8C4C_Out, _Property_167E6FA5_Out, _Multiply_9E4F1BD7_Out); float _Add_5B8345A6_Out; Unity_Add_float(_Add_824718F6_Out, _Multiply_9E4F1BD7_Out, _Add_5B8345A6_Out); float _Split_BF38371F_R = IN.WorldSpacePosition[0]; float _Split_BF38371F_G = IN.WorldSpacePosition[1]; float _Split_BF38371F_B = IN.WorldSpacePosition[2]; float _Split_BF38371F_A = 0; float4 _Combine_5D5A6EB4_RGBA; float3 _Combine_5D5A6EB4_RGB; float2 _Combine_5D5A6EB4_RG; Unity_Combine_float(_Split_BF38371F_R, _Split_BF38371F_B, 0, 0, _Combine_5D5A6EB4_RGBA, _Combine_5D5A6EB4_RGB, _Combine_5D5A6EB4_RG); float2 _Property_D4063191_Out = Vector2_FA95DCD5; float2 _Multiply_86B2E332_Out; Unity_Multiply_float((_Time.y.xx), _Property_D4063191_Out, _Multiply_86B2E332_Out); float2 _TilingAndOffset_37C09071_Out; Unity_TilingAndOffset_float(_Combine_5D5A6EB4_RG, float2 (1,1), _Multiply_86B2E332_Out, _TilingAndOffset_37C09071_Out); float _Property_4C95B6F7_Out = Vector1_A6C44B0B; float _GradientNoise_1AA59D61_Out; Unity_GradientNoise_float(_TilingAndOffset_37C09071_Out, _Property_4C95B6F7_Out, _GradientNoise_1AA59D61_Out); float2 _Property_78823826_Out = Vector2_1000B2F1; float _Remap_C3B2F9FE_Out; Unity_Remap_float(_GradientNoise_1AA59D61_Out, float2 (0,1), _Property_78823826_Out, _Remap_C3B2F9FE_Out); float _Multiply_FAFF27A2_Out; Unity_Multiply_float(_Add_5B8345A6_Out, _Remap_C3B2F9FE_Out, _Multiply_FAFF27A2_Out); float _Split_B44C4E4B_R = _Multiply_FAFF27A2_Out; float _Split_B44C4E4B_G = 0; float _Split_B44C4E4B_B = 0; float _Split_B44C4E4B_A = 0; float _Add_A40E349E_Out; Unity_Add_float(_Split_B44C4E4B_R, _Split_B44C4E4B_B, _Add_A40E349E_Out); float _Add_9F809789_Out; Unity_Add_float(_Split_85D79FAF_G, _Add_A40E349E_Out, _Add_9F809789_Out); float4 _Combine_AA9DAF7E_RGBA; float3 _Combine_AA9DAF7E_RGB; float2 _Combine_AA9DAF7E_RG; Unity_Combine_float(_Split_85D79FAF_R, _Add_9F809789_Out, _Split_85D79FAF_B, 0, _Combine_AA9DAF7E_RGBA, _Combine_AA9DAF7E_RGB, _Combine_AA9DAF7E_RG); float _Split_9965AACD_R = IN.VertexColor[0]; float _Split_9965AACD_G = IN.VertexColor[1]; float _Split_9965AACD_B = IN.VertexColor[2]; float _Split_9965AACD_A = IN.VertexColor[3]; float3 _Lerp_5D3FAD3B_Out; Unity_Lerp_float3(IN.ObjectSpacePosition, _Combine_AA9DAF7E_RGB, (_Split_9965AACD_R.xxx), _Lerp_5D3FAD3B_Out); description.Position = _Lerp_5D3FAD3B_Out; return description; } struct SurfaceDescription { float3 Albedo; float3 Normal; float3 Emission; float Metallic; float Smoothness; float Occlusion; float Alpha; float AlphaClipThreshold; }; SurfaceDescription PopulateSurfaceData(SurfaceDescriptionInputs IN) { SurfaceDescription surface = (SurfaceDescription)0; float4 _Property_A58D0047_Out = Color_120283E2; float4 _Property_9E3F1B0A_Out = Color_3974F997; float4 _UV_9F859596_Out = IN.uv1; float _Split_BDEBD26C_R = _UV_9F859596_Out[0]; float _Split_BDEBD26C_G = _UV_9F859596_Out[1]; float _Split_BDEBD26C_B = _UV_9F859596_Out[2]; float _Split_BDEBD26C_A = _UV_9F859596_Out[3]; float4 _Lerp_16947B2B_Out; Unity_Lerp_float4(_Property_A58D0047_Out, _Property_9E3F1B0A_Out, (_Split_BDEBD26C_G.xxxx), _Lerp_16947B2B_Out); float _Split_BF38371F_R = IN.WorldSpacePosition[0]; float _Split_BF38371F_G = IN.WorldSpacePosition[1]; float _Split_BF38371F_B = IN.WorldSpacePosition[2]; float _Split_BF38371F_A = 0; float4 _Combine_5D5A6EB4_RGBA; float3 _Combine_5D5A6EB4_RGB; float2 _Combine_5D5A6EB4_RG; Unity_Combine_float(_Split_BF38371F_R, _Split_BF38371F_B, 0, 0, _Combine_5D5A6EB4_RGBA, _Combine_5D5A6EB4_RGB, _Combine_5D5A6EB4_RG); float2 _Property_D4063191_Out = Vector2_FA95DCD5; float2 _Multiply_86B2E332_Out; Unity_Multiply_float((_Time.y.xx), _Property_D4063191_Out, _Multiply_86B2E332_Out); float2 _TilingAndOffset_37C09071_Out; Unity_TilingAndOffset_float(_Combine_5D5A6EB4_RG, float2 (1,1), _Multiply_86B2E332_Out, _TilingAndOffset_37C09071_Out); float _Property_4C95B6F7_Out = Vector1_A6C44B0B; float _GradientNoise_1AA59D61_Out; Unity_GradientNoise_float(_TilingAndOffset_37C09071_Out, _Property_4C95B6F7_Out, _GradientNoise_1AA59D61_Out); float2 _Property_78823826_Out = Vector2_1000B2F1; float _Remap_C3B2F9FE_Out; Unity_Remap_float(_GradientNoise_1AA59D61_Out, float2 (0,1), _Property_78823826_Out, _Remap_C3B2F9FE_Out); float _Property_1F3017E6_Out = Vector1_5D17CBA2; float _Property_6F727335_Out = Vector1_F44D25A0; float _Split_1FCA8336_R = IN.WorldSpacePosition[0]; float _Split_1FCA8336_G = IN.WorldSpacePosition[1]; float _Split_1FCA8336_B = IN.WorldSpacePosition[2]; float _Split_1FCA8336_A = 0; float _Multiply_FA212AA9_Out; Unity_Multiply_float(_Property_6F727335_Out, _Split_1FCA8336_R, _Multiply_FA212AA9_Out); float _Property_D24D4052_Out = Vector1_F68B8AAF; float _Multiply_DD586B4F_Out; Unity_Multiply_float(_Split_1FCA8336_B, _Property_D24D4052_Out, _Multiply_DD586B4F_Out); float _Add_9955F712_Out; Unity_Add_float(_Multiply_FA212AA9_Out, _Multiply_DD586B4F_Out, _Add_9955F712_Out); float _Property_D670E1C1_Out = Vector1_72D9B0C5; float _Multiply_E978714F_Out; Unity_Multiply_float(_Add_9955F712_Out, _Property_D670E1C1_Out, _Multiply_E978714F_Out); float _Property_1DB93E5B_Out = Vector1_C800E0A4; float _Multiply_B6BCE94B_Out; Unity_Multiply_float(_Property_1DB93E5B_Out, _Time.y, _Multiply_B6BCE94B_Out); float _Add_93C00E2C_Out; Unity_Add_float(_Multiply_E978714F_Out, _Multiply_B6BCE94B_Out, _Add_93C00E2C_Out); float _Sine_B3E85844_Out; Unity_Sine_float(_Add_93C00E2C_Out, _Sine_B3E85844_Out); float _Absolute_FD2BA96C_Out; Unity_Absolute_float(_Sine_B3E85844_Out, _Absolute_FD2BA96C_Out); float _OneMinus_E054867B_Out; Unity_OneMinus_float(_Absolute_FD2BA96C_Out, _OneMinus_E054867B_Out); float _Property_EDAEC3B4_Out = Vector1_221E0A39; float _Power_89128DC7_Out; Unity_Power_float(_OneMinus_E054867B_Out, _Property_EDAEC3B4_Out, _Power_89128DC7_Out); float _Preview_27050525_Out; Unity_Preview_float(_Power_89128DC7_Out, _Preview_27050525_Out); float _Split_F65B2B9D_R = _Preview_27050525_Out; float _Split_F65B2B9D_G = 0; float _Split_F65B2B9D_B = 0; float _Split_F65B2B9D_A = 0; float _Multiply_27419D92_Out; Unity_Multiply_float(_Property_1F3017E6_Out, _Split_F65B2B9D_R, _Multiply_27419D92_Out); float _Property_210419CE_Out = Vector1_730BBE62; float _Split_847C2C1D_R = IN.WorldSpacePosition[0]; float _Split_847C2C1D_G = IN.WorldSpacePosition[1]; float _Split_847C2C1D_B = IN.WorldSpacePosition[2]; float _Split_847C2C1D_A = 0; float _Multiply_FF63FCF9_Out; Unity_Multiply_float(_Property_210419CE_Out, _Split_847C2C1D_R, _Multiply_FF63FCF9_Out); float _Property_BE4DF16B_Out = Vector1_608CA392; float _Multiply_39F59106_Out; Unity_Multiply_float(_Split_847C2C1D_B, _Property_BE4DF16B_Out, _Multiply_39F59106_Out); float _Add_BCC6A16F_Out; Unity_Add_float(_Multiply_FF63FCF9_Out, _Multiply_39F59106_Out, _Add_BCC6A16F_Out); float _Property_871072B4_Out = Vector1_8403193C; float _Multiply_8117D6AC_Out; Unity_Multiply_float(_Add_BCC6A16F_Out, _Property_871072B4_Out, _Multiply_8117D6AC_Out); float _Property_5B1CDF26_Out = Vector1_B4A117B7; float _Multiply_ADD9E620_Out; Unity_Multiply_float(_Property_5B1CDF26_Out, _Time.y, _Multiply_ADD9E620_Out); float _Add_79F60FE7_Out; Unity_Add_float(_Multiply_8117D6AC_Out, _Multiply_ADD9E620_Out, _Add_79F60FE7_Out); float _Sine_85F022E9_Out; Unity_Sine_float(_Add_79F60FE7_Out, _Sine_85F022E9_Out); float _Absolute_4F8844FD_Out; Unity_Absolute_float(_Sine_85F022E9_Out, _Absolute_4F8844FD_Out); float _OneMinus_8F4F4A1C_Out; Unity_OneMinus_float(_Absolute_4F8844FD_Out, _OneMinus_8F4F4A1C_Out); float _Property_AD6B071E_Out = Vector1_632F7C2E; float _Power_9DCB8C4C_Out; Unity_Power_float(_OneMinus_8F4F4A1C_Out, _Property_AD6B071E_Out, _Power_9DCB8C4C_Out); float _Preview_A2C8B4D3_Out; Unity_Preview_float(_Power_9DCB8C4C_Out, _Preview_A2C8B4D3_Out); float _Split_4EAD296A_R = _Preview_A2C8B4D3_Out; float _Split_4EAD296A_G = 0; float _Split_4EAD296A_B = 0; float _Split_4EAD296A_A = 0; float _Add_FFD97C3E_Out; Unity_Add_float(_Multiply_27419D92_Out, _Split_4EAD296A_R, _Add_FFD97C3E_Out); float _Multiply_2F99235B_Out; Unity_Multiply_float(_Remap_C3B2F9FE_Out, _Add_FFD97C3E_Out, _Multiply_2F99235B_Out); float _Property_11498DA6_Out = Vector1_72D9B0C5; float _Property_D0D5ACAF_Out = Vector1_8403193C; float _Add_C50A47AB_Out; Unity_Add_float(_Property_11498DA6_Out, _Property_D0D5ACAF_Out, _Add_C50A47AB_Out); float _Add_BC920D78_Out; Unity_Add_float(_Add_C50A47AB_Out, 1, _Add_BC920D78_Out); float2 _Vector2_50E33FD3_Out = float2(0,_Add_BC920D78_Out); float2 _Property_6ED8E332_Out = Vector2_7922229F; float _Remap_3FDD5F9_Out; Unity_Remap_float(_Multiply_2F99235B_Out, _Vector2_50E33FD3_Out, _Property_6ED8E332_Out, _Remap_3FDD5F9_Out); float4 _Lerp_77A9BF27_Out; Unity_Lerp_float4(_Property_A58D0047_Out, _Property_9E3F1B0A_Out, (_Remap_3FDD5F9_Out.xxxx), _Lerp_77A9BF27_Out); float _Split_F8C6F6CA_R = IN.VertexColor[0]; float _Split_F8C6F6CA_G = IN.VertexColor[1]; float _Split_F8C6F6CA_B = IN.VertexColor[2]; float _Split_F8C6F6CA_A = IN.VertexColor[3]; float _Power_473AB475_Out; Unity_Power_float(_Split_F8C6F6CA_R, 40, _Power_473AB475_Out); float4 _Lerp_500CE65A_Out; Unity_Lerp_float4(_Lerp_16947B2B_Out, _Lerp_77A9BF27_Out, (_Power_473AB475_Out.xxxx), _Lerp_500CE65A_Out); float4 _ScreenPosition_B1CA2FF3_Out = float4(IN.ScreenPosition.xy / IN.ScreenPosition.w, 0, 0); float _Property_1E91A997_Out = Vector1_F9DF03AF; float _GradientNoise_C1C05A4B_Out; Unity_GradientNoise_float(IN.uv0.xy, _Property_1E91A997_Out, _GradientNoise_C1C05A4B_Out); float _Subtract_D19817F6_Out; Unity_Subtract_float(_GradientNoise_C1C05A4B_Out, 0.5, _Subtract_D19817F6_Out); float _Property_8492106C_Out = Vector1_961065ED; float _Multiply_26B89A04_Out; Unity_Multiply_float(_Subtract_D19817F6_Out, _Property_8492106C_Out, _Multiply_26B89A04_Out); float2 _TilingAndOffset_A1AA4EE2_Out; Unity_TilingAndOffset_float((_ScreenPosition_B1CA2FF3_Out.xy), float2 (1,1), (_Multiply_26B89A04_Out.xx), _TilingAndOffset_A1AA4EE2_Out); float4 _SampleTexture2D_509EB224_RGBA = SAMPLE_TEXTURE2D(_CameraOpaqueTexture, sampler_CameraOpaqueTexture, _TilingAndOffset_A1AA4EE2_Out); float _SampleTexture2D_509EB224_R = _SampleTexture2D_509EB224_RGBA.r; float _SampleTexture2D_509EB224_G = _SampleTexture2D_509EB224_RGBA.g; float _SampleTexture2D_509EB224_B = _SampleTexture2D_509EB224_RGBA.b; float _SampleTexture2D_509EB224_A = _SampleTexture2D_509EB224_RGBA.a; float _Property_3709319C_Out = Vector1_2067D572; float4 _Blend_79BBE81_Out; Unity_Blend_Overlay_float4(_Lerp_500CE65A_Out, _SampleTexture2D_509EB224_RGBA, _Blend_79BBE81_Out, _Property_3709319C_Out); float4 _Preview_1EB23B1E_Out; Unity_Preview_float4(_Blend_79BBE81_Out, _Preview_1EB23B1E_Out); float4 Color_E3435782 = IsGammaSpace() ? float4(0, 0, 1, 0) : float4(SRGBToLinear(float3(0, 0, 1)), 0); float _Split_C042A06E_R = IN.WorldSpacePosition[0]; float _Split_C042A06E_G = IN.WorldSpacePosition[1]; float _Split_C042A06E_B = IN.WorldSpacePosition[2]; float _Split_C042A06E_A = 0; float4 _Combine_42D488CE_RGBA; float3 _Combine_42D488CE_RGB; float2 _Combine_42D488CE_RG; Unity_Combine_float(_Split_C042A06E_R, _Split_C042A06E_B, 0, 0, _Combine_42D488CE_RGBA, _Combine_42D488CE_RGB, _Combine_42D488CE_RG); float2 _Property_4C48A23A_Out = Vector2_113ECD47; float2 _Property_26AA092C_Out = Vector2_BE5D86FE; float2 _Multiply_81F6C9D1_Out; Unity_Multiply_float((_Time.y.xx), _Property_26AA092C_Out, _Multiply_81F6C9D1_Out); float2 _TilingAndOffset_9A7C85FC_Out; Unity_TilingAndOffset_float(_Combine_42D488CE_RG, _Property_4C48A23A_Out, _Multiply_81F6C9D1_Out, _TilingAndOffset_9A7C85FC_Out); float _Property_D494FB3A_Out = Vector1_40E2F0ED; float2 _Rotate_1235EDDE_Out; Unity_Rotate_Radians_float(_TilingAndOffset_9A7C85FC_Out, float2 (0.5,0.5), _Property_D494FB3A_Out, _Rotate_1235EDDE_Out); float4 _SampleTexture2D_24F4BB82_RGBA = SAMPLE_TEXTURE2D(_SampleTexture2D_24F4BB82_Texture, sampler_SampleTexture2D_24F4BB82_Texture, _Rotate_1235EDDE_Out); float _SampleTexture2D_24F4BB82_R = _SampleTexture2D_24F4BB82_RGBA.r; float _SampleTexture2D_24F4BB82_G = _SampleTexture2D_24F4BB82_RGBA.g; float _SampleTexture2D_24F4BB82_B = _SampleTexture2D_24F4BB82_RGBA.b; float _SampleTexture2D_24F4BB82_A = _SampleTexture2D_24F4BB82_RGBA.a; float _Split_BAD2FE24_R = IN.VertexColor[0]; float _Split_BAD2FE24_G = IN.VertexColor[1]; float _Split_BAD2FE24_B = IN.VertexColor[2]; float _Split_BAD2FE24_A = IN.VertexColor[3]; float _Step_3370B11_Out; Unity_Step_float(0.99, _Split_BAD2FE24_R, _Step_3370B11_Out); float _Property_20BBF3DB_Out = Vector1_137DC7ED; float _Multiply_CBCB8A5B_Out; Unity_Multiply_float(_Step_3370B11_Out, _Property_20BBF3DB_Out, _Multiply_CBCB8A5B_Out); float4 _Lerp_9D637DEA_Out; Unity_Lerp_float4(Color_E3435782, _SampleTexture2D_24F4BB82_RGBA, (_Multiply_CBCB8A5B_Out.xxxx), _Lerp_9D637DEA_Out); float _Property_C38AA42C_Out = Vector1_F1BE6F9F; float _Property_529941BB_Out = Vector1_B9797993; surface.Albedo = (_Preview_1EB23B1E_Out.xyz); surface.Normal = (_Lerp_9D637DEA_Out.xyz); surface.Emission = IsGammaSpace() ? float3(0, 0, 0) : SRGBToLinear(float3(0, 0, 0)); surface.Metallic = _Property_C38AA42C_Out; surface.Smoothness = _Property_529941BB_Out; surface.Occlusion = 1; surface.Alpha = 1; surface.AlphaClipThreshold = 0; return surface; } struct GraphVertexInput { float4 vertex : POSITION; float3 normal : NORMAL; float4 tangent : TANGENT; float4 color : COLOR; float4 texcoord0 : TEXCOORD0; float4 texcoord1 : TEXCOORD1; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct GraphVertexOutput { float4 clipPos : SV_POSITION; DECLARE_LIGHTMAP_OR_SH(lightmapUV, vertexSH, 0); half4 fogFactorAndVertexLight : TEXCOORD1; // x: fogFactor, yzw: vertex light float4 shadowCoord : TEXCOORD2; // Interpolators defined by graph float3 WorldSpacePosition : TEXCOORD3; float3 WorldSpaceNormal : TEXCOORD4; float3 WorldSpaceTangent : TEXCOORD5; float3 WorldSpaceBiTangent : TEXCOORD6; float3 WorldSpaceViewDirection : TEXCOORD7; float4 VertexColor : COLOR; float4 ScreenPosition : TEXCOORD8; half4 uv0 : TEXCOORD9; half4 uv1 : TEXCOORD10; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; GraphVertexOutput vert (GraphVertexInput v) { GraphVertexOutput o = (GraphVertexOutput)0; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); // Vertex transformations performed by graph float3 WorldSpacePosition = mul(UNITY_MATRIX_M,v.vertex); float3 WorldSpaceNormal = normalize(mul(v.normal,(float3x3)UNITY_MATRIX_I_M)); float3 WorldSpaceTangent = normalize(mul((float3x3)UNITY_MATRIX_M,v.tangent.xyz)); float3 WorldSpaceBiTangent = cross(WorldSpaceNormal, WorldSpaceTangent.xyz) * v.tangent.w; float3 WorldSpaceViewDirection = _WorldSpaceCameraPos.xyz - mul(GetObjectToWorldMatrix(), float4(v.vertex.xyz, 1.0)).xyz; float4 VertexColor = v.color; float4 ScreenPosition = ComputeScreenPos(mul(GetWorldToHClipMatrix(), mul(GetObjectToWorldMatrix(), v.vertex)), _ProjectionParams.x); float4 uv0 = v.texcoord0; float4 uv1 = v.texcoord1; float3 ObjectSpacePosition = mul(UNITY_MATRIX_I_M,float4(WorldSpacePosition,1.0)); VertexDescriptionInputs vdi = (VertexDescriptionInputs)0; // Vertex description inputs defined by graph vdi.ObjectSpacePosition = ObjectSpacePosition; vdi.WorldSpacePosition = WorldSpacePosition; vdi.VertexColor = VertexColor; VertexDescription vd = PopulateVertexData(vdi); v.vertex.xyz = vd.Position; // Vertex shader outputs defined by graph o.WorldSpacePosition = WorldSpacePosition; o.WorldSpaceNormal = WorldSpaceNormal; o.WorldSpaceTangent = WorldSpaceTangent; o.WorldSpaceBiTangent = WorldSpaceBiTangent; o.WorldSpaceViewDirection = WorldSpaceViewDirection; o.VertexColor = VertexColor; o.ScreenPosition = ScreenPosition; o.uv0 = uv0; o.uv1 = uv1; float3 lwWNormal = TransformObjectToWorldNormal(v.normal); float3 lwWorldPos = TransformObjectToWorld(v.vertex.xyz); float4 clipPos = TransformWorldToHClip(lwWorldPos); // We either sample GI from lightmap or SH. // Lightmap UV and vertex SH coefficients use the same interpolator ("float2 lightmapUV" for lightmap or "half3 vertexSH" for SH) // see DECLARE_LIGHTMAP_OR_SH macro. // The following funcions initialize the correct variable with correct data OUTPUT_LIGHTMAP_UV(v.texcoord1, unity_LightmapST, o.lightmapUV); OUTPUT_SH(lwWNormal, o.vertexSH); half3 vertexLight = VertexLighting(lwWorldPos, lwWNormal); half fogFactor = ComputeFogFactor(clipPos.z); o.fogFactorAndVertexLight = half4(fogFactor, vertexLight); o.clipPos = clipPos; #ifdef _SHADOWS_ENABLED #if SHADOWS_SCREEN o.shadowCoord = ComputeShadowCoord(clipPos); #else o.shadowCoord = TransformWorldToShadowCoord(lwWorldPos); #endif #endif return o; } half4 frag (GraphVertexOutput IN ) : SV_Target { UNITY_SETUP_INSTANCE_ID(IN); // Pixel transformations performed by graph float3 WorldSpacePosition = IN.WorldSpacePosition; float3 WorldSpaceNormal = IN.WorldSpaceNormal; float3 WorldSpaceTangent = IN.WorldSpaceTangent; float3 WorldSpaceBiTangent = IN.WorldSpaceBiTangent; float3 WorldSpaceViewDirection = IN.WorldSpaceViewDirection; float4 VertexColor = IN.VertexColor; float4 ScreenPosition = IN.ScreenPosition; float4 uv0 = IN.uv0; float4 uv1 = IN.uv1; SurfaceDescriptionInputs surfaceInput = (SurfaceDescriptionInputs)0; // Surface description inputs defined by graph surfaceInput.WorldSpacePosition = WorldSpacePosition; surfaceInput.VertexColor = VertexColor; surfaceInput.ScreenPosition = ScreenPosition; surfaceInput.uv0 = uv0; surfaceInput.uv1 = uv1; SurfaceDescription surf = PopulateSurfaceData(surfaceInput); float3 Albedo = float3(0.5, 0.5, 0.5); float3 Specular = float3(0, 0, 0); float Metallic = 1; float3 Normal = float3(0, 0, 1); float3 Emission = 0; float Smoothness = 0.5; float Occlusion = 1; float Alpha = 1; float AlphaClipThreshold = 0; // Surface description remap performed by graph Albedo = surf.Albedo; Normal = surf.Normal; Emission = surf.Emission; Metallic = surf.Metallic; Smoothness = surf.Smoothness; Occlusion = surf.Occlusion; Alpha = surf.Alpha; AlphaClipThreshold = surf.AlphaClipThreshold; InputData inputData; inputData.positionWS = WorldSpacePosition; #ifdef _NORMALMAP inputData.normalWS = TangentToWorldNormal(Normal, WorldSpaceTangent, WorldSpaceBiTangent, WorldSpaceNormal); #else #if !SHADER_HINT_NICE_QUALITY inputData.normalWS = WorldSpaceNormal; #else inputData.normalWS = normalize(WorldSpaceNormal); #endif #endif #if !SHADER_HINT_NICE_QUALITY // viewDirection should be normalized here, but we avoid doing it as it's close enough and we save some ALU. inputData.viewDirectionWS = WorldSpaceViewDirection; #else inputData.viewDirectionWS = normalize(WorldSpaceViewDirection); #endif inputData.shadowCoord = IN.shadowCoord; inputData.fogCoord = IN.fogFactorAndVertexLight.x; inputData.vertexLighting = IN.fogFactorAndVertexLight.yzw; inputData.bakedGI = SAMPLE_GI(IN.lightmapUV, IN.vertexSH, inputData.normalWS); half4 color = LightweightFragmentPBR( inputData, Albedo, Metallic, Specular, Smoothness, Occlusion, Emission, Alpha); // Computes fog factor per-vertex ApplyFog(color.rgb, IN.fogFactorAndVertexLight.x); #if _AlphaClip clip(Alpha - AlphaClipThreshold); #endif return color; } ENDHLSL } Pass { Name "ShadowCaster" Tags{"LightMode" = "ShadowCaster"} ZWrite On ZTest LEqual // Material options generated by graph Cull Back HLSLPROGRAM // Required to compile gles 2.0 with standard srp library #pragma prefer_hlslcc gles #pragma exclude_renderers d3d11_9x #pragma target 2.0 //-------------------------------------- // GPU Instancing #pragma multi_compile_instancing #pragma vertex ShadowPassVertex #pragma fragment ShadowPassFragment // Defines generated by graph #include "LWRP/ShaderLibrary/Core.hlsl" #include "LWRP/ShaderLibrary/Lighting.hlsl" #include "ShaderGraphLibrary/Functions.hlsl" #include "CoreRP/ShaderLibrary/Color.hlsl" float Vector1_B9797993; float Vector1_F1BE6F9F; float4 Color_120283E2; float4 Color_3974F997; float2 Vector2_7922229F; float Vector1_8D2F509D; float Vector1_5685904E; float Vector1_11C8BE5D; float Vector1_A04E5E21; float Vector1_E58F6327; float Vector1_5721F4C2; float Vector1_5D17CBA2; float Vector1_72D9B0C5; float Vector1_C800E0A4; float Vector1_1C76134F; float Vector1_221E0A39; float Vector1_F44D25A0; float Vector1_F68B8AAF; float Vector1_8403193C; float Vector1_B4A117B7; float Vector1_4735D5E2; float Vector1_632F7C2E; float Vector1_730BBE62; float Vector1_608CA392; float Vector1_961065ED; float Vector1_F9DF03AF; float Vector1_2067D572; float Vector1_40E2F0ED; float2 Vector2_113ECD47; float Vector1_137DC7ED; float2 Vector2_BE5D86FE; float Vector1_A6C44B0B; float2 Vector2_1000B2F1; float2 Vector2_FA95DCD5; TEXTURE2D(_CameraOpaqueTexture); SAMPLER(sampler_CameraOpaqueTexture); float Vector1_95BDBEC1; struct VertexDescriptionInputs { float3 ObjectSpacePosition; float3 WorldSpacePosition; float4 VertexColor; }; void Unity_Multiply_float (float A, float B, out float Out) { Out = A * B; } void Unity_Add_float(float A, float B, out float Out) { Out = A + B; } void Unity_Sine_float(float In, out float Out) { Out = sin(In); } void Unity_Absolute_float(float In, out float Out) { Out = abs(In); } void Unity_OneMinus_float(float In, out float Out) { Out = 1 - In; } void Unity_Power_float(float A, float B, out float Out) { Out = pow(A, B); } void Unity_Combine_float(float R, float G, float B, float A, out float4 RGBA, out float3 RGB, out float2 RG) { RGBA = float4(R, G, B, A); RGB = float3(R, G, B); RG = float2(R, G); } void Unity_Multiply_float (float2 A, float2 B, out float2 Out) { Out = A * B; } void Unity_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out) { Out = UV * Tiling + Offset; } float2 unity_gradientNoise_dir(float2 p) { // Permutation and hashing used in webgl-nosie goo.gl/pX7HtC p = p % 289; float x = (34 * p.x + 1) * p.x % 289 + p.y; x = (34 * x + 1) * x % 289; x = frac(x / 41) * 2 - 1; return normalize(float2(x - floor(x + 0.5), abs(x) - 0.5)); } float unity_gradientNoise(float2 p) { float2 ip = floor(p); float2 fp = frac(p); float d00 = dot(unity_gradientNoise_dir(ip), fp); float d01 = dot(unity_gradientNoise_dir(ip + float2(0, 1)), fp - float2(0, 1)); float d10 = dot(unity_gradientNoise_dir(ip + float2(1, 0)), fp - float2(1, 0)); float d11 = dot(unity_gradientNoise_dir(ip + float2(1, 1)), fp - float2(1, 1)); fp = fp * fp * fp * (fp * (fp * 6 - 15) + 10); return lerp(lerp(d00, d01, fp.y), lerp(d10, d11, fp.y), fp.x); } void Unity_GradientNoise_float(float2 UV, float Scale, out float Out) { Out = unity_gradientNoise(UV * Scale) + 0.5; } void Unity_Remap_float(float In, float2 InMinMax, float2 OutMinMax, out float Out) { Out = OutMinMax.x + (In - InMinMax.x) * (OutMinMax.y - OutMinMax.x) / (InMinMax.y - InMinMax.x); } void Unity_Lerp_float3(float3 A, float3 B, float3 T, out float3 Out) { Out = lerp(A, B, T); } struct VertexDescription { float3 Position; }; VertexDescription PopulateVertexData(VertexDescriptionInputs IN) { VertexDescription description = (VertexDescription)0; float _Split_85D79FAF_R = IN.ObjectSpacePosition[0]; float _Split_85D79FAF_G = IN.ObjectSpacePosition[1]; float _Split_85D79FAF_B = IN.ObjectSpacePosition[2]; float _Split_85D79FAF_A = 0; float _Property_76EBDFB4_Out = Vector1_1C76134F; float _Property_6F727335_Out = Vector1_F44D25A0; float _Split_1FCA8336_R = IN.WorldSpacePosition[0]; float _Split_1FCA8336_G = IN.WorldSpacePosition[1]; float _Split_1FCA8336_B = IN.WorldSpacePosition[2]; float _Split_1FCA8336_A = 0; float _Multiply_FA212AA9_Out; Unity_Multiply_float(_Property_6F727335_Out, _Split_1FCA8336_R, _Multiply_FA212AA9_Out); float _Property_D24D4052_Out = Vector1_F68B8AAF; float _Multiply_DD586B4F_Out; Unity_Multiply_float(_Split_1FCA8336_B, _Property_D24D4052_Out, _Multiply_DD586B4F_Out); float _Add_9955F712_Out; Unity_Add_float(_Multiply_FA212AA9_Out, _Multiply_DD586B4F_Out, _Add_9955F712_Out); float _Property_D670E1C1_Out = Vector1_72D9B0C5; float _Multiply_E978714F_Out; Unity_Multiply_float(_Add_9955F712_Out, _Property_D670E1C1_Out, _Multiply_E978714F_Out); float _Property_1DB93E5B_Out = Vector1_C800E0A4; float _Multiply_B6BCE94B_Out; Unity_Multiply_float(_Property_1DB93E5B_Out, _Time.y, _Multiply_B6BCE94B_Out); float _Add_93C00E2C_Out; Unity_Add_float(_Multiply_E978714F_Out, _Multiply_B6BCE94B_Out, _Add_93C00E2C_Out); float _Sine_B3E85844_Out; Unity_Sine_float(_Add_93C00E2C_Out, _Sine_B3E85844_Out); float _Absolute_FD2BA96C_Out; Unity_Absolute_float(_Sine_B3E85844_Out, _Absolute_FD2BA96C_Out); float _OneMinus_E054867B_Out; Unity_OneMinus_float(_Absolute_FD2BA96C_Out, _OneMinus_E054867B_Out); float _Property_EDAEC3B4_Out = Vector1_221E0A39; float _Power_89128DC7_Out; Unity_Power_float(_OneMinus_E054867B_Out, _Property_EDAEC3B4_Out, _Power_89128DC7_Out); float _Multiply_456312AC_Out; Unity_Multiply_float(_Property_76EBDFB4_Out, _Power_89128DC7_Out, _Multiply_456312AC_Out); float _Property_AC775712_Out = Vector1_E58F6327; float _Split_DFB50EAE_R = IN.WorldSpacePosition[0]; float _Split_DFB50EAE_G = IN.WorldSpacePosition[1]; float _Split_DFB50EAE_B = IN.WorldSpacePosition[2]; float _Split_DFB50EAE_A = 0; float _Multiply_FA91F999_Out; Unity_Multiply_float(_Property_AC775712_Out, _Split_DFB50EAE_R, _Multiply_FA91F999_Out); float _Property_CCCFB6C5_Out = Vector1_608CA392; float _Multiply_E9F86F95_Out; Unity_Multiply_float(_Split_DFB50EAE_B, _Property_CCCFB6C5_Out, _Multiply_E9F86F95_Out); float _Add_8AD491B3_Out; Unity_Add_float(_Multiply_FA91F999_Out, _Multiply_E9F86F95_Out, _Add_8AD491B3_Out); float _Property_3F20CEFF_Out = Vector1_8D2F509D; float _Multiply_6BF97013_Out; Unity_Multiply_float(_Add_8AD491B3_Out, _Property_3F20CEFF_Out, _Multiply_6BF97013_Out); float _Property_D3C80BA0_Out = Vector1_5685904E; float _Multiply_29383B2_Out; Unity_Multiply_float(_Property_D3C80BA0_Out, _Time.y, _Multiply_29383B2_Out); float _Add_E3E06F02_Out; Unity_Add_float(_Multiply_6BF97013_Out, _Multiply_29383B2_Out, _Add_E3E06F02_Out); float _Sine_8E517BF5_Out; Unity_Sine_float(_Add_E3E06F02_Out, _Sine_8E517BF5_Out); float _Absolute_931AE881_Out; Unity_Absolute_float(_Sine_8E517BF5_Out, _Absolute_931AE881_Out); float _OneMinus_1E5C6612_Out; Unity_OneMinus_float(_Absolute_931AE881_Out, _OneMinus_1E5C6612_Out); float _Property_49B432CE_Out = Vector1_A04E5E21; float _Power_9AE27DEE_Out; Unity_Power_float(_OneMinus_1E5C6612_Out, _Property_49B432CE_Out, _Power_9AE27DEE_Out); float _Property_4660BD4E_Out = Vector1_11C8BE5D; float _Multiply_6470DEA3_Out; Unity_Multiply_float(_Power_9AE27DEE_Out, _Property_4660BD4E_Out, _Multiply_6470DEA3_Out); float _Add_824718F6_Out; Unity_Add_float(_Multiply_456312AC_Out, _Multiply_6470DEA3_Out, _Add_824718F6_Out); float _Property_210419CE_Out = Vector1_730BBE62; float _Split_847C2C1D_R = IN.WorldSpacePosition[0]; float _Split_847C2C1D_G = IN.WorldSpacePosition[1]; float _Split_847C2C1D_B = IN.WorldSpacePosition[2]; float _Split_847C2C1D_A = 0; float _Multiply_FF63FCF9_Out; Unity_Multiply_float(_Property_210419CE_Out, _Split_847C2C1D_R, _Multiply_FF63FCF9_Out); float _Property_BE4DF16B_Out = Vector1_608CA392; float _Multiply_39F59106_Out; Unity_Multiply_float(_Split_847C2C1D_B, _Property_BE4DF16B_Out, _Multiply_39F59106_Out); float _Add_BCC6A16F_Out; Unity_Add_float(_Multiply_FF63FCF9_Out, _Multiply_39F59106_Out, _Add_BCC6A16F_Out); float _Property_871072B4_Out = Vector1_8403193C; float _Multiply_8117D6AC_Out; Unity_Multiply_float(_Add_BCC6A16F_Out, _Property_871072B4_Out, _Multiply_8117D6AC_Out); float _Property_5B1CDF26_Out = Vector1_B4A117B7; float _Multiply_ADD9E620_Out; Unity_Multiply_float(_Property_5B1CDF26_Out, _Time.y, _Multiply_ADD9E620_Out); float _Add_79F60FE7_Out; Unity_Add_float(_Multiply_8117D6AC_Out, _Multiply_ADD9E620_Out, _Add_79F60FE7_Out); float _Sine_85F022E9_Out; Unity_Sine_float(_Add_79F60FE7_Out, _Sine_85F022E9_Out); float _Absolute_4F8844FD_Out; Unity_Absolute_float(_Sine_85F022E9_Out, _Absolute_4F8844FD_Out); float _OneMinus_8F4F4A1C_Out; Unity_OneMinus_float(_Absolute_4F8844FD_Out, _OneMinus_8F4F4A1C_Out); float _Property_AD6B071E_Out = Vector1_632F7C2E; float _Power_9DCB8C4C_Out; Unity_Power_float(_OneMinus_8F4F4A1C_Out, _Property_AD6B071E_Out, _Power_9DCB8C4C_Out); float _Property_167E6FA5_Out = Vector1_4735D5E2; float _Multiply_9E4F1BD7_Out; Unity_Multiply_float(_Power_9DCB8C4C_Out, _Property_167E6FA5_Out, _Multiply_9E4F1BD7_Out); float _Add_5B8345A6_Out; Unity_Add_float(_Add_824718F6_Out, _Multiply_9E4F1BD7_Out, _Add_5B8345A6_Out); float _Split_BF38371F_R = IN.WorldSpacePosition[0]; float _Split_BF38371F_G = IN.WorldSpacePosition[1]; float _Split_BF38371F_B = IN.WorldSpacePosition[2]; float _Split_BF38371F_A = 0; float4 _Combine_5D5A6EB4_RGBA; float3 _Combine_5D5A6EB4_RGB; float2 _Combine_5D5A6EB4_RG; Unity_Combine_float(_Split_BF38371F_R, _Split_BF38371F_B, 0, 0, _Combine_5D5A6EB4_RGBA, _Combine_5D5A6EB4_RGB, _Combine_5D5A6EB4_RG); float2 _Property_D4063191_Out = Vector2_FA95DCD5; float2 _Multiply_86B2E332_Out; Unity_Multiply_float((_Time.y.xx), _Property_D4063191_Out, _Multiply_86B2E332_Out); float2 _TilingAndOffset_37C09071_Out; Unity_TilingAndOffset_float(_Combine_5D5A6EB4_RG, float2 (1,1), _Multiply_86B2E332_Out, _TilingAndOffset_37C09071_Out); float _Property_4C95B6F7_Out = Vector1_A6C44B0B; float _GradientNoise_1AA59D61_Out; Unity_GradientNoise_float(_TilingAndOffset_37C09071_Out, _Property_4C95B6F7_Out, _GradientNoise_1AA59D61_Out); float2 _Property_78823826_Out = Vector2_1000B2F1; float _Remap_C3B2F9FE_Out; Unity_Remap_float(_GradientNoise_1AA59D61_Out, float2 (0,1), _Property_78823826_Out, _Remap_C3B2F9FE_Out); float _Multiply_FAFF27A2_Out; Unity_Multiply_float(_Add_5B8345A6_Out, _Remap_C3B2F9FE_Out, _Multiply_FAFF27A2_Out); float _Split_B44C4E4B_R = _Multiply_FAFF27A2_Out; float _Split_B44C4E4B_G = 0; float _Split_B44C4E4B_B = 0; float _Split_B44C4E4B_A = 0; float _Add_A40E349E_Out; Unity_Add_float(_Split_B44C4E4B_R, _Split_B44C4E4B_B, _Add_A40E349E_Out); float _Add_9F809789_Out; Unity_Add_float(_Split_85D79FAF_G, _Add_A40E349E_Out, _Add_9F809789_Out); float4 _Combine_AA9DAF7E_RGBA; float3 _Combine_AA9DAF7E_RGB; float2 _Combine_AA9DAF7E_RG; Unity_Combine_float(_Split_85D79FAF_R, _Add_9F809789_Out, _Split_85D79FAF_B, 0, _Combine_AA9DAF7E_RGBA, _Combine_AA9DAF7E_RGB, _Combine_AA9DAF7E_RG); float _Split_9965AACD_R = IN.VertexColor[0]; float _Split_9965AACD_G = IN.VertexColor[1]; float _Split_9965AACD_B = IN.VertexColor[2]; float _Split_9965AACD_A = IN.VertexColor[3]; float3 _Lerp_5D3FAD3B_Out; Unity_Lerp_float3(IN.ObjectSpacePosition, _Combine_AA9DAF7E_RGB, (_Split_9965AACD_R.xxx), _Lerp_5D3FAD3B_Out); description.Position = _Lerp_5D3FAD3B_Out; return description; } struct GraphVertexInput { float4 vertex : POSITION; float3 normal : NORMAL; float4 tangent : TANGENT; float4 color : COLOR; float4 texcoord1 : TEXCOORD1; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float2 uv : TEXCOORD0; float4 clipPos : SV_POSITION; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; // x: global clip space bias, y: normal world space bias float4 _ShadowBias; float3 _LightDirection; VertexOutput ShadowPassVertex(GraphVertexInput v) { VertexOutput o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); // Vertex transformations performed by graph float3 WorldSpacePosition = mul(UNITY_MATRIX_M,v.vertex); float3 WorldSpaceNormal = normalize(mul(v.normal,(float3x3)UNITY_MATRIX_I_M)); float4 VertexColor = v.color; float4 uv1 = v.texcoord1; float3 ObjectSpacePosition = mul(UNITY_MATRIX_I_M,float4(WorldSpacePosition,1.0)); VertexDescriptionInputs vdi = (VertexDescriptionInputs)0; // Vertex description inputs defined by graph vdi.ObjectSpacePosition = ObjectSpacePosition; vdi.WorldSpacePosition = WorldSpacePosition; vdi.VertexColor = VertexColor; VertexDescription vd = PopulateVertexData(vdi); v.vertex.xyz = vd.Position; o.uv = uv1; float3 positionWS = TransformObjectToWorld(v.vertex.xyz); float3 normalWS = TransformObjectToWorldDir(v.normal); float invNdotL = 1.0 - saturate(dot(_LightDirection, normalWS)); float scale = invNdotL * _ShadowBias.y; // normal bias is negative since we want to apply an inset normal offset positionWS = normalWS * scale.xxx + positionWS; float4 clipPos = TransformWorldToHClip(positionWS); // _ShadowBias.x sign depens on if platform has reversed z buffer clipPos.z += _ShadowBias.x; #if UNITY_REVERSED_Z clipPos.z = min(clipPos.z, clipPos.w * UNITY_NEAR_CLIP_VALUE); #else clipPos.z = max(clipPos.z, clipPos.w * UNITY_NEAR_CLIP_VALUE); #endif o.clipPos = clipPos; return o; } half4 ShadowPassFragment(VertexOutput IN) : SV_TARGET { UNITY_SETUP_INSTANCE_ID(IN); return 0; } ENDHLSL } Pass { Name "DepthOnly" Tags{"LightMode" = "DepthOnly"} ZWrite On ColorMask 0 // Material options generated by graph Cull Back HLSLPROGRAM // Required to compile gles 2.0 with standard srp library #pragma prefer_hlslcc gles #pragma exclude_renderers d3d11_9x #pragma target 2.0 //-------------------------------------- // GPU Instancing #pragma multi_compile_instancing #pragma vertex vert #pragma fragment frag // Defines generated by graph #include "LWRP/ShaderLibrary/Core.hlsl" #include "LWRP/ShaderLibrary/Lighting.hlsl" #include "ShaderGraphLibrary/Functions.hlsl" #include "CoreRP/ShaderLibrary/Color.hlsl" float Vector1_B9797993; float Vector1_F1BE6F9F; float4 Color_120283E2; float4 Color_3974F997; float2 Vector2_7922229F; float Vector1_8D2F509D; float Vector1_5685904E; float Vector1_11C8BE5D; float Vector1_A04E5E21; float Vector1_E58F6327; float Vector1_5721F4C2; float Vector1_5D17CBA2; float Vector1_72D9B0C5; float Vector1_C800E0A4; float Vector1_1C76134F; float Vector1_221E0A39; float Vector1_F44D25A0; float Vector1_F68B8AAF; float Vector1_8403193C; float Vector1_B4A117B7; float Vector1_4735D5E2; float Vector1_632F7C2E; float Vector1_730BBE62; float Vector1_608CA392; float Vector1_961065ED; float Vector1_F9DF03AF; float Vector1_2067D572; float Vector1_40E2F0ED; float2 Vector2_113ECD47; float Vector1_137DC7ED; float2 Vector2_BE5D86FE; float Vector1_A6C44B0B; float2 Vector2_1000B2F1; float2 Vector2_FA95DCD5; TEXTURE2D(_CameraOpaqueTexture); SAMPLER(sampler_CameraOpaqueTexture); float Vector1_95BDBEC1; struct VertexDescriptionInputs { float3 ObjectSpacePosition; float3 WorldSpacePosition; float4 VertexColor; }; void Unity_Multiply_float (float A, float B, out float Out) { Out = A * B; } void Unity_Add_float(float A, float B, out float Out) { Out = A + B; } void Unity_Sine_float(float In, out float Out) { Out = sin(In); } void Unity_Absolute_float(float In, out float Out) { Out = abs(In); } void Unity_OneMinus_float(float In, out float Out) { Out = 1 - In; } void Unity_Power_float(float A, float B, out float Out) { Out = pow(A, B); } void Unity_Combine_float(float R, float G, float B, float A, out float4 RGBA, out float3 RGB, out float2 RG) { RGBA = float4(R, G, B, A); RGB = float3(R, G, B); RG = float2(R, G); } void Unity_Multiply_float (float2 A, float2 B, out float2 Out) { Out = A * B; } void Unity_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out) { Out = UV * Tiling + Offset; } float2 unity_gradientNoise_dir(float2 p) { // Permutation and hashing used in webgl-nosie goo.gl/pX7HtC p = p % 289; float x = (34 * p.x + 1) * p.x % 289 + p.y; x = (34 * x + 1) * x % 289; x = frac(x / 41) * 2 - 1; return normalize(float2(x - floor(x + 0.5), abs(x) - 0.5)); } float unity_gradientNoise(float2 p) { float2 ip = floor(p); float2 fp = frac(p); float d00 = dot(unity_gradientNoise_dir(ip), fp); float d01 = dot(unity_gradientNoise_dir(ip + float2(0, 1)), fp - float2(0, 1)); float d10 = dot(unity_gradientNoise_dir(ip + float2(1, 0)), fp - float2(1, 0)); float d11 = dot(unity_gradientNoise_dir(ip + float2(1, 1)), fp - float2(1, 1)); fp = fp * fp * fp * (fp * (fp * 6 - 15) + 10); return lerp(lerp(d00, d01, fp.y), lerp(d10, d11, fp.y), fp.x); } void Unity_GradientNoise_float(float2 UV, float Scale, out float Out) { Out = unity_gradientNoise(UV * Scale) + 0.5; } void Unity_Remap_float(float In, float2 InMinMax, float2 OutMinMax, out float Out) { Out = OutMinMax.x + (In - InMinMax.x) * (OutMinMax.y - OutMinMax.x) / (InMinMax.y - InMinMax.x); } void Unity_Lerp_float3(float3 A, float3 B, float3 T, out float3 Out) { Out = lerp(A, B, T); } struct VertexDescription { float3 Position; }; VertexDescription PopulateVertexData(VertexDescriptionInputs IN) { VertexDescription description = (VertexDescription)0; float _Split_85D79FAF_R = IN.ObjectSpacePosition[0]; float _Split_85D79FAF_G = IN.ObjectSpacePosition[1]; float _Split_85D79FAF_B = IN.ObjectSpacePosition[2]; float _Split_85D79FAF_A = 0; float _Property_76EBDFB4_Out = Vector1_1C76134F; float _Property_6F727335_Out = Vector1_F44D25A0; float _Split_1FCA8336_R = IN.WorldSpacePosition[0]; float _Split_1FCA8336_G = IN.WorldSpacePosition[1]; float _Split_1FCA8336_B = IN.WorldSpacePosition[2]; float _Split_1FCA8336_A = 0; float _Multiply_FA212AA9_Out; Unity_Multiply_float(_Property_6F727335_Out, _Split_1FCA8336_R, _Multiply_FA212AA9_Out); float _Property_D24D4052_Out = Vector1_F68B8AAF; float _Multiply_DD586B4F_Out; Unity_Multiply_float(_Split_1FCA8336_B, _Property_D24D4052_Out, _Multiply_DD586B4F_Out); float _Add_9955F712_Out; Unity_Add_float(_Multiply_FA212AA9_Out, _Multiply_DD586B4F_Out, _Add_9955F712_Out); float _Property_D670E1C1_Out = Vector1_72D9B0C5; float _Multiply_E978714F_Out; Unity_Multiply_float(_Add_9955F712_Out, _Property_D670E1C1_Out, _Multiply_E978714F_Out); float _Property_1DB93E5B_Out = Vector1_C800E0A4; float _Multiply_B6BCE94B_Out; Unity_Multiply_float(_Property_1DB93E5B_Out, _Time.y, _Multiply_B6BCE94B_Out); float _Add_93C00E2C_Out; Unity_Add_float(_Multiply_E978714F_Out, _Multiply_B6BCE94B_Out, _Add_93C00E2C_Out); float _Sine_B3E85844_Out; Unity_Sine_float(_Add_93C00E2C_Out, _Sine_B3E85844_Out); float _Absolute_FD2BA96C_Out; Unity_Absolute_float(_Sine_B3E85844_Out, _Absolute_FD2BA96C_Out); float _OneMinus_E054867B_Out; Unity_OneMinus_float(_Absolute_FD2BA96C_Out, _OneMinus_E054867B_Out); float _Property_EDAEC3B4_Out = Vector1_221E0A39; float _Power_89128DC7_Out; Unity_Power_float(_OneMinus_E054867B_Out, _Property_EDAEC3B4_Out, _Power_89128DC7_Out); float _Multiply_456312AC_Out; Unity_Multiply_float(_Property_76EBDFB4_Out, _Power_89128DC7_Out, _Multiply_456312AC_Out); float _Property_AC775712_Out = Vector1_E58F6327; float _Split_DFB50EAE_R = IN.WorldSpacePosition[0]; float _Split_DFB50EAE_G = IN.WorldSpacePosition[1]; float _Split_DFB50EAE_B = IN.WorldSpacePosition[2]; float _Split_DFB50EAE_A = 0; float _Multiply_FA91F999_Out; Unity_Multiply_float(_Property_AC775712_Out, _Split_DFB50EAE_R, _Multiply_FA91F999_Out); float _Property_CCCFB6C5_Out = Vector1_608CA392; float _Multiply_E9F86F95_Out; Unity_Multiply_float(_Split_DFB50EAE_B, _Property_CCCFB6C5_Out, _Multiply_E9F86F95_Out); float _Add_8AD491B3_Out; Unity_Add_float(_Multiply_FA91F999_Out, _Multiply_E9F86F95_Out, _Add_8AD491B3_Out); float _Property_3F20CEFF_Out = Vector1_8D2F509D; float _Multiply_6BF97013_Out; Unity_Multiply_float(_Add_8AD491B3_Out, _Property_3F20CEFF_Out, _Multiply_6BF97013_Out); float _Property_D3C80BA0_Out = Vector1_5685904E; float _Multiply_29383B2_Out; Unity_Multiply_float(_Property_D3C80BA0_Out, _Time.y, _Multiply_29383B2_Out); float _Add_E3E06F02_Out; Unity_Add_float(_Multiply_6BF97013_Out, _Multiply_29383B2_Out, _Add_E3E06F02_Out); float _Sine_8E517BF5_Out; Unity_Sine_float(_Add_E3E06F02_Out, _Sine_8E517BF5_Out); float _Absolute_931AE881_Out; Unity_Absolute_float(_Sine_8E517BF5_Out, _Absolute_931AE881_Out); float _OneMinus_1E5C6612_Out; Unity_OneMinus_float(_Absolute_931AE881_Out, _OneMinus_1E5C6612_Out); float _Property_49B432CE_Out = Vector1_A04E5E21; float _Power_9AE27DEE_Out; Unity_Power_float(_OneMinus_1E5C6612_Out, _Property_49B432CE_Out, _Power_9AE27DEE_Out); float _Property_4660BD4E_Out = Vector1_11C8BE5D; float _Multiply_6470DEA3_Out; Unity_Multiply_float(_Power_9AE27DEE_Out, _Property_4660BD4E_Out, _Multiply_6470DEA3_Out); float _Add_824718F6_Out; Unity_Add_float(_Multiply_456312AC_Out, _Multiply_6470DEA3_Out, _Add_824718F6_Out); float _Property_210419CE_Out = Vector1_730BBE62; float _Split_847C2C1D_R = IN.WorldSpacePosition[0]; float _Split_847C2C1D_G = IN.WorldSpacePosition[1]; float _Split_847C2C1D_B = IN.WorldSpacePosition[2]; float _Split_847C2C1D_A = 0; float _Multiply_FF63FCF9_Out; Unity_Multiply_float(_Property_210419CE_Out, _Split_847C2C1D_R, _Multiply_FF63FCF9_Out); float _Property_BE4DF16B_Out = Vector1_608CA392; float _Multiply_39F59106_Out; Unity_Multiply_float(_Split_847C2C1D_B, _Property_BE4DF16B_Out, _Multiply_39F59106_Out); float _Add_BCC6A16F_Out; Unity_Add_float(_Multiply_FF63FCF9_Out, _Multiply_39F59106_Out, _Add_BCC6A16F_Out); float _Property_871072B4_Out = Vector1_8403193C; float _Multiply_8117D6AC_Out; Unity_Multiply_float(_Add_BCC6A16F_Out, _Property_871072B4_Out, _Multiply_8117D6AC_Out); float _Property_5B1CDF26_Out = Vector1_B4A117B7; float _Multiply_ADD9E620_Out; Unity_Multiply_float(_Property_5B1CDF26_Out, _Time.y, _Multiply_ADD9E620_Out); float _Add_79F60FE7_Out; Unity_Add_float(_Multiply_8117D6AC_Out, _Multiply_ADD9E620_Out, _Add_79F60FE7_Out); float _Sine_85F022E9_Out; Unity_Sine_float(_Add_79F60FE7_Out, _Sine_85F022E9_Out); float _Absolute_4F8844FD_Out; Unity_Absolute_float(_Sine_85F022E9_Out, _Absolute_4F8844FD_Out); float _OneMinus_8F4F4A1C_Out; Unity_OneMinus_float(_Absolute_4F8844FD_Out, _OneMinus_8F4F4A1C_Out); float _Property_AD6B071E_Out = Vector1_632F7C2E; float _Power_9DCB8C4C_Out; Unity_Power_float(_OneMinus_8F4F4A1C_Out, _Property_AD6B071E_Out, _Power_9DCB8C4C_Out); float _Property_167E6FA5_Out = Vector1_4735D5E2; float _Multiply_9E4F1BD7_Out; Unity_Multiply_float(_Power_9DCB8C4C_Out, _Property_167E6FA5_Out, _Multiply_9E4F1BD7_Out); float _Add_5B8345A6_Out; Unity_Add_float(_Add_824718F6_Out, _Multiply_9E4F1BD7_Out, _Add_5B8345A6_Out); float _Split_BF38371F_R = IN.WorldSpacePosition[0]; float _Split_BF38371F_G = IN.WorldSpacePosition[1]; float _Split_BF38371F_B = IN.WorldSpacePosition[2]; float _Split_BF38371F_A = 0; float4 _Combine_5D5A6EB4_RGBA; float3 _Combine_5D5A6EB4_RGB; float2 _Combine_5D5A6EB4_RG; Unity_Combine_float(_Split_BF38371F_R, _Split_BF38371F_B, 0, 0, _Combine_5D5A6EB4_RGBA, _Combine_5D5A6EB4_RGB, _Combine_5D5A6EB4_RG); float2 _Property_D4063191_Out = Vector2_FA95DCD5; float2 _Multiply_86B2E332_Out; Unity_Multiply_float((_Time.y.xx), _Property_D4063191_Out, _Multiply_86B2E332_Out); float2 _TilingAndOffset_37C09071_Out; Unity_TilingAndOffset_float(_Combine_5D5A6EB4_RG, float2 (1,1), _Multiply_86B2E332_Out, _TilingAndOffset_37C09071_Out); float _Property_4C95B6F7_Out = Vector1_A6C44B0B; float _GradientNoise_1AA59D61_Out; Unity_GradientNoise_float(_TilingAndOffset_37C09071_Out, _Property_4C95B6F7_Out, _GradientNoise_1AA59D61_Out); float2 _Property_78823826_Out = Vector2_1000B2F1; float _Remap_C3B2F9FE_Out; Unity_Remap_float(_GradientNoise_1AA59D61_Out, float2 (0,1), _Property_78823826_Out, _Remap_C3B2F9FE_Out); float _Multiply_FAFF27A2_Out; Unity_Multiply_float(_Add_5B8345A6_Out, _Remap_C3B2F9FE_Out, _Multiply_FAFF27A2_Out); float _Split_B44C4E4B_R = _Multiply_FAFF27A2_Out; float _Split_B44C4E4B_G = 0; float _Split_B44C4E4B_B = 0; float _Split_B44C4E4B_A = 0; float _Add_A40E349E_Out; Unity_Add_float(_Split_B44C4E4B_R, _Split_B44C4E4B_B, _Add_A40E349E_Out); float _Add_9F809789_Out; Unity_Add_float(_Split_85D79FAF_G, _Add_A40E349E_Out, _Add_9F809789_Out); float4 _Combine_AA9DAF7E_RGBA; float3 _Combine_AA9DAF7E_RGB; float2 _Combine_AA9DAF7E_RG; Unity_Combine_float(_Split_85D79FAF_R, _Add_9F809789_Out, _Split_85D79FAF_B, 0, _Combine_AA9DAF7E_RGBA, _Combine_AA9DAF7E_RGB, _Combine_AA9DAF7E_RG); float _Split_9965AACD_R = IN.VertexColor[0]; float _Split_9965AACD_G = IN.VertexColor[1]; float _Split_9965AACD_B = IN.VertexColor[2]; float _Split_9965AACD_A = IN.VertexColor[3]; float3 _Lerp_5D3FAD3B_Out; Unity_Lerp_float3(IN.ObjectSpacePosition, _Combine_AA9DAF7E_RGB, (_Split_9965AACD_R.xxx), _Lerp_5D3FAD3B_Out); description.Position = _Lerp_5D3FAD3B_Out; return description; } struct GraphVertexInput { float4 vertex : POSITION; float3 normal : NORMAL; float4 tangent : TANGENT; float4 color : COLOR; float4 texcoord1 : TEXCOORD1; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float2 uv : TEXCOORD0; float4 clipPos : SV_POSITION; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; VertexOutput vert(GraphVertexInput v) { VertexOutput o = (VertexOutput)0; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); // Vertex transformations performed by graph float3 WorldSpacePosition = mul(UNITY_MATRIX_M,v.vertex); float3 WorldSpaceNormal = normalize(mul(v.normal,(float3x3)UNITY_MATRIX_I_M)); float4 VertexColor = v.color; float4 uv1 = v.texcoord1; float3 ObjectSpacePosition = mul(UNITY_MATRIX_I_M,float4(WorldSpacePosition,1.0)); VertexDescriptionInputs vdi = (VertexDescriptionInputs)0; // Vertex description inputs defined by graph vdi.ObjectSpacePosition = ObjectSpacePosition; vdi.WorldSpacePosition = WorldSpacePosition; vdi.VertexColor = VertexColor; VertexDescription vd = PopulateVertexData(vdi); v.vertex.xyz = vd.Position; o.uv = uv1; o.clipPos = TransformObjectToHClip(v.vertex.xyz); return o; } half4 frag(VertexOutput IN) : SV_TARGET { UNITY_SETUP_INSTANCE_ID(IN); return 0; } ENDHLSL } // This pass it not used during regular rendering, only for lightmap baking. Pass { Name "Meta" Tags{"LightMode" = "Meta"} Cull Off HLSLPROGRAM // Required to compile gles 2.0 with standard srp library #pragma prefer_hlslcc gles #pragma exclude_renderers d3d11_9x #pragma target 2.0 #pragma vertex LightweightVertexMeta #pragma fragment LightweightFragmentMeta #pragma shader_feature _SPECULAR_SETUP #pragma shader_feature _EMISSION #pragma shader_feature _METALLICSPECGLOSSMAP #pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A #pragma shader_feature EDITOR_VISUALIZATION #pragma shader_feature _SPECGLOSSMAP #include "LWRP/ShaderLibrary/InputSurfacePBR.hlsl" #include "LWRP/ShaderLibrary/LightweightPassMetaPBR.hlsl" ENDHLSL } } FallBack "Hidden/InternalErrorShader" }