637 lines
24 KiB
Plaintext
637 lines
24 KiB
Plaintext
// Made with Amplify Shader Editor v1.9.5.1
|
|
// 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 Off
|
|
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_SRP_VERSION 140011
|
|
|
|
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
|
|
#define _SURFACE_TYPE_TRANSPARENT 1
|
|
#define SHADERPASS SHADERPASS_SPRITEUNLIT
|
|
|
|
#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"
|
|
|
|
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/SurfaceData2D.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging2D.hlsl"
|
|
|
|
#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
|
|
{
|
|
float4 positionOS : POSITION;
|
|
float3 normal : NORMAL;
|
|
float4 tangent : TANGENT;
|
|
float4 uv0 : TEXCOORD0;
|
|
float4 color : COLOR;
|
|
|
|
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
|
|
|
|
float4 _RendererColor;
|
|
|
|
|
|
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 );
|
|
|
|
|
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
|
float3 defaultVertexValue = v.positionOS.xyz;
|
|
#else
|
|
float3 defaultVertexValue = float3( 0, 0, 0 );
|
|
#endif
|
|
float3 vertexValue = defaultVertexValue;
|
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
|
v.positionOS.xyz = vertexValue;
|
|
#else
|
|
v.positionOS.xyz += vertexValue;
|
|
#endif
|
|
v.normal = v.normal;
|
|
v.tangent.xyz = v.tangent.xyz;
|
|
|
|
VertexPositionInputs vertexInput = GetVertexPositionInputs( v.positionOS.xyz );
|
|
|
|
o.texCoord0 = v.uv0;
|
|
o.color = v.color;
|
|
o.positionCS = vertexInput.positionCS;
|
|
o.positionWS = vertexInput.positionWS;
|
|
|
|
return o;
|
|
}
|
|
|
|
half4 frag( VertexOutput IN ) : SV_Target
|
|
{
|
|
UNITY_SETUP_INSTANCE_ID( IN );
|
|
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
|
|
|
|
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(IN.positionWS.xy, half2(IN.texCoord0.xy), inputData);
|
|
half4 debugColor = 0;
|
|
|
|
SETUP_DEBUG_DATA_2D(inputData, IN.positionWS);
|
|
|
|
if (CanDebugOverrideOutputColor(surfaceData, inputData, debugColor))
|
|
{
|
|
return debugColor;
|
|
}
|
|
#endif
|
|
|
|
Color *= IN.color * _RendererColor;
|
|
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_SRP_VERSION 140011
|
|
|
|
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
|
|
#define _SURFACE_TYPE_TRANSPARENT 1
|
|
#define SHADERPASS SHADERPASS_SPRITEFORWARD
|
|
|
|
#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"
|
|
|
|
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/SurfaceData2D.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging2D.hlsl"
|
|
|
|
#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
|
|
{
|
|
float4 positionOS : POSITION;
|
|
float3 normal : NORMAL;
|
|
float4 tangent : TANGENT;
|
|
float4 uv0 : TEXCOORD0;
|
|
float4 color : COLOR;
|
|
|
|
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
|
|
|
|
float4 _RendererColor;
|
|
|
|
|
|
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 );
|
|
|
|
|
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
|
float3 defaultVertexValue = v.positionOS.xyz;
|
|
#else
|
|
float3 defaultVertexValue = float3( 0, 0, 0 );
|
|
#endif
|
|
float3 vertexValue = defaultVertexValue;
|
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
|
v.positionOS.xyz = vertexValue;
|
|
#else
|
|
v.positionOS.xyz += vertexValue;
|
|
#endif
|
|
v.normal = v.normal;
|
|
v.tangent.xyz = v.tangent.xyz;
|
|
|
|
VertexPositionInputs vertexInput = GetVertexPositionInputs( v.positionOS.xyz );
|
|
|
|
o.texCoord0 = v.uv0;
|
|
o.color = v.color;
|
|
o.positionCS = vertexInput.positionCS;
|
|
o.positionWS = vertexInput.positionWS;
|
|
|
|
return o;
|
|
}
|
|
|
|
half4 frag( VertexOutput IN ) : SV_Target
|
|
{
|
|
UNITY_SETUP_INSTANCE_ID( IN );
|
|
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
|
|
|
|
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(IN.positionWS.xy, half2(IN.texCoord0.xy), inputData);
|
|
half4 debugColor = 0;
|
|
|
|
SETUP_DEBUG_DATA_2D(inputData, IN.positionWS);
|
|
|
|
if (CanDebugOverrideOutputColor(surfaceData, inputData, debugColor))
|
|
{
|
|
return debugColor;
|
|
}
|
|
#endif
|
|
|
|
Color *= IN.color * _RendererColor;
|
|
return Color;
|
|
}
|
|
|
|
ENDHLSL
|
|
}
|
|
|
|
Pass
|
|
{
|
|
|
|
Name "SceneSelectionPass"
|
|
Tags { "LightMode"="SceneSelectionPass" }
|
|
|
|
Cull Off
|
|
|
|
HLSLPROGRAM
|
|
|
|
#define ASE_SRP_VERSION 140011
|
|
|
|
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
|
|
#define _SURFACE_TYPE_TRANSPARENT 1
|
|
#define ATTRIBUTES_NEED_NORMAL
|
|
#define ATTRIBUTES_NEED_TANGENT
|
|
#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/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"
|
|
|
|
#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_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 );
|
|
|
|
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.xyz;
|
|
#else
|
|
float3 defaultVertexValue = float3(0, 0, 0);
|
|
#endif
|
|
float3 vertexValue = defaultVertexValue;
|
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
|
v.positionOS.xyz = vertexValue;
|
|
#else
|
|
v.positionOS.xyz += vertexValue;
|
|
#endif
|
|
|
|
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS.xyz);
|
|
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_SRP_VERSION 140011
|
|
|
|
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
|
|
#define _SURFACE_TYPE_TRANSPARENT 1
|
|
#define ATTRIBUTES_NEED_NORMAL
|
|
#define ATTRIBUTES_NEED_TANGENT
|
|
#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/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"
|
|
|
|
#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_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 );
|
|
|
|
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.xyz;
|
|
#else
|
|
float3 defaultVertexValue = float3(0, 0, 0);
|
|
#endif
|
|
float3 vertexValue = defaultVertexValue;
|
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
|
v.positionOS.xyz = vertexValue;
|
|
#else
|
|
v.positionOS.xyz += vertexValue;
|
|
#endif
|
|
|
|
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS.xyz);
|
|
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 = _SelectionID;
|
|
return outColor;
|
|
}
|
|
|
|
ENDHLSL
|
|
}
|
|
|
|
}
|
|
CustomEditor "ASEMaterialInspector"
|
|
Fallback "Hidden/InternalErrorShader"
|
|
|
|
}
|
|
/*ASEBEGIN
|
|
Version=19501
|
|
Node;AmplifyShaderEditor.SamplerNode;6;-992,-272;Inherit;True;Property;_MainTexture;MainTexture;0;0;Create;True;0;0;0;False;0;False;-1;None;b48cbbfc5b4a8f243b7275d66a4961f7;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
|
|
Node;AmplifyShaderEditor.BreakToComponentsNode;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;28;-496,-160;Inherit;False;Property;_UseRedAsAlpha;UseRedAsAlpha;3;0;Create;True;0;0;0;False;0;False;0;1;1;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;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;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.ColorNode;20;-80,208;Inherit;False;Property;_EmissionColor;EmissionColor;2;1;[HDR];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.ColorNode;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.SimpleMultiplyOpNode;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;31;192,-16;Inherit;False;Property;_Emission;Emission;4;0;Create;True;0;0;0;False;0;False;0;0;1;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;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;51;-992,-64;Inherit;False;Property;_ZWrite;ZWrite;5;1;[Toggle];Create;True;0;0;0;True;0;False;1;1;0;1;0;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;46;704,-160;Float;False;True;-1;2;ASEMaterialInspector;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;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;3;True;12;all;0;False;True;2;5;False;;10;False;;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
|
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;47;704,-160;Float;False;False;-1;2;ASEMaterialInspector;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;;10;False;;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;48;704,-160;Float;False;False;-1;2;ASEMaterialInspector;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;49;704,-160;Float;False;False;-1;2;ASEMaterialInspector;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
|
|
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=153CC78E2A8D4184FECF78C9032F5E0DC8E5F8A2 |