Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Shader /*ase_name*/ "Hidden/Universal/Simple Lit" /*end*/
- {
- Properties
- {
- /*ase_props*/
- }
- SubShader
- {
- /*ase_subshader_options:Name=Additional Options
- Option:Surface:Opaque,Transparent:Opaque
- Opaque:SetPropertyOnSubShader:RenderType,Opaque
- Opaque:SetPropertyOnSubShader:RenderQueue,Geometry
- Opaque:SetPropertyOnPass:Forward:ZWrite,On
- Opaque:HideOption: Blend
- Transparent:SetPropertyOnSubShader:RenderType,Transparent
- Transparent:SetPropertyOnSubShader:RenderQueue,Transparent
- Transparent:SetPropertyOnPass:Forward:ZWrite,Off
- Transparent:ShowOption: Blend
- Option: Blend:Alpha,Premultiply,Additive,Multiply:Alpha
- Alpha:SetPropertyOnPass:Forward:BlendRGB,SrcAlpha,OneMinusSrcAlpha
- Premultiply:SetPropertyOnPass:Forward:BlendRGB,One,OneMinusSrcAlpha
- Additive:SetPropertyOnPass:Forward:BlendRGB,One,One
- Multiply:SetPropertyOnPass:Forward:BlendRGB,DstColor,Zero
- Alpha,Premultiply,Additive:SetPropertyOnPass:Forward:BlendAlpha,One,OneMinusSrcAlpha
- Multiply:SetPropertyOnPass:Forward:BlendAlpha,One,Zero
- Premultiply:SetDefine:_ALPHAPREMULTIPLY_ON 1
- Alpha,Additive,Multiply,disable:RemoveDefine:_ALPHAPREMULTIPLY_ON 1
- disable:SetPropertyOnPass:Forward:BlendRGB,One,Zero
- disable:SetPropertyOnPass:Forward:BlendAlpha,One,Zero
- Option:Two Sided:On,Cull Back,Cull Front:Cull Back
- On:SetPropertyOnSubShader:CullMode,Off
- Cull Back:SetPropertyOnSubShader:CullMode,Back
- Cull Front:SetPropertyOnSubShader:CullMode,Front
- Option:Specular:false,true:true
- true:SetDefine:_SPECULAR_COLOR 1
- false:RemoveDefine:_SPECULAR_COLOR 1
- Option:Cast Shadows:false,true:true
- true:IncludePass:ShadowCaster
- false,disable:ExcludePass:ShadowCaster
- Option:Receive Shadows:false,true:true
- true:RemoveDefine:_RECEIVE_SHADOWS_OFF 1
- false:SetDefine:_RECEIVE_SHADOWS_OFF 1
- Option:GPU Instancing:false,true:true
- true:SetDefine:pragma multi_compile_instancing
- false:RemoveDefine:pragma multi_compile_instancing
- Option:LOD CrossFade:false,true:true
- true:SetDefine:pragma multi_compile _ LOD_FADE_CROSSFADE
- false:RemoveDefine:pragma multi_compile _ LOD_FADE_CROSSFADE
- Option:Built-in Fog:false,true:true
- true:SetDefine:pragma multi_compile_fog
- false:RemoveDefine:pragma multi_compile_fog
- true:SetDefine:ASE_FOG 1
- false:RemoveDefine:ASE_FOG 1
- Option:Meta Pass:false,true:true
- true:IncludePass:Meta
- false,disable:ExcludePass:Meta
- Option:Vertex Position,InvertActionOnDeselection:Absolute,Relative:Relative
- Absolute:SetDefine:ASE_ABSOLUTE_VERTEX_POS 1
- Absolute:SetPortName:Forward:8,Vertex Position
- Relative:SetPortName:Forward:8,Vertex Offset
- Option:Alpha Clip:false,true:false
- false:RemoveDefine:_ALPHA_CLIP 1
- true:SetDefine:_ALPHA_CLIP 1
- */
- Tags
- {
- "RenderPipeline" = "UniversalPipeline"
- "RenderType"="Opaque"
- "Queue"="Geometry+0"
- }
- Cull Back
- HLSLINCLUDE
- #pragma target 2.0
- ENDHLSL
- /*ase_pass*/
- Pass
- {
- Name "Forward"
- Tags{"LightMode" = "UniversalForward"}
- Blend One Zero
- ZWrite On
- ZTest LEqual
- Offset 0,0
- ColorMask RGBA
- /*ase_stencil*/
- HLSLPROGRAM
- #pragma prefer_hlslcc gles
- #pragma exclude_renderers d3d11_9x
- #pragma multi_compile _ _MAIN_LIGHT_SHADOWS
- #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE
- #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS
- #pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS
- #pragma multi_compile _ _SHADOWS_SOFT
- #pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE
- #pragma multi_compile _ DIRLIGHTMAP_COMBINED
- #pragma multi_compile _ LIGHTMAP_ON
- #pragma vertex vert
- #pragma fragment frag
- #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/Color.hlsl"
- #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/UnityInstancing.hlsl"
- #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
- /*ase_pragma*/
- /*ase_globals*/
- struct VertexInput
- {
- float4 vertex : POSITION;
- float3 ase_normal : NORMAL;
- float4 ase_tangent : TANGENT;
- float4 texcoord1 : TEXCOORD1;
- /*ase_vdata:p=p;n=n;t=t;uv1=tc1.xyzw*/
- UNITY_VERTEX_INPUT_INSTANCE_ID
- };
- struct VertexOutput
- {
- float4 clipPos : SV_POSITION;
- DECLARE_LIGHTMAP_OR_SH( lightmapUV, vertexSH, 0 );
- half4 fogFactorAndVertexLight : TEXCOORD1;
- float4 shadowCoord : TEXCOORD2;
- float4 tSpace0 : TEXCOORD3;
- float4 tSpace1 : TEXCOORD4;
- float4 tSpace2 : TEXCOORD5;
- /*ase_interp(7,):sp=sp;wn.x=tc3.z;wn.y=tc4.z;wn.z=tc5.z;wt.x=tc3.x;wt.y=tc4.x;wt.z=tc5.x;wbt.x=tc3.y;wbt.y=tc4.y;wbt.z=tc5.y;wp.x=tc3.w;wp.y=tc4.w;wp.z=tc5.w*/
- UNITY_VERTEX_INPUT_INSTANCE_ID
- UNITY_VERTEX_OUTPUT_STEREO
- };
- /*ase_funcs*/
- VertexOutput vert ( VertexInput v /*ase_vert_input*/ )
- {
- VertexOutput o = (VertexOutput)0;
- UNITY_SETUP_INSTANCE_ID(v);
- UNITY_TRANSFER_INSTANCE_ID(v, o);
- UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
- /*ase_vert_code:v=VertexInput;o=VertexOutput*/
- #ifdef ASE_ABSOLUTE_VERTEX_POS
- float3 defaultVertexValue = v.vertex.xyz;
- #else
- float3 defaultVertexValue = float3(0, 0, 0);
- #endif
- float3 vertexValue = /*ase_vert_out:Vertex Offset;Float3;8;-1;_Vertex*/defaultVertexValue/*end*/;
- #ifdef ASE_ABSOLUTE_VERTEX_POS
- v.vertex.xyz = vertexValue;
- #else
- v.vertex.xyz += vertexValue;
- #endif
- v.ase_normal = /*ase_vert_out:Vertex Normal;Float3;10;-1;_Normal*/v.ase_normal/*end*/;
- float3 lwWNormal = TransformObjectToWorldNormal(v.ase_normal);
- float3 lwWorldPos = TransformObjectToWorld(v.vertex.xyz);
- float3 lwWTangent = TransformObjectToWorldDir(v.ase_tangent.xyz);
- float3 lwWBinormal = normalize(cross(lwWNormal, lwWTangent) * v.ase_tangent.w);
- o.tSpace0 = float4(lwWTangent.x, lwWBinormal.x, lwWNormal.x, lwWorldPos.x);
- o.tSpace1 = float4(lwWTangent.y, lwWBinormal.y, lwWNormal.y, lwWorldPos.y);
- o.tSpace2 = float4(lwWTangent.z, lwWBinormal.z, lwWNormal.z, lwWorldPos.z);
- VertexPositionInputs vertexInput = GetVertexPositionInputs(v.vertex.xyz);
- OUTPUT_LIGHTMAP_UV( v.texcoord1, unity_LightmapST, o.lightmapUV );
- OUTPUT_SH(lwWNormal, o.vertexSH );
- half3 vertexLight = VertexLighting(vertexInput.positionWS, lwWNormal);
- #ifdef ASE_FOG
- half fogFactor = ComputeFogFactor( vertexInput.positionCS.z );
- #else
- half fogFactor = 0;
- #endif
- o.fogFactorAndVertexLight = half4(fogFactor, vertexLight);
- o.clipPos = vertexInput.positionCS;
- #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
- o.shadowCoord = GetShadowCoord(vertexInput);
- #endif
- return o;
- }
- half4 frag ( VertexOutput IN /*ase_frag_input*/ ) : SV_Target
- {
- UNITY_SETUP_INSTANCE_ID(IN);
- UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
- /*ase_local_var:wn*/float3 WorldSpaceNormal = normalize(float3(IN.tSpace0.z,IN.tSpace1.z,IN.tSpace2.z));
- /*ase_local_var:wt*/float3 WorldSpaceTangent = float3(IN.tSpace0.x,IN.tSpace1.x,IN.tSpace2.x);
- /*ase_local_var:wbt*/float3 WorldSpaceBiTangent = float3(IN.tSpace0.y,IN.tSpace1.y,IN.tSpace2.y);
- /*ase_local_var:wp*/float3 WorldSpacePosition = float3(IN.tSpace0.w,IN.tSpace1.w,IN.tSpace2.w);
- /*ase_local_var:wvd*/float3 WorldSpaceViewDirection = _WorldSpaceCameraPos.xyz - WorldSpacePosition;
- #if SHADER_HINT_NICE_QUALITY
- WorldSpaceViewDirection = SafeNormalize( WorldSpaceViewDirection );
- #endif
- /*ase_frag_code:IN=VertexOutput*/
- float3 Albedo = /*ase_frag_out:Albedo;Float3;0;-1;_Albedo*/float3(0.5, 0.5, 0.5)/*end*/;
- float3 Normal = /*ase_frag_out:Normal;Float3;1*/float3(0, 0, 1)/*end*/;
- float3 Emission = /*ase_frag_out:Emission;Float3;2;-1;_Emission*/0/*end*/;
- float4 SpecGloss = /*ase_frag_out:SpecGloss;Float4;3*/0/*end*/;
- float Smoothness = /*ase_frag_out:Smoothness;Float;4*/0.5/*end*/;
- float Alpha = /*ase_frag_out:Alpha;Float;5;-1;_Alpha*/1/*end*/;
- float AlphaClipThreshold = /*ase_frag_out:Alpha Clip Threshold;Float;6;-1;_AlphaClip*/0.5/*end*/;
- float Occlusion = /*ase_frag_out:Occlusion;Float*/1.0/*end*/;
- InputData inputData = (InputData)0;
- inputData.positionWS = WorldSpacePosition;
- #ifdef _NORMALMAP
- inputData.normalWS = normalize(TransformTangentToWorld(Normal, half3x3(WorldSpaceTangent, WorldSpaceBiTangent, WorldSpaceNormal)));
- #else
- #if !SHADER_HINT_NICE_QUALITY
- inputData.normalWS = WorldSpaceNormal;
- #else
- inputData.normalWS = normalize(WorldSpaceNormal);
- #endif
- #endif
- inputData.viewDirectionWS = WorldSpaceViewDirection;
- #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
- inputData.shadowCoord = IN.shadowCoord;
- #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
- inputData.shadowCoord = TransformWorldToShadowCoord(inputData.positionWS);
- #else
- inputData.shadowCoord = float4(0, 0, 0, 0);
- #endif
- #ifdef ASE_FOG
- inputData.fogCoord = IN.fogFactorAndVertexLight.x;
- #endif
- inputData.vertexLighting = IN.fogFactorAndVertexLight.yzw;
- inputData.bakedGI = SAMPLE_GI( IN.lightmapUV, IN.vertexSH, inputData.normalWS );
- SurfaceData surface_data = (SurfaceData)0;
- surface_data.albedo = Albedo;
- surface_data.specular = SpecGloss.rgb;
- surface_data.smoothness = Smoothness;
- surface_data.normalTS = Normal;
- surface_data.emission = Emission;
- surface_data.alpha = Alpha;
- surface_data.occlusion = Occlusion;
- half4 color = UniversalFragmentBlinnPhong(inputData, surface_data);
- #ifdef ASE_FOG
- #ifdef TERRAIN_SPLAT_ADDPASS
- color.rgb = MixFogColor(color.rgb, half3( 0, 0, 0 ), IN.fogFactorAndVertexLight.x );
- #else
- color.rgb = MixFog(color.rgb, IN.fogFactorAndVertexLight.x);
- #endif
- #endif
- #if _ALPHA_CLIP
- clip(Alpha - AlphaClipThreshold);
- #endif
- #ifdef LOD_FADE_CROSSFADE
- LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
- #endif
- return color;
- }
- ENDHLSL
- }
- /*ase_pass*/
- Pass
- {
- /*ase_hide_pass*/
- Name "ShadowCaster"
- Tags{"LightMode" = "ShadowCaster"}
- ZWrite On
- ZTest LEqual
- HLSLPROGRAM
- #pragma prefer_hlslcc gles
- #pragma exclude_renderers d3d11_9x
- #pragma vertex ShadowPassVertex
- #pragma fragment ShadowPassFragment
- #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.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
- #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
- /*ase_pragma*/
- struct VertexInput
- {
- float4 vertex : POSITION;
- float3 ase_normal : NORMAL;
- /*ase_vdata:p=p;n=n*/
- UNITY_VERTEX_INPUT_INSTANCE_ID
- };
- /*ase_globals*/
- struct VertexOutput
- {
- float4 clipPos : SV_POSITION;
- /*ase_interp(7,):sp=sp*/
- UNITY_VERTEX_INPUT_INSTANCE_ID
- };
- /*ase_funcs*/
- float3 _LightDirection;
- VertexOutput ShadowPassVertex( VertexInput v/*ase_vert_input*/ )
- {
- VertexOutput o;
- UNITY_SETUP_INSTANCE_ID(v);
- UNITY_TRANSFER_INSTANCE_ID(v, o);
- /*ase_vert_code:v=VertexInput;o=VertexOutput*/
- #ifdef ASE_ABSOLUTE_VERTEX_POS
- float3 defaultVertexValue = v.vertex.xyz;
- #else
- float3 defaultVertexValue = float3(0, 0, 0);
- #endif
- float3 vertexValue = /*ase_vert_out:Vertex Offset;Float3;2;-1;_Vertex*/defaultVertexValue/*end*/;
- #ifdef ASE_ABSOLUTE_VERTEX_POS
- v.vertex.xyz = vertexValue;
- #else
- v.vertex.xyz += vertexValue;
- #endif
- v.ase_normal = /*ase_vert_out:Vertex Normal;Float3;3;-1;_Normal*/v.ase_normal/*end*/;
- float3 positionWS = TransformObjectToWorld(v.vertex.xyz);
- float3 normalWS = TransformObjectToWorldDir(v.ase_normal);
- float4 clipPos = TransformWorldToHClip( ApplyShadowBias( positionWS, normalWS, _LightDirection ) );
- #if UNITY_REVERSED_Z
- clipPos.z = min(clipPos.z, clipPos.w * UNITY_NEAR_CLIP_VALUE);
- #else
- clipPos.z = max(clipPos.z, clipPos.w * UNITY_NEAR_CLIP_VALUE);
- #endif
- o.clipPos = clipPos;
- return o;
- }
- half4 ShadowPassFragment(VertexOutput IN /*ase_frag_input*/ ) : SV_TARGET
- {
- UNITY_SETUP_INSTANCE_ID( IN );
- /*ase_frag_code:IN=VertexOutput*/
- float Alpha = /*ase_frag_out:Alpha;Float;0;-1;_Alpha*/1/*end*/;
- float AlphaClipThreshold = /*ase_frag_out:Alpha Clip Threshold;Float;1;-1;_AlphaClip*/0.5/*end*/;
- #if _ALPHA_CLIP
- clip(Alpha - AlphaClipThreshold);
- #endif
- #ifdef LOD_FADE_CROSSFADE
- LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
- #endif
- return 0;
- }
- ENDHLSL
- }
- /*ase_pass*/
- Pass
- {
- /*ase_hide_pass*/
- Name "DepthOnly"
- Tags{"LightMode" = "DepthOnly"}
- ZWrite On
- ColorMask 0
- HLSLPROGRAM
- #pragma prefer_hlslcc gles
- #pragma exclude_renderers d3d11_9x
- #pragma vertex vert
- #pragma fragment frag
- #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.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
- #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
- /*ase_pragma*/
- /*ase_globals*/
- struct VertexInput
- {
- float4 vertex : POSITION;
- float3 ase_normal : NORMAL;
- /*ase_vdata:p=p;n=n*/
- UNITY_VERTEX_INPUT_INSTANCE_ID
- };
- struct VertexOutput
- {
- float4 clipPos : SV_POSITION;
- /*ase_interp(0,):sp=sp*/
- UNITY_VERTEX_INPUT_INSTANCE_ID
- UNITY_VERTEX_OUTPUT_STEREO
- };
- /*ase_funcs*/
- VertexOutput vert( VertexInput v /*ase_vert_input*/ )
- {
- VertexOutput o = (VertexOutput)0;
- UNITY_SETUP_INSTANCE_ID(v);
- UNITY_TRANSFER_INSTANCE_ID(v, o);
- UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
- /*ase_vert_code:v=VertexInput;o=VertexOutput*/
- #ifdef ASE_ABSOLUTE_VERTEX_POS
- float3 defaultVertexValue = v.vertex.xyz;
- #else
- float3 defaultVertexValue = float3(0, 0, 0);
- #endif
- float3 vertexValue = /*ase_vert_out:Vertex Offset;Float3;2;-1;_Vertex*/defaultVertexValue/*end*/;
- #ifdef ASE_ABSOLUTE_VERTEX_POS
- v.vertex.xyz = vertexValue;
- #else
- v.vertex.xyz += vertexValue;
- #endif
- v.ase_normal = /*ase_vert_out:Vertex Normal;Float3;3;-1;_Normal*/v.ase_normal/*end*/;
- o.clipPos = TransformObjectToHClip(v.vertex.xyz);
- return o;
- }
- half4 frag(VertexOutput IN /*ase_frag_input*/ ) : SV_TARGET
- {
- UNITY_SETUP_INSTANCE_ID(IN);
- UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
- /*ase_frag_code:IN=VertexOutput*/
- float Alpha = /*ase_frag_out:Alpha;Float;0;-1;_Alpha*/1/*end*/;
- float AlphaClipThreshold = /*ase_frag_out:Alpha Clip Threshold;Float;1;-1;_AlphaClip*/0.5/*end*/;
- #if _ALPHA_CLIP
- clip(Alpha - AlphaClipThreshold);
- #endif
- #ifdef LOD_FADE_CROSSFADE
- LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
- #endif
- return 0;
- }
- ENDHLSL
- }
- /*ase_pass*/
- Pass
- {
- /*ase_hide_pass*/
- Name "Meta"
- Tags{"LightMode" = "Meta"}
- Cull Off
- HLSLPROGRAM
- #pragma prefer_hlslcc gles
- #pragma exclude_renderers d3d11_9x
- #pragma vertex vert
- #pragma fragment frag
- #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
- #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/MetaInput.hlsl"
- #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
- #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
- /*ase_pragma*/
- /*ase_globals*/
- #pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
- struct VertexInput
- {
- float4 vertex : POSITION;
- float3 ase_normal : NORMAL;
- float4 texcoord1 : TEXCOORD1;
- float4 texcoord2 : TEXCOORD2;
- /*ase_vdata:p=p;n=n;uv1=tc1;uv2=tc2*/
- UNITY_VERTEX_INPUT_INSTANCE_ID
- };
- struct VertexOutput
- {
- float4 clipPos : SV_POSITION;
- /*ase_interp(0,):sp=sp;uv1=tc1*/
- UNITY_VERTEX_INPUT_INSTANCE_ID
- UNITY_VERTEX_OUTPUT_STEREO
- };
- /*ase_funcs*/
- VertexOutput vert( VertexInput v /*ase_vert_input*/ )
- {
- VertexOutput o = (VertexOutput)0;
- UNITY_SETUP_INSTANCE_ID(v);
- UNITY_TRANSFER_INSTANCE_ID(v, o);
- UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
- /*ase_vert_code:v=VertexInput;o=VertexOutput*/
- #ifdef ASE_ABSOLUTE_VERTEX_POS
- float3 defaultVertexValue = v.vertex.xyz;
- #else
- float3 defaultVertexValue = float3(0, 0, 0);
- #endif
- float3 vertexValue = /*ase_vert_out:Vertex Offset;Float3;4;-1;_Vertex*/defaultVertexValue/*end*/;
- #ifdef ASE_ABSOLUTE_VERTEX_POS
- v.vertex.xyz = vertexValue;
- #else
- v.vertex.xyz += vertexValue;
- #endif
- v.ase_normal = /*ase_vert_out:Vertex Normal;Float3;5;-1;_Normal*/v.ase_normal/*end*/;
- o.clipPos = MetaVertexPosition( v.vertex, v.texcoord1.xy, v.texcoord1.xy, unity_LightmapST, unity_DynamicLightmapST );
- return o;
- }
- half4 frag(VertexOutput IN /*ase_frag_input*/ ) : SV_TARGET
- {
- UNITY_SETUP_INSTANCE_ID(IN);
- UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
- /*ase_frag_code:IN=VertexOutput*/
- float3 Albedo = /*ase_frag_out:Albedo;Float3;0;-1;_Albedo*/float3(0.5, 0.5, 0.5)/*end*/;
- float3 Emission = /*ase_frag_out:Emission;Float3;1;-1;_Emission*/0/*end*/;
- float Alpha = /*ase_frag_out:Alpha;Float;2;-1;_Alpha*/1/*end*/;
- float AlphaClipThreshold = /*ase_frag_out:Alpha Clip Threshold;Float;3;-1;_AlphaClip*/0.5/*end*/;
- #if _ALPHA_CLIP
- clip(Alpha - AlphaClipThreshold);
- #endif
- MetaInput metaInput = (MetaInput)0;
- metaInput.Albedo = Albedo;
- metaInput.Emission = Emission;
- return MetaFragment(metaInput);
- }
- ENDHLSL
- }
- /*ase_pass*/
- Pass
- {
- /*ase_hide_pass:SyncP*/
- Name "Universal2D"
- Tags{"LightMode" = "Universal2D"}
- Blend One Zero
- ZWrite On
- ZTest LEqual
- Offset 0,0
- ColorMask RGBA
- HLSLPROGRAM
- #pragma enable_d3d11_debug_symbols
- #pragma prefer_hlslcc gles
- #pragma exclude_renderers d3d11_9x
- #pragma vertex vert
- #pragma fragment frag
- #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/Color.hlsl"
- #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/UnityInstancing.hlsl"
- #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
- /*ase_pragma*/
- /*ase_globals*/
- #pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
- struct VertexInput
- {
- float4 vertex : POSITION;
- float3 ase_normal : NORMAL;
- /*ase_vdata:p=p;n=n*/
- UNITY_VERTEX_INPUT_INSTANCE_ID
- };
- struct VertexOutput
- {
- float4 clipPos : SV_POSITION;
- /*ase_interp(0,):sp=sp;uv1=tc1*/
- };
- /*ase_funcs*/
- VertexOutput vert( VertexInput v /*ase_vert_input*/ )
- {
- VertexOutput o = (VertexOutput)0;
- /*ase_vert_code:v=VertexInput;o=VertexOutput*/
- #ifdef ASE_ABSOLUTE_VERTEX_POS
- float3 defaultVertexValue = v.vertex.xyz;
- #else
- float3 defaultVertexValue = float3(0, 0, 0);
- #endif
- float3 vertexValue = /*ase_vert_out:Vertex Offset;Float3;3;-1;_Vertex*/defaultVertexValue/*end*/;
- #ifdef ASE_ABSOLUTE_VERTEX_POS
- v.vertex.xyz = vertexValue;
- #else
- v.vertex.xyz += vertexValue;
- #endif
- v.ase_normal = /*ase_vert_out:Vertex Normal;Float3;4;-1;_Normal*/v.ase_normal/*end*/;
- VertexPositionInputs vertexInput = GetVertexPositionInputs( v.vertex.xyz );
- o.clipPos = vertexInput.positionCS;
- return o;
- }
- half4 frag(VertexOutput IN /*ase_frag_input*/ ) : SV_TARGET
- {
- /*ase_frag_code:IN=VertexOutput*/
- float3 Albedo = /*ase_frag_out:Albedo;Float3;0;-1;_Albedo*/float3(0.5, 0.5, 0.5)/*end*/;
- float Alpha = /*ase_frag_out:Alpha;Float;1;-1;_Alpha*/1/*end*/;
- float AlphaClipThreshold = /*ase_frag_out:Alpha Clip Threshold;Float;2;-1;_AlphaClip*/0.5/*end*/;
- half4 color = half4( Albedo, Alpha );
- #if _ALPHA_CLIP
- clip(Alpha - AlphaClipThreshold);
- #endif
- return color;
- }
- ENDHLSL
- }
- /*ase_pass_end*/
- }
- CustomEditor "UnityEditor.ShaderGraph.PBRMasterGUI"
- FallBack "Hidden/InternalErrorShader"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement