Files
ichni_Creator_Studio/Assets/Shaders/TrackShader.shader
SoulliesOfficial 7954ec800c 爆修
2026-03-30 03:23:36 -04:00

738 lines
30 KiB
Plaintext
Executable File

// Made with Amplify Shader Editor v1.9.9.4
// Available at the Unity Asset Store - http://u3d.as/y3X
Shader "Soullies/TrackShader"
{
Properties
{
[HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5
_MainTexture( "MainTexture", 2D ) = "white" {}
_BaseColor( "BaseColor", Color ) = ( 0, 0, 0, 0 )
[HDR] _EmissionColor( "EmissionColor", Color ) = ( 0, 0, 0, 0 )
[Toggle( _USEREDASALPHA_ON )] _UseRedAsAlpha( "UseRedAsAlpha", Float ) = 1
[Toggle( _EMISSION_ON )] _Emission( "Emission", Float ) = 0
[Toggle] _ZWrite( "ZWrite", Range( 0, 1 ) ) = 1
[HideInInspector] _texcoord( "", 2D ) = "white" {}
[HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
[HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
[HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
}
SubShader
{
LOD 0
Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" }
Cull Back
HLSLINCLUDE
#pragma target 3.5
#pragma prefer_hlslcc gles
// ensure rendering platforms toggle list is visible
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl"
ENDHLSL
Pass
{
Name "Sprite Unlit"
Tags { "LightMode"="Universal2D" }
Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
ZTest LEqual
ZWrite [_ZWrite]
Offset 0 , 0
ColorMask RGBA
HLSLPROGRAM
#define ASE_VERSION 19904
#define ASE_SRP_VERSION -1
#pragma multi_compile_instancing
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_fragment _ DEBUG_DISPLAY
#pragma multi_compile_vertex _ SKINNED_SPRITE
#define _SURFACE_TYPE_TRANSPARENT 1
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define ATTRIBUTES_NEED_TEXCOORD0
#define ATTRIBUTES_NEED_COLOR
#define FEATURES_GRAPH_VERTEX_NORMAL_OUTPUT
#define FEATURES_GRAPH_VERTEX_TANGENT_OUTPUT
#define VARYINGS_NEED_POSITION_WS
#define VARYINGS_NEED_TEXCOORD0
#define VARYINGS_NEED_COLOR
#define FEATURES_GRAPH_VERTEX
#define SHADERPASS SHADERPASS_SPRITEUNLIT
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Fog.hlsl"
#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/Shaders/2D/Include/Core2D.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/SurfaceData2D.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging2D.hlsl"
#define ASE_NEEDS_TEXTURE_COORDINATES0
#define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0
#pragma shader_feature_local _USEREDASALPHA_ON
#pragma shader_feature_local _EMISSION_ON
sampler2D _MainTexture;
CBUFFER_START( UnityPerMaterial )
float4 _MainTexture_ST;
float4 _BaseColor;
float4 _EmissionColor;
float _ZWrite;
CBUFFER_END
struct VertexInput
{
float3 positionOS : POSITION;
float3 normal : NORMAL;
float4 tangent : TANGENT;
float4 uv0 : TEXCOORD0;
float4 color : COLOR;
UNITY_SKINNED_VERTEX_INPUTS
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct VertexOutput
{
float4 positionCS : SV_POSITION;
float4 texCoord0 : TEXCOORD0;
float4 color : TEXCOORD1;
float3 positionWS : TEXCOORD2;
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
#if ETC1_EXTERNAL_ALPHA
TEXTURE2D(_AlphaTex); SAMPLER(sampler_AlphaTex);
float _EnableAlphaTexture;
#endif
VertexOutput vert( VertexInput v )
{
VertexOutput o = (VertexOutput)0;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_TRANSFER_INSTANCE_ID(v, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
UNITY_SKINNED_VERTEX_COMPUTE( v );
v.positionOS = UnityFlipSprite( v.positionOS, unity_SpriteProps.xy );
#ifdef ASE_ABSOLUTE_VERTEX_POS
float3 defaultVertexValue = v.positionOS;
#else
float3 defaultVertexValue = float3(0, 0, 0);
#endif
float3 vertexValue = defaultVertexValue;
#ifdef ASE_ABSOLUTE_VERTEX_POS
v.positionOS = vertexValue;
#else
v.positionOS += vertexValue;
#endif
v.normal = v.normal;
v.tangent.xyz = v.tangent.xyz;
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS);
o.positionCS = vertexInput.positionCS;
o.positionWS = vertexInput.positionWS;
o.texCoord0 = v.uv0;
o.color = v.color;
return o;
}
half4 frag( VertexOutput IN ) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(IN);
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
float4 positionCS = IN.positionCS;
float3 positionWS = IN.positionWS;
float2 uv_MainTexture = IN.texCoord0.xy * _MainTexture_ST.xy + _MainTexture_ST.zw;
float4 break10 = tex2D( _MainTexture, uv_MainTexture );
#ifdef _USEREDASALPHA_ON
float staticSwitch28 = break10.r;
#else
float staticSwitch28 = break10.a;
#endif
float4 appendResult13 = (float4(break10.r , break10.g , break10.b , staticSwitch28));
float4 color52 = IsGammaSpace() ? float4( 1, 1, 1, 1 ) : float4( 1, 1, 1, 1 );
#ifdef _EMISSION_ON
float4 staticSwitch31 = _EmissionColor;
#else
float4 staticSwitch31 = color52;
#endif
float4 Color = ( ( appendResult13 * _BaseColor ) * staticSwitch31 );
#if ETC1_EXTERNAL_ALPHA
float4 alpha = SAMPLE_TEXTURE2D(_AlphaTex, sampler_AlphaTex, IN.texCoord0.xy);
Color.a = lerp( Color.a, alpha.r, _EnableAlphaTexture);
#endif
#if defined(DEBUG_DISPLAY)
SurfaceData2D surfaceData;
InitializeSurfaceData(Color.rgb, Color.a, surfaceData);
InputData2D inputData;
InitializeInputData(positionWS.xy, half2(IN.texCoord0.xy), inputData);
half4 debugColor = 0;
SETUP_DEBUG_DATA_2D(inputData, positionWS, positionCS);
if (CanDebugOverrideOutputColor(surfaceData, inputData, debugColor))
{
return debugColor;
}
#endif
Color *= IN.color * unity_SpriteColor;
return Color;
}
ENDHLSL
}
Pass
{
Name "Sprite Unlit Forward"
Tags { "LightMode"="UniversalForward" }
Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
ZTest LEqual
ZWrite [_ZWrite]
Offset 0 , 0
ColorMask RGBA
HLSLPROGRAM
#define ASE_VERSION 19904
#define ASE_SRP_VERSION -1
#pragma multi_compile_instancing
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_fragment _ DEBUG_DISPLAY
#pragma multi_compile_vertex _ SKINNED_SPRITE
#define _SURFACE_TYPE_TRANSPARENT 1
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define ATTRIBUTES_NEED_TEXCOORD0
#define ATTRIBUTES_NEED_COLOR
#define FEATURES_GRAPH_VERTEX_NORMAL_OUTPUT
#define FEATURES_GRAPH_VERTEX_TANGENT_OUTPUT
#define VARYINGS_NEED_POSITION_WS
#define VARYINGS_NEED_TEXCOORD0
#define VARYINGS_NEED_COLOR
#define FEATURES_GRAPH_VERTEX
#define SHADERPASS SHADERPASS_SPRITEFORWARD
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Fog.hlsl"
#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/Shaders/2D/Include/Core2D.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/SurfaceData2D.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging2D.hlsl"
#define ASE_NEEDS_TEXTURE_COORDINATES0
#define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0
#pragma shader_feature_local _USEREDASALPHA_ON
#pragma shader_feature_local _EMISSION_ON
sampler2D _MainTexture;
CBUFFER_START( UnityPerMaterial )
float4 _MainTexture_ST;
float4 _BaseColor;
float4 _EmissionColor;
float _ZWrite;
CBUFFER_END
struct VertexInput
{
float3 positionOS : POSITION;
float3 normal : NORMAL;
float4 tangent : TANGENT;
float4 uv0 : TEXCOORD0;
float4 color : COLOR;
UNITY_SKINNED_VERTEX_INPUTS
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct VertexOutput
{
float4 positionCS : SV_POSITION;
float4 texCoord0 : TEXCOORD0;
float4 color : TEXCOORD1;
float3 positionWS : TEXCOORD2;
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
#if ETC1_EXTERNAL_ALPHA
TEXTURE2D( _AlphaTex ); SAMPLER( sampler_AlphaTex );
float _EnableAlphaTexture;
#endif
VertexOutput vert( VertexInput v )
{
VertexOutput o = (VertexOutput)0;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_TRANSFER_INSTANCE_ID(v, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
UNITY_SKINNED_VERTEX_COMPUTE( v );
v.positionOS = UnityFlipSprite( v.positionOS, unity_SpriteProps.xy );
#ifdef ASE_ABSOLUTE_VERTEX_POS
float3 defaultVertexValue = v.positionOS;
#else
float3 defaultVertexValue = float3( 0, 0, 0 );
#endif
float3 vertexValue = defaultVertexValue;
#ifdef ASE_ABSOLUTE_VERTEX_POS
v.positionOS = vertexValue;
#else
v.positionOS += vertexValue;
#endif
v.normal = v.normal;
v.tangent.xyz = v.tangent.xyz;
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS);
o.positionCS = vertexInput.positionCS;
o.positionWS = vertexInput.positionWS;
o.texCoord0 = v.uv0;
o.color = v.color;
return o;
}
half4 frag( VertexOutput IN ) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(IN);
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
float4 positionCS = IN.positionCS;
float3 positionWS = IN.positionWS;
float2 uv_MainTexture = IN.texCoord0.xy * _MainTexture_ST.xy + _MainTexture_ST.zw;
float4 break10 = tex2D( _MainTexture, uv_MainTexture );
#ifdef _USEREDASALPHA_ON
float staticSwitch28 = break10.r;
#else
float staticSwitch28 = break10.a;
#endif
float4 appendResult13 = (float4(break10.r , break10.g , break10.b , staticSwitch28));
float4 color52 = IsGammaSpace() ? float4( 1, 1, 1, 1 ) : float4( 1, 1, 1, 1 );
#ifdef _EMISSION_ON
float4 staticSwitch31 = _EmissionColor;
#else
float4 staticSwitch31 = color52;
#endif
float4 Color = ( ( appendResult13 * _BaseColor ) * staticSwitch31 );
#if ETC1_EXTERNAL_ALPHA
float4 alpha = SAMPLE_TEXTURE2D( _AlphaTex, sampler_AlphaTex, IN.texCoord0.xy );
Color.a = lerp( Color.a, alpha.r, _EnableAlphaTexture );
#endif
#if defined(DEBUG_DISPLAY)
SurfaceData2D surfaceData;
InitializeSurfaceData(Color.rgb, Color.a, surfaceData);
InputData2D inputData;
InitializeInputData(positionWS.xy, half2(IN.texCoord0.xy), inputData);
half4 debugColor = 0;
SETUP_DEBUG_DATA_2D(inputData, positionWS, positionCS);
if (CanDebugOverrideOutputColor(surfaceData, inputData, debugColor))
{
return debugColor;
}
#endif
Color *= IN.color * unity_SpriteColor;
return Color;
}
ENDHLSL
}
Pass
{
Name "SceneSelectionPass"
Tags { "LightMode"="SceneSelectionPass" }
Cull Off
HLSLPROGRAM
#define ASE_VERSION 19904
#define ASE_SRP_VERSION -1
#pragma multi_compile_instancing
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile _ DEBUG_DISPLAY SKINNED_SPRITE
#define _SURFACE_TYPE_TRANSPARENT 1
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define FEATURES_GRAPH_VERTEX_NORMAL_OUTPUT
#define FEATURES_GRAPH_VERTEX_TANGENT_OUTPUT
#define FEATURES_GRAPH_VERTEX
#define SHADERPASS SHADERPASS_DEPTHONLY
#define SCENESELECTIONPASS 1
#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/Shaders/2D/Include/Core2D.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
#define ASE_NEEDS_TEXTURE_COORDINATES0
#pragma shader_feature_local _USEREDASALPHA_ON
#pragma shader_feature_local _EMISSION_ON
sampler2D _MainTexture;
CBUFFER_START( UnityPerMaterial )
float4 _MainTexture_ST;
float4 _BaseColor;
float4 _EmissionColor;
float _ZWrite;
CBUFFER_END
struct VertexInput
{
float3 positionOS : POSITION;
float3 normal : NORMAL;
float4 tangent : TANGENT;
float4 ase_texcoord : TEXCOORD0;
UNITY_SKINNED_VERTEX_INPUTS
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct VertexOutput
{
float4 positionCS : SV_POSITION;
float4 ase_texcoord : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
int _ObjectId;
int _PassValue;
VertexOutput vert(VertexInput v )
{
VertexOutput o = (VertexOutput)0;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_TRANSFER_INSTANCE_ID(v, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
UNITY_SKINNED_VERTEX_COMPUTE(v);
v.positionOS = UnityFlipSprite( v.positionOS, unity_SpriteProps.xy );
o.ase_texcoord.xy = v.ase_texcoord.xy;
//setting value to unused interpolator channels and avoid initialization warnings
o.ase_texcoord.zw = 0;
#ifdef ASE_ABSOLUTE_VERTEX_POS
float3 defaultVertexValue = v.positionOS;
#else
float3 defaultVertexValue = float3(0, 0, 0);
#endif
float3 vertexValue = defaultVertexValue;
#ifdef ASE_ABSOLUTE_VERTEX_POS
v.positionOS = vertexValue;
#else
v.positionOS += vertexValue;
#endif
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS);
float3 positionWS = TransformObjectToWorld(v.positionOS);
o.positionCS = TransformWorldToHClip(positionWS);
return o;
}
half4 frag(VertexOutput IN) : SV_TARGET
{
float2 uv_MainTexture = IN.ase_texcoord.xy * _MainTexture_ST.xy + _MainTexture_ST.zw;
float4 break10 = tex2D( _MainTexture, uv_MainTexture );
#ifdef _USEREDASALPHA_ON
float staticSwitch28 = break10.r;
#else
float staticSwitch28 = break10.a;
#endif
float4 appendResult13 = (float4(break10.r , break10.g , break10.b , staticSwitch28));
float4 color52 = IsGammaSpace() ? float4( 1, 1, 1, 1 ) : float4( 1, 1, 1, 1 );
#ifdef _EMISSION_ON
float4 staticSwitch31 = _EmissionColor;
#else
float4 staticSwitch31 = color52;
#endif
float4 Color = ( ( appendResult13 * _BaseColor ) * staticSwitch31 );
half4 outColor = half4(_ObjectId, _PassValue, 1.0, 1.0);
return outColor;
}
ENDHLSL
}
Pass
{
Name "ScenePickingPass"
Tags { "LightMode"="Picking" }
Cull Off
HLSLPROGRAM
#define ASE_VERSION 19904
#define ASE_SRP_VERSION -1
#pragma multi_compile_instancing
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile _ DEBUG_DISPLAY SKINNED_SPRITE
#define _SURFACE_TYPE_TRANSPARENT 1
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define FEATURES_GRAPH_VERTEX_NORMAL_OUTPUT
#define FEATURES_GRAPH_VERTEX_TANGENT_OUTPUT
#define FEATURES_GRAPH_VERTEX
#define SHADERPASS SHADERPASS_DEPTHONLY
#define SCENEPICKINGPASS 1
#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/Shaders/2D/Include/Core2D.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
#define ASE_NEEDS_TEXTURE_COORDINATES0
#pragma shader_feature_local _USEREDASALPHA_ON
#pragma shader_feature_local _EMISSION_ON
sampler2D _MainTexture;
CBUFFER_START( UnityPerMaterial )
float4 _MainTexture_ST;
float4 _BaseColor;
float4 _EmissionColor;
float _ZWrite;
CBUFFER_END
struct VertexInput
{
float3 positionOS : POSITION;
float3 normal : NORMAL;
float4 tangent : TANGENT;
float4 ase_texcoord : TEXCOORD0;
UNITY_SKINNED_VERTEX_INPUTS
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct VertexOutput
{
float4 positionCS : SV_POSITION;
float4 ase_texcoord : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
float4 _SelectionID;
VertexOutput vert(VertexInput v )
{
VertexOutput o = (VertexOutput)0;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_TRANSFER_INSTANCE_ID(v, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
UNITY_SKINNED_VERTEX_COMPUTE(v);
v.positionOS = UnityFlipSprite( v.positionOS, unity_SpriteProps.xy );
o.ase_texcoord.xy = v.ase_texcoord.xy;
//setting value to unused interpolator channels and avoid initialization warnings
o.ase_texcoord.zw = 0;
#ifdef ASE_ABSOLUTE_VERTEX_POS
float3 defaultVertexValue = v.positionOS;
#else
float3 defaultVertexValue = float3(0, 0, 0);
#endif
float3 vertexValue = defaultVertexValue;
#ifdef ASE_ABSOLUTE_VERTEX_POS
v.positionOS = vertexValue;
#else
v.positionOS += vertexValue;
#endif
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS);
float3 positionWS = TransformObjectToWorld(v.positionOS);
o.positionCS = TransformWorldToHClip(positionWS);
return o;
}
half4 frag(VertexOutput IN ) : SV_TARGET
{
float2 uv_MainTexture = IN.ase_texcoord.xy * _MainTexture_ST.xy + _MainTexture_ST.zw;
float4 break10 = tex2D( _MainTexture, uv_MainTexture );
#ifdef _USEREDASALPHA_ON
float staticSwitch28 = break10.r;
#else
float staticSwitch28 = break10.a;
#endif
float4 appendResult13 = (float4(break10.r , break10.g , break10.b , staticSwitch28));
float4 color52 = IsGammaSpace() ? float4( 1, 1, 1, 1 ) : float4( 1, 1, 1, 1 );
#ifdef _EMISSION_ON
float4 staticSwitch31 = _EmissionColor;
#else
float4 staticSwitch31 = color52;
#endif
float4 Color = ( ( appendResult13 * _BaseColor ) * staticSwitch31 );
half4 outColor = unity_SelectionID;
return outColor;
}
ENDHLSL
}
}
CustomEditor "AmplifyShaderEditor.MaterialInspector"
FallBack "Hidden/Shader Graph/FallbackError"
Fallback "Hidden/InternalErrorShader"
}
/*ASEBEGIN
Version=19904
Node;AmplifyShaderEditor.SamplerNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;6;-992,-272;Inherit;True;Property;_MainTexture;MainTexture;0;0;Create;True;0;0;0;False;0;False;-1;None;d6a6e786d00f297479749f8a4a290eea;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;False;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
Node;AmplifyShaderEditor.BreakToComponentsNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;10;-672,-272;Inherit;False;COLOR;1;0;COLOR;0,0,0,0;False;16;FLOAT;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT;5;FLOAT;6;FLOAT;7;FLOAT;8;FLOAT;9;FLOAT;10;FLOAT;11;FLOAT;12;FLOAT;13;FLOAT;14;FLOAT;15
Node;AmplifyShaderEditor.StaticSwitch, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;28;-496,-160;Inherit;False;Property;_UseRedAsAlpha;UseRedAsAlpha;3;0;Create;True;0;0;0;False;0;False;0;1;0;True;;Toggle;2;Key0;Key1;Create;True;True;All;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.ColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;20;-80,208;Inherit;False;Property;_EmissionColor;EmissionColor;2;1;[HDR];Create;True;0;0;0;False;0;False;0,0,0,0;0,0,0,1;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
Node;AmplifyShaderEditor.ColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;52;-80,16;Inherit;False;Constant;_Color0;Color 0;6;0;Create;True;0;0;0;False;0;False;1,1,1,1;0,0,0,0;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
Node;AmplifyShaderEditor.ColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;8;-368,-16;Inherit;False;Property;_BaseColor;BaseColor;1;0;Create;True;0;0;0;False;0;False;0,0,0,0;1,1,1,1;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
Node;AmplifyShaderEditor.DynamicAppendNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;13;-192,-272;Inherit;False;COLOR;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;COLOR;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;14;-16,-192;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
Node;AmplifyShaderEditor.StaticSwitch, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;31;192,-16;Inherit;False;Property;_Emission;Emission;4;0;Create;True;0;0;0;False;0;False;0;0;0;True;;Toggle;2;Key0;Key1;Create;True;True;All;9;1;COLOR;0,0,0,0;False;0;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;3;COLOR;0,0,0,0;False;4;COLOR;0,0,0,0;False;5;COLOR;0,0,0,0;False;6;COLOR;0,0,0,0;False;7;COLOR;0,0,0,0;False;8;COLOR;0,0,0,0;False;1;COLOR;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;21;416,-144;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;51;-992,-64;Inherit;False;Property;_ZWrite;ZWrite;5;1;[Toggle];Create;True;0;0;0;True;0;False;1;0;0;1;0;1;FLOAT;0
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;47;704,-160;Float;False;False;-1;2;AmplifyShaderEditor.MaterialInspector;0;15;New Amplify Shader;cf964e524c8e69742b1d21fbe2ebcc4a;True;Sprite Unlit Forward;0;1;Sprite Unlit Forward;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;True;0;True;12;all;0;False;True;2;5;False;_RGBBlendSrc;10;False;_RGBBlendDst;3;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;True;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForward;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;48;704,-160;Float;False;False;-1;2;AmplifyShaderEditor.MaterialInspector;0;15;New Amplify Shader;cf964e524c8e69742b1d21fbe2ebcc4a;True;SceneSelectionPass;0;2;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;True;0;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;49;704,-160;Float;False;False;-1;2;AmplifyShaderEditor.MaterialInspector;0;15;New Amplify Shader;cf964e524c8e69742b1d21fbe2ebcc4a;True;ScenePickingPass;0;3;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;True;0;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;46;704,-160;Float;False;True;-1;2;AmplifyShaderEditor.MaterialInspector;0;15;Soullies/TrackShader;cf964e524c8e69742b1d21fbe2ebcc4a;True;Sprite Unlit;0;0;Sprite Unlit;4;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;True;3;True;12;all;0;True;True;2;5;False;_RGBBlendSrc;10;False;_RGBBlendDst;3;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;True;True;1;True;_ZWrite;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=Universal2D;False;False;0;Hidden/InternalErrorShader;0;0;Standard;3;Vertex Position;1;0;Debug Display;0;0;External Alpha;0;0;0;4;True;True;True;True;False;;False;0
WireConnection;10;0;6;0
WireConnection;28;1;10;3
WireConnection;28;0;10;0
WireConnection;13;0;10;0
WireConnection;13;1;10;1
WireConnection;13;2;10;2
WireConnection;13;3;28;0
WireConnection;14;0;13;0
WireConnection;14;1;8;0
WireConnection;31;1;52;0
WireConnection;31;0;20;0
WireConnection;21;0;14;0
WireConnection;21;1;31;0
WireConnection;46;1;21;0
ASEEND*/
//CHKSM=488EB639888F9A6C060BBF0C176BB89D0D00E0DF