ToriaAssets/Sources/Shaders/NM_Particles_Lava_Emissive.shader
2026-05-19 15:33:18 +02:00

7315 lines
349 KiB
GLSL

Shader "NatureManufacture/URP/Particles/Lava Emissive"
{
Properties
{
_AlphaClipThreshold("Alpha Clip Threshold", Range(0, 1)) = 1
[ToggleUI]_ReadAlbedo("Read Albedo", Float) = 1
[NoScaleOffset]_ParticleMask("Particle (RGB) Mask (A)", 2D) = "white" {}
_TilingandOffset("Tiling and Offset", Vector) = (1, 1, 0, 0)
_ParticleColor("Particle Color (RGB) Alpha (A)", Color) = (1, 1, 1, 1)
[Normal][NoScaleOffset]_ParticleNormal("Particle Normal", 2D) = "bump" {}
_ParticleNormalScale("Particle Normal Strenght", Float) = 1
[NoScaleOffset]_Mask_Map("Mask Map (MT_AO_H_SM)", 2D) = "white" {}
_AO_multiplier("AO multiplier", Range(0, 1)) = 1
_Smoothness_multiplier("Smoothness multiplier", Range(0, 1)) = 1
Vector1_bab3a2e609c74b6baff7b028a65ce418("Metallic multiplier", Range(0, 1)) = 0
[NoScaleOffset]_Emission_Texture("Emission Texture", 2D) = "white" {}
[HDR]_Emission_Color("Emission Color", Color) = (0, 0, 0, 0)
[HideInInspector]_WorkflowMode("_WorkflowMode", Float) = 1
[HideInInspector]_CastShadows("_CastShadows", Float) = 1
[HideInInspector]_ReceiveShadows("_ReceiveShadows", Float) = 1
[HideInInspector]_Surface("_Surface", Float) = 1
[HideInInspector]_Blend("_Blend", Float) = 0
[HideInInspector]_AlphaClip("_AlphaClip", Float) = 1
[HideInInspector]_SrcBlend("_SrcBlend", Float) = 1
[HideInInspector]_DstBlend("_DstBlend", Float) = 0
[HideInInspector][ToggleUI]_ZWrite("_ZWrite", Float) = 0
[HideInInspector]_ZWriteControl("_ZWriteControl", Float) = 0
[HideInInspector]_ZTest("_ZTest", Float) = 4
[HideInInspector]_Cull("_Cull", Float) = 2
[HideInInspector]_QueueOffset("_QueueOffset", Float) = 0
[HideInInspector]_QueueControl("_QueueControl", Float) = -1
[HideInInspector][NoScaleOffset]unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
[HideInInspector][NoScaleOffset]unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
[HideInInspector][NoScaleOffset]unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
}
SubShader
{
Tags
{
"RenderPipeline"="UniversalPipeline"
"RenderType"="Transparent"
"UniversalMaterialType" = "Lit"
"Queue"="Transparent"
"ShaderGraphShader"="true"
"ShaderGraphTargetId"="UniversalLitSubTarget"
}
Pass
{
Name "Universal Forward"
Tags
{
"LightMode" = "UniversalForward"
}
// Render State
Cull [_Cull]
Blend [_SrcBlend] [_DstBlend]
ZTest [_ZTest]
ZWrite [_ZWrite]
// Debug
// <None>
// --------------------------------------------------
// Pass
HLSLPROGRAM
// Pragmas
#pragma target 4.5
#pragma exclude_renderers gles gles3 glcore
#pragma multi_compile_instancing
#pragma multi_compile_fog
#pragma instancing_options renderinglayer
#pragma multi_compile _ DOTS_INSTANCING_ON
#pragma vertex vert
#pragma fragment frag
// DotsInstancingOptions: <None>
// HybridV1InjectedBuiltinProperties: <None>
// Keywords
#pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION
#pragma multi_compile _ LIGHTMAP_ON
#pragma multi_compile _ DYNAMICLIGHTMAP_ON
#pragma multi_compile _ DIRLIGHTMAP_COMBINED
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN
#pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS
#pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS
#pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING
#pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION
#pragma multi_compile_fragment _ _SHADOWS_SOFT
#pragma multi_compile _ LIGHTMAP_SHADOW_MIXING
#pragma multi_compile _ SHADOWS_SHADOWMASK
#pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
#pragma multi_compile_fragment _ _LIGHT_LAYERS
#pragma multi_compile_fragment _ DEBUG_DISPLAY
#pragma multi_compile_fragment _ _LIGHT_COOKIES
#pragma multi_compile _ _CLUSTERED_RENDERING
#pragma shader_feature_fragment _ _SURFACE_TYPE_TRANSPARENT
#pragma shader_feature_local_fragment _ _ALPHAPREMULTIPLY_ON
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
#pragma shader_feature_local_fragment _ _SPECULAR_SETUP
#pragma shader_feature_local _ _RECEIVE_SHADOWS_OFF
// GraphKeywords: <None>
// Defines
#define _NORMALMAP 1
#define _NORMAL_DROPOFF_TS 1
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define ATTRIBUTES_NEED_TEXCOORD0
#define ATTRIBUTES_NEED_TEXCOORD1
#define ATTRIBUTES_NEED_TEXCOORD2
#define ATTRIBUTES_NEED_COLOR
#define VARYINGS_NEED_POSITION_WS
#define VARYINGS_NEED_NORMAL_WS
#define VARYINGS_NEED_TANGENT_WS
#define VARYINGS_NEED_TEXCOORD0
#define VARYINGS_NEED_COLOR
#define VARYINGS_NEED_VIEWDIRECTION_WS
#define VARYINGS_NEED_FOG_AND_VERTEX_LIGHT
#define VARYINGS_NEED_SHADOW_COORD
#define FEATURES_GRAPH_VERTEX
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
#define SHADERPASS SHADERPASS_FORWARD
#define _FOG_FRAGMENT 1
/* WARNING: $splice Could not find named fragment 'DotsInstancingVars' */
// custom interpolator pre-include
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
// Includes
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
// --------------------------------------------------
// Structs and Packing
// custom interpolators pre packing
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
struct Attributes
{
float3 positionOS : POSITION;
float3 normalOS : NORMAL;
float4 tangentOS : TANGENT;
float4 uv0 : TEXCOORD0;
float4 uv1 : TEXCOORD1;
float4 uv2 : TEXCOORD2;
float4 color : COLOR;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : INSTANCEID_SEMANTIC;
#endif
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float3 positionWS;
float3 normalWS;
float4 tangentWS;
float4 texCoord0;
float4 color;
float3 viewDirectionWS;
#if defined(LIGHTMAP_ON)
float2 staticLightmapUV;
#endif
#if defined(DYNAMICLIGHTMAP_ON)
float2 dynamicLightmapUV;
#endif
#if !defined(LIGHTMAP_ON)
float3 sh;
#endif
float4 fogFactorAndVertexLight;
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
float4 shadowCoord;
#endif
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
struct SurfaceDescriptionInputs
{
float3 TangentSpaceNormal;
float4 uv0;
float4 VertexColor;
};
struct VertexDescriptionInputs
{
float3 ObjectSpaceNormal;
float3 ObjectSpaceTangent;
float3 ObjectSpacePosition;
};
struct PackedVaryings
{
float4 positionCS : SV_POSITION;
float3 interp0 : INTERP0;
float3 interp1 : INTERP1;
float4 interp2 : INTERP2;
float4 interp3 : INTERP3;
float4 interp4 : INTERP4;
float3 interp5 : INTERP5;
float2 interp6 : INTERP6;
float2 interp7 : INTERP7;
float3 interp8 : INTERP8;
float4 interp9 : INTERP9;
float4 interp10 : INTERP10;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
PackedVaryings PackVaryings (Varyings input)
{
PackedVaryings output;
ZERO_INITIALIZE(PackedVaryings, output);
output.positionCS = input.positionCS;
output.interp0.xyz = input.positionWS;
output.interp1.xyz = input.normalWS;
output.interp2.xyzw = input.tangentWS;
output.interp3.xyzw = input.texCoord0;
output.interp4.xyzw = input.color;
output.interp5.xyz = input.viewDirectionWS;
#if defined(LIGHTMAP_ON)
output.interp6.xy = input.staticLightmapUV;
#endif
#if defined(DYNAMICLIGHTMAP_ON)
output.interp7.xy = input.dynamicLightmapUV;
#endif
#if !defined(LIGHTMAP_ON)
output.interp8.xyz = input.sh;
#endif
output.interp9.xyzw = input.fogFactorAndVertexLight;
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
output.interp10.xyzw = input.shadowCoord;
#endif
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
Varyings UnpackVaryings (PackedVaryings input)
{
Varyings output;
output.positionCS = input.positionCS;
output.positionWS = input.interp0.xyz;
output.normalWS = input.interp1.xyz;
output.tangentWS = input.interp2.xyzw;
output.texCoord0 = input.interp3.xyzw;
output.color = input.interp4.xyzw;
output.viewDirectionWS = input.interp5.xyz;
#if defined(LIGHTMAP_ON)
output.staticLightmapUV = input.interp6.xy;
#endif
#if defined(DYNAMICLIGHTMAP_ON)
output.dynamicLightmapUV = input.interp7.xy;
#endif
#if !defined(LIGHTMAP_ON)
output.sh = input.interp8.xyz;
#endif
output.fogFactorAndVertexLight = input.interp9.xyzw;
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
output.shadowCoord = input.interp10.xyzw;
#endif
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
// --------------------------------------------------
// Graph
// Graph Properties
CBUFFER_START(UnityPerMaterial)
float _AlphaClipThreshold;
float _ReadAlbedo;
float4 _ParticleMask_TexelSize;
float4 _TilingandOffset;
float4 _ParticleColor;
float4 _ParticleNormal_TexelSize;
float _ParticleNormalScale;
float4 _Mask_Map_TexelSize;
float _AO_multiplier;
float _Smoothness_multiplier;
float Vector1_bab3a2e609c74b6baff7b028a65ce418;
float4 _Emission_Texture_TexelSize;
float4 _Emission_Color;
CBUFFER_END
// Object and Global properties
SAMPLER(SamplerState_Linear_Repeat);
TEXTURE2D(_ParticleMask);
SAMPLER(sampler_ParticleMask);
TEXTURE2D(_ParticleNormal);
SAMPLER(sampler_ParticleNormal);
TEXTURE2D(_Mask_Map);
SAMPLER(sampler_Mask_Map);
TEXTURE2D(_Emission_Texture);
SAMPLER(sampler_Emission_Texture);
// Graph Includes
// GraphIncludes: <None>
// -- Property used by ScenePickingPass
#ifdef SCENEPICKINGPASS
float4 _SelectionID;
#endif
// -- Properties used by SceneSelectionPass
#ifdef SCENESELECTIONPASS
int _ObjectId;
int _PassValue;
#endif
// Graph Functions
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_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
{
Out = UV * Tiling + Offset;
}
void Unity_Multiply_float4_float4(float4 A, float4 B, out float4 Out)
{
Out = A * B;
}
void Unity_Branch_float4(float Predicate, float4 True, float4 False, out float4 Out)
{
Out = Predicate ? True : False;
}
void Unity_Clamp_float4(float4 In, float4 Min, float4 Max, out float4 Out)
{
Out = clamp(In, Min, Max);
}
void Unity_NormalStrength_float(float3 In, float Strength, out float3 Out)
{
Out = float3(In.rg * Strength, lerp(1, In.b, saturate(Strength)));
}
void Unity_Multiply_float_float(float A, float B, out float Out)
{
Out = A * B;
}
// Custom interpolators pre vertex
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
// Graph Vertex
struct VertexDescription
{
float3 Position;
float3 Normal;
float3 Tangent;
};
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
{
VertexDescription description = (VertexDescription)0;
description.Position = IN.ObjectSpacePosition;
description.Normal = IN.ObjectSpaceNormal;
description.Tangent = IN.ObjectSpaceTangent;
return description;
}
// Custom interpolators, pre surface
#ifdef FEATURES_GRAPH_VERTEX
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
{
return output;
}
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
#endif
// Graph Pixel
struct SurfaceDescription
{
float3 BaseColor;
float3 NormalTS;
float3 Emission;
float Metallic;
float3 Specular;
float Smoothness;
float Occlusion;
float Alpha;
float AlphaClipThreshold;
};
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
{
SurfaceDescription surface = (SurfaceDescription)0;
float _Property_b4e0c30cf01756839030a5167b089dc6_Out_0 = _ReadAlbedo;
float4 _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0 = _ParticleColor;
UnityTexture2D _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0 = UnityBuildTexture2DStructNoScale(_ParticleMask);
float4 _UV_85147850253e5a80b9d2c8ddf437e4da_Out_0 = IN.uv0;
float4 _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0 = _TilingandOffset;
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[0];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[1];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[2];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[3];
float4 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4;
float3 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5;
float2 _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1, _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2, 0, 0, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5, _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6);
float4 _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4;
float3 _Combine_75591f92a94419868e344fd5de21bb70_RGB_5;
float2 _Combine_75591f92a94419868e344fd5de21bb70_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3, _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4, 0, 0, _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4, _Combine_75591f92a94419868e344fd5de21bb70_RGB_5, _Combine_75591f92a94419868e344fd5de21bb70_RG_6);
float2 _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3;
Unity_TilingAndOffset_float((_UV_85147850253e5a80b9d2c8ddf437e4da_Out_0.xy), _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6, _Combine_75591f92a94419868e344fd5de21bb70_RG_6, _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3);
float4 _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0 = SAMPLE_TEXTURE2D(_Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.tex, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.samplerstate, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_R_4 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.r;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_G_5 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.g;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_B_6 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.b;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.a;
float4 _Multiply_ffed7e4d201e2e86974f2cc3d88026b2_Out_2;
Unity_Multiply_float4_float4(_Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0, _Multiply_ffed7e4d201e2e86974f2cc3d88026b2_Out_2);
float4 _Branch_ef8236ada61be1869b3278db6ae02537_Out_3;
Unity_Branch_float4(_Property_b4e0c30cf01756839030a5167b089dc6_Out_0, _Multiply_ffed7e4d201e2e86974f2cc3d88026b2_Out_2, _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0, _Branch_ef8236ada61be1869b3278db6ae02537_Out_3);
float4 _Clamp_40a04c92716b499d87e45494624e46af_Out_3;
Unity_Clamp_float4(IN.VertexColor, float4(0, 0, 0, 0), float4(1, 1, 1, 1), _Clamp_40a04c92716b499d87e45494624e46af_Out_3);
float4 _Multiply_3c7c94a1a6e2c08786b9b70a13b426fa_Out_2;
Unity_Multiply_float4_float4(_Branch_ef8236ada61be1869b3278db6ae02537_Out_3, _Clamp_40a04c92716b499d87e45494624e46af_Out_3, _Multiply_3c7c94a1a6e2c08786b9b70a13b426fa_Out_2);
UnityTexture2D _Property_47d26322b0cbee809f7bb147ebce9c2b_Out_0 = UnityBuildTexture2DStructNoScale(_ParticleNormal);
float4 _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0 = SAMPLE_TEXTURE2D(_Property_47d26322b0cbee809f7bb147ebce9c2b_Out_0.tex, _Property_47d26322b0cbee809f7bb147ebce9c2b_Out_0.samplerstate, _Property_47d26322b0cbee809f7bb147ebce9c2b_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
_SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.rgb = UnpackNormal(_SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0);
float _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_R_4 = _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.r;
float _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_G_5 = _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.g;
float _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_B_6 = _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.b;
float _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_A_7 = _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.a;
float _Property_9ca212c6c965a284b1795febc12e7aed_Out_0 = _ParticleNormalScale;
float3 _NormalStrength_2012b1b56379248a8afa64fa70f1b999_Out_2;
Unity_NormalStrength_float((_SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.xyz), _Property_9ca212c6c965a284b1795febc12e7aed_Out_0, _NormalStrength_2012b1b56379248a8afa64fa70f1b999_Out_2);
float4 _Property_479229991d5542d796eac0e9def8c2d7_Out_0 = IsGammaSpace() ? LinearToSRGB(_Emission_Color) : _Emission_Color;
UnityTexture2D _Property_62c46c558d8f4d209a7a17877af03aab_Out_0 = UnityBuildTexture2DStructNoScale(_Emission_Texture);
float4 _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0 = SAMPLE_TEXTURE2D(_Property_62c46c558d8f4d209a7a17877af03aab_Out_0.tex, _Property_62c46c558d8f4d209a7a17877af03aab_Out_0.samplerstate, _Property_62c46c558d8f4d209a7a17877af03aab_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_R_4 = _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0.r;
float _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_G_5 = _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0.g;
float _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_B_6 = _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0.b;
float _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_A_7 = _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0.a;
float4 _Multiply_f5ae222b26e245a681d4c4005fdcd9dd_Out_2;
Unity_Multiply_float4_float4(_Property_479229991d5542d796eac0e9def8c2d7_Out_0, _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0, _Multiply_f5ae222b26e245a681d4c4005fdcd9dd_Out_2);
float4 _Multiply_d1894c3787b04ddc9f4316bde9b000ee_Out_2;
Unity_Multiply_float4_float4(_Clamp_40a04c92716b499d87e45494624e46af_Out_3, _Multiply_f5ae222b26e245a681d4c4005fdcd9dd_Out_2, _Multiply_d1894c3787b04ddc9f4316bde9b000ee_Out_2);
UnityTexture2D _Property_b76d286c926943aea555b7bf653aa933_Out_0 = UnityBuildTexture2DStructNoScale(_Mask_Map);
float4 _SampleTexture2D_ce88e50c033044d283deb2776a46204d_RGBA_0 = SAMPLE_TEXTURE2D(_Property_b76d286c926943aea555b7bf653aa933_Out_0.tex, _Property_b76d286c926943aea555b7bf653aa933_Out_0.samplerstate, _Property_b76d286c926943aea555b7bf653aa933_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_ce88e50c033044d283deb2776a46204d_R_4 = _SampleTexture2D_ce88e50c033044d283deb2776a46204d_RGBA_0.r;
float _SampleTexture2D_ce88e50c033044d283deb2776a46204d_G_5 = _SampleTexture2D_ce88e50c033044d283deb2776a46204d_RGBA_0.g;
float _SampleTexture2D_ce88e50c033044d283deb2776a46204d_B_6 = _SampleTexture2D_ce88e50c033044d283deb2776a46204d_RGBA_0.b;
float _SampleTexture2D_ce88e50c033044d283deb2776a46204d_A_7 = _SampleTexture2D_ce88e50c033044d283deb2776a46204d_RGBA_0.a;
float _Property_52a58e015e194cd6827988c464ce8081_Out_0 = Vector1_bab3a2e609c74b6baff7b028a65ce418;
float _Multiply_8146e5f348b44712abf415e139d5de39_Out_2;
Unity_Multiply_float_float(_SampleTexture2D_ce88e50c033044d283deb2776a46204d_R_4, _Property_52a58e015e194cd6827988c464ce8081_Out_0, _Multiply_8146e5f348b44712abf415e139d5de39_Out_2);
float _Property_0f0d790c7ab2432eae4a03f04d7490c8_Out_0 = _Smoothness_multiplier;
float _Multiply_e36c6ff9e74a4e81bcfd131039b673f6_Out_2;
Unity_Multiply_float_float(_SampleTexture2D_ce88e50c033044d283deb2776a46204d_A_7, _Property_0f0d790c7ab2432eae4a03f04d7490c8_Out_0, _Multiply_e36c6ff9e74a4e81bcfd131039b673f6_Out_2);
float _Property_03e8f7eb67bf44c486e74298294a220c_Out_0 = _AO_multiplier;
float _Multiply_fdf1d2924b844055a18446459f70922e_Out_2;
Unity_Multiply_float_float(_SampleTexture2D_ce88e50c033044d283deb2776a46204d_G_5, _Property_03e8f7eb67bf44c486e74298294a220c_Out_0, _Multiply_fdf1d2924b844055a18446459f70922e_Out_2);
float _Split_4d25adc154b2cd889bea31041dc0b8bd_R_1 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[0];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_G_2 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[1];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_B_3 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[2];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_A_4 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[3];
float _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2;
Unity_Multiply_float_float(_Split_4d25adc154b2cd889bea31041dc0b8bd_A_4, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7, _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2);
float _Split_12920bdaccef158ab9bd191cc9e45c04_R_1 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[0];
float _Split_12920bdaccef158ab9bd191cc9e45c04_G_2 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[1];
float _Split_12920bdaccef158ab9bd191cc9e45c04_B_3 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[2];
float _Split_12920bdaccef158ab9bd191cc9e45c04_A_4 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[3];
float _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
Unity_Multiply_float_float(_Multiply_adbe396b9120628ea1a79eee1222a007_Out_2, _Split_12920bdaccef158ab9bd191cc9e45c04_A_4, _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2);
float _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0 = _AlphaClipThreshold;
surface.BaseColor = (_Multiply_3c7c94a1a6e2c08786b9b70a13b426fa_Out_2.xyz);
surface.NormalTS = _NormalStrength_2012b1b56379248a8afa64fa70f1b999_Out_2;
surface.Emission = (_Multiply_d1894c3787b04ddc9f4316bde9b000ee_Out_2.xyz);
surface.Metallic = _Multiply_8146e5f348b44712abf415e139d5de39_Out_2;
surface.Specular = IsGammaSpace() ? float3(0.5, 0.5, 0.5) : SRGBToLinear(float3(0.5, 0.5, 0.5));
surface.Smoothness = _Multiply_e36c6ff9e74a4e81bcfd131039b673f6_Out_2;
surface.Occlusion = _Multiply_fdf1d2924b844055a18446459f70922e_Out_2;
surface.Alpha = _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
surface.AlphaClipThreshold = _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0;
return surface;
}
// --------------------------------------------------
// Build Graph Inputs
#ifdef HAVE_VFX_MODIFICATION
#define VFX_SRP_ATTRIBUTES Attributes
#define VFX_SRP_VARYINGS Varyings
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
#endif
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
{
VertexDescriptionInputs output;
ZERO_INITIALIZE(VertexDescriptionInputs, output);
output.ObjectSpaceNormal = input.normalOS;
output.ObjectSpaceTangent = input.tangentOS.xyz;
output.ObjectSpacePosition = input.positionOS;
return output;
}
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
{
SurfaceDescriptionInputs output;
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
#ifdef HAVE_VFX_MODIFICATION
// FragInputs from VFX come from two places: Interpolator or CBuffer.
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
#endif
output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
output.uv0 = input.texCoord0;
output.VertexColor = input.color;
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
#else
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
#endif
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
return output;
}
// --------------------------------------------------
// Main
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/PBRForwardPass.hlsl"
// --------------------------------------------------
// Visual Effect Vertex Invocations
#ifdef HAVE_VFX_MODIFICATION
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
#endif
ENDHLSL
}
Pass
{
Name "GBuffer"
Tags
{
"LightMode" = "UniversalGBuffer"
}
// Render State
Cull [_Cull]
Blend [_SrcBlend] [_DstBlend]
ZTest [_ZTest]
ZWrite [_ZWrite]
// Debug
// <None>
// --------------------------------------------------
// Pass
HLSLPROGRAM
// Pragmas
#pragma target 4.5
#pragma exclude_renderers gles gles3 glcore
#pragma multi_compile_instancing
#pragma multi_compile_fog
#pragma instancing_options renderinglayer
#pragma multi_compile _ DOTS_INSTANCING_ON
#pragma vertex vert
#pragma fragment frag
// DotsInstancingOptions: <None>
// HybridV1InjectedBuiltinProperties: <None>
// Keywords
#pragma multi_compile _ LIGHTMAP_ON
#pragma multi_compile _ DYNAMICLIGHTMAP_ON
#pragma multi_compile _ DIRLIGHTMAP_COMBINED
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN
#pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING
#pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION
#pragma multi_compile_fragment _ _SHADOWS_SOFT
#pragma multi_compile _ LIGHTMAP_SHADOW_MIXING
#pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE
#pragma multi_compile _ SHADOWS_SHADOWMASK
#pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
#pragma multi_compile_fragment _ _GBUFFER_NORMALS_OCT
#pragma multi_compile_fragment _ _LIGHT_LAYERS
#pragma multi_compile_fragment _ _RENDER_PASS_ENABLED
#pragma multi_compile_fragment _ DEBUG_DISPLAY
#pragma shader_feature_fragment _ _SURFACE_TYPE_TRANSPARENT
#pragma shader_feature_local_fragment _ _ALPHAPREMULTIPLY_ON
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
#pragma shader_feature_local_fragment _ _SPECULAR_SETUP
#pragma shader_feature_local _ _RECEIVE_SHADOWS_OFF
// GraphKeywords: <None>
// Defines
#define _NORMALMAP 1
#define _NORMAL_DROPOFF_TS 1
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define ATTRIBUTES_NEED_TEXCOORD0
#define ATTRIBUTES_NEED_TEXCOORD1
#define ATTRIBUTES_NEED_TEXCOORD2
#define ATTRIBUTES_NEED_COLOR
#define VARYINGS_NEED_POSITION_WS
#define VARYINGS_NEED_NORMAL_WS
#define VARYINGS_NEED_TANGENT_WS
#define VARYINGS_NEED_TEXCOORD0
#define VARYINGS_NEED_COLOR
#define VARYINGS_NEED_VIEWDIRECTION_WS
#define VARYINGS_NEED_FOG_AND_VERTEX_LIGHT
#define VARYINGS_NEED_SHADOW_COORD
#define FEATURES_GRAPH_VERTEX
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
#define SHADERPASS SHADERPASS_GBUFFER
#define _FOG_FRAGMENT 1
/* WARNING: $splice Could not find named fragment 'DotsInstancingVars' */
// custom interpolator pre-include
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
// Includes
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
// --------------------------------------------------
// Structs and Packing
// custom interpolators pre packing
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
struct Attributes
{
float3 positionOS : POSITION;
float3 normalOS : NORMAL;
float4 tangentOS : TANGENT;
float4 uv0 : TEXCOORD0;
float4 uv1 : TEXCOORD1;
float4 uv2 : TEXCOORD2;
float4 color : COLOR;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : INSTANCEID_SEMANTIC;
#endif
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float3 positionWS;
float3 normalWS;
float4 tangentWS;
float4 texCoord0;
float4 color;
float3 viewDirectionWS;
#if defined(LIGHTMAP_ON)
float2 staticLightmapUV;
#endif
#if defined(DYNAMICLIGHTMAP_ON)
float2 dynamicLightmapUV;
#endif
#if !defined(LIGHTMAP_ON)
float3 sh;
#endif
float4 fogFactorAndVertexLight;
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
float4 shadowCoord;
#endif
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
struct SurfaceDescriptionInputs
{
float3 TangentSpaceNormal;
float4 uv0;
float4 VertexColor;
};
struct VertexDescriptionInputs
{
float3 ObjectSpaceNormal;
float3 ObjectSpaceTangent;
float3 ObjectSpacePosition;
};
struct PackedVaryings
{
float4 positionCS : SV_POSITION;
float3 interp0 : INTERP0;
float3 interp1 : INTERP1;
float4 interp2 : INTERP2;
float4 interp3 : INTERP3;
float4 interp4 : INTERP4;
float3 interp5 : INTERP5;
float2 interp6 : INTERP6;
float2 interp7 : INTERP7;
float3 interp8 : INTERP8;
float4 interp9 : INTERP9;
float4 interp10 : INTERP10;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
PackedVaryings PackVaryings (Varyings input)
{
PackedVaryings output;
ZERO_INITIALIZE(PackedVaryings, output);
output.positionCS = input.positionCS;
output.interp0.xyz = input.positionWS;
output.interp1.xyz = input.normalWS;
output.interp2.xyzw = input.tangentWS;
output.interp3.xyzw = input.texCoord0;
output.interp4.xyzw = input.color;
output.interp5.xyz = input.viewDirectionWS;
#if defined(LIGHTMAP_ON)
output.interp6.xy = input.staticLightmapUV;
#endif
#if defined(DYNAMICLIGHTMAP_ON)
output.interp7.xy = input.dynamicLightmapUV;
#endif
#if !defined(LIGHTMAP_ON)
output.interp8.xyz = input.sh;
#endif
output.interp9.xyzw = input.fogFactorAndVertexLight;
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
output.interp10.xyzw = input.shadowCoord;
#endif
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
Varyings UnpackVaryings (PackedVaryings input)
{
Varyings output;
output.positionCS = input.positionCS;
output.positionWS = input.interp0.xyz;
output.normalWS = input.interp1.xyz;
output.tangentWS = input.interp2.xyzw;
output.texCoord0 = input.interp3.xyzw;
output.color = input.interp4.xyzw;
output.viewDirectionWS = input.interp5.xyz;
#if defined(LIGHTMAP_ON)
output.staticLightmapUV = input.interp6.xy;
#endif
#if defined(DYNAMICLIGHTMAP_ON)
output.dynamicLightmapUV = input.interp7.xy;
#endif
#if !defined(LIGHTMAP_ON)
output.sh = input.interp8.xyz;
#endif
output.fogFactorAndVertexLight = input.interp9.xyzw;
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
output.shadowCoord = input.interp10.xyzw;
#endif
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
// --------------------------------------------------
// Graph
// Graph Properties
CBUFFER_START(UnityPerMaterial)
float _AlphaClipThreshold;
float _ReadAlbedo;
float4 _ParticleMask_TexelSize;
float4 _TilingandOffset;
float4 _ParticleColor;
float4 _ParticleNormal_TexelSize;
float _ParticleNormalScale;
float4 _Mask_Map_TexelSize;
float _AO_multiplier;
float _Smoothness_multiplier;
float Vector1_bab3a2e609c74b6baff7b028a65ce418;
float4 _Emission_Texture_TexelSize;
float4 _Emission_Color;
CBUFFER_END
// Object and Global properties
SAMPLER(SamplerState_Linear_Repeat);
TEXTURE2D(_ParticleMask);
SAMPLER(sampler_ParticleMask);
TEXTURE2D(_ParticleNormal);
SAMPLER(sampler_ParticleNormal);
TEXTURE2D(_Mask_Map);
SAMPLER(sampler_Mask_Map);
TEXTURE2D(_Emission_Texture);
SAMPLER(sampler_Emission_Texture);
// Graph Includes
// GraphIncludes: <None>
// -- Property used by ScenePickingPass
#ifdef SCENEPICKINGPASS
float4 _SelectionID;
#endif
// -- Properties used by SceneSelectionPass
#ifdef SCENESELECTIONPASS
int _ObjectId;
int _PassValue;
#endif
// Graph Functions
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_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
{
Out = UV * Tiling + Offset;
}
void Unity_Multiply_float4_float4(float4 A, float4 B, out float4 Out)
{
Out = A * B;
}
void Unity_Branch_float4(float Predicate, float4 True, float4 False, out float4 Out)
{
Out = Predicate ? True : False;
}
void Unity_Clamp_float4(float4 In, float4 Min, float4 Max, out float4 Out)
{
Out = clamp(In, Min, Max);
}
void Unity_NormalStrength_float(float3 In, float Strength, out float3 Out)
{
Out = float3(In.rg * Strength, lerp(1, In.b, saturate(Strength)));
}
void Unity_Multiply_float_float(float A, float B, out float Out)
{
Out = A * B;
}
// Custom interpolators pre vertex
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
// Graph Vertex
struct VertexDescription
{
float3 Position;
float3 Normal;
float3 Tangent;
};
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
{
VertexDescription description = (VertexDescription)0;
description.Position = IN.ObjectSpacePosition;
description.Normal = IN.ObjectSpaceNormal;
description.Tangent = IN.ObjectSpaceTangent;
return description;
}
// Custom interpolators, pre surface
#ifdef FEATURES_GRAPH_VERTEX
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
{
return output;
}
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
#endif
// Graph Pixel
struct SurfaceDescription
{
float3 BaseColor;
float3 NormalTS;
float3 Emission;
float Metallic;
float3 Specular;
float Smoothness;
float Occlusion;
float Alpha;
float AlphaClipThreshold;
};
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
{
SurfaceDescription surface = (SurfaceDescription)0;
float _Property_b4e0c30cf01756839030a5167b089dc6_Out_0 = _ReadAlbedo;
float4 _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0 = _ParticleColor;
UnityTexture2D _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0 = UnityBuildTexture2DStructNoScale(_ParticleMask);
float4 _UV_85147850253e5a80b9d2c8ddf437e4da_Out_0 = IN.uv0;
float4 _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0 = _TilingandOffset;
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[0];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[1];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[2];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[3];
float4 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4;
float3 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5;
float2 _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1, _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2, 0, 0, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5, _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6);
float4 _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4;
float3 _Combine_75591f92a94419868e344fd5de21bb70_RGB_5;
float2 _Combine_75591f92a94419868e344fd5de21bb70_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3, _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4, 0, 0, _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4, _Combine_75591f92a94419868e344fd5de21bb70_RGB_5, _Combine_75591f92a94419868e344fd5de21bb70_RG_6);
float2 _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3;
Unity_TilingAndOffset_float((_UV_85147850253e5a80b9d2c8ddf437e4da_Out_0.xy), _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6, _Combine_75591f92a94419868e344fd5de21bb70_RG_6, _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3);
float4 _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0 = SAMPLE_TEXTURE2D(_Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.tex, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.samplerstate, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_R_4 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.r;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_G_5 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.g;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_B_6 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.b;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.a;
float4 _Multiply_ffed7e4d201e2e86974f2cc3d88026b2_Out_2;
Unity_Multiply_float4_float4(_Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0, _Multiply_ffed7e4d201e2e86974f2cc3d88026b2_Out_2);
float4 _Branch_ef8236ada61be1869b3278db6ae02537_Out_3;
Unity_Branch_float4(_Property_b4e0c30cf01756839030a5167b089dc6_Out_0, _Multiply_ffed7e4d201e2e86974f2cc3d88026b2_Out_2, _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0, _Branch_ef8236ada61be1869b3278db6ae02537_Out_3);
float4 _Clamp_40a04c92716b499d87e45494624e46af_Out_3;
Unity_Clamp_float4(IN.VertexColor, float4(0, 0, 0, 0), float4(1, 1, 1, 1), _Clamp_40a04c92716b499d87e45494624e46af_Out_3);
float4 _Multiply_3c7c94a1a6e2c08786b9b70a13b426fa_Out_2;
Unity_Multiply_float4_float4(_Branch_ef8236ada61be1869b3278db6ae02537_Out_3, _Clamp_40a04c92716b499d87e45494624e46af_Out_3, _Multiply_3c7c94a1a6e2c08786b9b70a13b426fa_Out_2);
UnityTexture2D _Property_47d26322b0cbee809f7bb147ebce9c2b_Out_0 = UnityBuildTexture2DStructNoScale(_ParticleNormal);
float4 _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0 = SAMPLE_TEXTURE2D(_Property_47d26322b0cbee809f7bb147ebce9c2b_Out_0.tex, _Property_47d26322b0cbee809f7bb147ebce9c2b_Out_0.samplerstate, _Property_47d26322b0cbee809f7bb147ebce9c2b_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
_SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.rgb = UnpackNormal(_SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0);
float _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_R_4 = _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.r;
float _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_G_5 = _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.g;
float _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_B_6 = _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.b;
float _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_A_7 = _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.a;
float _Property_9ca212c6c965a284b1795febc12e7aed_Out_0 = _ParticleNormalScale;
float3 _NormalStrength_2012b1b56379248a8afa64fa70f1b999_Out_2;
Unity_NormalStrength_float((_SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.xyz), _Property_9ca212c6c965a284b1795febc12e7aed_Out_0, _NormalStrength_2012b1b56379248a8afa64fa70f1b999_Out_2);
float4 _Property_479229991d5542d796eac0e9def8c2d7_Out_0 = IsGammaSpace() ? LinearToSRGB(_Emission_Color) : _Emission_Color;
UnityTexture2D _Property_62c46c558d8f4d209a7a17877af03aab_Out_0 = UnityBuildTexture2DStructNoScale(_Emission_Texture);
float4 _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0 = SAMPLE_TEXTURE2D(_Property_62c46c558d8f4d209a7a17877af03aab_Out_0.tex, _Property_62c46c558d8f4d209a7a17877af03aab_Out_0.samplerstate, _Property_62c46c558d8f4d209a7a17877af03aab_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_R_4 = _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0.r;
float _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_G_5 = _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0.g;
float _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_B_6 = _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0.b;
float _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_A_7 = _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0.a;
float4 _Multiply_f5ae222b26e245a681d4c4005fdcd9dd_Out_2;
Unity_Multiply_float4_float4(_Property_479229991d5542d796eac0e9def8c2d7_Out_0, _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0, _Multiply_f5ae222b26e245a681d4c4005fdcd9dd_Out_2);
float4 _Multiply_d1894c3787b04ddc9f4316bde9b000ee_Out_2;
Unity_Multiply_float4_float4(_Clamp_40a04c92716b499d87e45494624e46af_Out_3, _Multiply_f5ae222b26e245a681d4c4005fdcd9dd_Out_2, _Multiply_d1894c3787b04ddc9f4316bde9b000ee_Out_2);
UnityTexture2D _Property_b76d286c926943aea555b7bf653aa933_Out_0 = UnityBuildTexture2DStructNoScale(_Mask_Map);
float4 _SampleTexture2D_ce88e50c033044d283deb2776a46204d_RGBA_0 = SAMPLE_TEXTURE2D(_Property_b76d286c926943aea555b7bf653aa933_Out_0.tex, _Property_b76d286c926943aea555b7bf653aa933_Out_0.samplerstate, _Property_b76d286c926943aea555b7bf653aa933_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_ce88e50c033044d283deb2776a46204d_R_4 = _SampleTexture2D_ce88e50c033044d283deb2776a46204d_RGBA_0.r;
float _SampleTexture2D_ce88e50c033044d283deb2776a46204d_G_5 = _SampleTexture2D_ce88e50c033044d283deb2776a46204d_RGBA_0.g;
float _SampleTexture2D_ce88e50c033044d283deb2776a46204d_B_6 = _SampleTexture2D_ce88e50c033044d283deb2776a46204d_RGBA_0.b;
float _SampleTexture2D_ce88e50c033044d283deb2776a46204d_A_7 = _SampleTexture2D_ce88e50c033044d283deb2776a46204d_RGBA_0.a;
float _Property_52a58e015e194cd6827988c464ce8081_Out_0 = Vector1_bab3a2e609c74b6baff7b028a65ce418;
float _Multiply_8146e5f348b44712abf415e139d5de39_Out_2;
Unity_Multiply_float_float(_SampleTexture2D_ce88e50c033044d283deb2776a46204d_R_4, _Property_52a58e015e194cd6827988c464ce8081_Out_0, _Multiply_8146e5f348b44712abf415e139d5de39_Out_2);
float _Property_0f0d790c7ab2432eae4a03f04d7490c8_Out_0 = _Smoothness_multiplier;
float _Multiply_e36c6ff9e74a4e81bcfd131039b673f6_Out_2;
Unity_Multiply_float_float(_SampleTexture2D_ce88e50c033044d283deb2776a46204d_A_7, _Property_0f0d790c7ab2432eae4a03f04d7490c8_Out_0, _Multiply_e36c6ff9e74a4e81bcfd131039b673f6_Out_2);
float _Property_03e8f7eb67bf44c486e74298294a220c_Out_0 = _AO_multiplier;
float _Multiply_fdf1d2924b844055a18446459f70922e_Out_2;
Unity_Multiply_float_float(_SampleTexture2D_ce88e50c033044d283deb2776a46204d_G_5, _Property_03e8f7eb67bf44c486e74298294a220c_Out_0, _Multiply_fdf1d2924b844055a18446459f70922e_Out_2);
float _Split_4d25adc154b2cd889bea31041dc0b8bd_R_1 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[0];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_G_2 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[1];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_B_3 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[2];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_A_4 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[3];
float _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2;
Unity_Multiply_float_float(_Split_4d25adc154b2cd889bea31041dc0b8bd_A_4, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7, _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2);
float _Split_12920bdaccef158ab9bd191cc9e45c04_R_1 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[0];
float _Split_12920bdaccef158ab9bd191cc9e45c04_G_2 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[1];
float _Split_12920bdaccef158ab9bd191cc9e45c04_B_3 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[2];
float _Split_12920bdaccef158ab9bd191cc9e45c04_A_4 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[3];
float _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
Unity_Multiply_float_float(_Multiply_adbe396b9120628ea1a79eee1222a007_Out_2, _Split_12920bdaccef158ab9bd191cc9e45c04_A_4, _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2);
float _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0 = _AlphaClipThreshold;
surface.BaseColor = (_Multiply_3c7c94a1a6e2c08786b9b70a13b426fa_Out_2.xyz);
surface.NormalTS = _NormalStrength_2012b1b56379248a8afa64fa70f1b999_Out_2;
surface.Emission = (_Multiply_d1894c3787b04ddc9f4316bde9b000ee_Out_2.xyz);
surface.Metallic = _Multiply_8146e5f348b44712abf415e139d5de39_Out_2;
surface.Specular = IsGammaSpace() ? float3(0.5, 0.5, 0.5) : SRGBToLinear(float3(0.5, 0.5, 0.5));
surface.Smoothness = _Multiply_e36c6ff9e74a4e81bcfd131039b673f6_Out_2;
surface.Occlusion = _Multiply_fdf1d2924b844055a18446459f70922e_Out_2;
surface.Alpha = _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
surface.AlphaClipThreshold = _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0;
return surface;
}
// --------------------------------------------------
// Build Graph Inputs
#ifdef HAVE_VFX_MODIFICATION
#define VFX_SRP_ATTRIBUTES Attributes
#define VFX_SRP_VARYINGS Varyings
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
#endif
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
{
VertexDescriptionInputs output;
ZERO_INITIALIZE(VertexDescriptionInputs, output);
output.ObjectSpaceNormal = input.normalOS;
output.ObjectSpaceTangent = input.tangentOS.xyz;
output.ObjectSpacePosition = input.positionOS;
return output;
}
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
{
SurfaceDescriptionInputs output;
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
#ifdef HAVE_VFX_MODIFICATION
// FragInputs from VFX come from two places: Interpolator or CBuffer.
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
#endif
output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
output.uv0 = input.texCoord0;
output.VertexColor = input.color;
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
#else
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
#endif
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
return output;
}
// --------------------------------------------------
// Main
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/UnityGBuffer.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/PBRGBufferPass.hlsl"
// --------------------------------------------------
// Visual Effect Vertex Invocations
#ifdef HAVE_VFX_MODIFICATION
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
#endif
ENDHLSL
}
Pass
{
Name "ShadowCaster"
Tags
{
"LightMode" = "ShadowCaster"
}
// Render State
Cull [_Cull]
ZTest LEqual
ZWrite On
ColorMask 0
// Debug
// <None>
// --------------------------------------------------
// Pass
HLSLPROGRAM
// Pragmas
#pragma target 4.5
#pragma exclude_renderers gles gles3 glcore
#pragma multi_compile_instancing
#pragma multi_compile _ DOTS_INSTANCING_ON
#pragma vertex vert
#pragma fragment frag
// DotsInstancingOptions: <None>
// HybridV1InjectedBuiltinProperties: <None>
// Keywords
#pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
// GraphKeywords: <None>
// Defines
#define _NORMALMAP 1
#define _NORMAL_DROPOFF_TS 1
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define ATTRIBUTES_NEED_TEXCOORD0
#define ATTRIBUTES_NEED_COLOR
#define VARYINGS_NEED_NORMAL_WS
#define VARYINGS_NEED_TEXCOORD0
#define VARYINGS_NEED_COLOR
#define FEATURES_GRAPH_VERTEX
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
#define SHADERPASS SHADERPASS_SHADOWCASTER
/* WARNING: $splice Could not find named fragment 'DotsInstancingVars' */
// custom interpolator pre-include
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
// Includes
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
// --------------------------------------------------
// Structs and Packing
// custom interpolators pre packing
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
struct Attributes
{
float3 positionOS : POSITION;
float3 normalOS : NORMAL;
float4 tangentOS : TANGENT;
float4 uv0 : TEXCOORD0;
float4 color : COLOR;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : INSTANCEID_SEMANTIC;
#endif
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float3 normalWS;
float4 texCoord0;
float4 color;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
struct SurfaceDescriptionInputs
{
float4 uv0;
float4 VertexColor;
};
struct VertexDescriptionInputs
{
float3 ObjectSpaceNormal;
float3 ObjectSpaceTangent;
float3 ObjectSpacePosition;
};
struct PackedVaryings
{
float4 positionCS : SV_POSITION;
float3 interp0 : INTERP0;
float4 interp1 : INTERP1;
float4 interp2 : INTERP2;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
PackedVaryings PackVaryings (Varyings input)
{
PackedVaryings output;
ZERO_INITIALIZE(PackedVaryings, output);
output.positionCS = input.positionCS;
output.interp0.xyz = input.normalWS;
output.interp1.xyzw = input.texCoord0;
output.interp2.xyzw = input.color;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
Varyings UnpackVaryings (PackedVaryings input)
{
Varyings output;
output.positionCS = input.positionCS;
output.normalWS = input.interp0.xyz;
output.texCoord0 = input.interp1.xyzw;
output.color = input.interp2.xyzw;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
// --------------------------------------------------
// Graph
// Graph Properties
CBUFFER_START(UnityPerMaterial)
float _AlphaClipThreshold;
float _ReadAlbedo;
float4 _ParticleMask_TexelSize;
float4 _TilingandOffset;
float4 _ParticleColor;
float4 _ParticleNormal_TexelSize;
float _ParticleNormalScale;
float4 _Mask_Map_TexelSize;
float _AO_multiplier;
float _Smoothness_multiplier;
float Vector1_bab3a2e609c74b6baff7b028a65ce418;
float4 _Emission_Texture_TexelSize;
float4 _Emission_Color;
CBUFFER_END
// Object and Global properties
SAMPLER(SamplerState_Linear_Repeat);
TEXTURE2D(_ParticleMask);
SAMPLER(sampler_ParticleMask);
TEXTURE2D(_ParticleNormal);
SAMPLER(sampler_ParticleNormal);
TEXTURE2D(_Mask_Map);
SAMPLER(sampler_Mask_Map);
TEXTURE2D(_Emission_Texture);
SAMPLER(sampler_Emission_Texture);
// Graph Includes
// GraphIncludes: <None>
// -- Property used by ScenePickingPass
#ifdef SCENEPICKINGPASS
float4 _SelectionID;
#endif
// -- Properties used by SceneSelectionPass
#ifdef SCENESELECTIONPASS
int _ObjectId;
int _PassValue;
#endif
// Graph Functions
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_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
{
Out = UV * Tiling + Offset;
}
void Unity_Multiply_float_float(float A, float B, out float Out)
{
Out = A * B;
}
void Unity_Clamp_float4(float4 In, float4 Min, float4 Max, out float4 Out)
{
Out = clamp(In, Min, Max);
}
// Custom interpolators pre vertex
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
// Graph Vertex
struct VertexDescription
{
float3 Position;
float3 Normal;
float3 Tangent;
};
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
{
VertexDescription description = (VertexDescription)0;
description.Position = IN.ObjectSpacePosition;
description.Normal = IN.ObjectSpaceNormal;
description.Tangent = IN.ObjectSpaceTangent;
return description;
}
// Custom interpolators, pre surface
#ifdef FEATURES_GRAPH_VERTEX
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
{
return output;
}
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
#endif
// Graph Pixel
struct SurfaceDescription
{
float Alpha;
float AlphaClipThreshold;
};
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
{
SurfaceDescription surface = (SurfaceDescription)0;
float4 _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0 = _ParticleColor;
float _Split_4d25adc154b2cd889bea31041dc0b8bd_R_1 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[0];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_G_2 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[1];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_B_3 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[2];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_A_4 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[3];
UnityTexture2D _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0 = UnityBuildTexture2DStructNoScale(_ParticleMask);
float4 _UV_85147850253e5a80b9d2c8ddf437e4da_Out_0 = IN.uv0;
float4 _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0 = _TilingandOffset;
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[0];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[1];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[2];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[3];
float4 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4;
float3 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5;
float2 _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1, _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2, 0, 0, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5, _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6);
float4 _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4;
float3 _Combine_75591f92a94419868e344fd5de21bb70_RGB_5;
float2 _Combine_75591f92a94419868e344fd5de21bb70_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3, _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4, 0, 0, _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4, _Combine_75591f92a94419868e344fd5de21bb70_RGB_5, _Combine_75591f92a94419868e344fd5de21bb70_RG_6);
float2 _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3;
Unity_TilingAndOffset_float((_UV_85147850253e5a80b9d2c8ddf437e4da_Out_0.xy), _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6, _Combine_75591f92a94419868e344fd5de21bb70_RG_6, _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3);
float4 _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0 = SAMPLE_TEXTURE2D(_Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.tex, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.samplerstate, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_R_4 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.r;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_G_5 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.g;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_B_6 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.b;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.a;
float _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2;
Unity_Multiply_float_float(_Split_4d25adc154b2cd889bea31041dc0b8bd_A_4, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7, _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2);
float4 _Clamp_40a04c92716b499d87e45494624e46af_Out_3;
Unity_Clamp_float4(IN.VertexColor, float4(0, 0, 0, 0), float4(1, 1, 1, 1), _Clamp_40a04c92716b499d87e45494624e46af_Out_3);
float _Split_12920bdaccef158ab9bd191cc9e45c04_R_1 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[0];
float _Split_12920bdaccef158ab9bd191cc9e45c04_G_2 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[1];
float _Split_12920bdaccef158ab9bd191cc9e45c04_B_3 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[2];
float _Split_12920bdaccef158ab9bd191cc9e45c04_A_4 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[3];
float _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
Unity_Multiply_float_float(_Multiply_adbe396b9120628ea1a79eee1222a007_Out_2, _Split_12920bdaccef158ab9bd191cc9e45c04_A_4, _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2);
float _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0 = _AlphaClipThreshold;
surface.Alpha = _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
surface.AlphaClipThreshold = _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0;
return surface;
}
// --------------------------------------------------
// Build Graph Inputs
#ifdef HAVE_VFX_MODIFICATION
#define VFX_SRP_ATTRIBUTES Attributes
#define VFX_SRP_VARYINGS Varyings
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
#endif
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
{
VertexDescriptionInputs output;
ZERO_INITIALIZE(VertexDescriptionInputs, output);
output.ObjectSpaceNormal = input.normalOS;
output.ObjectSpaceTangent = input.tangentOS.xyz;
output.ObjectSpacePosition = input.positionOS;
return output;
}
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
{
SurfaceDescriptionInputs output;
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
#ifdef HAVE_VFX_MODIFICATION
// FragInputs from VFX come from two places: Interpolator or CBuffer.
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
#endif
output.uv0 = input.texCoord0;
output.VertexColor = input.color;
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
#else
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
#endif
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
return output;
}
// --------------------------------------------------
// Main
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShadowCasterPass.hlsl"
// --------------------------------------------------
// Visual Effect Vertex Invocations
#ifdef HAVE_VFX_MODIFICATION
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
#endif
ENDHLSL
}
Pass
{
Name "DepthOnly"
Tags
{
"LightMode" = "DepthOnly"
}
// Render State
Cull [_Cull]
ZTest LEqual
ZWrite On
ColorMask 0
// Debug
// <None>
// --------------------------------------------------
// Pass
HLSLPROGRAM
// Pragmas
#pragma target 4.5
#pragma exclude_renderers gles gles3 glcore
#pragma multi_compile_instancing
#pragma multi_compile _ DOTS_INSTANCING_ON
#pragma vertex vert
#pragma fragment frag
// DotsInstancingOptions: <None>
// HybridV1InjectedBuiltinProperties: <None>
// Keywords
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
// GraphKeywords: <None>
// Defines
#define _NORMALMAP 1
#define _NORMAL_DROPOFF_TS 1
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define ATTRIBUTES_NEED_TEXCOORD0
#define ATTRIBUTES_NEED_COLOR
#define VARYINGS_NEED_TEXCOORD0
#define VARYINGS_NEED_COLOR
#define FEATURES_GRAPH_VERTEX
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
#define SHADERPASS SHADERPASS_DEPTHONLY
/* WARNING: $splice Could not find named fragment 'DotsInstancingVars' */
// custom interpolator pre-include
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
// Includes
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
// --------------------------------------------------
// Structs and Packing
// custom interpolators pre packing
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
struct Attributes
{
float3 positionOS : POSITION;
float3 normalOS : NORMAL;
float4 tangentOS : TANGENT;
float4 uv0 : TEXCOORD0;
float4 color : COLOR;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : INSTANCEID_SEMANTIC;
#endif
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float4 texCoord0;
float4 color;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
struct SurfaceDescriptionInputs
{
float4 uv0;
float4 VertexColor;
};
struct VertexDescriptionInputs
{
float3 ObjectSpaceNormal;
float3 ObjectSpaceTangent;
float3 ObjectSpacePosition;
};
struct PackedVaryings
{
float4 positionCS : SV_POSITION;
float4 interp0 : INTERP0;
float4 interp1 : INTERP1;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
PackedVaryings PackVaryings (Varyings input)
{
PackedVaryings output;
ZERO_INITIALIZE(PackedVaryings, output);
output.positionCS = input.positionCS;
output.interp0.xyzw = input.texCoord0;
output.interp1.xyzw = input.color;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
Varyings UnpackVaryings (PackedVaryings input)
{
Varyings output;
output.positionCS = input.positionCS;
output.texCoord0 = input.interp0.xyzw;
output.color = input.interp1.xyzw;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
// --------------------------------------------------
// Graph
// Graph Properties
CBUFFER_START(UnityPerMaterial)
float _AlphaClipThreshold;
float _ReadAlbedo;
float4 _ParticleMask_TexelSize;
float4 _TilingandOffset;
float4 _ParticleColor;
float4 _ParticleNormal_TexelSize;
float _ParticleNormalScale;
float4 _Mask_Map_TexelSize;
float _AO_multiplier;
float _Smoothness_multiplier;
float Vector1_bab3a2e609c74b6baff7b028a65ce418;
float4 _Emission_Texture_TexelSize;
float4 _Emission_Color;
CBUFFER_END
// Object and Global properties
SAMPLER(SamplerState_Linear_Repeat);
TEXTURE2D(_ParticleMask);
SAMPLER(sampler_ParticleMask);
TEXTURE2D(_ParticleNormal);
SAMPLER(sampler_ParticleNormal);
TEXTURE2D(_Mask_Map);
SAMPLER(sampler_Mask_Map);
TEXTURE2D(_Emission_Texture);
SAMPLER(sampler_Emission_Texture);
// Graph Includes
// GraphIncludes: <None>
// -- Property used by ScenePickingPass
#ifdef SCENEPICKINGPASS
float4 _SelectionID;
#endif
// -- Properties used by SceneSelectionPass
#ifdef SCENESELECTIONPASS
int _ObjectId;
int _PassValue;
#endif
// Graph Functions
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_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
{
Out = UV * Tiling + Offset;
}
void Unity_Multiply_float_float(float A, float B, out float Out)
{
Out = A * B;
}
void Unity_Clamp_float4(float4 In, float4 Min, float4 Max, out float4 Out)
{
Out = clamp(In, Min, Max);
}
// Custom interpolators pre vertex
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
// Graph Vertex
struct VertexDescription
{
float3 Position;
float3 Normal;
float3 Tangent;
};
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
{
VertexDescription description = (VertexDescription)0;
description.Position = IN.ObjectSpacePosition;
description.Normal = IN.ObjectSpaceNormal;
description.Tangent = IN.ObjectSpaceTangent;
return description;
}
// Custom interpolators, pre surface
#ifdef FEATURES_GRAPH_VERTEX
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
{
return output;
}
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
#endif
// Graph Pixel
struct SurfaceDescription
{
float Alpha;
float AlphaClipThreshold;
};
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
{
SurfaceDescription surface = (SurfaceDescription)0;
float4 _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0 = _ParticleColor;
float _Split_4d25adc154b2cd889bea31041dc0b8bd_R_1 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[0];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_G_2 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[1];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_B_3 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[2];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_A_4 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[3];
UnityTexture2D _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0 = UnityBuildTexture2DStructNoScale(_ParticleMask);
float4 _UV_85147850253e5a80b9d2c8ddf437e4da_Out_0 = IN.uv0;
float4 _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0 = _TilingandOffset;
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[0];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[1];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[2];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[3];
float4 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4;
float3 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5;
float2 _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1, _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2, 0, 0, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5, _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6);
float4 _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4;
float3 _Combine_75591f92a94419868e344fd5de21bb70_RGB_5;
float2 _Combine_75591f92a94419868e344fd5de21bb70_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3, _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4, 0, 0, _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4, _Combine_75591f92a94419868e344fd5de21bb70_RGB_5, _Combine_75591f92a94419868e344fd5de21bb70_RG_6);
float2 _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3;
Unity_TilingAndOffset_float((_UV_85147850253e5a80b9d2c8ddf437e4da_Out_0.xy), _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6, _Combine_75591f92a94419868e344fd5de21bb70_RG_6, _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3);
float4 _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0 = SAMPLE_TEXTURE2D(_Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.tex, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.samplerstate, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_R_4 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.r;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_G_5 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.g;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_B_6 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.b;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.a;
float _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2;
Unity_Multiply_float_float(_Split_4d25adc154b2cd889bea31041dc0b8bd_A_4, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7, _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2);
float4 _Clamp_40a04c92716b499d87e45494624e46af_Out_3;
Unity_Clamp_float4(IN.VertexColor, float4(0, 0, 0, 0), float4(1, 1, 1, 1), _Clamp_40a04c92716b499d87e45494624e46af_Out_3);
float _Split_12920bdaccef158ab9bd191cc9e45c04_R_1 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[0];
float _Split_12920bdaccef158ab9bd191cc9e45c04_G_2 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[1];
float _Split_12920bdaccef158ab9bd191cc9e45c04_B_3 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[2];
float _Split_12920bdaccef158ab9bd191cc9e45c04_A_4 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[3];
float _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
Unity_Multiply_float_float(_Multiply_adbe396b9120628ea1a79eee1222a007_Out_2, _Split_12920bdaccef158ab9bd191cc9e45c04_A_4, _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2);
float _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0 = _AlphaClipThreshold;
surface.Alpha = _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
surface.AlphaClipThreshold = _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0;
return surface;
}
// --------------------------------------------------
// Build Graph Inputs
#ifdef HAVE_VFX_MODIFICATION
#define VFX_SRP_ATTRIBUTES Attributes
#define VFX_SRP_VARYINGS Varyings
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
#endif
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
{
VertexDescriptionInputs output;
ZERO_INITIALIZE(VertexDescriptionInputs, output);
output.ObjectSpaceNormal = input.normalOS;
output.ObjectSpaceTangent = input.tangentOS.xyz;
output.ObjectSpacePosition = input.positionOS;
return output;
}
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
{
SurfaceDescriptionInputs output;
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
#ifdef HAVE_VFX_MODIFICATION
// FragInputs from VFX come from two places: Interpolator or CBuffer.
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
#endif
output.uv0 = input.texCoord0;
output.VertexColor = input.color;
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
#else
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
#endif
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
return output;
}
// --------------------------------------------------
// Main
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/DepthOnlyPass.hlsl"
// --------------------------------------------------
// Visual Effect Vertex Invocations
#ifdef HAVE_VFX_MODIFICATION
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
#endif
ENDHLSL
}
Pass
{
Name "DepthNormals"
Tags
{
"LightMode" = "DepthNormals"
}
// Render State
Cull [_Cull]
ZTest LEqual
ZWrite On
// Debug
// <None>
// --------------------------------------------------
// Pass
HLSLPROGRAM
// Pragmas
#pragma target 4.5
#pragma exclude_renderers gles gles3 glcore
#pragma multi_compile_instancing
#pragma multi_compile _ DOTS_INSTANCING_ON
#pragma vertex vert
#pragma fragment frag
// DotsInstancingOptions: <None>
// HybridV1InjectedBuiltinProperties: <None>
// Keywords
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
// GraphKeywords: <None>
// Defines
#define _NORMALMAP 1
#define _NORMAL_DROPOFF_TS 1
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define ATTRIBUTES_NEED_TEXCOORD0
#define ATTRIBUTES_NEED_TEXCOORD1
#define ATTRIBUTES_NEED_COLOR
#define VARYINGS_NEED_NORMAL_WS
#define VARYINGS_NEED_TANGENT_WS
#define VARYINGS_NEED_TEXCOORD0
#define VARYINGS_NEED_COLOR
#define FEATURES_GRAPH_VERTEX
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
#define SHADERPASS SHADERPASS_DEPTHNORMALS
/* WARNING: $splice Could not find named fragment 'DotsInstancingVars' */
// custom interpolator pre-include
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
// Includes
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
// --------------------------------------------------
// Structs and Packing
// custom interpolators pre packing
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
struct Attributes
{
float3 positionOS : POSITION;
float3 normalOS : NORMAL;
float4 tangentOS : TANGENT;
float4 uv0 : TEXCOORD0;
float4 uv1 : TEXCOORD1;
float4 color : COLOR;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : INSTANCEID_SEMANTIC;
#endif
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float3 normalWS;
float4 tangentWS;
float4 texCoord0;
float4 color;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
struct SurfaceDescriptionInputs
{
float3 TangentSpaceNormal;
float4 uv0;
float4 VertexColor;
};
struct VertexDescriptionInputs
{
float3 ObjectSpaceNormal;
float3 ObjectSpaceTangent;
float3 ObjectSpacePosition;
};
struct PackedVaryings
{
float4 positionCS : SV_POSITION;
float3 interp0 : INTERP0;
float4 interp1 : INTERP1;
float4 interp2 : INTERP2;
float4 interp3 : INTERP3;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
PackedVaryings PackVaryings (Varyings input)
{
PackedVaryings output;
ZERO_INITIALIZE(PackedVaryings, output);
output.positionCS = input.positionCS;
output.interp0.xyz = input.normalWS;
output.interp1.xyzw = input.tangentWS;
output.interp2.xyzw = input.texCoord0;
output.interp3.xyzw = input.color;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
Varyings UnpackVaryings (PackedVaryings input)
{
Varyings output;
output.positionCS = input.positionCS;
output.normalWS = input.interp0.xyz;
output.tangentWS = input.interp1.xyzw;
output.texCoord0 = input.interp2.xyzw;
output.color = input.interp3.xyzw;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
// --------------------------------------------------
// Graph
// Graph Properties
CBUFFER_START(UnityPerMaterial)
float _AlphaClipThreshold;
float _ReadAlbedo;
float4 _ParticleMask_TexelSize;
float4 _TilingandOffset;
float4 _ParticleColor;
float4 _ParticleNormal_TexelSize;
float _ParticleNormalScale;
float4 _Mask_Map_TexelSize;
float _AO_multiplier;
float _Smoothness_multiplier;
float Vector1_bab3a2e609c74b6baff7b028a65ce418;
float4 _Emission_Texture_TexelSize;
float4 _Emission_Color;
CBUFFER_END
// Object and Global properties
SAMPLER(SamplerState_Linear_Repeat);
TEXTURE2D(_ParticleMask);
SAMPLER(sampler_ParticleMask);
TEXTURE2D(_ParticleNormal);
SAMPLER(sampler_ParticleNormal);
TEXTURE2D(_Mask_Map);
SAMPLER(sampler_Mask_Map);
TEXTURE2D(_Emission_Texture);
SAMPLER(sampler_Emission_Texture);
// Graph Includes
// GraphIncludes: <None>
// -- Property used by ScenePickingPass
#ifdef SCENEPICKINGPASS
float4 _SelectionID;
#endif
// -- Properties used by SceneSelectionPass
#ifdef SCENESELECTIONPASS
int _ObjectId;
int _PassValue;
#endif
// Graph Functions
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_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
{
Out = UV * Tiling + Offset;
}
void Unity_NormalStrength_float(float3 In, float Strength, out float3 Out)
{
Out = float3(In.rg * Strength, lerp(1, In.b, saturate(Strength)));
}
void Unity_Multiply_float_float(float A, float B, out float Out)
{
Out = A * B;
}
void Unity_Clamp_float4(float4 In, float4 Min, float4 Max, out float4 Out)
{
Out = clamp(In, Min, Max);
}
// Custom interpolators pre vertex
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
// Graph Vertex
struct VertexDescription
{
float3 Position;
float3 Normal;
float3 Tangent;
};
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
{
VertexDescription description = (VertexDescription)0;
description.Position = IN.ObjectSpacePosition;
description.Normal = IN.ObjectSpaceNormal;
description.Tangent = IN.ObjectSpaceTangent;
return description;
}
// Custom interpolators, pre surface
#ifdef FEATURES_GRAPH_VERTEX
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
{
return output;
}
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
#endif
// Graph Pixel
struct SurfaceDescription
{
float3 NormalTS;
float Alpha;
float AlphaClipThreshold;
};
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
{
SurfaceDescription surface = (SurfaceDescription)0;
UnityTexture2D _Property_47d26322b0cbee809f7bb147ebce9c2b_Out_0 = UnityBuildTexture2DStructNoScale(_ParticleNormal);
float4 _UV_85147850253e5a80b9d2c8ddf437e4da_Out_0 = IN.uv0;
float4 _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0 = _TilingandOffset;
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[0];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[1];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[2];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[3];
float4 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4;
float3 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5;
float2 _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1, _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2, 0, 0, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5, _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6);
float4 _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4;
float3 _Combine_75591f92a94419868e344fd5de21bb70_RGB_5;
float2 _Combine_75591f92a94419868e344fd5de21bb70_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3, _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4, 0, 0, _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4, _Combine_75591f92a94419868e344fd5de21bb70_RGB_5, _Combine_75591f92a94419868e344fd5de21bb70_RG_6);
float2 _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3;
Unity_TilingAndOffset_float((_UV_85147850253e5a80b9d2c8ddf437e4da_Out_0.xy), _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6, _Combine_75591f92a94419868e344fd5de21bb70_RG_6, _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3);
float4 _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0 = SAMPLE_TEXTURE2D(_Property_47d26322b0cbee809f7bb147ebce9c2b_Out_0.tex, _Property_47d26322b0cbee809f7bb147ebce9c2b_Out_0.samplerstate, _Property_47d26322b0cbee809f7bb147ebce9c2b_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
_SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.rgb = UnpackNormal(_SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0);
float _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_R_4 = _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.r;
float _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_G_5 = _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.g;
float _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_B_6 = _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.b;
float _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_A_7 = _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.a;
float _Property_9ca212c6c965a284b1795febc12e7aed_Out_0 = _ParticleNormalScale;
float3 _NormalStrength_2012b1b56379248a8afa64fa70f1b999_Out_2;
Unity_NormalStrength_float((_SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.xyz), _Property_9ca212c6c965a284b1795febc12e7aed_Out_0, _NormalStrength_2012b1b56379248a8afa64fa70f1b999_Out_2);
float4 _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0 = _ParticleColor;
float _Split_4d25adc154b2cd889bea31041dc0b8bd_R_1 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[0];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_G_2 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[1];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_B_3 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[2];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_A_4 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[3];
UnityTexture2D _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0 = UnityBuildTexture2DStructNoScale(_ParticleMask);
float4 _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0 = SAMPLE_TEXTURE2D(_Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.tex, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.samplerstate, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_R_4 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.r;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_G_5 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.g;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_B_6 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.b;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.a;
float _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2;
Unity_Multiply_float_float(_Split_4d25adc154b2cd889bea31041dc0b8bd_A_4, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7, _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2);
float4 _Clamp_40a04c92716b499d87e45494624e46af_Out_3;
Unity_Clamp_float4(IN.VertexColor, float4(0, 0, 0, 0), float4(1, 1, 1, 1), _Clamp_40a04c92716b499d87e45494624e46af_Out_3);
float _Split_12920bdaccef158ab9bd191cc9e45c04_R_1 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[0];
float _Split_12920bdaccef158ab9bd191cc9e45c04_G_2 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[1];
float _Split_12920bdaccef158ab9bd191cc9e45c04_B_3 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[2];
float _Split_12920bdaccef158ab9bd191cc9e45c04_A_4 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[3];
float _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
Unity_Multiply_float_float(_Multiply_adbe396b9120628ea1a79eee1222a007_Out_2, _Split_12920bdaccef158ab9bd191cc9e45c04_A_4, _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2);
float _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0 = _AlphaClipThreshold;
surface.NormalTS = _NormalStrength_2012b1b56379248a8afa64fa70f1b999_Out_2;
surface.Alpha = _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
surface.AlphaClipThreshold = _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0;
return surface;
}
// --------------------------------------------------
// Build Graph Inputs
#ifdef HAVE_VFX_MODIFICATION
#define VFX_SRP_ATTRIBUTES Attributes
#define VFX_SRP_VARYINGS Varyings
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
#endif
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
{
VertexDescriptionInputs output;
ZERO_INITIALIZE(VertexDescriptionInputs, output);
output.ObjectSpaceNormal = input.normalOS;
output.ObjectSpaceTangent = input.tangentOS.xyz;
output.ObjectSpacePosition = input.positionOS;
return output;
}
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
{
SurfaceDescriptionInputs output;
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
#ifdef HAVE_VFX_MODIFICATION
// FragInputs from VFX come from two places: Interpolator or CBuffer.
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
#endif
output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
output.uv0 = input.texCoord0;
output.VertexColor = input.color;
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
#else
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
#endif
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
return output;
}
// --------------------------------------------------
// Main
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/DepthNormalsOnlyPass.hlsl"
// --------------------------------------------------
// Visual Effect Vertex Invocations
#ifdef HAVE_VFX_MODIFICATION
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
#endif
ENDHLSL
}
Pass
{
Name "Meta"
Tags
{
"LightMode" = "Meta"
}
// Render State
Cull Off
// Debug
// <None>
// --------------------------------------------------
// Pass
HLSLPROGRAM
// Pragmas
#pragma target 4.5
#pragma exclude_renderers gles gles3 glcore
#pragma vertex vert
#pragma fragment frag
// DotsInstancingOptions: <None>
// HybridV1InjectedBuiltinProperties: <None>
// Keywords
#pragma shader_feature _ EDITOR_VISUALIZATION
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
// GraphKeywords: <None>
// Defines
#define _NORMALMAP 1
#define _NORMAL_DROPOFF_TS 1
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define ATTRIBUTES_NEED_TEXCOORD0
#define ATTRIBUTES_NEED_TEXCOORD1
#define ATTRIBUTES_NEED_TEXCOORD2
#define ATTRIBUTES_NEED_COLOR
#define VARYINGS_NEED_TEXCOORD0
#define VARYINGS_NEED_TEXCOORD1
#define VARYINGS_NEED_TEXCOORD2
#define VARYINGS_NEED_COLOR
#define FEATURES_GRAPH_VERTEX
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
#define SHADERPASS SHADERPASS_META
#define _FOG_FRAGMENT 1
/* WARNING: $splice Could not find named fragment 'DotsInstancingVars' */
// custom interpolator pre-include
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
// Includes
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/MetaInput.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
// --------------------------------------------------
// Structs and Packing
// custom interpolators pre packing
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
struct Attributes
{
float3 positionOS : POSITION;
float3 normalOS : NORMAL;
float4 tangentOS : TANGENT;
float4 uv0 : TEXCOORD0;
float4 uv1 : TEXCOORD1;
float4 uv2 : TEXCOORD2;
float4 color : COLOR;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : INSTANCEID_SEMANTIC;
#endif
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float4 texCoord0;
float4 texCoord1;
float4 texCoord2;
float4 color;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
struct SurfaceDescriptionInputs
{
float4 uv0;
float4 VertexColor;
};
struct VertexDescriptionInputs
{
float3 ObjectSpaceNormal;
float3 ObjectSpaceTangent;
float3 ObjectSpacePosition;
};
struct PackedVaryings
{
float4 positionCS : SV_POSITION;
float4 interp0 : INTERP0;
float4 interp1 : INTERP1;
float4 interp2 : INTERP2;
float4 interp3 : INTERP3;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
PackedVaryings PackVaryings (Varyings input)
{
PackedVaryings output;
ZERO_INITIALIZE(PackedVaryings, output);
output.positionCS = input.positionCS;
output.interp0.xyzw = input.texCoord0;
output.interp1.xyzw = input.texCoord1;
output.interp2.xyzw = input.texCoord2;
output.interp3.xyzw = input.color;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
Varyings UnpackVaryings (PackedVaryings input)
{
Varyings output;
output.positionCS = input.positionCS;
output.texCoord0 = input.interp0.xyzw;
output.texCoord1 = input.interp1.xyzw;
output.texCoord2 = input.interp2.xyzw;
output.color = input.interp3.xyzw;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
// --------------------------------------------------
// Graph
// Graph Properties
CBUFFER_START(UnityPerMaterial)
float _AlphaClipThreshold;
float _ReadAlbedo;
float4 _ParticleMask_TexelSize;
float4 _TilingandOffset;
float4 _ParticleColor;
float4 _ParticleNormal_TexelSize;
float _ParticleNormalScale;
float4 _Mask_Map_TexelSize;
float _AO_multiplier;
float _Smoothness_multiplier;
float Vector1_bab3a2e609c74b6baff7b028a65ce418;
float4 _Emission_Texture_TexelSize;
float4 _Emission_Color;
CBUFFER_END
// Object and Global properties
SAMPLER(SamplerState_Linear_Repeat);
TEXTURE2D(_ParticleMask);
SAMPLER(sampler_ParticleMask);
TEXTURE2D(_ParticleNormal);
SAMPLER(sampler_ParticleNormal);
TEXTURE2D(_Mask_Map);
SAMPLER(sampler_Mask_Map);
TEXTURE2D(_Emission_Texture);
SAMPLER(sampler_Emission_Texture);
// Graph Includes
// GraphIncludes: <None>
// -- Property used by ScenePickingPass
#ifdef SCENEPICKINGPASS
float4 _SelectionID;
#endif
// -- Properties used by SceneSelectionPass
#ifdef SCENESELECTIONPASS
int _ObjectId;
int _PassValue;
#endif
// Graph Functions
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_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
{
Out = UV * Tiling + Offset;
}
void Unity_Multiply_float4_float4(float4 A, float4 B, out float4 Out)
{
Out = A * B;
}
void Unity_Branch_float4(float Predicate, float4 True, float4 False, out float4 Out)
{
Out = Predicate ? True : False;
}
void Unity_Clamp_float4(float4 In, float4 Min, float4 Max, out float4 Out)
{
Out = clamp(In, Min, Max);
}
void Unity_Multiply_float_float(float A, float B, out float Out)
{
Out = A * B;
}
// Custom interpolators pre vertex
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
// Graph Vertex
struct VertexDescription
{
float3 Position;
float3 Normal;
float3 Tangent;
};
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
{
VertexDescription description = (VertexDescription)0;
description.Position = IN.ObjectSpacePosition;
description.Normal = IN.ObjectSpaceNormal;
description.Tangent = IN.ObjectSpaceTangent;
return description;
}
// Custom interpolators, pre surface
#ifdef FEATURES_GRAPH_VERTEX
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
{
return output;
}
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
#endif
// Graph Pixel
struct SurfaceDescription
{
float3 BaseColor;
float3 Emission;
float Alpha;
float AlphaClipThreshold;
};
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
{
SurfaceDescription surface = (SurfaceDescription)0;
float _Property_b4e0c30cf01756839030a5167b089dc6_Out_0 = _ReadAlbedo;
float4 _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0 = _ParticleColor;
UnityTexture2D _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0 = UnityBuildTexture2DStructNoScale(_ParticleMask);
float4 _UV_85147850253e5a80b9d2c8ddf437e4da_Out_0 = IN.uv0;
float4 _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0 = _TilingandOffset;
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[0];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[1];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[2];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[3];
float4 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4;
float3 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5;
float2 _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1, _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2, 0, 0, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5, _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6);
float4 _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4;
float3 _Combine_75591f92a94419868e344fd5de21bb70_RGB_5;
float2 _Combine_75591f92a94419868e344fd5de21bb70_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3, _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4, 0, 0, _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4, _Combine_75591f92a94419868e344fd5de21bb70_RGB_5, _Combine_75591f92a94419868e344fd5de21bb70_RG_6);
float2 _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3;
Unity_TilingAndOffset_float((_UV_85147850253e5a80b9d2c8ddf437e4da_Out_0.xy), _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6, _Combine_75591f92a94419868e344fd5de21bb70_RG_6, _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3);
float4 _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0 = SAMPLE_TEXTURE2D(_Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.tex, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.samplerstate, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_R_4 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.r;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_G_5 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.g;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_B_6 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.b;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.a;
float4 _Multiply_ffed7e4d201e2e86974f2cc3d88026b2_Out_2;
Unity_Multiply_float4_float4(_Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0, _Multiply_ffed7e4d201e2e86974f2cc3d88026b2_Out_2);
float4 _Branch_ef8236ada61be1869b3278db6ae02537_Out_3;
Unity_Branch_float4(_Property_b4e0c30cf01756839030a5167b089dc6_Out_0, _Multiply_ffed7e4d201e2e86974f2cc3d88026b2_Out_2, _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0, _Branch_ef8236ada61be1869b3278db6ae02537_Out_3);
float4 _Clamp_40a04c92716b499d87e45494624e46af_Out_3;
Unity_Clamp_float4(IN.VertexColor, float4(0, 0, 0, 0), float4(1, 1, 1, 1), _Clamp_40a04c92716b499d87e45494624e46af_Out_3);
float4 _Multiply_3c7c94a1a6e2c08786b9b70a13b426fa_Out_2;
Unity_Multiply_float4_float4(_Branch_ef8236ada61be1869b3278db6ae02537_Out_3, _Clamp_40a04c92716b499d87e45494624e46af_Out_3, _Multiply_3c7c94a1a6e2c08786b9b70a13b426fa_Out_2);
float4 _Property_479229991d5542d796eac0e9def8c2d7_Out_0 = IsGammaSpace() ? LinearToSRGB(_Emission_Color) : _Emission_Color;
UnityTexture2D _Property_62c46c558d8f4d209a7a17877af03aab_Out_0 = UnityBuildTexture2DStructNoScale(_Emission_Texture);
float4 _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0 = SAMPLE_TEXTURE2D(_Property_62c46c558d8f4d209a7a17877af03aab_Out_0.tex, _Property_62c46c558d8f4d209a7a17877af03aab_Out_0.samplerstate, _Property_62c46c558d8f4d209a7a17877af03aab_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_R_4 = _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0.r;
float _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_G_5 = _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0.g;
float _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_B_6 = _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0.b;
float _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_A_7 = _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0.a;
float4 _Multiply_f5ae222b26e245a681d4c4005fdcd9dd_Out_2;
Unity_Multiply_float4_float4(_Property_479229991d5542d796eac0e9def8c2d7_Out_0, _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0, _Multiply_f5ae222b26e245a681d4c4005fdcd9dd_Out_2);
float4 _Multiply_d1894c3787b04ddc9f4316bde9b000ee_Out_2;
Unity_Multiply_float4_float4(_Clamp_40a04c92716b499d87e45494624e46af_Out_3, _Multiply_f5ae222b26e245a681d4c4005fdcd9dd_Out_2, _Multiply_d1894c3787b04ddc9f4316bde9b000ee_Out_2);
float _Split_4d25adc154b2cd889bea31041dc0b8bd_R_1 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[0];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_G_2 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[1];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_B_3 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[2];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_A_4 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[3];
float _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2;
Unity_Multiply_float_float(_Split_4d25adc154b2cd889bea31041dc0b8bd_A_4, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7, _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2);
float _Split_12920bdaccef158ab9bd191cc9e45c04_R_1 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[0];
float _Split_12920bdaccef158ab9bd191cc9e45c04_G_2 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[1];
float _Split_12920bdaccef158ab9bd191cc9e45c04_B_3 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[2];
float _Split_12920bdaccef158ab9bd191cc9e45c04_A_4 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[3];
float _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
Unity_Multiply_float_float(_Multiply_adbe396b9120628ea1a79eee1222a007_Out_2, _Split_12920bdaccef158ab9bd191cc9e45c04_A_4, _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2);
float _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0 = _AlphaClipThreshold;
surface.BaseColor = (_Multiply_3c7c94a1a6e2c08786b9b70a13b426fa_Out_2.xyz);
surface.Emission = (_Multiply_d1894c3787b04ddc9f4316bde9b000ee_Out_2.xyz);
surface.Alpha = _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
surface.AlphaClipThreshold = _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0;
return surface;
}
// --------------------------------------------------
// Build Graph Inputs
#ifdef HAVE_VFX_MODIFICATION
#define VFX_SRP_ATTRIBUTES Attributes
#define VFX_SRP_VARYINGS Varyings
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
#endif
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
{
VertexDescriptionInputs output;
ZERO_INITIALIZE(VertexDescriptionInputs, output);
output.ObjectSpaceNormal = input.normalOS;
output.ObjectSpaceTangent = input.tangentOS.xyz;
output.ObjectSpacePosition = input.positionOS;
return output;
}
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
{
SurfaceDescriptionInputs output;
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
#ifdef HAVE_VFX_MODIFICATION
// FragInputs from VFX come from two places: Interpolator or CBuffer.
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
#endif
output.uv0 = input.texCoord0;
output.VertexColor = input.color;
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
#else
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
#endif
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
return output;
}
// --------------------------------------------------
// Main
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/LightingMetaPass.hlsl"
// --------------------------------------------------
// Visual Effect Vertex Invocations
#ifdef HAVE_VFX_MODIFICATION
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
#endif
ENDHLSL
}
Pass
{
Name "SceneSelectionPass"
Tags
{
"LightMode" = "SceneSelectionPass"
}
// Render State
Cull Off
// Debug
// <None>
// --------------------------------------------------
// Pass
HLSLPROGRAM
// Pragmas
#pragma target 4.5
#pragma exclude_renderers gles gles3 glcore
#pragma vertex vert
#pragma fragment frag
// DotsInstancingOptions: <None>
// HybridV1InjectedBuiltinProperties: <None>
// Keywords
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
// GraphKeywords: <None>
// Defines
#define _NORMALMAP 1
#define _NORMAL_DROPOFF_TS 1
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define ATTRIBUTES_NEED_TEXCOORD0
#define ATTRIBUTES_NEED_COLOR
#define VARYINGS_NEED_TEXCOORD0
#define VARYINGS_NEED_COLOR
#define FEATURES_GRAPH_VERTEX
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
#define SHADERPASS SHADERPASS_DEPTHONLY
#define SCENESELECTIONPASS 1
#define ALPHA_CLIP_THRESHOLD 1
/* WARNING: $splice Could not find named fragment 'DotsInstancingVars' */
// custom interpolator pre-include
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
// Includes
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
// --------------------------------------------------
// Structs and Packing
// custom interpolators pre packing
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
struct Attributes
{
float3 positionOS : POSITION;
float3 normalOS : NORMAL;
float4 tangentOS : TANGENT;
float4 uv0 : TEXCOORD0;
float4 color : COLOR;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : INSTANCEID_SEMANTIC;
#endif
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float4 texCoord0;
float4 color;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
struct SurfaceDescriptionInputs
{
float4 uv0;
float4 VertexColor;
};
struct VertexDescriptionInputs
{
float3 ObjectSpaceNormal;
float3 ObjectSpaceTangent;
float3 ObjectSpacePosition;
};
struct PackedVaryings
{
float4 positionCS : SV_POSITION;
float4 interp0 : INTERP0;
float4 interp1 : INTERP1;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
PackedVaryings PackVaryings (Varyings input)
{
PackedVaryings output;
ZERO_INITIALIZE(PackedVaryings, output);
output.positionCS = input.positionCS;
output.interp0.xyzw = input.texCoord0;
output.interp1.xyzw = input.color;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
Varyings UnpackVaryings (PackedVaryings input)
{
Varyings output;
output.positionCS = input.positionCS;
output.texCoord0 = input.interp0.xyzw;
output.color = input.interp1.xyzw;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
// --------------------------------------------------
// Graph
// Graph Properties
CBUFFER_START(UnityPerMaterial)
float _AlphaClipThreshold;
float _ReadAlbedo;
float4 _ParticleMask_TexelSize;
float4 _TilingandOffset;
float4 _ParticleColor;
float4 _ParticleNormal_TexelSize;
float _ParticleNormalScale;
float4 _Mask_Map_TexelSize;
float _AO_multiplier;
float _Smoothness_multiplier;
float Vector1_bab3a2e609c74b6baff7b028a65ce418;
float4 _Emission_Texture_TexelSize;
float4 _Emission_Color;
CBUFFER_END
// Object and Global properties
SAMPLER(SamplerState_Linear_Repeat);
TEXTURE2D(_ParticleMask);
SAMPLER(sampler_ParticleMask);
TEXTURE2D(_ParticleNormal);
SAMPLER(sampler_ParticleNormal);
TEXTURE2D(_Mask_Map);
SAMPLER(sampler_Mask_Map);
TEXTURE2D(_Emission_Texture);
SAMPLER(sampler_Emission_Texture);
// Graph Includes
// GraphIncludes: <None>
// -- Property used by ScenePickingPass
#ifdef SCENEPICKINGPASS
float4 _SelectionID;
#endif
// -- Properties used by SceneSelectionPass
#ifdef SCENESELECTIONPASS
int _ObjectId;
int _PassValue;
#endif
// Graph Functions
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_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
{
Out = UV * Tiling + Offset;
}
void Unity_Multiply_float_float(float A, float B, out float Out)
{
Out = A * B;
}
void Unity_Clamp_float4(float4 In, float4 Min, float4 Max, out float4 Out)
{
Out = clamp(In, Min, Max);
}
// Custom interpolators pre vertex
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
// Graph Vertex
struct VertexDescription
{
float3 Position;
float3 Normal;
float3 Tangent;
};
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
{
VertexDescription description = (VertexDescription)0;
description.Position = IN.ObjectSpacePosition;
description.Normal = IN.ObjectSpaceNormal;
description.Tangent = IN.ObjectSpaceTangent;
return description;
}
// Custom interpolators, pre surface
#ifdef FEATURES_GRAPH_VERTEX
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
{
return output;
}
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
#endif
// Graph Pixel
struct SurfaceDescription
{
float Alpha;
float AlphaClipThreshold;
};
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
{
SurfaceDescription surface = (SurfaceDescription)0;
float4 _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0 = _ParticleColor;
float _Split_4d25adc154b2cd889bea31041dc0b8bd_R_1 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[0];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_G_2 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[1];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_B_3 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[2];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_A_4 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[3];
UnityTexture2D _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0 = UnityBuildTexture2DStructNoScale(_ParticleMask);
float4 _UV_85147850253e5a80b9d2c8ddf437e4da_Out_0 = IN.uv0;
float4 _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0 = _TilingandOffset;
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[0];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[1];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[2];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[3];
float4 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4;
float3 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5;
float2 _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1, _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2, 0, 0, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5, _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6);
float4 _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4;
float3 _Combine_75591f92a94419868e344fd5de21bb70_RGB_5;
float2 _Combine_75591f92a94419868e344fd5de21bb70_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3, _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4, 0, 0, _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4, _Combine_75591f92a94419868e344fd5de21bb70_RGB_5, _Combine_75591f92a94419868e344fd5de21bb70_RG_6);
float2 _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3;
Unity_TilingAndOffset_float((_UV_85147850253e5a80b9d2c8ddf437e4da_Out_0.xy), _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6, _Combine_75591f92a94419868e344fd5de21bb70_RG_6, _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3);
float4 _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0 = SAMPLE_TEXTURE2D(_Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.tex, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.samplerstate, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_R_4 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.r;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_G_5 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.g;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_B_6 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.b;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.a;
float _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2;
Unity_Multiply_float_float(_Split_4d25adc154b2cd889bea31041dc0b8bd_A_4, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7, _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2);
float4 _Clamp_40a04c92716b499d87e45494624e46af_Out_3;
Unity_Clamp_float4(IN.VertexColor, float4(0, 0, 0, 0), float4(1, 1, 1, 1), _Clamp_40a04c92716b499d87e45494624e46af_Out_3);
float _Split_12920bdaccef158ab9bd191cc9e45c04_R_1 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[0];
float _Split_12920bdaccef158ab9bd191cc9e45c04_G_2 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[1];
float _Split_12920bdaccef158ab9bd191cc9e45c04_B_3 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[2];
float _Split_12920bdaccef158ab9bd191cc9e45c04_A_4 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[3];
float _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
Unity_Multiply_float_float(_Multiply_adbe396b9120628ea1a79eee1222a007_Out_2, _Split_12920bdaccef158ab9bd191cc9e45c04_A_4, _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2);
float _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0 = _AlphaClipThreshold;
surface.Alpha = _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
surface.AlphaClipThreshold = _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0;
return surface;
}
// --------------------------------------------------
// Build Graph Inputs
#ifdef HAVE_VFX_MODIFICATION
#define VFX_SRP_ATTRIBUTES Attributes
#define VFX_SRP_VARYINGS Varyings
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
#endif
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
{
VertexDescriptionInputs output;
ZERO_INITIALIZE(VertexDescriptionInputs, output);
output.ObjectSpaceNormal = input.normalOS;
output.ObjectSpaceTangent = input.tangentOS.xyz;
output.ObjectSpacePosition = input.positionOS;
return output;
}
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
{
SurfaceDescriptionInputs output;
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
#ifdef HAVE_VFX_MODIFICATION
// FragInputs from VFX come from two places: Interpolator or CBuffer.
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
#endif
output.uv0 = input.texCoord0;
output.VertexColor = input.color;
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
#else
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
#endif
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
return output;
}
// --------------------------------------------------
// Main
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/SelectionPickingPass.hlsl"
// --------------------------------------------------
// Visual Effect Vertex Invocations
#ifdef HAVE_VFX_MODIFICATION
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
#endif
ENDHLSL
}
Pass
{
Name "ScenePickingPass"
Tags
{
"LightMode" = "Picking"
}
// Render State
Cull [_Cull]
// Debug
// <None>
// --------------------------------------------------
// Pass
HLSLPROGRAM
// Pragmas
#pragma target 4.5
#pragma exclude_renderers gles gles3 glcore
#pragma vertex vert
#pragma fragment frag
// DotsInstancingOptions: <None>
// HybridV1InjectedBuiltinProperties: <None>
// Keywords
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
// GraphKeywords: <None>
// Defines
#define _NORMALMAP 1
#define _NORMAL_DROPOFF_TS 1
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define ATTRIBUTES_NEED_TEXCOORD0
#define ATTRIBUTES_NEED_COLOR
#define VARYINGS_NEED_TEXCOORD0
#define VARYINGS_NEED_COLOR
#define FEATURES_GRAPH_VERTEX
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
#define SHADERPASS SHADERPASS_DEPTHONLY
#define SCENEPICKINGPASS 1
#define ALPHA_CLIP_THRESHOLD 1
/* WARNING: $splice Could not find named fragment 'DotsInstancingVars' */
// custom interpolator pre-include
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
// Includes
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
// --------------------------------------------------
// Structs and Packing
// custom interpolators pre packing
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
struct Attributes
{
float3 positionOS : POSITION;
float3 normalOS : NORMAL;
float4 tangentOS : TANGENT;
float4 uv0 : TEXCOORD0;
float4 color : COLOR;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : INSTANCEID_SEMANTIC;
#endif
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float4 texCoord0;
float4 color;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
struct SurfaceDescriptionInputs
{
float4 uv0;
float4 VertexColor;
};
struct VertexDescriptionInputs
{
float3 ObjectSpaceNormal;
float3 ObjectSpaceTangent;
float3 ObjectSpacePosition;
};
struct PackedVaryings
{
float4 positionCS : SV_POSITION;
float4 interp0 : INTERP0;
float4 interp1 : INTERP1;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
PackedVaryings PackVaryings (Varyings input)
{
PackedVaryings output;
ZERO_INITIALIZE(PackedVaryings, output);
output.positionCS = input.positionCS;
output.interp0.xyzw = input.texCoord0;
output.interp1.xyzw = input.color;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
Varyings UnpackVaryings (PackedVaryings input)
{
Varyings output;
output.positionCS = input.positionCS;
output.texCoord0 = input.interp0.xyzw;
output.color = input.interp1.xyzw;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
// --------------------------------------------------
// Graph
// Graph Properties
CBUFFER_START(UnityPerMaterial)
float _AlphaClipThreshold;
float _ReadAlbedo;
float4 _ParticleMask_TexelSize;
float4 _TilingandOffset;
float4 _ParticleColor;
float4 _ParticleNormal_TexelSize;
float _ParticleNormalScale;
float4 _Mask_Map_TexelSize;
float _AO_multiplier;
float _Smoothness_multiplier;
float Vector1_bab3a2e609c74b6baff7b028a65ce418;
float4 _Emission_Texture_TexelSize;
float4 _Emission_Color;
CBUFFER_END
// Object and Global properties
SAMPLER(SamplerState_Linear_Repeat);
TEXTURE2D(_ParticleMask);
SAMPLER(sampler_ParticleMask);
TEXTURE2D(_ParticleNormal);
SAMPLER(sampler_ParticleNormal);
TEXTURE2D(_Mask_Map);
SAMPLER(sampler_Mask_Map);
TEXTURE2D(_Emission_Texture);
SAMPLER(sampler_Emission_Texture);
// Graph Includes
// GraphIncludes: <None>
// -- Property used by ScenePickingPass
#ifdef SCENEPICKINGPASS
float4 _SelectionID;
#endif
// -- Properties used by SceneSelectionPass
#ifdef SCENESELECTIONPASS
int _ObjectId;
int _PassValue;
#endif
// Graph Functions
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_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
{
Out = UV * Tiling + Offset;
}
void Unity_Multiply_float_float(float A, float B, out float Out)
{
Out = A * B;
}
void Unity_Clamp_float4(float4 In, float4 Min, float4 Max, out float4 Out)
{
Out = clamp(In, Min, Max);
}
// Custom interpolators pre vertex
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
// Graph Vertex
struct VertexDescription
{
float3 Position;
float3 Normal;
float3 Tangent;
};
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
{
VertexDescription description = (VertexDescription)0;
description.Position = IN.ObjectSpacePosition;
description.Normal = IN.ObjectSpaceNormal;
description.Tangent = IN.ObjectSpaceTangent;
return description;
}
// Custom interpolators, pre surface
#ifdef FEATURES_GRAPH_VERTEX
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
{
return output;
}
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
#endif
// Graph Pixel
struct SurfaceDescription
{
float Alpha;
float AlphaClipThreshold;
};
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
{
SurfaceDescription surface = (SurfaceDescription)0;
float4 _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0 = _ParticleColor;
float _Split_4d25adc154b2cd889bea31041dc0b8bd_R_1 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[0];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_G_2 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[1];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_B_3 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[2];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_A_4 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[3];
UnityTexture2D _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0 = UnityBuildTexture2DStructNoScale(_ParticleMask);
float4 _UV_85147850253e5a80b9d2c8ddf437e4da_Out_0 = IN.uv0;
float4 _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0 = _TilingandOffset;
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[0];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[1];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[2];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[3];
float4 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4;
float3 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5;
float2 _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1, _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2, 0, 0, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5, _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6);
float4 _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4;
float3 _Combine_75591f92a94419868e344fd5de21bb70_RGB_5;
float2 _Combine_75591f92a94419868e344fd5de21bb70_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3, _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4, 0, 0, _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4, _Combine_75591f92a94419868e344fd5de21bb70_RGB_5, _Combine_75591f92a94419868e344fd5de21bb70_RG_6);
float2 _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3;
Unity_TilingAndOffset_float((_UV_85147850253e5a80b9d2c8ddf437e4da_Out_0.xy), _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6, _Combine_75591f92a94419868e344fd5de21bb70_RG_6, _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3);
float4 _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0 = SAMPLE_TEXTURE2D(_Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.tex, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.samplerstate, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_R_4 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.r;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_G_5 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.g;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_B_6 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.b;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.a;
float _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2;
Unity_Multiply_float_float(_Split_4d25adc154b2cd889bea31041dc0b8bd_A_4, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7, _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2);
float4 _Clamp_40a04c92716b499d87e45494624e46af_Out_3;
Unity_Clamp_float4(IN.VertexColor, float4(0, 0, 0, 0), float4(1, 1, 1, 1), _Clamp_40a04c92716b499d87e45494624e46af_Out_3);
float _Split_12920bdaccef158ab9bd191cc9e45c04_R_1 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[0];
float _Split_12920bdaccef158ab9bd191cc9e45c04_G_2 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[1];
float _Split_12920bdaccef158ab9bd191cc9e45c04_B_3 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[2];
float _Split_12920bdaccef158ab9bd191cc9e45c04_A_4 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[3];
float _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
Unity_Multiply_float_float(_Multiply_adbe396b9120628ea1a79eee1222a007_Out_2, _Split_12920bdaccef158ab9bd191cc9e45c04_A_4, _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2);
float _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0 = _AlphaClipThreshold;
surface.Alpha = _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
surface.AlphaClipThreshold = _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0;
return surface;
}
// --------------------------------------------------
// Build Graph Inputs
#ifdef HAVE_VFX_MODIFICATION
#define VFX_SRP_ATTRIBUTES Attributes
#define VFX_SRP_VARYINGS Varyings
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
#endif
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
{
VertexDescriptionInputs output;
ZERO_INITIALIZE(VertexDescriptionInputs, output);
output.ObjectSpaceNormal = input.normalOS;
output.ObjectSpaceTangent = input.tangentOS.xyz;
output.ObjectSpacePosition = input.positionOS;
return output;
}
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
{
SurfaceDescriptionInputs output;
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
#ifdef HAVE_VFX_MODIFICATION
// FragInputs from VFX come from two places: Interpolator or CBuffer.
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
#endif
output.uv0 = input.texCoord0;
output.VertexColor = input.color;
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
#else
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
#endif
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
return output;
}
// --------------------------------------------------
// Main
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/SelectionPickingPass.hlsl"
// --------------------------------------------------
// Visual Effect Vertex Invocations
#ifdef HAVE_VFX_MODIFICATION
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
#endif
ENDHLSL
}
Pass
{
// Name: <None>
Tags
{
"LightMode" = "Universal2D"
}
// Render State
Cull [_Cull]
Blend [_SrcBlend] [_DstBlend]
ZTest [_ZTest]
ZWrite [_ZWrite]
// Debug
// <None>
// --------------------------------------------------
// Pass
HLSLPROGRAM
// Pragmas
#pragma target 4.5
#pragma exclude_renderers gles gles3 glcore
#pragma vertex vert
#pragma fragment frag
// DotsInstancingOptions: <None>
// HybridV1InjectedBuiltinProperties: <None>
// Keywords
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
// GraphKeywords: <None>
// Defines
#define _NORMALMAP 1
#define _NORMAL_DROPOFF_TS 1
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define ATTRIBUTES_NEED_TEXCOORD0
#define ATTRIBUTES_NEED_COLOR
#define VARYINGS_NEED_TEXCOORD0
#define VARYINGS_NEED_COLOR
#define FEATURES_GRAPH_VERTEX
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
#define SHADERPASS SHADERPASS_2D
/* WARNING: $splice Could not find named fragment 'DotsInstancingVars' */
// custom interpolator pre-include
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
// Includes
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
// --------------------------------------------------
// Structs and Packing
// custom interpolators pre packing
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
struct Attributes
{
float3 positionOS : POSITION;
float3 normalOS : NORMAL;
float4 tangentOS : TANGENT;
float4 uv0 : TEXCOORD0;
float4 color : COLOR;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : INSTANCEID_SEMANTIC;
#endif
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float4 texCoord0;
float4 color;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
struct SurfaceDescriptionInputs
{
float4 uv0;
float4 VertexColor;
};
struct VertexDescriptionInputs
{
float3 ObjectSpaceNormal;
float3 ObjectSpaceTangent;
float3 ObjectSpacePosition;
};
struct PackedVaryings
{
float4 positionCS : SV_POSITION;
float4 interp0 : INTERP0;
float4 interp1 : INTERP1;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
PackedVaryings PackVaryings (Varyings input)
{
PackedVaryings output;
ZERO_INITIALIZE(PackedVaryings, output);
output.positionCS = input.positionCS;
output.interp0.xyzw = input.texCoord0;
output.interp1.xyzw = input.color;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
Varyings UnpackVaryings (PackedVaryings input)
{
Varyings output;
output.positionCS = input.positionCS;
output.texCoord0 = input.interp0.xyzw;
output.color = input.interp1.xyzw;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
// --------------------------------------------------
// Graph
// Graph Properties
CBUFFER_START(UnityPerMaterial)
float _AlphaClipThreshold;
float _ReadAlbedo;
float4 _ParticleMask_TexelSize;
float4 _TilingandOffset;
float4 _ParticleColor;
float4 _ParticleNormal_TexelSize;
float _ParticleNormalScale;
float4 _Mask_Map_TexelSize;
float _AO_multiplier;
float _Smoothness_multiplier;
float Vector1_bab3a2e609c74b6baff7b028a65ce418;
float4 _Emission_Texture_TexelSize;
float4 _Emission_Color;
CBUFFER_END
// Object and Global properties
SAMPLER(SamplerState_Linear_Repeat);
TEXTURE2D(_ParticleMask);
SAMPLER(sampler_ParticleMask);
TEXTURE2D(_ParticleNormal);
SAMPLER(sampler_ParticleNormal);
TEXTURE2D(_Mask_Map);
SAMPLER(sampler_Mask_Map);
TEXTURE2D(_Emission_Texture);
SAMPLER(sampler_Emission_Texture);
// Graph Includes
// GraphIncludes: <None>
// -- Property used by ScenePickingPass
#ifdef SCENEPICKINGPASS
float4 _SelectionID;
#endif
// -- Properties used by SceneSelectionPass
#ifdef SCENESELECTIONPASS
int _ObjectId;
int _PassValue;
#endif
// Graph Functions
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_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
{
Out = UV * Tiling + Offset;
}
void Unity_Multiply_float4_float4(float4 A, float4 B, out float4 Out)
{
Out = A * B;
}
void Unity_Branch_float4(float Predicate, float4 True, float4 False, out float4 Out)
{
Out = Predicate ? True : False;
}
void Unity_Clamp_float4(float4 In, float4 Min, float4 Max, out float4 Out)
{
Out = clamp(In, Min, Max);
}
void Unity_Multiply_float_float(float A, float B, out float Out)
{
Out = A * B;
}
// Custom interpolators pre vertex
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
// Graph Vertex
struct VertexDescription
{
float3 Position;
float3 Normal;
float3 Tangent;
};
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
{
VertexDescription description = (VertexDescription)0;
description.Position = IN.ObjectSpacePosition;
description.Normal = IN.ObjectSpaceNormal;
description.Tangent = IN.ObjectSpaceTangent;
return description;
}
// Custom interpolators, pre surface
#ifdef FEATURES_GRAPH_VERTEX
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
{
return output;
}
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
#endif
// Graph Pixel
struct SurfaceDescription
{
float3 BaseColor;
float Alpha;
float AlphaClipThreshold;
};
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
{
SurfaceDescription surface = (SurfaceDescription)0;
float _Property_b4e0c30cf01756839030a5167b089dc6_Out_0 = _ReadAlbedo;
float4 _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0 = _ParticleColor;
UnityTexture2D _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0 = UnityBuildTexture2DStructNoScale(_ParticleMask);
float4 _UV_85147850253e5a80b9d2c8ddf437e4da_Out_0 = IN.uv0;
float4 _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0 = _TilingandOffset;
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[0];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[1];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[2];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[3];
float4 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4;
float3 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5;
float2 _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1, _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2, 0, 0, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5, _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6);
float4 _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4;
float3 _Combine_75591f92a94419868e344fd5de21bb70_RGB_5;
float2 _Combine_75591f92a94419868e344fd5de21bb70_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3, _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4, 0, 0, _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4, _Combine_75591f92a94419868e344fd5de21bb70_RGB_5, _Combine_75591f92a94419868e344fd5de21bb70_RG_6);
float2 _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3;
Unity_TilingAndOffset_float((_UV_85147850253e5a80b9d2c8ddf437e4da_Out_0.xy), _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6, _Combine_75591f92a94419868e344fd5de21bb70_RG_6, _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3);
float4 _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0 = SAMPLE_TEXTURE2D(_Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.tex, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.samplerstate, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_R_4 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.r;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_G_5 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.g;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_B_6 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.b;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.a;
float4 _Multiply_ffed7e4d201e2e86974f2cc3d88026b2_Out_2;
Unity_Multiply_float4_float4(_Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0, _Multiply_ffed7e4d201e2e86974f2cc3d88026b2_Out_2);
float4 _Branch_ef8236ada61be1869b3278db6ae02537_Out_3;
Unity_Branch_float4(_Property_b4e0c30cf01756839030a5167b089dc6_Out_0, _Multiply_ffed7e4d201e2e86974f2cc3d88026b2_Out_2, _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0, _Branch_ef8236ada61be1869b3278db6ae02537_Out_3);
float4 _Clamp_40a04c92716b499d87e45494624e46af_Out_3;
Unity_Clamp_float4(IN.VertexColor, float4(0, 0, 0, 0), float4(1, 1, 1, 1), _Clamp_40a04c92716b499d87e45494624e46af_Out_3);
float4 _Multiply_3c7c94a1a6e2c08786b9b70a13b426fa_Out_2;
Unity_Multiply_float4_float4(_Branch_ef8236ada61be1869b3278db6ae02537_Out_3, _Clamp_40a04c92716b499d87e45494624e46af_Out_3, _Multiply_3c7c94a1a6e2c08786b9b70a13b426fa_Out_2);
float _Split_4d25adc154b2cd889bea31041dc0b8bd_R_1 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[0];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_G_2 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[1];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_B_3 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[2];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_A_4 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[3];
float _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2;
Unity_Multiply_float_float(_Split_4d25adc154b2cd889bea31041dc0b8bd_A_4, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7, _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2);
float _Split_12920bdaccef158ab9bd191cc9e45c04_R_1 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[0];
float _Split_12920bdaccef158ab9bd191cc9e45c04_G_2 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[1];
float _Split_12920bdaccef158ab9bd191cc9e45c04_B_3 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[2];
float _Split_12920bdaccef158ab9bd191cc9e45c04_A_4 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[3];
float _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
Unity_Multiply_float_float(_Multiply_adbe396b9120628ea1a79eee1222a007_Out_2, _Split_12920bdaccef158ab9bd191cc9e45c04_A_4, _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2);
float _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0 = _AlphaClipThreshold;
surface.BaseColor = (_Multiply_3c7c94a1a6e2c08786b9b70a13b426fa_Out_2.xyz);
surface.Alpha = _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
surface.AlphaClipThreshold = _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0;
return surface;
}
// --------------------------------------------------
// Build Graph Inputs
#ifdef HAVE_VFX_MODIFICATION
#define VFX_SRP_ATTRIBUTES Attributes
#define VFX_SRP_VARYINGS Varyings
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
#endif
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
{
VertexDescriptionInputs output;
ZERO_INITIALIZE(VertexDescriptionInputs, output);
output.ObjectSpaceNormal = input.normalOS;
output.ObjectSpaceTangent = input.tangentOS.xyz;
output.ObjectSpacePosition = input.positionOS;
return output;
}
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
{
SurfaceDescriptionInputs output;
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
#ifdef HAVE_VFX_MODIFICATION
// FragInputs from VFX come from two places: Interpolator or CBuffer.
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
#endif
output.uv0 = input.texCoord0;
output.VertexColor = input.color;
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
#else
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
#endif
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
return output;
}
// --------------------------------------------------
// Main
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/PBR2DPass.hlsl"
// --------------------------------------------------
// Visual Effect Vertex Invocations
#ifdef HAVE_VFX_MODIFICATION
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
#endif
ENDHLSL
}
}
SubShader
{
Tags
{
"RenderPipeline"="UniversalPipeline"
"RenderType"="Transparent"
"UniversalMaterialType" = "Lit"
"Queue"="Transparent"
"ShaderGraphShader"="true"
"ShaderGraphTargetId"="UniversalLitSubTarget"
}
Pass
{
Name "Universal Forward"
Tags
{
"LightMode" = "UniversalForward"
}
// Render State
Cull [_Cull]
Blend [_SrcBlend] [_DstBlend]
ZTest [_ZTest]
ZWrite [_ZWrite]
// Debug
// <None>
// --------------------------------------------------
// Pass
HLSLPROGRAM
// Pragmas
#pragma target 2.0
#pragma only_renderers gles gles3 glcore d3d11
#pragma multi_compile_instancing
#pragma multi_compile_fog
#pragma instancing_options renderinglayer
#pragma vertex vert
#pragma fragment frag
// DotsInstancingOptions: <None>
// HybridV1InjectedBuiltinProperties: <None>
// Keywords
#pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION
#pragma multi_compile _ LIGHTMAP_ON
#pragma multi_compile _ DYNAMICLIGHTMAP_ON
#pragma multi_compile _ DIRLIGHTMAP_COMBINED
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN
#pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS
#pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS
#pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING
#pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION
#pragma multi_compile_fragment _ _SHADOWS_SOFT
#pragma multi_compile _ LIGHTMAP_SHADOW_MIXING
#pragma multi_compile _ SHADOWS_SHADOWMASK
#pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
#pragma multi_compile_fragment _ _LIGHT_LAYERS
#pragma multi_compile_fragment _ DEBUG_DISPLAY
#pragma multi_compile_fragment _ _LIGHT_COOKIES
#pragma multi_compile _ _CLUSTERED_RENDERING
#pragma shader_feature_fragment _ _SURFACE_TYPE_TRANSPARENT
#pragma shader_feature_local_fragment _ _ALPHAPREMULTIPLY_ON
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
#pragma shader_feature_local_fragment _ _SPECULAR_SETUP
#pragma shader_feature_local _ _RECEIVE_SHADOWS_OFF
// GraphKeywords: <None>
// Defines
#define _NORMALMAP 1
#define _NORMAL_DROPOFF_TS 1
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define ATTRIBUTES_NEED_TEXCOORD0
#define ATTRIBUTES_NEED_TEXCOORD1
#define ATTRIBUTES_NEED_TEXCOORD2
#define ATTRIBUTES_NEED_COLOR
#define VARYINGS_NEED_POSITION_WS
#define VARYINGS_NEED_NORMAL_WS
#define VARYINGS_NEED_TANGENT_WS
#define VARYINGS_NEED_TEXCOORD0
#define VARYINGS_NEED_COLOR
#define VARYINGS_NEED_VIEWDIRECTION_WS
#define VARYINGS_NEED_FOG_AND_VERTEX_LIGHT
#define VARYINGS_NEED_SHADOW_COORD
#define FEATURES_GRAPH_VERTEX
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
#define SHADERPASS SHADERPASS_FORWARD
#define _FOG_FRAGMENT 1
/* WARNING: $splice Could not find named fragment 'DotsInstancingVars' */
// custom interpolator pre-include
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
// Includes
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
// --------------------------------------------------
// Structs and Packing
// custom interpolators pre packing
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
struct Attributes
{
float3 positionOS : POSITION;
float3 normalOS : NORMAL;
float4 tangentOS : TANGENT;
float4 uv0 : TEXCOORD0;
float4 uv1 : TEXCOORD1;
float4 uv2 : TEXCOORD2;
float4 color : COLOR;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : INSTANCEID_SEMANTIC;
#endif
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float3 positionWS;
float3 normalWS;
float4 tangentWS;
float4 texCoord0;
float4 color;
float3 viewDirectionWS;
#if defined(LIGHTMAP_ON)
float2 staticLightmapUV;
#endif
#if defined(DYNAMICLIGHTMAP_ON)
float2 dynamicLightmapUV;
#endif
#if !defined(LIGHTMAP_ON)
float3 sh;
#endif
float4 fogFactorAndVertexLight;
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
float4 shadowCoord;
#endif
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
struct SurfaceDescriptionInputs
{
float3 TangentSpaceNormal;
float4 uv0;
float4 VertexColor;
};
struct VertexDescriptionInputs
{
float3 ObjectSpaceNormal;
float3 ObjectSpaceTangent;
float3 ObjectSpacePosition;
};
struct PackedVaryings
{
float4 positionCS : SV_POSITION;
float3 interp0 : INTERP0;
float3 interp1 : INTERP1;
float4 interp2 : INTERP2;
float4 interp3 : INTERP3;
float4 interp4 : INTERP4;
float3 interp5 : INTERP5;
float2 interp6 : INTERP6;
float2 interp7 : INTERP7;
float3 interp8 : INTERP8;
float4 interp9 : INTERP9;
float4 interp10 : INTERP10;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
PackedVaryings PackVaryings (Varyings input)
{
PackedVaryings output;
ZERO_INITIALIZE(PackedVaryings, output);
output.positionCS = input.positionCS;
output.interp0.xyz = input.positionWS;
output.interp1.xyz = input.normalWS;
output.interp2.xyzw = input.tangentWS;
output.interp3.xyzw = input.texCoord0;
output.interp4.xyzw = input.color;
output.interp5.xyz = input.viewDirectionWS;
#if defined(LIGHTMAP_ON)
output.interp6.xy = input.staticLightmapUV;
#endif
#if defined(DYNAMICLIGHTMAP_ON)
output.interp7.xy = input.dynamicLightmapUV;
#endif
#if !defined(LIGHTMAP_ON)
output.interp8.xyz = input.sh;
#endif
output.interp9.xyzw = input.fogFactorAndVertexLight;
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
output.interp10.xyzw = input.shadowCoord;
#endif
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
Varyings UnpackVaryings (PackedVaryings input)
{
Varyings output;
output.positionCS = input.positionCS;
output.positionWS = input.interp0.xyz;
output.normalWS = input.interp1.xyz;
output.tangentWS = input.interp2.xyzw;
output.texCoord0 = input.interp3.xyzw;
output.color = input.interp4.xyzw;
output.viewDirectionWS = input.interp5.xyz;
#if defined(LIGHTMAP_ON)
output.staticLightmapUV = input.interp6.xy;
#endif
#if defined(DYNAMICLIGHTMAP_ON)
output.dynamicLightmapUV = input.interp7.xy;
#endif
#if !defined(LIGHTMAP_ON)
output.sh = input.interp8.xyz;
#endif
output.fogFactorAndVertexLight = input.interp9.xyzw;
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
output.shadowCoord = input.interp10.xyzw;
#endif
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
// --------------------------------------------------
// Graph
// Graph Properties
CBUFFER_START(UnityPerMaterial)
float _AlphaClipThreshold;
float _ReadAlbedo;
float4 _ParticleMask_TexelSize;
float4 _TilingandOffset;
float4 _ParticleColor;
float4 _ParticleNormal_TexelSize;
float _ParticleNormalScale;
float4 _Mask_Map_TexelSize;
float _AO_multiplier;
float _Smoothness_multiplier;
float Vector1_bab3a2e609c74b6baff7b028a65ce418;
float4 _Emission_Texture_TexelSize;
float4 _Emission_Color;
CBUFFER_END
// Object and Global properties
SAMPLER(SamplerState_Linear_Repeat);
TEXTURE2D(_ParticleMask);
SAMPLER(sampler_ParticleMask);
TEXTURE2D(_ParticleNormal);
SAMPLER(sampler_ParticleNormal);
TEXTURE2D(_Mask_Map);
SAMPLER(sampler_Mask_Map);
TEXTURE2D(_Emission_Texture);
SAMPLER(sampler_Emission_Texture);
// Graph Includes
// GraphIncludes: <None>
// -- Property used by ScenePickingPass
#ifdef SCENEPICKINGPASS
float4 _SelectionID;
#endif
// -- Properties used by SceneSelectionPass
#ifdef SCENESELECTIONPASS
int _ObjectId;
int _PassValue;
#endif
// Graph Functions
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_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
{
Out = UV * Tiling + Offset;
}
void Unity_Multiply_float4_float4(float4 A, float4 B, out float4 Out)
{
Out = A * B;
}
void Unity_Branch_float4(float Predicate, float4 True, float4 False, out float4 Out)
{
Out = Predicate ? True : False;
}
void Unity_Clamp_float4(float4 In, float4 Min, float4 Max, out float4 Out)
{
Out = clamp(In, Min, Max);
}
void Unity_NormalStrength_float(float3 In, float Strength, out float3 Out)
{
Out = float3(In.rg * Strength, lerp(1, In.b, saturate(Strength)));
}
void Unity_Multiply_float_float(float A, float B, out float Out)
{
Out = A * B;
}
// Custom interpolators pre vertex
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
// Graph Vertex
struct VertexDescription
{
float3 Position;
float3 Normal;
float3 Tangent;
};
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
{
VertexDescription description = (VertexDescription)0;
description.Position = IN.ObjectSpacePosition;
description.Normal = IN.ObjectSpaceNormal;
description.Tangent = IN.ObjectSpaceTangent;
return description;
}
// Custom interpolators, pre surface
#ifdef FEATURES_GRAPH_VERTEX
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
{
return output;
}
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
#endif
// Graph Pixel
struct SurfaceDescription
{
float3 BaseColor;
float3 NormalTS;
float3 Emission;
float Metallic;
float3 Specular;
float Smoothness;
float Occlusion;
float Alpha;
float AlphaClipThreshold;
};
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
{
SurfaceDescription surface = (SurfaceDescription)0;
float _Property_b4e0c30cf01756839030a5167b089dc6_Out_0 = _ReadAlbedo;
float4 _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0 = _ParticleColor;
UnityTexture2D _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0 = UnityBuildTexture2DStructNoScale(_ParticleMask);
float4 _UV_85147850253e5a80b9d2c8ddf437e4da_Out_0 = IN.uv0;
float4 _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0 = _TilingandOffset;
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[0];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[1];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[2];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[3];
float4 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4;
float3 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5;
float2 _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1, _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2, 0, 0, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5, _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6);
float4 _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4;
float3 _Combine_75591f92a94419868e344fd5de21bb70_RGB_5;
float2 _Combine_75591f92a94419868e344fd5de21bb70_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3, _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4, 0, 0, _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4, _Combine_75591f92a94419868e344fd5de21bb70_RGB_5, _Combine_75591f92a94419868e344fd5de21bb70_RG_6);
float2 _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3;
Unity_TilingAndOffset_float((_UV_85147850253e5a80b9d2c8ddf437e4da_Out_0.xy), _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6, _Combine_75591f92a94419868e344fd5de21bb70_RG_6, _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3);
float4 _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0 = SAMPLE_TEXTURE2D(_Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.tex, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.samplerstate, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_R_4 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.r;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_G_5 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.g;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_B_6 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.b;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.a;
float4 _Multiply_ffed7e4d201e2e86974f2cc3d88026b2_Out_2;
Unity_Multiply_float4_float4(_Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0, _Multiply_ffed7e4d201e2e86974f2cc3d88026b2_Out_2);
float4 _Branch_ef8236ada61be1869b3278db6ae02537_Out_3;
Unity_Branch_float4(_Property_b4e0c30cf01756839030a5167b089dc6_Out_0, _Multiply_ffed7e4d201e2e86974f2cc3d88026b2_Out_2, _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0, _Branch_ef8236ada61be1869b3278db6ae02537_Out_3);
float4 _Clamp_40a04c92716b499d87e45494624e46af_Out_3;
Unity_Clamp_float4(IN.VertexColor, float4(0, 0, 0, 0), float4(1, 1, 1, 1), _Clamp_40a04c92716b499d87e45494624e46af_Out_3);
float4 _Multiply_3c7c94a1a6e2c08786b9b70a13b426fa_Out_2;
Unity_Multiply_float4_float4(_Branch_ef8236ada61be1869b3278db6ae02537_Out_3, _Clamp_40a04c92716b499d87e45494624e46af_Out_3, _Multiply_3c7c94a1a6e2c08786b9b70a13b426fa_Out_2);
UnityTexture2D _Property_47d26322b0cbee809f7bb147ebce9c2b_Out_0 = UnityBuildTexture2DStructNoScale(_ParticleNormal);
float4 _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0 = SAMPLE_TEXTURE2D(_Property_47d26322b0cbee809f7bb147ebce9c2b_Out_0.tex, _Property_47d26322b0cbee809f7bb147ebce9c2b_Out_0.samplerstate, _Property_47d26322b0cbee809f7bb147ebce9c2b_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
_SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.rgb = UnpackNormal(_SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0);
float _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_R_4 = _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.r;
float _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_G_5 = _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.g;
float _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_B_6 = _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.b;
float _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_A_7 = _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.a;
float _Property_9ca212c6c965a284b1795febc12e7aed_Out_0 = _ParticleNormalScale;
float3 _NormalStrength_2012b1b56379248a8afa64fa70f1b999_Out_2;
Unity_NormalStrength_float((_SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.xyz), _Property_9ca212c6c965a284b1795febc12e7aed_Out_0, _NormalStrength_2012b1b56379248a8afa64fa70f1b999_Out_2);
float4 _Property_479229991d5542d796eac0e9def8c2d7_Out_0 = IsGammaSpace() ? LinearToSRGB(_Emission_Color) : _Emission_Color;
UnityTexture2D _Property_62c46c558d8f4d209a7a17877af03aab_Out_0 = UnityBuildTexture2DStructNoScale(_Emission_Texture);
float4 _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0 = SAMPLE_TEXTURE2D(_Property_62c46c558d8f4d209a7a17877af03aab_Out_0.tex, _Property_62c46c558d8f4d209a7a17877af03aab_Out_0.samplerstate, _Property_62c46c558d8f4d209a7a17877af03aab_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_R_4 = _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0.r;
float _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_G_5 = _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0.g;
float _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_B_6 = _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0.b;
float _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_A_7 = _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0.a;
float4 _Multiply_f5ae222b26e245a681d4c4005fdcd9dd_Out_2;
Unity_Multiply_float4_float4(_Property_479229991d5542d796eac0e9def8c2d7_Out_0, _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0, _Multiply_f5ae222b26e245a681d4c4005fdcd9dd_Out_2);
float4 _Multiply_d1894c3787b04ddc9f4316bde9b000ee_Out_2;
Unity_Multiply_float4_float4(_Clamp_40a04c92716b499d87e45494624e46af_Out_3, _Multiply_f5ae222b26e245a681d4c4005fdcd9dd_Out_2, _Multiply_d1894c3787b04ddc9f4316bde9b000ee_Out_2);
UnityTexture2D _Property_b76d286c926943aea555b7bf653aa933_Out_0 = UnityBuildTexture2DStructNoScale(_Mask_Map);
float4 _SampleTexture2D_ce88e50c033044d283deb2776a46204d_RGBA_0 = SAMPLE_TEXTURE2D(_Property_b76d286c926943aea555b7bf653aa933_Out_0.tex, _Property_b76d286c926943aea555b7bf653aa933_Out_0.samplerstate, _Property_b76d286c926943aea555b7bf653aa933_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_ce88e50c033044d283deb2776a46204d_R_4 = _SampleTexture2D_ce88e50c033044d283deb2776a46204d_RGBA_0.r;
float _SampleTexture2D_ce88e50c033044d283deb2776a46204d_G_5 = _SampleTexture2D_ce88e50c033044d283deb2776a46204d_RGBA_0.g;
float _SampleTexture2D_ce88e50c033044d283deb2776a46204d_B_6 = _SampleTexture2D_ce88e50c033044d283deb2776a46204d_RGBA_0.b;
float _SampleTexture2D_ce88e50c033044d283deb2776a46204d_A_7 = _SampleTexture2D_ce88e50c033044d283deb2776a46204d_RGBA_0.a;
float _Property_52a58e015e194cd6827988c464ce8081_Out_0 = Vector1_bab3a2e609c74b6baff7b028a65ce418;
float _Multiply_8146e5f348b44712abf415e139d5de39_Out_2;
Unity_Multiply_float_float(_SampleTexture2D_ce88e50c033044d283deb2776a46204d_R_4, _Property_52a58e015e194cd6827988c464ce8081_Out_0, _Multiply_8146e5f348b44712abf415e139d5de39_Out_2);
float _Property_0f0d790c7ab2432eae4a03f04d7490c8_Out_0 = _Smoothness_multiplier;
float _Multiply_e36c6ff9e74a4e81bcfd131039b673f6_Out_2;
Unity_Multiply_float_float(_SampleTexture2D_ce88e50c033044d283deb2776a46204d_A_7, _Property_0f0d790c7ab2432eae4a03f04d7490c8_Out_0, _Multiply_e36c6ff9e74a4e81bcfd131039b673f6_Out_2);
float _Property_03e8f7eb67bf44c486e74298294a220c_Out_0 = _AO_multiplier;
float _Multiply_fdf1d2924b844055a18446459f70922e_Out_2;
Unity_Multiply_float_float(_SampleTexture2D_ce88e50c033044d283deb2776a46204d_G_5, _Property_03e8f7eb67bf44c486e74298294a220c_Out_0, _Multiply_fdf1d2924b844055a18446459f70922e_Out_2);
float _Split_4d25adc154b2cd889bea31041dc0b8bd_R_1 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[0];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_G_2 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[1];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_B_3 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[2];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_A_4 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[3];
float _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2;
Unity_Multiply_float_float(_Split_4d25adc154b2cd889bea31041dc0b8bd_A_4, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7, _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2);
float _Split_12920bdaccef158ab9bd191cc9e45c04_R_1 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[0];
float _Split_12920bdaccef158ab9bd191cc9e45c04_G_2 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[1];
float _Split_12920bdaccef158ab9bd191cc9e45c04_B_3 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[2];
float _Split_12920bdaccef158ab9bd191cc9e45c04_A_4 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[3];
float _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
Unity_Multiply_float_float(_Multiply_adbe396b9120628ea1a79eee1222a007_Out_2, _Split_12920bdaccef158ab9bd191cc9e45c04_A_4, _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2);
float _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0 = _AlphaClipThreshold;
surface.BaseColor = (_Multiply_3c7c94a1a6e2c08786b9b70a13b426fa_Out_2.xyz);
surface.NormalTS = _NormalStrength_2012b1b56379248a8afa64fa70f1b999_Out_2;
surface.Emission = (_Multiply_d1894c3787b04ddc9f4316bde9b000ee_Out_2.xyz);
surface.Metallic = _Multiply_8146e5f348b44712abf415e139d5de39_Out_2;
surface.Specular = IsGammaSpace() ? float3(0.5, 0.5, 0.5) : SRGBToLinear(float3(0.5, 0.5, 0.5));
surface.Smoothness = _Multiply_e36c6ff9e74a4e81bcfd131039b673f6_Out_2;
surface.Occlusion = _Multiply_fdf1d2924b844055a18446459f70922e_Out_2;
surface.Alpha = _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
surface.AlphaClipThreshold = _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0;
return surface;
}
// --------------------------------------------------
// Build Graph Inputs
#ifdef HAVE_VFX_MODIFICATION
#define VFX_SRP_ATTRIBUTES Attributes
#define VFX_SRP_VARYINGS Varyings
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
#endif
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
{
VertexDescriptionInputs output;
ZERO_INITIALIZE(VertexDescriptionInputs, output);
output.ObjectSpaceNormal = input.normalOS;
output.ObjectSpaceTangent = input.tangentOS.xyz;
output.ObjectSpacePosition = input.positionOS;
return output;
}
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
{
SurfaceDescriptionInputs output;
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
#ifdef HAVE_VFX_MODIFICATION
// FragInputs from VFX come from two places: Interpolator or CBuffer.
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
#endif
output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
output.uv0 = input.texCoord0;
output.VertexColor = input.color;
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
#else
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
#endif
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
return output;
}
// --------------------------------------------------
// Main
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/PBRForwardPass.hlsl"
// --------------------------------------------------
// Visual Effect Vertex Invocations
#ifdef HAVE_VFX_MODIFICATION
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
#endif
ENDHLSL
}
Pass
{
Name "ShadowCaster"
Tags
{
"LightMode" = "ShadowCaster"
}
// Render State
Cull [_Cull]
ZTest LEqual
ZWrite On
ColorMask 0
// Debug
// <None>
// --------------------------------------------------
// Pass
HLSLPROGRAM
// Pragmas
#pragma target 2.0
#pragma only_renderers gles gles3 glcore d3d11
#pragma multi_compile_instancing
#pragma vertex vert
#pragma fragment frag
// DotsInstancingOptions: <None>
// HybridV1InjectedBuiltinProperties: <None>
// Keywords
#pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
// GraphKeywords: <None>
// Defines
#define _NORMALMAP 1
#define _NORMAL_DROPOFF_TS 1
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define ATTRIBUTES_NEED_TEXCOORD0
#define ATTRIBUTES_NEED_COLOR
#define VARYINGS_NEED_NORMAL_WS
#define VARYINGS_NEED_TEXCOORD0
#define VARYINGS_NEED_COLOR
#define FEATURES_GRAPH_VERTEX
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
#define SHADERPASS SHADERPASS_SHADOWCASTER
/* WARNING: $splice Could not find named fragment 'DotsInstancingVars' */
// custom interpolator pre-include
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
// Includes
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
// --------------------------------------------------
// Structs and Packing
// custom interpolators pre packing
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
struct Attributes
{
float3 positionOS : POSITION;
float3 normalOS : NORMAL;
float4 tangentOS : TANGENT;
float4 uv0 : TEXCOORD0;
float4 color : COLOR;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : INSTANCEID_SEMANTIC;
#endif
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float3 normalWS;
float4 texCoord0;
float4 color;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
struct SurfaceDescriptionInputs
{
float4 uv0;
float4 VertexColor;
};
struct VertexDescriptionInputs
{
float3 ObjectSpaceNormal;
float3 ObjectSpaceTangent;
float3 ObjectSpacePosition;
};
struct PackedVaryings
{
float4 positionCS : SV_POSITION;
float3 interp0 : INTERP0;
float4 interp1 : INTERP1;
float4 interp2 : INTERP2;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
PackedVaryings PackVaryings (Varyings input)
{
PackedVaryings output;
ZERO_INITIALIZE(PackedVaryings, output);
output.positionCS = input.positionCS;
output.interp0.xyz = input.normalWS;
output.interp1.xyzw = input.texCoord0;
output.interp2.xyzw = input.color;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
Varyings UnpackVaryings (PackedVaryings input)
{
Varyings output;
output.positionCS = input.positionCS;
output.normalWS = input.interp0.xyz;
output.texCoord0 = input.interp1.xyzw;
output.color = input.interp2.xyzw;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
// --------------------------------------------------
// Graph
// Graph Properties
CBUFFER_START(UnityPerMaterial)
float _AlphaClipThreshold;
float _ReadAlbedo;
float4 _ParticleMask_TexelSize;
float4 _TilingandOffset;
float4 _ParticleColor;
float4 _ParticleNormal_TexelSize;
float _ParticleNormalScale;
float4 _Mask_Map_TexelSize;
float _AO_multiplier;
float _Smoothness_multiplier;
float Vector1_bab3a2e609c74b6baff7b028a65ce418;
float4 _Emission_Texture_TexelSize;
float4 _Emission_Color;
CBUFFER_END
// Object and Global properties
SAMPLER(SamplerState_Linear_Repeat);
TEXTURE2D(_ParticleMask);
SAMPLER(sampler_ParticleMask);
TEXTURE2D(_ParticleNormal);
SAMPLER(sampler_ParticleNormal);
TEXTURE2D(_Mask_Map);
SAMPLER(sampler_Mask_Map);
TEXTURE2D(_Emission_Texture);
SAMPLER(sampler_Emission_Texture);
// Graph Includes
// GraphIncludes: <None>
// -- Property used by ScenePickingPass
#ifdef SCENEPICKINGPASS
float4 _SelectionID;
#endif
// -- Properties used by SceneSelectionPass
#ifdef SCENESELECTIONPASS
int _ObjectId;
int _PassValue;
#endif
// Graph Functions
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_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
{
Out = UV * Tiling + Offset;
}
void Unity_Multiply_float_float(float A, float B, out float Out)
{
Out = A * B;
}
void Unity_Clamp_float4(float4 In, float4 Min, float4 Max, out float4 Out)
{
Out = clamp(In, Min, Max);
}
// Custom interpolators pre vertex
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
// Graph Vertex
struct VertexDescription
{
float3 Position;
float3 Normal;
float3 Tangent;
};
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
{
VertexDescription description = (VertexDescription)0;
description.Position = IN.ObjectSpacePosition;
description.Normal = IN.ObjectSpaceNormal;
description.Tangent = IN.ObjectSpaceTangent;
return description;
}
// Custom interpolators, pre surface
#ifdef FEATURES_GRAPH_VERTEX
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
{
return output;
}
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
#endif
// Graph Pixel
struct SurfaceDescription
{
float Alpha;
float AlphaClipThreshold;
};
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
{
SurfaceDescription surface = (SurfaceDescription)0;
float4 _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0 = _ParticleColor;
float _Split_4d25adc154b2cd889bea31041dc0b8bd_R_1 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[0];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_G_2 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[1];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_B_3 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[2];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_A_4 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[3];
UnityTexture2D _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0 = UnityBuildTexture2DStructNoScale(_ParticleMask);
float4 _UV_85147850253e5a80b9d2c8ddf437e4da_Out_0 = IN.uv0;
float4 _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0 = _TilingandOffset;
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[0];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[1];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[2];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[3];
float4 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4;
float3 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5;
float2 _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1, _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2, 0, 0, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5, _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6);
float4 _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4;
float3 _Combine_75591f92a94419868e344fd5de21bb70_RGB_5;
float2 _Combine_75591f92a94419868e344fd5de21bb70_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3, _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4, 0, 0, _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4, _Combine_75591f92a94419868e344fd5de21bb70_RGB_5, _Combine_75591f92a94419868e344fd5de21bb70_RG_6);
float2 _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3;
Unity_TilingAndOffset_float((_UV_85147850253e5a80b9d2c8ddf437e4da_Out_0.xy), _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6, _Combine_75591f92a94419868e344fd5de21bb70_RG_6, _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3);
float4 _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0 = SAMPLE_TEXTURE2D(_Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.tex, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.samplerstate, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_R_4 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.r;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_G_5 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.g;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_B_6 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.b;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.a;
float _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2;
Unity_Multiply_float_float(_Split_4d25adc154b2cd889bea31041dc0b8bd_A_4, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7, _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2);
float4 _Clamp_40a04c92716b499d87e45494624e46af_Out_3;
Unity_Clamp_float4(IN.VertexColor, float4(0, 0, 0, 0), float4(1, 1, 1, 1), _Clamp_40a04c92716b499d87e45494624e46af_Out_3);
float _Split_12920bdaccef158ab9bd191cc9e45c04_R_1 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[0];
float _Split_12920bdaccef158ab9bd191cc9e45c04_G_2 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[1];
float _Split_12920bdaccef158ab9bd191cc9e45c04_B_3 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[2];
float _Split_12920bdaccef158ab9bd191cc9e45c04_A_4 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[3];
float _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
Unity_Multiply_float_float(_Multiply_adbe396b9120628ea1a79eee1222a007_Out_2, _Split_12920bdaccef158ab9bd191cc9e45c04_A_4, _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2);
float _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0 = _AlphaClipThreshold;
surface.Alpha = _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
surface.AlphaClipThreshold = _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0;
return surface;
}
// --------------------------------------------------
// Build Graph Inputs
#ifdef HAVE_VFX_MODIFICATION
#define VFX_SRP_ATTRIBUTES Attributes
#define VFX_SRP_VARYINGS Varyings
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
#endif
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
{
VertexDescriptionInputs output;
ZERO_INITIALIZE(VertexDescriptionInputs, output);
output.ObjectSpaceNormal = input.normalOS;
output.ObjectSpaceTangent = input.tangentOS.xyz;
output.ObjectSpacePosition = input.positionOS;
return output;
}
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
{
SurfaceDescriptionInputs output;
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
#ifdef HAVE_VFX_MODIFICATION
// FragInputs from VFX come from two places: Interpolator or CBuffer.
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
#endif
output.uv0 = input.texCoord0;
output.VertexColor = input.color;
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
#else
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
#endif
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
return output;
}
// --------------------------------------------------
// Main
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShadowCasterPass.hlsl"
// --------------------------------------------------
// Visual Effect Vertex Invocations
#ifdef HAVE_VFX_MODIFICATION
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
#endif
ENDHLSL
}
Pass
{
Name "DepthOnly"
Tags
{
"LightMode" = "DepthOnly"
}
// Render State
Cull [_Cull]
ZTest LEqual
ZWrite On
ColorMask 0
// Debug
// <None>
// --------------------------------------------------
// Pass
HLSLPROGRAM
// Pragmas
#pragma target 2.0
#pragma only_renderers gles gles3 glcore d3d11
#pragma multi_compile_instancing
#pragma vertex vert
#pragma fragment frag
// DotsInstancingOptions: <None>
// HybridV1InjectedBuiltinProperties: <None>
// Keywords
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
// GraphKeywords: <None>
// Defines
#define _NORMALMAP 1
#define _NORMAL_DROPOFF_TS 1
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define ATTRIBUTES_NEED_TEXCOORD0
#define ATTRIBUTES_NEED_COLOR
#define VARYINGS_NEED_TEXCOORD0
#define VARYINGS_NEED_COLOR
#define FEATURES_GRAPH_VERTEX
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
#define SHADERPASS SHADERPASS_DEPTHONLY
/* WARNING: $splice Could not find named fragment 'DotsInstancingVars' */
// custom interpolator pre-include
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
// Includes
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
// --------------------------------------------------
// Structs and Packing
// custom interpolators pre packing
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
struct Attributes
{
float3 positionOS : POSITION;
float3 normalOS : NORMAL;
float4 tangentOS : TANGENT;
float4 uv0 : TEXCOORD0;
float4 color : COLOR;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : INSTANCEID_SEMANTIC;
#endif
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float4 texCoord0;
float4 color;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
struct SurfaceDescriptionInputs
{
float4 uv0;
float4 VertexColor;
};
struct VertexDescriptionInputs
{
float3 ObjectSpaceNormal;
float3 ObjectSpaceTangent;
float3 ObjectSpacePosition;
};
struct PackedVaryings
{
float4 positionCS : SV_POSITION;
float4 interp0 : INTERP0;
float4 interp1 : INTERP1;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
PackedVaryings PackVaryings (Varyings input)
{
PackedVaryings output;
ZERO_INITIALIZE(PackedVaryings, output);
output.positionCS = input.positionCS;
output.interp0.xyzw = input.texCoord0;
output.interp1.xyzw = input.color;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
Varyings UnpackVaryings (PackedVaryings input)
{
Varyings output;
output.positionCS = input.positionCS;
output.texCoord0 = input.interp0.xyzw;
output.color = input.interp1.xyzw;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
// --------------------------------------------------
// Graph
// Graph Properties
CBUFFER_START(UnityPerMaterial)
float _AlphaClipThreshold;
float _ReadAlbedo;
float4 _ParticleMask_TexelSize;
float4 _TilingandOffset;
float4 _ParticleColor;
float4 _ParticleNormal_TexelSize;
float _ParticleNormalScale;
float4 _Mask_Map_TexelSize;
float _AO_multiplier;
float _Smoothness_multiplier;
float Vector1_bab3a2e609c74b6baff7b028a65ce418;
float4 _Emission_Texture_TexelSize;
float4 _Emission_Color;
CBUFFER_END
// Object and Global properties
SAMPLER(SamplerState_Linear_Repeat);
TEXTURE2D(_ParticleMask);
SAMPLER(sampler_ParticleMask);
TEXTURE2D(_ParticleNormal);
SAMPLER(sampler_ParticleNormal);
TEXTURE2D(_Mask_Map);
SAMPLER(sampler_Mask_Map);
TEXTURE2D(_Emission_Texture);
SAMPLER(sampler_Emission_Texture);
// Graph Includes
// GraphIncludes: <None>
// -- Property used by ScenePickingPass
#ifdef SCENEPICKINGPASS
float4 _SelectionID;
#endif
// -- Properties used by SceneSelectionPass
#ifdef SCENESELECTIONPASS
int _ObjectId;
int _PassValue;
#endif
// Graph Functions
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_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
{
Out = UV * Tiling + Offset;
}
void Unity_Multiply_float_float(float A, float B, out float Out)
{
Out = A * B;
}
void Unity_Clamp_float4(float4 In, float4 Min, float4 Max, out float4 Out)
{
Out = clamp(In, Min, Max);
}
// Custom interpolators pre vertex
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
// Graph Vertex
struct VertexDescription
{
float3 Position;
float3 Normal;
float3 Tangent;
};
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
{
VertexDescription description = (VertexDescription)0;
description.Position = IN.ObjectSpacePosition;
description.Normal = IN.ObjectSpaceNormal;
description.Tangent = IN.ObjectSpaceTangent;
return description;
}
// Custom interpolators, pre surface
#ifdef FEATURES_GRAPH_VERTEX
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
{
return output;
}
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
#endif
// Graph Pixel
struct SurfaceDescription
{
float Alpha;
float AlphaClipThreshold;
};
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
{
SurfaceDescription surface = (SurfaceDescription)0;
float4 _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0 = _ParticleColor;
float _Split_4d25adc154b2cd889bea31041dc0b8bd_R_1 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[0];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_G_2 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[1];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_B_3 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[2];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_A_4 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[3];
UnityTexture2D _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0 = UnityBuildTexture2DStructNoScale(_ParticleMask);
float4 _UV_85147850253e5a80b9d2c8ddf437e4da_Out_0 = IN.uv0;
float4 _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0 = _TilingandOffset;
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[0];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[1];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[2];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[3];
float4 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4;
float3 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5;
float2 _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1, _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2, 0, 0, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5, _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6);
float4 _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4;
float3 _Combine_75591f92a94419868e344fd5de21bb70_RGB_5;
float2 _Combine_75591f92a94419868e344fd5de21bb70_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3, _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4, 0, 0, _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4, _Combine_75591f92a94419868e344fd5de21bb70_RGB_5, _Combine_75591f92a94419868e344fd5de21bb70_RG_6);
float2 _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3;
Unity_TilingAndOffset_float((_UV_85147850253e5a80b9d2c8ddf437e4da_Out_0.xy), _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6, _Combine_75591f92a94419868e344fd5de21bb70_RG_6, _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3);
float4 _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0 = SAMPLE_TEXTURE2D(_Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.tex, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.samplerstate, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_R_4 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.r;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_G_5 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.g;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_B_6 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.b;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.a;
float _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2;
Unity_Multiply_float_float(_Split_4d25adc154b2cd889bea31041dc0b8bd_A_4, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7, _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2);
float4 _Clamp_40a04c92716b499d87e45494624e46af_Out_3;
Unity_Clamp_float4(IN.VertexColor, float4(0, 0, 0, 0), float4(1, 1, 1, 1), _Clamp_40a04c92716b499d87e45494624e46af_Out_3);
float _Split_12920bdaccef158ab9bd191cc9e45c04_R_1 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[0];
float _Split_12920bdaccef158ab9bd191cc9e45c04_G_2 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[1];
float _Split_12920bdaccef158ab9bd191cc9e45c04_B_3 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[2];
float _Split_12920bdaccef158ab9bd191cc9e45c04_A_4 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[3];
float _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
Unity_Multiply_float_float(_Multiply_adbe396b9120628ea1a79eee1222a007_Out_2, _Split_12920bdaccef158ab9bd191cc9e45c04_A_4, _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2);
float _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0 = _AlphaClipThreshold;
surface.Alpha = _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
surface.AlphaClipThreshold = _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0;
return surface;
}
// --------------------------------------------------
// Build Graph Inputs
#ifdef HAVE_VFX_MODIFICATION
#define VFX_SRP_ATTRIBUTES Attributes
#define VFX_SRP_VARYINGS Varyings
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
#endif
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
{
VertexDescriptionInputs output;
ZERO_INITIALIZE(VertexDescriptionInputs, output);
output.ObjectSpaceNormal = input.normalOS;
output.ObjectSpaceTangent = input.tangentOS.xyz;
output.ObjectSpacePosition = input.positionOS;
return output;
}
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
{
SurfaceDescriptionInputs output;
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
#ifdef HAVE_VFX_MODIFICATION
// FragInputs from VFX come from two places: Interpolator or CBuffer.
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
#endif
output.uv0 = input.texCoord0;
output.VertexColor = input.color;
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
#else
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
#endif
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
return output;
}
// --------------------------------------------------
// Main
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/DepthOnlyPass.hlsl"
// --------------------------------------------------
// Visual Effect Vertex Invocations
#ifdef HAVE_VFX_MODIFICATION
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
#endif
ENDHLSL
}
Pass
{
Name "DepthNormals"
Tags
{
"LightMode" = "DepthNormals"
}
// Render State
Cull [_Cull]
ZTest LEqual
ZWrite On
// Debug
// <None>
// --------------------------------------------------
// Pass
HLSLPROGRAM
// Pragmas
#pragma target 2.0
#pragma only_renderers gles gles3 glcore d3d11
#pragma multi_compile_instancing
#pragma vertex vert
#pragma fragment frag
// DotsInstancingOptions: <None>
// HybridV1InjectedBuiltinProperties: <None>
// Keywords
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
// GraphKeywords: <None>
// Defines
#define _NORMALMAP 1
#define _NORMAL_DROPOFF_TS 1
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define ATTRIBUTES_NEED_TEXCOORD0
#define ATTRIBUTES_NEED_TEXCOORD1
#define ATTRIBUTES_NEED_COLOR
#define VARYINGS_NEED_NORMAL_WS
#define VARYINGS_NEED_TANGENT_WS
#define VARYINGS_NEED_TEXCOORD0
#define VARYINGS_NEED_COLOR
#define FEATURES_GRAPH_VERTEX
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
#define SHADERPASS SHADERPASS_DEPTHNORMALS
/* WARNING: $splice Could not find named fragment 'DotsInstancingVars' */
// custom interpolator pre-include
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
// Includes
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
// --------------------------------------------------
// Structs and Packing
// custom interpolators pre packing
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
struct Attributes
{
float3 positionOS : POSITION;
float3 normalOS : NORMAL;
float4 tangentOS : TANGENT;
float4 uv0 : TEXCOORD0;
float4 uv1 : TEXCOORD1;
float4 color : COLOR;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : INSTANCEID_SEMANTIC;
#endif
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float3 normalWS;
float4 tangentWS;
float4 texCoord0;
float4 color;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
struct SurfaceDescriptionInputs
{
float3 TangentSpaceNormal;
float4 uv0;
float4 VertexColor;
};
struct VertexDescriptionInputs
{
float3 ObjectSpaceNormal;
float3 ObjectSpaceTangent;
float3 ObjectSpacePosition;
};
struct PackedVaryings
{
float4 positionCS : SV_POSITION;
float3 interp0 : INTERP0;
float4 interp1 : INTERP1;
float4 interp2 : INTERP2;
float4 interp3 : INTERP3;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
PackedVaryings PackVaryings (Varyings input)
{
PackedVaryings output;
ZERO_INITIALIZE(PackedVaryings, output);
output.positionCS = input.positionCS;
output.interp0.xyz = input.normalWS;
output.interp1.xyzw = input.tangentWS;
output.interp2.xyzw = input.texCoord0;
output.interp3.xyzw = input.color;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
Varyings UnpackVaryings (PackedVaryings input)
{
Varyings output;
output.positionCS = input.positionCS;
output.normalWS = input.interp0.xyz;
output.tangentWS = input.interp1.xyzw;
output.texCoord0 = input.interp2.xyzw;
output.color = input.interp3.xyzw;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
// --------------------------------------------------
// Graph
// Graph Properties
CBUFFER_START(UnityPerMaterial)
float _AlphaClipThreshold;
float _ReadAlbedo;
float4 _ParticleMask_TexelSize;
float4 _TilingandOffset;
float4 _ParticleColor;
float4 _ParticleNormal_TexelSize;
float _ParticleNormalScale;
float4 _Mask_Map_TexelSize;
float _AO_multiplier;
float _Smoothness_multiplier;
float Vector1_bab3a2e609c74b6baff7b028a65ce418;
float4 _Emission_Texture_TexelSize;
float4 _Emission_Color;
CBUFFER_END
// Object and Global properties
SAMPLER(SamplerState_Linear_Repeat);
TEXTURE2D(_ParticleMask);
SAMPLER(sampler_ParticleMask);
TEXTURE2D(_ParticleNormal);
SAMPLER(sampler_ParticleNormal);
TEXTURE2D(_Mask_Map);
SAMPLER(sampler_Mask_Map);
TEXTURE2D(_Emission_Texture);
SAMPLER(sampler_Emission_Texture);
// Graph Includes
// GraphIncludes: <None>
// -- Property used by ScenePickingPass
#ifdef SCENEPICKINGPASS
float4 _SelectionID;
#endif
// -- Properties used by SceneSelectionPass
#ifdef SCENESELECTIONPASS
int _ObjectId;
int _PassValue;
#endif
// Graph Functions
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_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
{
Out = UV * Tiling + Offset;
}
void Unity_NormalStrength_float(float3 In, float Strength, out float3 Out)
{
Out = float3(In.rg * Strength, lerp(1, In.b, saturate(Strength)));
}
void Unity_Multiply_float_float(float A, float B, out float Out)
{
Out = A * B;
}
void Unity_Clamp_float4(float4 In, float4 Min, float4 Max, out float4 Out)
{
Out = clamp(In, Min, Max);
}
// Custom interpolators pre vertex
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
// Graph Vertex
struct VertexDescription
{
float3 Position;
float3 Normal;
float3 Tangent;
};
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
{
VertexDescription description = (VertexDescription)0;
description.Position = IN.ObjectSpacePosition;
description.Normal = IN.ObjectSpaceNormal;
description.Tangent = IN.ObjectSpaceTangent;
return description;
}
// Custom interpolators, pre surface
#ifdef FEATURES_GRAPH_VERTEX
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
{
return output;
}
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
#endif
// Graph Pixel
struct SurfaceDescription
{
float3 NormalTS;
float Alpha;
float AlphaClipThreshold;
};
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
{
SurfaceDescription surface = (SurfaceDescription)0;
UnityTexture2D _Property_47d26322b0cbee809f7bb147ebce9c2b_Out_0 = UnityBuildTexture2DStructNoScale(_ParticleNormal);
float4 _UV_85147850253e5a80b9d2c8ddf437e4da_Out_0 = IN.uv0;
float4 _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0 = _TilingandOffset;
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[0];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[1];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[2];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[3];
float4 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4;
float3 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5;
float2 _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1, _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2, 0, 0, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5, _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6);
float4 _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4;
float3 _Combine_75591f92a94419868e344fd5de21bb70_RGB_5;
float2 _Combine_75591f92a94419868e344fd5de21bb70_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3, _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4, 0, 0, _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4, _Combine_75591f92a94419868e344fd5de21bb70_RGB_5, _Combine_75591f92a94419868e344fd5de21bb70_RG_6);
float2 _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3;
Unity_TilingAndOffset_float((_UV_85147850253e5a80b9d2c8ddf437e4da_Out_0.xy), _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6, _Combine_75591f92a94419868e344fd5de21bb70_RG_6, _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3);
float4 _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0 = SAMPLE_TEXTURE2D(_Property_47d26322b0cbee809f7bb147ebce9c2b_Out_0.tex, _Property_47d26322b0cbee809f7bb147ebce9c2b_Out_0.samplerstate, _Property_47d26322b0cbee809f7bb147ebce9c2b_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
_SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.rgb = UnpackNormal(_SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0);
float _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_R_4 = _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.r;
float _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_G_5 = _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.g;
float _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_B_6 = _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.b;
float _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_A_7 = _SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.a;
float _Property_9ca212c6c965a284b1795febc12e7aed_Out_0 = _ParticleNormalScale;
float3 _NormalStrength_2012b1b56379248a8afa64fa70f1b999_Out_2;
Unity_NormalStrength_float((_SampleTexture2D_0ed25a5d03077d89ba21a94bf21a8a6e_RGBA_0.xyz), _Property_9ca212c6c965a284b1795febc12e7aed_Out_0, _NormalStrength_2012b1b56379248a8afa64fa70f1b999_Out_2);
float4 _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0 = _ParticleColor;
float _Split_4d25adc154b2cd889bea31041dc0b8bd_R_1 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[0];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_G_2 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[1];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_B_3 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[2];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_A_4 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[3];
UnityTexture2D _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0 = UnityBuildTexture2DStructNoScale(_ParticleMask);
float4 _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0 = SAMPLE_TEXTURE2D(_Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.tex, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.samplerstate, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_R_4 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.r;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_G_5 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.g;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_B_6 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.b;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.a;
float _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2;
Unity_Multiply_float_float(_Split_4d25adc154b2cd889bea31041dc0b8bd_A_4, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7, _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2);
float4 _Clamp_40a04c92716b499d87e45494624e46af_Out_3;
Unity_Clamp_float4(IN.VertexColor, float4(0, 0, 0, 0), float4(1, 1, 1, 1), _Clamp_40a04c92716b499d87e45494624e46af_Out_3);
float _Split_12920bdaccef158ab9bd191cc9e45c04_R_1 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[0];
float _Split_12920bdaccef158ab9bd191cc9e45c04_G_2 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[1];
float _Split_12920bdaccef158ab9bd191cc9e45c04_B_3 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[2];
float _Split_12920bdaccef158ab9bd191cc9e45c04_A_4 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[3];
float _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
Unity_Multiply_float_float(_Multiply_adbe396b9120628ea1a79eee1222a007_Out_2, _Split_12920bdaccef158ab9bd191cc9e45c04_A_4, _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2);
float _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0 = _AlphaClipThreshold;
surface.NormalTS = _NormalStrength_2012b1b56379248a8afa64fa70f1b999_Out_2;
surface.Alpha = _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
surface.AlphaClipThreshold = _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0;
return surface;
}
// --------------------------------------------------
// Build Graph Inputs
#ifdef HAVE_VFX_MODIFICATION
#define VFX_SRP_ATTRIBUTES Attributes
#define VFX_SRP_VARYINGS Varyings
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
#endif
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
{
VertexDescriptionInputs output;
ZERO_INITIALIZE(VertexDescriptionInputs, output);
output.ObjectSpaceNormal = input.normalOS;
output.ObjectSpaceTangent = input.tangentOS.xyz;
output.ObjectSpacePosition = input.positionOS;
return output;
}
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
{
SurfaceDescriptionInputs output;
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
#ifdef HAVE_VFX_MODIFICATION
// FragInputs from VFX come from two places: Interpolator or CBuffer.
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
#endif
output.TangentSpaceNormal = float3(0.0f, 0.0f, 1.0f);
output.uv0 = input.texCoord0;
output.VertexColor = input.color;
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
#else
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
#endif
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
return output;
}
// --------------------------------------------------
// Main
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/DepthNormalsOnlyPass.hlsl"
// --------------------------------------------------
// Visual Effect Vertex Invocations
#ifdef HAVE_VFX_MODIFICATION
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
#endif
ENDHLSL
}
Pass
{
Name "Meta"
Tags
{
"LightMode" = "Meta"
}
// Render State
Cull Off
// Debug
// <None>
// --------------------------------------------------
// Pass
HLSLPROGRAM
// Pragmas
#pragma target 2.0
#pragma only_renderers gles gles3 glcore d3d11
#pragma vertex vert
#pragma fragment frag
// DotsInstancingOptions: <None>
// HybridV1InjectedBuiltinProperties: <None>
// Keywords
#pragma shader_feature _ EDITOR_VISUALIZATION
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
// GraphKeywords: <None>
// Defines
#define _NORMALMAP 1
#define _NORMAL_DROPOFF_TS 1
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define ATTRIBUTES_NEED_TEXCOORD0
#define ATTRIBUTES_NEED_TEXCOORD1
#define ATTRIBUTES_NEED_TEXCOORD2
#define ATTRIBUTES_NEED_COLOR
#define VARYINGS_NEED_TEXCOORD0
#define VARYINGS_NEED_TEXCOORD1
#define VARYINGS_NEED_TEXCOORD2
#define VARYINGS_NEED_COLOR
#define FEATURES_GRAPH_VERTEX
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
#define SHADERPASS SHADERPASS_META
#define _FOG_FRAGMENT 1
/* WARNING: $splice Could not find named fragment 'DotsInstancingVars' */
// custom interpolator pre-include
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
// Includes
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/MetaInput.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
// --------------------------------------------------
// Structs and Packing
// custom interpolators pre packing
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
struct Attributes
{
float3 positionOS : POSITION;
float3 normalOS : NORMAL;
float4 tangentOS : TANGENT;
float4 uv0 : TEXCOORD0;
float4 uv1 : TEXCOORD1;
float4 uv2 : TEXCOORD2;
float4 color : COLOR;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : INSTANCEID_SEMANTIC;
#endif
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float4 texCoord0;
float4 texCoord1;
float4 texCoord2;
float4 color;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
struct SurfaceDescriptionInputs
{
float4 uv0;
float4 VertexColor;
};
struct VertexDescriptionInputs
{
float3 ObjectSpaceNormal;
float3 ObjectSpaceTangent;
float3 ObjectSpacePosition;
};
struct PackedVaryings
{
float4 positionCS : SV_POSITION;
float4 interp0 : INTERP0;
float4 interp1 : INTERP1;
float4 interp2 : INTERP2;
float4 interp3 : INTERP3;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
PackedVaryings PackVaryings (Varyings input)
{
PackedVaryings output;
ZERO_INITIALIZE(PackedVaryings, output);
output.positionCS = input.positionCS;
output.interp0.xyzw = input.texCoord0;
output.interp1.xyzw = input.texCoord1;
output.interp2.xyzw = input.texCoord2;
output.interp3.xyzw = input.color;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
Varyings UnpackVaryings (PackedVaryings input)
{
Varyings output;
output.positionCS = input.positionCS;
output.texCoord0 = input.interp0.xyzw;
output.texCoord1 = input.interp1.xyzw;
output.texCoord2 = input.interp2.xyzw;
output.color = input.interp3.xyzw;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
// --------------------------------------------------
// Graph
// Graph Properties
CBUFFER_START(UnityPerMaterial)
float _AlphaClipThreshold;
float _ReadAlbedo;
float4 _ParticleMask_TexelSize;
float4 _TilingandOffset;
float4 _ParticleColor;
float4 _ParticleNormal_TexelSize;
float _ParticleNormalScale;
float4 _Mask_Map_TexelSize;
float _AO_multiplier;
float _Smoothness_multiplier;
float Vector1_bab3a2e609c74b6baff7b028a65ce418;
float4 _Emission_Texture_TexelSize;
float4 _Emission_Color;
CBUFFER_END
// Object and Global properties
SAMPLER(SamplerState_Linear_Repeat);
TEXTURE2D(_ParticleMask);
SAMPLER(sampler_ParticleMask);
TEXTURE2D(_ParticleNormal);
SAMPLER(sampler_ParticleNormal);
TEXTURE2D(_Mask_Map);
SAMPLER(sampler_Mask_Map);
TEXTURE2D(_Emission_Texture);
SAMPLER(sampler_Emission_Texture);
// Graph Includes
// GraphIncludes: <None>
// -- Property used by ScenePickingPass
#ifdef SCENEPICKINGPASS
float4 _SelectionID;
#endif
// -- Properties used by SceneSelectionPass
#ifdef SCENESELECTIONPASS
int _ObjectId;
int _PassValue;
#endif
// Graph Functions
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_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
{
Out = UV * Tiling + Offset;
}
void Unity_Multiply_float4_float4(float4 A, float4 B, out float4 Out)
{
Out = A * B;
}
void Unity_Branch_float4(float Predicate, float4 True, float4 False, out float4 Out)
{
Out = Predicate ? True : False;
}
void Unity_Clamp_float4(float4 In, float4 Min, float4 Max, out float4 Out)
{
Out = clamp(In, Min, Max);
}
void Unity_Multiply_float_float(float A, float B, out float Out)
{
Out = A * B;
}
// Custom interpolators pre vertex
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
// Graph Vertex
struct VertexDescription
{
float3 Position;
float3 Normal;
float3 Tangent;
};
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
{
VertexDescription description = (VertexDescription)0;
description.Position = IN.ObjectSpacePosition;
description.Normal = IN.ObjectSpaceNormal;
description.Tangent = IN.ObjectSpaceTangent;
return description;
}
// Custom interpolators, pre surface
#ifdef FEATURES_GRAPH_VERTEX
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
{
return output;
}
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
#endif
// Graph Pixel
struct SurfaceDescription
{
float3 BaseColor;
float3 Emission;
float Alpha;
float AlphaClipThreshold;
};
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
{
SurfaceDescription surface = (SurfaceDescription)0;
float _Property_b4e0c30cf01756839030a5167b089dc6_Out_0 = _ReadAlbedo;
float4 _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0 = _ParticleColor;
UnityTexture2D _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0 = UnityBuildTexture2DStructNoScale(_ParticleMask);
float4 _UV_85147850253e5a80b9d2c8ddf437e4da_Out_0 = IN.uv0;
float4 _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0 = _TilingandOffset;
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[0];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[1];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[2];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[3];
float4 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4;
float3 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5;
float2 _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1, _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2, 0, 0, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5, _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6);
float4 _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4;
float3 _Combine_75591f92a94419868e344fd5de21bb70_RGB_5;
float2 _Combine_75591f92a94419868e344fd5de21bb70_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3, _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4, 0, 0, _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4, _Combine_75591f92a94419868e344fd5de21bb70_RGB_5, _Combine_75591f92a94419868e344fd5de21bb70_RG_6);
float2 _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3;
Unity_TilingAndOffset_float((_UV_85147850253e5a80b9d2c8ddf437e4da_Out_0.xy), _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6, _Combine_75591f92a94419868e344fd5de21bb70_RG_6, _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3);
float4 _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0 = SAMPLE_TEXTURE2D(_Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.tex, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.samplerstate, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_R_4 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.r;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_G_5 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.g;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_B_6 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.b;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.a;
float4 _Multiply_ffed7e4d201e2e86974f2cc3d88026b2_Out_2;
Unity_Multiply_float4_float4(_Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0, _Multiply_ffed7e4d201e2e86974f2cc3d88026b2_Out_2);
float4 _Branch_ef8236ada61be1869b3278db6ae02537_Out_3;
Unity_Branch_float4(_Property_b4e0c30cf01756839030a5167b089dc6_Out_0, _Multiply_ffed7e4d201e2e86974f2cc3d88026b2_Out_2, _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0, _Branch_ef8236ada61be1869b3278db6ae02537_Out_3);
float4 _Clamp_40a04c92716b499d87e45494624e46af_Out_3;
Unity_Clamp_float4(IN.VertexColor, float4(0, 0, 0, 0), float4(1, 1, 1, 1), _Clamp_40a04c92716b499d87e45494624e46af_Out_3);
float4 _Multiply_3c7c94a1a6e2c08786b9b70a13b426fa_Out_2;
Unity_Multiply_float4_float4(_Branch_ef8236ada61be1869b3278db6ae02537_Out_3, _Clamp_40a04c92716b499d87e45494624e46af_Out_3, _Multiply_3c7c94a1a6e2c08786b9b70a13b426fa_Out_2);
float4 _Property_479229991d5542d796eac0e9def8c2d7_Out_0 = IsGammaSpace() ? LinearToSRGB(_Emission_Color) : _Emission_Color;
UnityTexture2D _Property_62c46c558d8f4d209a7a17877af03aab_Out_0 = UnityBuildTexture2DStructNoScale(_Emission_Texture);
float4 _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0 = SAMPLE_TEXTURE2D(_Property_62c46c558d8f4d209a7a17877af03aab_Out_0.tex, _Property_62c46c558d8f4d209a7a17877af03aab_Out_0.samplerstate, _Property_62c46c558d8f4d209a7a17877af03aab_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_R_4 = _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0.r;
float _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_G_5 = _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0.g;
float _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_B_6 = _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0.b;
float _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_A_7 = _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0.a;
float4 _Multiply_f5ae222b26e245a681d4c4005fdcd9dd_Out_2;
Unity_Multiply_float4_float4(_Property_479229991d5542d796eac0e9def8c2d7_Out_0, _SampleTexture2D_86cbac1f49464c8e9280d55370c445ac_RGBA_0, _Multiply_f5ae222b26e245a681d4c4005fdcd9dd_Out_2);
float4 _Multiply_d1894c3787b04ddc9f4316bde9b000ee_Out_2;
Unity_Multiply_float4_float4(_Clamp_40a04c92716b499d87e45494624e46af_Out_3, _Multiply_f5ae222b26e245a681d4c4005fdcd9dd_Out_2, _Multiply_d1894c3787b04ddc9f4316bde9b000ee_Out_2);
float _Split_4d25adc154b2cd889bea31041dc0b8bd_R_1 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[0];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_G_2 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[1];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_B_3 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[2];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_A_4 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[3];
float _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2;
Unity_Multiply_float_float(_Split_4d25adc154b2cd889bea31041dc0b8bd_A_4, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7, _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2);
float _Split_12920bdaccef158ab9bd191cc9e45c04_R_1 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[0];
float _Split_12920bdaccef158ab9bd191cc9e45c04_G_2 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[1];
float _Split_12920bdaccef158ab9bd191cc9e45c04_B_3 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[2];
float _Split_12920bdaccef158ab9bd191cc9e45c04_A_4 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[3];
float _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
Unity_Multiply_float_float(_Multiply_adbe396b9120628ea1a79eee1222a007_Out_2, _Split_12920bdaccef158ab9bd191cc9e45c04_A_4, _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2);
float _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0 = _AlphaClipThreshold;
surface.BaseColor = (_Multiply_3c7c94a1a6e2c08786b9b70a13b426fa_Out_2.xyz);
surface.Emission = (_Multiply_d1894c3787b04ddc9f4316bde9b000ee_Out_2.xyz);
surface.Alpha = _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
surface.AlphaClipThreshold = _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0;
return surface;
}
// --------------------------------------------------
// Build Graph Inputs
#ifdef HAVE_VFX_MODIFICATION
#define VFX_SRP_ATTRIBUTES Attributes
#define VFX_SRP_VARYINGS Varyings
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
#endif
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
{
VertexDescriptionInputs output;
ZERO_INITIALIZE(VertexDescriptionInputs, output);
output.ObjectSpaceNormal = input.normalOS;
output.ObjectSpaceTangent = input.tangentOS.xyz;
output.ObjectSpacePosition = input.positionOS;
return output;
}
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
{
SurfaceDescriptionInputs output;
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
#ifdef HAVE_VFX_MODIFICATION
// FragInputs from VFX come from two places: Interpolator or CBuffer.
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
#endif
output.uv0 = input.texCoord0;
output.VertexColor = input.color;
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
#else
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
#endif
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
return output;
}
// --------------------------------------------------
// Main
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/LightingMetaPass.hlsl"
// --------------------------------------------------
// Visual Effect Vertex Invocations
#ifdef HAVE_VFX_MODIFICATION
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
#endif
ENDHLSL
}
Pass
{
Name "SceneSelectionPass"
Tags
{
"LightMode" = "SceneSelectionPass"
}
// Render State
Cull Off
// Debug
// <None>
// --------------------------------------------------
// Pass
HLSLPROGRAM
// Pragmas
#pragma target 2.0
#pragma only_renderers gles gles3 glcore d3d11
#pragma multi_compile_instancing
#pragma vertex vert
#pragma fragment frag
// DotsInstancingOptions: <None>
// HybridV1InjectedBuiltinProperties: <None>
// Keywords
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
// GraphKeywords: <None>
// Defines
#define _NORMALMAP 1
#define _NORMAL_DROPOFF_TS 1
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define ATTRIBUTES_NEED_TEXCOORD0
#define ATTRIBUTES_NEED_COLOR
#define VARYINGS_NEED_TEXCOORD0
#define VARYINGS_NEED_COLOR
#define FEATURES_GRAPH_VERTEX
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
#define SHADERPASS SHADERPASS_DEPTHONLY
#define SCENESELECTIONPASS 1
#define ALPHA_CLIP_THRESHOLD 1
/* WARNING: $splice Could not find named fragment 'DotsInstancingVars' */
// custom interpolator pre-include
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
// Includes
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
// --------------------------------------------------
// Structs and Packing
// custom interpolators pre packing
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
struct Attributes
{
float3 positionOS : POSITION;
float3 normalOS : NORMAL;
float4 tangentOS : TANGENT;
float4 uv0 : TEXCOORD0;
float4 color : COLOR;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : INSTANCEID_SEMANTIC;
#endif
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float4 texCoord0;
float4 color;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
struct SurfaceDescriptionInputs
{
float4 uv0;
float4 VertexColor;
};
struct VertexDescriptionInputs
{
float3 ObjectSpaceNormal;
float3 ObjectSpaceTangent;
float3 ObjectSpacePosition;
};
struct PackedVaryings
{
float4 positionCS : SV_POSITION;
float4 interp0 : INTERP0;
float4 interp1 : INTERP1;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
PackedVaryings PackVaryings (Varyings input)
{
PackedVaryings output;
ZERO_INITIALIZE(PackedVaryings, output);
output.positionCS = input.positionCS;
output.interp0.xyzw = input.texCoord0;
output.interp1.xyzw = input.color;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
Varyings UnpackVaryings (PackedVaryings input)
{
Varyings output;
output.positionCS = input.positionCS;
output.texCoord0 = input.interp0.xyzw;
output.color = input.interp1.xyzw;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
// --------------------------------------------------
// Graph
// Graph Properties
CBUFFER_START(UnityPerMaterial)
float _AlphaClipThreshold;
float _ReadAlbedo;
float4 _ParticleMask_TexelSize;
float4 _TilingandOffset;
float4 _ParticleColor;
float4 _ParticleNormal_TexelSize;
float _ParticleNormalScale;
float4 _Mask_Map_TexelSize;
float _AO_multiplier;
float _Smoothness_multiplier;
float Vector1_bab3a2e609c74b6baff7b028a65ce418;
float4 _Emission_Texture_TexelSize;
float4 _Emission_Color;
CBUFFER_END
// Object and Global properties
SAMPLER(SamplerState_Linear_Repeat);
TEXTURE2D(_ParticleMask);
SAMPLER(sampler_ParticleMask);
TEXTURE2D(_ParticleNormal);
SAMPLER(sampler_ParticleNormal);
TEXTURE2D(_Mask_Map);
SAMPLER(sampler_Mask_Map);
TEXTURE2D(_Emission_Texture);
SAMPLER(sampler_Emission_Texture);
// Graph Includes
// GraphIncludes: <None>
// -- Property used by ScenePickingPass
#ifdef SCENEPICKINGPASS
float4 _SelectionID;
#endif
// -- Properties used by SceneSelectionPass
#ifdef SCENESELECTIONPASS
int _ObjectId;
int _PassValue;
#endif
// Graph Functions
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_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
{
Out = UV * Tiling + Offset;
}
void Unity_Multiply_float_float(float A, float B, out float Out)
{
Out = A * B;
}
void Unity_Clamp_float4(float4 In, float4 Min, float4 Max, out float4 Out)
{
Out = clamp(In, Min, Max);
}
// Custom interpolators pre vertex
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
// Graph Vertex
struct VertexDescription
{
float3 Position;
float3 Normal;
float3 Tangent;
};
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
{
VertexDescription description = (VertexDescription)0;
description.Position = IN.ObjectSpacePosition;
description.Normal = IN.ObjectSpaceNormal;
description.Tangent = IN.ObjectSpaceTangent;
return description;
}
// Custom interpolators, pre surface
#ifdef FEATURES_GRAPH_VERTEX
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
{
return output;
}
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
#endif
// Graph Pixel
struct SurfaceDescription
{
float Alpha;
float AlphaClipThreshold;
};
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
{
SurfaceDescription surface = (SurfaceDescription)0;
float4 _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0 = _ParticleColor;
float _Split_4d25adc154b2cd889bea31041dc0b8bd_R_1 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[0];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_G_2 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[1];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_B_3 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[2];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_A_4 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[3];
UnityTexture2D _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0 = UnityBuildTexture2DStructNoScale(_ParticleMask);
float4 _UV_85147850253e5a80b9d2c8ddf437e4da_Out_0 = IN.uv0;
float4 _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0 = _TilingandOffset;
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[0];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[1];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[2];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[3];
float4 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4;
float3 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5;
float2 _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1, _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2, 0, 0, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5, _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6);
float4 _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4;
float3 _Combine_75591f92a94419868e344fd5de21bb70_RGB_5;
float2 _Combine_75591f92a94419868e344fd5de21bb70_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3, _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4, 0, 0, _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4, _Combine_75591f92a94419868e344fd5de21bb70_RGB_5, _Combine_75591f92a94419868e344fd5de21bb70_RG_6);
float2 _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3;
Unity_TilingAndOffset_float((_UV_85147850253e5a80b9d2c8ddf437e4da_Out_0.xy), _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6, _Combine_75591f92a94419868e344fd5de21bb70_RG_6, _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3);
float4 _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0 = SAMPLE_TEXTURE2D(_Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.tex, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.samplerstate, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_R_4 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.r;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_G_5 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.g;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_B_6 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.b;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.a;
float _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2;
Unity_Multiply_float_float(_Split_4d25adc154b2cd889bea31041dc0b8bd_A_4, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7, _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2);
float4 _Clamp_40a04c92716b499d87e45494624e46af_Out_3;
Unity_Clamp_float4(IN.VertexColor, float4(0, 0, 0, 0), float4(1, 1, 1, 1), _Clamp_40a04c92716b499d87e45494624e46af_Out_3);
float _Split_12920bdaccef158ab9bd191cc9e45c04_R_1 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[0];
float _Split_12920bdaccef158ab9bd191cc9e45c04_G_2 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[1];
float _Split_12920bdaccef158ab9bd191cc9e45c04_B_3 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[2];
float _Split_12920bdaccef158ab9bd191cc9e45c04_A_4 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[3];
float _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
Unity_Multiply_float_float(_Multiply_adbe396b9120628ea1a79eee1222a007_Out_2, _Split_12920bdaccef158ab9bd191cc9e45c04_A_4, _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2);
float _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0 = _AlphaClipThreshold;
surface.Alpha = _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
surface.AlphaClipThreshold = _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0;
return surface;
}
// --------------------------------------------------
// Build Graph Inputs
#ifdef HAVE_VFX_MODIFICATION
#define VFX_SRP_ATTRIBUTES Attributes
#define VFX_SRP_VARYINGS Varyings
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
#endif
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
{
VertexDescriptionInputs output;
ZERO_INITIALIZE(VertexDescriptionInputs, output);
output.ObjectSpaceNormal = input.normalOS;
output.ObjectSpaceTangent = input.tangentOS.xyz;
output.ObjectSpacePosition = input.positionOS;
return output;
}
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
{
SurfaceDescriptionInputs output;
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
#ifdef HAVE_VFX_MODIFICATION
// FragInputs from VFX come from two places: Interpolator or CBuffer.
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
#endif
output.uv0 = input.texCoord0;
output.VertexColor = input.color;
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
#else
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
#endif
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
return output;
}
// --------------------------------------------------
// Main
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/SelectionPickingPass.hlsl"
// --------------------------------------------------
// Visual Effect Vertex Invocations
#ifdef HAVE_VFX_MODIFICATION
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
#endif
ENDHLSL
}
Pass
{
Name "ScenePickingPass"
Tags
{
"LightMode" = "Picking"
}
// Render State
Cull [_Cull]
// Debug
// <None>
// --------------------------------------------------
// Pass
HLSLPROGRAM
// Pragmas
#pragma target 2.0
#pragma only_renderers gles gles3 glcore d3d11
#pragma multi_compile_instancing
#pragma vertex vert
#pragma fragment frag
// DotsInstancingOptions: <None>
// HybridV1InjectedBuiltinProperties: <None>
// Keywords
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
// GraphKeywords: <None>
// Defines
#define _NORMALMAP 1
#define _NORMAL_DROPOFF_TS 1
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define ATTRIBUTES_NEED_TEXCOORD0
#define ATTRIBUTES_NEED_COLOR
#define VARYINGS_NEED_TEXCOORD0
#define VARYINGS_NEED_COLOR
#define FEATURES_GRAPH_VERTEX
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
#define SHADERPASS SHADERPASS_DEPTHONLY
#define SCENEPICKINGPASS 1
#define ALPHA_CLIP_THRESHOLD 1
/* WARNING: $splice Could not find named fragment 'DotsInstancingVars' */
// custom interpolator pre-include
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
// Includes
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
// --------------------------------------------------
// Structs and Packing
// custom interpolators pre packing
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
struct Attributes
{
float3 positionOS : POSITION;
float3 normalOS : NORMAL;
float4 tangentOS : TANGENT;
float4 uv0 : TEXCOORD0;
float4 color : COLOR;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : INSTANCEID_SEMANTIC;
#endif
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float4 texCoord0;
float4 color;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
struct SurfaceDescriptionInputs
{
float4 uv0;
float4 VertexColor;
};
struct VertexDescriptionInputs
{
float3 ObjectSpaceNormal;
float3 ObjectSpaceTangent;
float3 ObjectSpacePosition;
};
struct PackedVaryings
{
float4 positionCS : SV_POSITION;
float4 interp0 : INTERP0;
float4 interp1 : INTERP1;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
PackedVaryings PackVaryings (Varyings input)
{
PackedVaryings output;
ZERO_INITIALIZE(PackedVaryings, output);
output.positionCS = input.positionCS;
output.interp0.xyzw = input.texCoord0;
output.interp1.xyzw = input.color;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
Varyings UnpackVaryings (PackedVaryings input)
{
Varyings output;
output.positionCS = input.positionCS;
output.texCoord0 = input.interp0.xyzw;
output.color = input.interp1.xyzw;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
// --------------------------------------------------
// Graph
// Graph Properties
CBUFFER_START(UnityPerMaterial)
float _AlphaClipThreshold;
float _ReadAlbedo;
float4 _ParticleMask_TexelSize;
float4 _TilingandOffset;
float4 _ParticleColor;
float4 _ParticleNormal_TexelSize;
float _ParticleNormalScale;
float4 _Mask_Map_TexelSize;
float _AO_multiplier;
float _Smoothness_multiplier;
float Vector1_bab3a2e609c74b6baff7b028a65ce418;
float4 _Emission_Texture_TexelSize;
float4 _Emission_Color;
CBUFFER_END
// Object and Global properties
SAMPLER(SamplerState_Linear_Repeat);
TEXTURE2D(_ParticleMask);
SAMPLER(sampler_ParticleMask);
TEXTURE2D(_ParticleNormal);
SAMPLER(sampler_ParticleNormal);
TEXTURE2D(_Mask_Map);
SAMPLER(sampler_Mask_Map);
TEXTURE2D(_Emission_Texture);
SAMPLER(sampler_Emission_Texture);
// Graph Includes
// GraphIncludes: <None>
// -- Property used by ScenePickingPass
#ifdef SCENEPICKINGPASS
float4 _SelectionID;
#endif
// -- Properties used by SceneSelectionPass
#ifdef SCENESELECTIONPASS
int _ObjectId;
int _PassValue;
#endif
// Graph Functions
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_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
{
Out = UV * Tiling + Offset;
}
void Unity_Multiply_float_float(float A, float B, out float Out)
{
Out = A * B;
}
void Unity_Clamp_float4(float4 In, float4 Min, float4 Max, out float4 Out)
{
Out = clamp(In, Min, Max);
}
// Custom interpolators pre vertex
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
// Graph Vertex
struct VertexDescription
{
float3 Position;
float3 Normal;
float3 Tangent;
};
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
{
VertexDescription description = (VertexDescription)0;
description.Position = IN.ObjectSpacePosition;
description.Normal = IN.ObjectSpaceNormal;
description.Tangent = IN.ObjectSpaceTangent;
return description;
}
// Custom interpolators, pre surface
#ifdef FEATURES_GRAPH_VERTEX
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
{
return output;
}
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
#endif
// Graph Pixel
struct SurfaceDescription
{
float Alpha;
float AlphaClipThreshold;
};
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
{
SurfaceDescription surface = (SurfaceDescription)0;
float4 _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0 = _ParticleColor;
float _Split_4d25adc154b2cd889bea31041dc0b8bd_R_1 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[0];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_G_2 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[1];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_B_3 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[2];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_A_4 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[3];
UnityTexture2D _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0 = UnityBuildTexture2DStructNoScale(_ParticleMask);
float4 _UV_85147850253e5a80b9d2c8ddf437e4da_Out_0 = IN.uv0;
float4 _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0 = _TilingandOffset;
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[0];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[1];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[2];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[3];
float4 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4;
float3 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5;
float2 _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1, _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2, 0, 0, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5, _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6);
float4 _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4;
float3 _Combine_75591f92a94419868e344fd5de21bb70_RGB_5;
float2 _Combine_75591f92a94419868e344fd5de21bb70_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3, _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4, 0, 0, _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4, _Combine_75591f92a94419868e344fd5de21bb70_RGB_5, _Combine_75591f92a94419868e344fd5de21bb70_RG_6);
float2 _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3;
Unity_TilingAndOffset_float((_UV_85147850253e5a80b9d2c8ddf437e4da_Out_0.xy), _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6, _Combine_75591f92a94419868e344fd5de21bb70_RG_6, _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3);
float4 _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0 = SAMPLE_TEXTURE2D(_Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.tex, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.samplerstate, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_R_4 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.r;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_G_5 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.g;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_B_6 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.b;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.a;
float _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2;
Unity_Multiply_float_float(_Split_4d25adc154b2cd889bea31041dc0b8bd_A_4, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7, _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2);
float4 _Clamp_40a04c92716b499d87e45494624e46af_Out_3;
Unity_Clamp_float4(IN.VertexColor, float4(0, 0, 0, 0), float4(1, 1, 1, 1), _Clamp_40a04c92716b499d87e45494624e46af_Out_3);
float _Split_12920bdaccef158ab9bd191cc9e45c04_R_1 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[0];
float _Split_12920bdaccef158ab9bd191cc9e45c04_G_2 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[1];
float _Split_12920bdaccef158ab9bd191cc9e45c04_B_3 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[2];
float _Split_12920bdaccef158ab9bd191cc9e45c04_A_4 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[3];
float _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
Unity_Multiply_float_float(_Multiply_adbe396b9120628ea1a79eee1222a007_Out_2, _Split_12920bdaccef158ab9bd191cc9e45c04_A_4, _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2);
float _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0 = _AlphaClipThreshold;
surface.Alpha = _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
surface.AlphaClipThreshold = _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0;
return surface;
}
// --------------------------------------------------
// Build Graph Inputs
#ifdef HAVE_VFX_MODIFICATION
#define VFX_SRP_ATTRIBUTES Attributes
#define VFX_SRP_VARYINGS Varyings
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
#endif
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
{
VertexDescriptionInputs output;
ZERO_INITIALIZE(VertexDescriptionInputs, output);
output.ObjectSpaceNormal = input.normalOS;
output.ObjectSpaceTangent = input.tangentOS.xyz;
output.ObjectSpacePosition = input.positionOS;
return output;
}
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
{
SurfaceDescriptionInputs output;
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
#ifdef HAVE_VFX_MODIFICATION
// FragInputs from VFX come from two places: Interpolator or CBuffer.
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
#endif
output.uv0 = input.texCoord0;
output.VertexColor = input.color;
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
#else
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
#endif
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
return output;
}
// --------------------------------------------------
// Main
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/SelectionPickingPass.hlsl"
// --------------------------------------------------
// Visual Effect Vertex Invocations
#ifdef HAVE_VFX_MODIFICATION
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
#endif
ENDHLSL
}
Pass
{
// Name: <None>
Tags
{
"LightMode" = "Universal2D"
}
// Render State
Cull [_Cull]
Blend [_SrcBlend] [_DstBlend]
ZTest [_ZTest]
ZWrite [_ZWrite]
// Debug
// <None>
// --------------------------------------------------
// Pass
HLSLPROGRAM
// Pragmas
#pragma target 2.0
#pragma only_renderers gles gles3 glcore d3d11
#pragma multi_compile_instancing
#pragma vertex vert
#pragma fragment frag
// DotsInstancingOptions: <None>
// HybridV1InjectedBuiltinProperties: <None>
// Keywords
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
// GraphKeywords: <None>
// Defines
#define _NORMALMAP 1
#define _NORMAL_DROPOFF_TS 1
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define ATTRIBUTES_NEED_TEXCOORD0
#define ATTRIBUTES_NEED_COLOR
#define VARYINGS_NEED_TEXCOORD0
#define VARYINGS_NEED_COLOR
#define FEATURES_GRAPH_VERTEX
/* WARNING: $splice Could not find named fragment 'PassInstancing' */
#define SHADERPASS SHADERPASS_2D
/* WARNING: $splice Could not find named fragment 'DotsInstancingVars' */
// custom interpolator pre-include
/* WARNING: $splice Could not find named fragment 'sgci_CustomInterpolatorPreInclude' */
// Includes
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
// --------------------------------------------------
// Structs and Packing
// custom interpolators pre packing
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPrePacking' */
struct Attributes
{
float3 positionOS : POSITION;
float3 normalOS : NORMAL;
float4 tangentOS : TANGENT;
float4 uv0 : TEXCOORD0;
float4 color : COLOR;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : INSTANCEID_SEMANTIC;
#endif
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float4 texCoord0;
float4 color;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
struct SurfaceDescriptionInputs
{
float4 uv0;
float4 VertexColor;
};
struct VertexDescriptionInputs
{
float3 ObjectSpaceNormal;
float3 ObjectSpaceTangent;
float3 ObjectSpacePosition;
};
struct PackedVaryings
{
float4 positionCS : SV_POSITION;
float4 interp0 : INTERP0;
float4 interp1 : INTERP1;
#if UNITY_ANY_INSTANCING_ENABLED
uint instanceID : CUSTOM_INSTANCE_ID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
#endif
};
PackedVaryings PackVaryings (Varyings input)
{
PackedVaryings output;
ZERO_INITIALIZE(PackedVaryings, output);
output.positionCS = input.positionCS;
output.interp0.xyzw = input.texCoord0;
output.interp1.xyzw = input.color;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
Varyings UnpackVaryings (PackedVaryings input)
{
Varyings output;
output.positionCS = input.positionCS;
output.texCoord0 = input.interp0.xyzw;
output.color = input.interp1.xyzw;
#if UNITY_ANY_INSTANCING_ENABLED
output.instanceID = input.instanceID;
#endif
#if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
#endif
#if (defined(UNITY_STEREO_INSTANCING_ENABLED))
output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
#endif
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
output.cullFace = input.cullFace;
#endif
return output;
}
// --------------------------------------------------
// Graph
// Graph Properties
CBUFFER_START(UnityPerMaterial)
float _AlphaClipThreshold;
float _ReadAlbedo;
float4 _ParticleMask_TexelSize;
float4 _TilingandOffset;
float4 _ParticleColor;
float4 _ParticleNormal_TexelSize;
float _ParticleNormalScale;
float4 _Mask_Map_TexelSize;
float _AO_multiplier;
float _Smoothness_multiplier;
float Vector1_bab3a2e609c74b6baff7b028a65ce418;
float4 _Emission_Texture_TexelSize;
float4 _Emission_Color;
CBUFFER_END
// Object and Global properties
SAMPLER(SamplerState_Linear_Repeat);
TEXTURE2D(_ParticleMask);
SAMPLER(sampler_ParticleMask);
TEXTURE2D(_ParticleNormal);
SAMPLER(sampler_ParticleNormal);
TEXTURE2D(_Mask_Map);
SAMPLER(sampler_Mask_Map);
TEXTURE2D(_Emission_Texture);
SAMPLER(sampler_Emission_Texture);
// Graph Includes
// GraphIncludes: <None>
// -- Property used by ScenePickingPass
#ifdef SCENEPICKINGPASS
float4 _SelectionID;
#endif
// -- Properties used by SceneSelectionPass
#ifdef SCENESELECTIONPASS
int _ObjectId;
int _PassValue;
#endif
// Graph Functions
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_TilingAndOffset_float(float2 UV, float2 Tiling, float2 Offset, out float2 Out)
{
Out = UV * Tiling + Offset;
}
void Unity_Multiply_float4_float4(float4 A, float4 B, out float4 Out)
{
Out = A * B;
}
void Unity_Branch_float4(float Predicate, float4 True, float4 False, out float4 Out)
{
Out = Predicate ? True : False;
}
void Unity_Clamp_float4(float4 In, float4 Min, float4 Max, out float4 Out)
{
Out = clamp(In, Min, Max);
}
void Unity_Multiply_float_float(float A, float B, out float Out)
{
Out = A * B;
}
// Custom interpolators pre vertex
/* WARNING: $splice Could not find named fragment 'CustomInterpolatorPreVertex' */
// Graph Vertex
struct VertexDescription
{
float3 Position;
float3 Normal;
float3 Tangent;
};
VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
{
VertexDescription description = (VertexDescription)0;
description.Position = IN.ObjectSpacePosition;
description.Normal = IN.ObjectSpaceNormal;
description.Tangent = IN.ObjectSpaceTangent;
return description;
}
// Custom interpolators, pre surface
#ifdef FEATURES_GRAPH_VERTEX
Varyings CustomInterpolatorPassThroughFunc(inout Varyings output, VertexDescription input)
{
return output;
}
#define CUSTOMINTERPOLATOR_VARYPASSTHROUGH_FUNC
#endif
// Graph Pixel
struct SurfaceDescription
{
float3 BaseColor;
float Alpha;
float AlphaClipThreshold;
};
SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
{
SurfaceDescription surface = (SurfaceDescription)0;
float _Property_b4e0c30cf01756839030a5167b089dc6_Out_0 = _ReadAlbedo;
float4 _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0 = _ParticleColor;
UnityTexture2D _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0 = UnityBuildTexture2DStructNoScale(_ParticleMask);
float4 _UV_85147850253e5a80b9d2c8ddf437e4da_Out_0 = IN.uv0;
float4 _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0 = _TilingandOffset;
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[0];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[1];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[2];
float _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4 = _Property_70516ee8ebaaa28b9d5f77232f742384_Out_0[3];
float4 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4;
float3 _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5;
float2 _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_R_1, _Split_9e98eeb2b55b6082b367a40240ad1f5f_G_2, 0, 0, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGBA_4, _Combine_13a8f7d471c16c87bba732ba638d5d14_RGB_5, _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6);
float4 _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4;
float3 _Combine_75591f92a94419868e344fd5de21bb70_RGB_5;
float2 _Combine_75591f92a94419868e344fd5de21bb70_RG_6;
Unity_Combine_float(_Split_9e98eeb2b55b6082b367a40240ad1f5f_B_3, _Split_9e98eeb2b55b6082b367a40240ad1f5f_A_4, 0, 0, _Combine_75591f92a94419868e344fd5de21bb70_RGBA_4, _Combine_75591f92a94419868e344fd5de21bb70_RGB_5, _Combine_75591f92a94419868e344fd5de21bb70_RG_6);
float2 _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3;
Unity_TilingAndOffset_float((_UV_85147850253e5a80b9d2c8ddf437e4da_Out_0.xy), _Combine_13a8f7d471c16c87bba732ba638d5d14_RG_6, _Combine_75591f92a94419868e344fd5de21bb70_RG_6, _TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3);
float4 _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0 = SAMPLE_TEXTURE2D(_Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.tex, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.samplerstate, _Property_22e694d78262e38f9b1745f585f0f4b4_Out_0.GetTransformedUV(_TilingAndOffset_bdb45f607c204e7b80d5bc71b3d00436_Out_3));
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_R_4 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.r;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_G_5 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.g;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_B_6 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.b;
float _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7 = _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0.a;
float4 _Multiply_ffed7e4d201e2e86974f2cc3d88026b2_Out_2;
Unity_Multiply_float4_float4(_Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_RGBA_0, _Multiply_ffed7e4d201e2e86974f2cc3d88026b2_Out_2);
float4 _Branch_ef8236ada61be1869b3278db6ae02537_Out_3;
Unity_Branch_float4(_Property_b4e0c30cf01756839030a5167b089dc6_Out_0, _Multiply_ffed7e4d201e2e86974f2cc3d88026b2_Out_2, _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0, _Branch_ef8236ada61be1869b3278db6ae02537_Out_3);
float4 _Clamp_40a04c92716b499d87e45494624e46af_Out_3;
Unity_Clamp_float4(IN.VertexColor, float4(0, 0, 0, 0), float4(1, 1, 1, 1), _Clamp_40a04c92716b499d87e45494624e46af_Out_3);
float4 _Multiply_3c7c94a1a6e2c08786b9b70a13b426fa_Out_2;
Unity_Multiply_float4_float4(_Branch_ef8236ada61be1869b3278db6ae02537_Out_3, _Clamp_40a04c92716b499d87e45494624e46af_Out_3, _Multiply_3c7c94a1a6e2c08786b9b70a13b426fa_Out_2);
float _Split_4d25adc154b2cd889bea31041dc0b8bd_R_1 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[0];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_G_2 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[1];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_B_3 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[2];
float _Split_4d25adc154b2cd889bea31041dc0b8bd_A_4 = _Property_b7fc7bb7e8ed2c8da6489b6d9d78d3f7_Out_0[3];
float _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2;
Unity_Multiply_float_float(_Split_4d25adc154b2cd889bea31041dc0b8bd_A_4, _SampleTexture2D_185b79e27fa17080b89730ca7c4303ce_A_7, _Multiply_adbe396b9120628ea1a79eee1222a007_Out_2);
float _Split_12920bdaccef158ab9bd191cc9e45c04_R_1 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[0];
float _Split_12920bdaccef158ab9bd191cc9e45c04_G_2 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[1];
float _Split_12920bdaccef158ab9bd191cc9e45c04_B_3 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[2];
float _Split_12920bdaccef158ab9bd191cc9e45c04_A_4 = _Clamp_40a04c92716b499d87e45494624e46af_Out_3[3];
float _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
Unity_Multiply_float_float(_Multiply_adbe396b9120628ea1a79eee1222a007_Out_2, _Split_12920bdaccef158ab9bd191cc9e45c04_A_4, _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2);
float _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0 = _AlphaClipThreshold;
surface.BaseColor = (_Multiply_3c7c94a1a6e2c08786b9b70a13b426fa_Out_2.xyz);
surface.Alpha = _Multiply_04951b1c5969598aa7f847c67f0bab47_Out_2;
surface.AlphaClipThreshold = _Property_e23b1daac78b0a87a81cf357c01bb1c6_Out_0;
return surface;
}
// --------------------------------------------------
// Build Graph Inputs
#ifdef HAVE_VFX_MODIFICATION
#define VFX_SRP_ATTRIBUTES Attributes
#define VFX_SRP_VARYINGS Varyings
#define VFX_SRP_SURFACE_INPUTS SurfaceDescriptionInputs
#endif
VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
{
VertexDescriptionInputs output;
ZERO_INITIALIZE(VertexDescriptionInputs, output);
output.ObjectSpaceNormal = input.normalOS;
output.ObjectSpaceTangent = input.tangentOS.xyz;
output.ObjectSpacePosition = input.positionOS;
return output;
}
SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
{
SurfaceDescriptionInputs output;
ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
#ifdef HAVE_VFX_MODIFICATION
// FragInputs from VFX come from two places: Interpolator or CBuffer.
/* WARNING: $splice Could not find named fragment 'VFXSetFragInputs' */
#endif
output.uv0 = input.texCoord0;
output.VertexColor = input.color;
#if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign = IS_FRONT_VFACE(input.cullFace, true, false);
#else
#define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
#endif
#undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
return output;
}
// --------------------------------------------------
// Main
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/PBR2DPass.hlsl"
// --------------------------------------------------
// Visual Effect Vertex Invocations
#ifdef HAVE_VFX_MODIFICATION
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
#endif
ENDHLSL
}
}
CustomEditorForRenderPipeline "UnityEditor.ShaderGraphLitGUI" "UnityEngine.Rendering.Universal.UniversalRenderPipelineAsset"
CustomEditor "UnityEditor.ShaderGraph.GenericShaderGraphMaterialGUI"
FallBack "Hidden/Shader Graph/FallbackError"
}