%YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!114 &11400000 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 78b2425a2284af743826c689403a4924, type: 3} m_Name: Sample Lightmap m_EditorClassIdentifier: m_functionInfo: "// Made with Amplify Shader Editor v1.9.6.1\n// Available at the Unity Asset Store - http://u3d.as/y3X \n/*ASEBEGIN\nVersion=19601\nNode;AmplifyShaderEditor.CommentaryNode;212;1066.107,-568.2391;Inherit;False;614.2085;438.7624;;5;210;211;215;213;216;SRP Switch;1,1,1,1;0;0\nNode;AmplifyShaderEditor.CommentaryNode;198;-3321.077,-917.414;Inherit;False;1469.91;1078.811;;17;170;55;62;61;54;71;168;67;13;16;15;19;18;17;20;101;245;Inputs;1,1,1,1;0;0\nNode;AmplifyShaderEditor.CommentaryNode;197;-1643.276,-298.3067;Inherit;False;1831.265;759.8353;;15;249;192;190;194;191;188;175;174;176;189;153;167;173;195;196;URP & HDRP;1,1,1,1;0;0\nNode;AmplifyShaderEditor.CommentaryNode;200;-1643.683,-1527.179;Inherit;False;2476.525;940.3968;;24;225;209;205;232;208;218;204;203;230;202;201;221;220;219;226;233;234;235;237;238;239;240;243;246;BiRP;1,1,1,1;0;0\nNode;AmplifyShaderEditor.CommentaryNode;199;1811.648,-566.3028;Inherit;False;542.9536;444.1997;;2;178;0;Outputs;1,1,1,1;0;0\nNode;AmplifyShaderEditor.GetLocalVarNode;173;-1007.25,-144.4184;Inherit;False;170;backNormalWS;1;0;OBJECT;;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.GetLocalVarNode;167;-982.1501,-225.209;Inherit;False;67;normalWS;1;0;OBJECT;;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.FunctionNode;61;-2341.289,-408.4945;Inherit;False;Lightmap UV;-1;;77;1940f027d0458684eb0ad486f669d7d5;1,1,1;0;1;FLOAT2;0\nNode;AmplifyShaderEditor.Vector4Node;16;-2885.037,-91.71725;Float;False;Constant;_Vector1;Vector 1;3;0;Create;True;0;0;0;False;0;False;0,0,0,0;0,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4\nNode;AmplifyShaderEditor.StaticSwitch;15;-3037.036,-261.7169;Float;False;Property;_Keyword2;Keyword 2;2;0;Create;True;0;0;0;False;0;False;0;0;0;False;UNITY_LIGHTMAP_RGBM_ENCODING;Toggle;2;Key0;Key1;Fetch;True;True;All;9;1;FLOAT4;0,0,0,0;False;0;FLOAT4;0,0,0,0;False;2;FLOAT4;0,0,0,0;False;3;FLOAT4;0,0,0,0;False;4;FLOAT4;0,0,0,0;False;5;FLOAT4;0,0,0,0;False;6;FLOAT4;0,0,0,0;False;7;FLOAT4;0,0,0,0;False;8;FLOAT4;0,0,0,0;False;1;FLOAT4;0\nNode;AmplifyShaderEditor.CustomExpressionNode;19;-2608.36,-289.4103;Inherit;False;return float4(LIGHTMAP_HDR_MULTIPLIER, LIGHTMAP_HDR_EXPONENT, 0, 0)@;4;Create;0;URPDecodeInstruction;True;False;0;;False;0;1;FLOAT4;0\nNode;AmplifyShaderEditor.Vector4Node;18;-3271.077,-50.60384;Float;False;Constant;_Vector3;Vector 3;3;0;Create;True;0;0;0;False;0;False;34.49324,2.2,0,0;0,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4\nNode;AmplifyShaderEditor.Vector4Node;17;-3264.077,-263.6035;Float;False;Constant;_Vector2;Vector 2;3;0;Create;True;0;0;0;False;0;False;2,2.2,0,0;0,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4\nNode;AmplifyShaderEditor.FunctionSwitchByPipeline;20;-2342.951,-225.9808;Inherit;False;4;0;FLOAT4;0,0,0,0;False;3;FLOAT4;0,0,0,0;False;1;FLOAT4;0,0,0,0;False;2;FLOAT4;0,0,0,0;False;1;FLOAT4;0\nNode;AmplifyShaderEditor.RegisterLocalVarNode;101;-2100.167,-229.8449;Inherit;False;decodeInstructions;-1;True;1;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0\nNode;AmplifyShaderEditor.RegisterLocalVarNode;55;-2105.392,-528.5924;Inherit;False;staticUV;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2;0\nNode;AmplifyShaderEditor.RegisterLocalVarNode;62;-2108.067,-411.3564;Inherit;False;dynamicUV;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2;0\nNode;AmplifyShaderEditor.FunctionNode;54;-2343.268,-526.1492;Inherit;False;Lightmap UV;-1;;78;1940f027d0458684eb0ad486f669d7d5;1,1,0;0;1;FLOAT2;0\nNode;AmplifyShaderEditor.StaticSwitch;13;-2689.409,-196.2771;Float;False;Property;_Keyword0;Keyword 0;1;0;Create;True;0;0;0;False;0;False;0;0;0;False;UNITY_LIGHTMAP_FULL_HDR;Toggle;2;Key0;Key1;Fetch;True;True;All;9;1;FLOAT4;0,0,0,0;False;0;FLOAT4;0,0,0,0;False;2;FLOAT4;0,0,0,0;False;3;FLOAT4;0,0,0,0;False;4;FLOAT4;0,0,0,0;False;5;FLOAT4;0,0,0,0;False;6;FLOAT4;0,0,0,0;False;7;FLOAT4;0,0,0,0;False;8;FLOAT4;0,0,0,0;False;1;FLOAT4;0\nNode;AmplifyShaderEditor.FunctionSwitchByPipeline;211;1409.194,-331.8781;Inherit;False;4;0;COLOR;0,0,0,0;False;3;COLOR;0,0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;1;COLOR;0\nNode;AmplifyShaderEditor.FunctionSwitchByPipeline;210;1407.375,-495.5697;Inherit;False;4;0;COLOR;0,0,0,0;False;3;COLOR;0,0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;1;COLOR;0\nNode;AmplifyShaderEditor.RelayNode;216;1156.125,-423.1747;Inherit;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.RelayNode;213;1156.155,-496.1849;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0\nNode;AmplifyShaderEditor.RelayNode;215;1158.605,-258.5797;Inherit;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.FunctionNode;204;-1082.759,-820.9391;Inherit;False;Bicubic Sample;-1;;79;ce0e14d5ad5eac645b2e5892ab3506ff;2,92,2,72,2;7;99;SAMPLER2D;0;False;91;SAMPLER2DARRAY;0;False;93;FLOAT;0;False;97;FLOAT2;0,0;False;198;FLOAT4;0,0,0,0;False;199;FLOAT2;0,0;False;94;SAMPLERSTATE;0;False;5;COLOR;86;FLOAT;84;FLOAT;85;FLOAT;82;FLOAT;83\nNode;AmplifyShaderEditor.CustomExpressionNode;218;-1556.358,-756.4255;Inherit;False;int width = 1, height = 1@$#if !defined( SHADER_TARGET_SURFACE_ANALYSIS )$unity_Lightmap.GetDimensions( width, height )@$#endif$TexelSize = float4( 1.0 / float2( width, height ), width, height )@;7;Create;1;True;TexelSize;FLOAT4;0,0,0,0;Out;;Inherit;False;Lightmap Texel Size;False;False;0;;False;2;0;FLOAT;0;False;1;FLOAT4;0,0,0,0;False;2;FLOAT;0;FLOAT4;2\nNode;AmplifyShaderEditor.GetLocalVarNode;208;-1535.264,-848.9343;Inherit;False;55;staticUV;1;0;OBJECT;;False;1;FLOAT2;0\nNode;AmplifyShaderEditor.FunctionNode;205;-1349.639,-792.7326;Inherit;False;Bicubic Precompute;-1;;80;818835145cc522e4da1f9915d8b8a984;0;2;5;FLOAT2;0,0;False;55;FLOAT4;0,0,0,0;False;2;FLOAT4;34;FLOAT2;54\nNode;AmplifyShaderEditor.TexturePropertyNode;201;-1570.616,-1145.339;Float;True;Global;unity_Lightmap;unity_Lightmap;0;0;Fetch;True;0;0;0;False;0;False;None;None;False;white;Auto;Texture2D;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1\nNode;AmplifyShaderEditor.GetLocalVarNode;202;-1511.77,-943.116;Inherit;False;55;staticUV;1;0;OBJECT;;False;1;FLOAT2;0\nNode;AmplifyShaderEditor.SamplerNode;203;-1276.811,-1039.238;Inherit;True;Property;_TextureSample0;Texture Sample 0;0;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5\nNode;AmplifyShaderEditor.WireNode;230;-1293.099,-841.9213;Inherit;False;1;0;SAMPLER2D;;False;1;SAMPLER2D;0\nNode;AmplifyShaderEditor.WireNode;232;-1137.081,-816.2039;Inherit;False;1;0;SAMPLER2D;;False;1;SAMPLER2D;0\nNode;AmplifyShaderEditor.FunctionNode;237;-623.8598,-1071.433;Inherit;False;Bicubic Precompute;-1;;83;818835145cc522e4da1f9915d8b8a984;0;2;5;FLOAT2;0,0;False;55;FLOAT4;0,0,0,0;False;2;FLOAT4;34;FLOAT2;54\nNode;AmplifyShaderEditor.FunctionNode;233;-356.9789,-1099.639;Inherit;False;Bicubic Sample;-1;;84;ce0e14d5ad5eac645b2e5892ab3506ff;2,92,2,72,2;7;99;SAMPLER2D;0;False;91;SAMPLER2DARRAY;0;False;93;FLOAT;0;False;97;FLOAT2;0,0;False;198;FLOAT4;0,0,0,0;False;199;FLOAT2;0,0;False;94;SAMPLERSTATE;0;False;5;COLOR;86;FLOAT;84;FLOAT;85;FLOAT;82;FLOAT;83\nNode;AmplifyShaderEditor.WireNode;240;-413.0786,-1096.328;Inherit;False;1;0;SAMPLER2D;;False;1;SAMPLER2D;0\nNode;AmplifyShaderEditor.SamplerNode;219;-539.1411,-1312.84;Inherit;True;Property;_TextureSample12;Texture Sample 0;0;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5\nNode;AmplifyShaderEditor.TexturePropertyNode;221;-829.9549,-1413.015;Float;True;Global;unity_LightmapInd;unity_LightmapInd;1;0;Fetch;True;0;0;0;False;0;False;None;None;False;white;Auto;Texture2D;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1\nNode;AmplifyShaderEditor.WireNode;239;-569.8479,-1141.709;Inherit;False;1;0;SAMPLER2D;;False;1;SAMPLER2D;0\nNode;AmplifyShaderEditor.RelayNode;243;-6.239696,-836.7784;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0\nNode;AmplifyShaderEditor.StaticSwitch;226;528.4357,-844.262;Float;False;Property;_Keyword1;Keyword 0;1;0;Create;True;0;0;0;False;0;False;0;0;0;False;DIRLIGHTMAP_COMBINED;Toggle;2;Key0;Key1;Fetch;True;True;All;9;1;COLOR;0,0,0,0;False;0;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;3;COLOR;0,0,0,0;False;4;COLOR;0,0,0,0;False;5;COLOR;0,0,0,0;False;6;COLOR;0,0,0,0;False;7;COLOR;0,0,0,0;False;8;COLOR;0,0,0,0;False;1;COLOR;0\nNode;AmplifyShaderEditor.FunctionSwitch;209;-835.5051,-844.2455;Inherit;False;Lighting Filter;False;0;2;0;Bilinear;Bicubic;Instance;195;10;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;9;FLOAT;0;False;1;COLOR;0\nNode;AmplifyShaderEditor.FunctionSwitch;238;-97.97224,-1122.82;Inherit;False;Direction Filter;False;0;2;1;Bilinear;Bicubic;Object;-1;10;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;9;FLOAT;0;False;1;COLOR;0\nNode;AmplifyShaderEditor.CustomExpressionNode;234;-830.5789,-1035.125;Inherit;False;int width = 1, height = 1@$#if !defined( SHADER_TARGET_SURFACE_ANALYSIS )$unity_LightmapInd.GetDimensions( width, height )@$#endif$TexelSize = float4( 1.0 / float2( width, height ), width, height )@;7;Call;1;True;TexelSize;FLOAT4;0,0,0,0;Out;;Inherit;False;LightmapInd Texel Size;False;False;0;;False;2;0;FLOAT;0;False;1;FLOAT4;0,0,0,0;False;2;FLOAT;0;FLOAT4;2\nNode;AmplifyShaderEditor.GetLocalVarNode;225;-74.82937,-996.6099;Inherit;False;67;normalWS;1;0;OBJECT;;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.FunctionNode;244;177.309,-942.9111;Inherit;False;Decode Directional Lighmap;-1;;86;8132441d5c7c63f479ea1c42855420a8;0;3;3;FLOAT3;0,0,0;False;2;FLOAT4;0,0,0,0;False;4;FLOAT3;0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.RegisterLocalVarNode;67;-2105.157,-821.5981;Inherit;False;normalWS;-1;True;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.RegisterLocalVarNode;170;-2108.187,-690.5192;Inherit;False;backNormalWS;-1;True;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.SimpleMultiplyOpNode;245;-2583.312,-684.721;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT3;-1,-1,-1;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.WorldNormalVector;168;-3006.344,-819.4457;Inherit;False;False;1;0;FLOAT3;0,0,1;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3\nNode;AmplifyShaderEditor.FunctionInput;71;-2794.314,-824.7816;Inherit;False;Normal WS;3;0;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.GetLocalVarNode;235;-810.4849,-1110.634;Inherit;False;55;staticUV;1;0;OBJECT;;False;1;FLOAT2;0\nNode;AmplifyShaderEditor.GetLocalVarNode;220;-808.5855,-1190.202;Inherit;False;55;staticUV;1;0;OBJECT;;False;1;FLOAT2;0\nNode;AmplifyShaderEditor.WireNode;246;-856.9822,-1219.418;Inherit;False;1;0;SAMPLERSTATE;;False;1;SAMPLERSTATE;0\nNode;AmplifyShaderEditor.GetLocalVarNode;176;-1027.531,109.2103;Inherit;False;101;decodeInstructions;1;0;OBJECT;;False;1;FLOAT4;0\nNode;AmplifyShaderEditor.GetLocalVarNode;174;-974.187,-66.97986;Inherit;False;55;staticUV;1;0;OBJECT;;False;1;FLOAT2;0\nNode;AmplifyShaderEditor.GetLocalVarNode;175;-982.531,22.33251;Inherit;False;62;dynamicUV;1;0;OBJECT;;False;1;FLOAT2;0\nNode;AmplifyShaderEditor.FunctionSwitch;191;-1000.923,198.1162;Inherit;False;dwd;False;0;2;1;Bilinear;Bicubic;Instance;238;10;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0,0,0,0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;9;FLOAT;0;False;1;FLOAT4;0\nNode;AmplifyShaderEditor.FunctionSwitch;249;-1000.977,315.5321;Inherit;False;dwd;False;0;2;1;Bilinear;Bicubic;Instance;238;10;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0,0,0,0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;9;FLOAT;0;False;1;FLOAT4;0\nNode;AmplifyShaderEditor.FunctionSwitch;195;-60.53754,-130.1396;Inherit;False;Lighting Filter;False;0;2;0;Bilinear;Bicubic;Object;-1;10;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;9;FLOAT;0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.FunctionSwitch;196;-60.30683,119.6928;Inherit;False;Lighting Filter;False;0;2;0;Bilinear;Bicubic;Instance;195;10;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;9;FLOAT;0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.GetLocalVarNode;189;-1576.323,197.3364;Inherit;False;55;staticUV;1;0;OBJECT;;False;1;FLOAT2;0\nNode;AmplifyShaderEditor.GetLocalVarNode;190;-1585.323,340.3365;Inherit;False;62;dynamicUV;1;0;OBJECT;;False;1;FLOAT2;0\nNode;AmplifyShaderEditor.CustomExpressionNode;192;-1337.46,297.4571;Inherit;False;#if defined( DIRLIGHTMAP_COMBINED ) && ( defined( SHADER_STAGE_FRAGMENT ) || defined( SHADER_STAGE_RAY_TRACING ) )$ int width, height@$ float4 texSize@$$ #if defined( LIGHTMAP_ON )$ #if defined( UNITY_DOTS_INSTANCING_ENABLED )$ unity_LightmapsInd.GetDimensions( width, height )@$ texSize = float4( width, height, 1.0 / float2( width, height ) )@$ staticDir = SampleTexture2DBicubic( unity_LightmapsInd, samplerunity_Lightmaps, staticUV, texSize, float2( 1, 1 ), unity_LightmapIndex.x )@$ #else$ unity_LightmapInd.GetDimensions( width, height )@$ texSize = float4( width, height, 1.0 / float2( width, height ) )@$ staticDir = SampleTexture2DBicubic( unity_LightmapInd, samplerunity_Lightmap, staticUV, texSize, float2( 1, 1 ), 0 )@$ #endif$ #endif$$ #if defined( DYNAMICLIGHTMAP_ON )$ unity_DynamicDirectionality.GetDimensions( width, height )@$ texSize = float4( width, height, 1.0 / float2( width, height ) )@$ dynamicDir = SampleTexture2DBicubic( unity_DynamicDirectionality, samplerunity_DynamicLightmap, dynamicUV, texSize, float2( 1, 1 ), 0 )@$ #endif$$#endif;7;Create;4;True;staticUV;FLOAT2;0,0;In;;Inherit;False;True;dynamicUV;FLOAT2;0,0;In;;Inherit;False;True;staticDir;FLOAT4;0,0,0,0;Out;;Inherit;False;True;dynamicDir;FLOAT4;0,0,0,0;Out;;Inherit;False;Sample Direction Bicubic;False;False;0;;False;5;0;FLOAT;0;False;1;FLOAT2;0,0;False;2;FLOAT2;0,0;False;3;FLOAT4;0,0,0,0;False;4;FLOAT4;0,0,0,0;False;3;FLOAT;0;FLOAT4;4;FLOAT4;5\nNode;AmplifyShaderEditor.CustomExpressionNode;194;-624,112;Inherit;False;bakeDiffuseLighting = 0@$backBakeDiffuseLighting = 0@$#if defined( SHADER_STAGE_FRAGMENT ) || defined( SHADER_STAGE_RAY_TRACING )$\tint width, height@$\tfloat4 texSize@$\tfloat3 illuminance@$\tfloat halfLambert@$\tfloat backHalfLambert@$$\t#if defined( LIGHTMAP_ON )$\t\t#ifdef UNITY_LIGHTMAP_FULL_HDR$\t\t\tbool encodedLightmap = false@$\t\t#else$\t\t\tbool encodedLightmap = true@$\t\t#endif$$\t\t#if defined( UNITY_DOTS_INSTANCING_ENABLED )$\t\t\tunity_Lightmaps.GetDimensions( width, height )@$\t\t\ttexSize = float4( width, height, 1.0 / float2( width, height ) )@$\t\t\tfloat4 encodedIlluminance = SampleTexture2DBicubic( unity_Lightmaps, samplerunity_Lightmaps, staticUV, texSize, float2( 1, 1 ), unity_LightmapIndex.x ).rgba@$\t\t#else$\t\t\tunity_Lightmap.GetDimensions( width, height )@$\t\t\ttexSize = float4( width, height, 1.0 / float2( width, height ) )@$\t\t\tfloat4 encodedIlluminance = SampleTexture2DBicubic( unity_Lightmap, samplerunity_Lightmap, staticUV, texSize, float2( 1, 1 ), 0 ).rgba@$\t\t#endif$\t\tilluminance = encodedLightmap ? DecodeLightmap( encodedIlluminance, decodeInstructions ) : encodedIlluminance.rgb@$$\t\t#if defined( DIRLIGHTMAP_COMBINED )$\t\t\thalfLambert = dot( normalWS, staticDir.xyz - 0.5 ) + 0.5@$\t\t\tbakeDiffuseLighting += illuminance * halfLambert / max( 1e-4, staticDir.w )@$$\t\t\tbackHalfLambert = dot( backNormalWS, staticDir.xyz - 0.5 ) + 0.5@$\t\t\tbackBakeDiffuseLighting += illuminance * backHalfLambert / max( 1e-4, staticDir.w )@$\t\t#else$\t\t\tbakeDiffuseLighting += illuminance@$\t\t\tbackBakeDiffuseLighting += illuminance@$\t\t#endif$\t#endif$$\t#if defined( DYNAMICLIGHTMAP_ON )$\t\tunity_DynamicLightmap.GetDimensions( width, height )@$\t\ttexSize = float4( width, height, 1.0 / float2( width, height ) )@$$\t\tilluminance = SampleTexture2DBicubic( unity_DynamicLightmap, samplerunity_DynamicLightmap, dynamicUV, texSize, float2( 1, 1 ), 0 ).rgb@$$\t\t#if defined( DIRLIGHTMAP_COMBINED )$\t\t\thalfLambert = dot( normalWS, dynamicDir.xyz - 0.5 ) + 0.5@$\t\t\tbakeDiffuseLighting += illuminance * halfLambert / max( 1e-4, dynamicDir.w )@$$\t\t\tbackHalfLambert = dot( backNormalWS, dynamicDir.xyz - 0.5 ) + 0.5@$\t\t\tbackBakeDiffuseLighting += illuminance * backHalfLambert / max( 1e-4, dynamicDir.w )@$\t\t#else$\t\t\tbakeDiffuseLighting += illuminance@$\t\t\tbackBakeDiffuseLighting += illuminance@$\t\t#endif$\t#endif$$#endif$return@;7;Create;9;True;normalWS;FLOAT3;0,0,0;In;;Inherit;False;True;backNormalWS;FLOAT3;0,0,0;In;;Inherit;False;True;staticUV;FLOAT2;0,0;In;;Inherit;False;True;dynamicUV;FLOAT2;0,0;In;;Inherit;False;True;bakeDiffuseLighting;FLOAT3;0,0,0;Out;;Inherit;False;True;backBakeDiffuseLighting;FLOAT3;0,0,0;Out;;Inherit;False;True;decodeInstructions;FLOAT4;0,0,0,0;In;;Inherit;False;True;staticDir;FLOAT4;0,0,0,0;In;;Inherit;False;True;dynamicDir;FLOAT4;0,0,0,0;In;;Inherit;False;Sample Lightmap Bicubic;False;False;0;;False;10;0;FLOAT;0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT3;0,0,0;False;6;FLOAT3;0,0,0;False;7;FLOAT4;0,0,0,0;False;8;FLOAT4;0,0,0,0;False;9;FLOAT4;0,0,0,0;False;3;FLOAT;0;FLOAT3;6;FLOAT3;7\nNode;AmplifyShaderEditor.CustomExpressionNode;153;-624,-144;Inherit;False;bakeDiffuseLighting = 0@$backBakeDiffuseLighting = 0@$#if defined( SHADER_STAGE_FRAGMENT ) || defined( SHADER_STAGE_RAY_TRACING )$\tfloat3 illuminance@$\tfloat halfLambert@$\tfloat backHalfLambert@$$\t#if defined( LIGHTMAP_ON )$\t\t#ifdef UNITY_LIGHTMAP_FULL_HDR$\t\t\tbool encodedLightmap = false@$\t\t#else$\t\t\tbool encodedLightmap = true@$\t\t#endif$$\t\t#if defined( UNITY_DOTS_INSTANCING_ENABLED )$\t\t\tfloat4 encodedIlluminance = SAMPLE_TEXTURE2D_LIGHTMAP( unity_Lightmaps, samplerunity_Lightmaps, staticUV, unity_LightmapIndex.x ).rgba@$\t\t#else$\t\t\tfloat4 encodedIlluminance = SAMPLE_TEXTURE2D_LIGHTMAP( unity_Lightmap, samplerunity_Lightmap, staticUV ).rgba@$\t\t#endif$\t\tilluminance = encodedLightmap ? DecodeLightmap( encodedIlluminance, decodeInstructions ) : encodedIlluminance.rgb@$$\t\t#if defined( DIRLIGHTMAP_COMBINED )$\t\t\thalfLambert = dot( normalWS, staticDir.xyz - 0.5 ) + 0.5@$\t\t\tbakeDiffuseLighting += illuminance * halfLambert / max( 1e-4, staticDir.w )@$$\t\t\tbackHalfLambert = dot( backNormalWS, staticDir.xyz - 0.5 ) + 0.5@$\t\t\tbackBakeDiffuseLighting += illuminance * backHalfLambert / max( 1e-4, staticDir.w )@$\t\t#else$\t\t\tbakeDiffuseLighting += illuminance@$\t\t\tbackBakeDiffuseLighting += illuminance@$\t\t#endif$\t#endif$$\t#if defined( DYNAMICLIGHTMAP_ON )$\t\tilluminance = SAMPLE_TEXTURE2D_LIGHTMAP( unity_DynamicLightmap, samplerunity_DynamicLightmap, dynamicUV ).rgb@$$\t\t#if defined( DIRLIGHTMAP_COMBINED )$\t\t\thalfLambert = dot( normalWS, dynamicDir.xyz - 0.5 ) + 0.5@$\t\t\tbakeDiffuseLighting += illuminance * halfLambert / max( 1e-4, dynamicDir.w )@$$\t\t\tbackHalfLambert = dot( backNormalWS, dynamicDir.xyz - 0.5 ) + 0.5@$\t\t\tbackBakeDiffuseLighting += illuminance * backHalfLambert / max( 1e-4, dynamicDir.w )@$\t\t#else$\t\t\tbakeDiffuseLighting += illuminance@$\t\t\tbackBakeDiffuseLighting += illuminance@$\t\t#endif$\t#endif$$#endif$return@;7;Create;9;True;normalWS;FLOAT3;0,0,0;In;;Inherit;False;True;backNormalWS;FLOAT3;0,0,0;In;;Inherit;False;True;staticUV;FLOAT2;0,0;In;;Inherit;False;True;dynamicUV;FLOAT2;0,0;In;;Inherit;False;True;bakeDiffuseLighting;FLOAT3;0,0,0;Out;;Inherit;False;True;backBakeDiffuseLighting;FLOAT3;0,0,0;Out;;Inherit;False;True;decodeInstructions;FLOAT4;0,0,0,0;In;;Inherit;False;True;staticDir;FLOAT4;0,0,0,0;In;;Inherit;False;True;dynamicDir;FLOAT4;0,0,0,0;In;;Inherit;False;Sample Lightmap Bilinear;False;False;0;;False;10;0;FLOAT;0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT3;0,0,0;False;6;FLOAT3;0,0,0;False;7;FLOAT4;0,0,0,0;False;8;FLOAT4;0,0,0,0;False;9;FLOAT4;0,0,0,0;False;3;FLOAT;0;FLOAT3;6;FLOAT3;7\nNode;AmplifyShaderEditor.SimpleMultiplyOpNode;255;464,96;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.Exposure;254;256,-16;Inherit;False;0;1;FLOAT;0\nNode;AmplifyShaderEditor.SimpleMultiplyOpNode;256;464,-128;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.FunctionSwitch;258;656,-240;Inherit;False;Apply Exposure;True;1;2;-1;In 0;In 1;Object;-1;10;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;9;FLOAT;0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.FunctionSwitch;259;656,0;Inherit;False;Apply Exposure;True;1;2;-1;In 0;In 1;Instance;258;10;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;9;FLOAT;0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.CustomExpressionNode;188;-1338.572,178.5896;Inherit;False;#if defined( DIRLIGHTMAP_COMBINED ) && ( defined( SHADER_STAGE_FRAGMENT ) || defined( SHADER_STAGE_RAY_TRACING ) )$$ #if defined( LIGHTMAP_ON )$ #if defined( UNITY_DOTS_INSTANCING_ENABLED )$ staticDir = SAMPLE_TEXTURE2D_LIGHTMAP( unity_LightmapsInd, samplerunity_Lightmaps, staticUV, unity_LightmapIndex.x )@$ #else$ staticDir = SAMPLE_TEXTURE2D_LIGHTMAP( unity_LightmapInd, samplerunity_Lightmap, staticUV )@$ #endif$ #endif$$ #if defined( DYNAMICLIGHTMAP_ON )$ dynamicDir = SAMPLE_TEXTURE2D_LIGHTMAP( unity_DynamicDirectionality, samplerunity_DynamicLightmap, dynamicUV )@$ #endif$$#endif;7;Create;4;True;staticUV;FLOAT2;0,0;In;;Inherit;False;True;dynamicUV;FLOAT2;0,0;In;;Inherit;False;True;staticDir;FLOAT4;0,0,0,0;Out;;Inherit;False;True;dynamicDir;FLOAT4;0,0,0,0;Out;;Inherit;False;Sample Direction Bilinear;False;False;0;;False;5;0;FLOAT;0;False;1;FLOAT2;0,0;False;2;FLOAT2;0,0;False;3;FLOAT4;0,0,0,0;False;4;FLOAT4;0,0,0,0;False;3;FLOAT;0;FLOAT4;4;FLOAT4;5\nNode;AmplifyShaderEditor.FunctionOutput;0;1901.405,-499.9456;Inherit;False;True;-1;Lighting;0;True;1;0;COLOR;0,0,0,0;False;1;COLOR;0\nNode;AmplifyShaderEditor.FunctionOutput;178;1904.03,-333.0743;Inherit;False;False;-1;Back Lighting;1;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0\nWireConnection;15;1;17;0\nWireConnection;15;0;18;0\nWireConnection;20;0;13;0\nWireConnection;20;3;13;0\nWireConnection;20;1;19;0\nWireConnection;20;2;13;0\nWireConnection;101;0;20;0\nWireConnection;55;0;54;0\nWireConnection;62;0;61;0\nWireConnection;13;1;15;0\nWireConnection;13;0;16;0\nWireConnection;211;0;213;0\nWireConnection;211;3;213;0\nWireConnection;211;1;215;0\nWireConnection;211;2;215;0\nWireConnection;210;0;213;0\nWireConnection;210;3;213;0\nWireConnection;210;1;216;0\nWireConnection;210;2;216;0\nWireConnection;216;0;258;0\nWireConnection;213;0;226;0\nWireConnection;215;0;259;0\nWireConnection;204;99;232;0\nWireConnection;204;198;205;34\nWireConnection;204;199;205;54\nWireConnection;205;5;208;0\nWireConnection;205;55;218;2\nWireConnection;203;0;201;0\nWireConnection;203;1;202;0\nWireConnection;203;7;201;1\nWireConnection;230;0;201;0\nWireConnection;232;0;230;0\nWireConnection;237;5;235;0\nWireConnection;237;55;234;2\nWireConnection;233;99;240;0\nWireConnection;233;198;237;34\nWireConnection;233;199;237;54\nWireConnection;240;0;239;0\nWireConnection;219;0;221;0\nWireConnection;219;1;220;0\nWireConnection;219;7;246;0\nWireConnection;239;0;221;0\nWireConnection;243;0;209;0\nWireConnection;226;1;243;0\nWireConnection;226;0;244;0\nWireConnection;209;0;203;0\nWireConnection;209;1;204;86\nWireConnection;238;0;219;0\nWireConnection;238;1;233;86\nWireConnection;244;3;243;0\nWireConnection;244;2;238;0\nWireConnection;244;4;225;0\nWireConnection;67;0;71;0\nWireConnection;170;0;245;0\nWireConnection;245;0;71;0\nWireConnection;71;0;168;0\nWireConnection;246;0;201;1\nWireConnection;191;0;188;4\nWireConnection;191;1;192;4\nWireConnection;249;0;188;5\nWireConnection;249;1;192;5\nWireConnection;195;0;153;6\nWireConnection;195;1;194;6\nWireConnection;196;0;153;7\nWireConnection;196;1;194;7\nWireConnection;192;1;189;0\nWireConnection;192;2;190;0\nWireConnection;194;1;167;0\nWireConnection;194;2;173;0\nWireConnection;194;3;174;0\nWireConnection;194;4;175;0\nWireConnection;194;7;176;0\nWireConnection;194;8;191;0\nWireConnection;194;9;249;0\nWireConnection;153;1;167;0\nWireConnection;153;2;173;0\nWireConnection;153;3;174;0\nWireConnection;153;4;175;0\nWireConnection;153;7;176;0\nWireConnection;153;8;191;0\nWireConnection;153;9;249;0\nWireConnection;255;0;254;0\nWireConnection;255;1;196;0\nWireConnection;256;0;195;0\nWireConnection;256;1;254;0\nWireConnection;258;0;195;0\nWireConnection;258;1;256;0\nWireConnection;259;0;196;0\nWireConnection;259;1;255;0\nWireConnection;188;1;189;0\nWireConnection;188;2;190;0\nWireConnection;0;0;210;0\nWireConnection;178;0;211;0\nASEEND*/\n//CHKSM=5237DBE3894DE513CDED35E76CA481E3C597BEEF" m_functionName: m_description: 'Sample lightmap. ' m_additionalIncludes: m_additionalIncludes: [] m_outsideIncludes: [] m_additionalPragmas: m_additionalPragmas: [] m_outsidePragmas: [] m_additionalDirectives: m_validData: 0 m_isDirty: 1 m_moduleName: ' Additional Directives' m_independentModule: 1 m_customEdited: 0 m_additionalDirectives: - {fileID: 0} - {fileID: 0} - {fileID: 0} m_shaderFunctionDirectives: [] m_nativeDirectives: [] m_nativeDirectivesIndex: -1 m_nativeDirectivesFoldout: 0 m_directivesSaveItems: - LineType: 2 LineValue: multi_compile _ LIGHTMAP_ON GUIDToggle: 0 GUIDValue: ShowConditionals: 0 VersionMin: 0 VersionMax: 0 Passes: Origin: 2 - LineType: 2 LineValue: multi_compile _ DYNAMICLIGHTMAP_ON GUIDToggle: 0 GUIDValue: ShowConditionals: 0 VersionMin: 0 VersionMax: 0 Passes: Origin: 2 - LineType: 2 LineValue: multi_compile _ DIRLIGHTMAP_COMBINED GUIDToggle: 0 GUIDValue: ShowConditionals: 0 VersionMin: 0 VersionMax: 0 Passes: Origin: 2 m_nodeCategory: 3 m_headerStyle: 1 m_headerColor: {r: 1, g: 0.4, b: 0, a: 1} m_customNodeCategory: m_previewPosition: 0 m_hidden: 0 m_url: