This commit is contained in:
SoulliesOfficial
2026-03-30 03:23:36 -04:00
parent 7533e7031d
commit 7954ec800c
56 changed files with 23688 additions and 18808 deletions

View File

@@ -0,0 +1,417 @@
// BlendUnlit.shader
// Soullies - Hand-written URP 17 Unlit Sprite/Mesh Shader
// Derived from TrackShader (ASE), rewritten for clarity and extensibility.
//
// Core Feature: Base Color * Texture, optionally multiplied by an HDR Emission Color,
// allowing illuminated objects to retain proper transparency.
// New Feature : Runtime-selectable Blend Mode (Alpha, Additive, Multiply, Premultiplied).
Shader "Soullies/BlendUnlit"
{
Properties
{
[Header(Texture)]
_MainTexture ("Main Texture", 2D) = "white" {}
[Space(8)]
[Header(Color)]
[MainColor] _BaseColor ("Base Color", Color) = (1, 1, 1, 1)
[Space(8)]
[Header(Emission)]
[Toggle(_EMISSION_ON)] _EnableEmission ("Enable Emission", Float) = 0
[HDR] _EmissionColor ("Emission Color (HDR)", Color) = (0, 0, 0, 1)
[Space(8)]
[Header(Alpha Source)]
// When toggled ON : uses the Red channel of the texture as Alpha (for single-channel masks).
// When toggled OFF : uses the A channel of the texture (standard RGBA sprite).
[Toggle(_USEREDASALPHA_ON)] _UseRedAsAlpha ("Use Red Channel as Alpha", Float) = 0
[Space(8)]
[Header(Blend Mode)]
// 0 = Alpha Blend (SrcAlpha, OneMinusSrcAlpha) standard transparent
// 1 = Additive (SrcAlpha, One) add light, black = invisible
// 2 = Multiply (DstColor, Zero) darken underlying pixels
// 3 = Premultiplied(One, OneMinusSrcAlpha) for pre-multiplied alpha textures
[KeywordEnum(Alpha, Additive, Multiply, Premultiplied)] _BlendMode ("Blend Mode", Float) = 0
[Space(8)]
[Header(Render State)]
[Enum(UnityEngine.Rendering.CullMode)] _CullMode ("Cull Mode", Float) = 2 // Back
[Enum(Off, 0, On, 1)] _ZWrite ("Z Write", Float) = 0
// Internal blend equation floats managed by BlendUnlitShaderGUI.
// Default values = Alpha blend: SrcAlpha(5), OneMinusSrcAlpha(10).
// MUST be declared here so Unity serialises them into the .mat asset
// and they survive domain reloads / Ctrl+S without resetting to 0(Zero,Zero=black).
[HideInInspector] _SrcBlendRGB ("Src Blend (Internal)", Float) = 5
[HideInInspector] _DstBlendRGB ("Dst Blend (Internal)", Float) = 10
}
SubShader
{
Tags
{
"RenderPipeline" = "UniversalPipeline"
"RenderType" = "Transparent"
"Queue" = "Transparent"
"UniversalMaterialType" = "Unlit"
"IgnoreProjector" = "True"
"PreviewType" = "Plane"
"CanUseSpriteAtlas" = "True"
}
// ---------------------------------------------------------------------------
// Blend equations for each mode (controlled by shader_feature variants):
// Alpha : SrcAlpha, OneMinusSrcAlpha (standard transparency)
// Additive : SrcAlpha, One (screen-style additive, black is invisible)
// Multiply : DstColor, Zero (multiply blend, darkens below)
// Premultiplied : One, OneMinusSrcAlpha (for pre-multiplied textures/HDR)
// ---------------------------------------------------------------------------
Cull [_CullMode]
ZWrite [_ZWrite]
ZTest LEqual
// ---------------------------------------------------------------------------
// Pass 1 Universal 2D (sprite renderer main path)
// ---------------------------------------------------------------------------
Pass
{
Name "BlendUnlit_Universal2D"
Tags { "LightMode" = "Universal2D" }
// Blend state driven by shader_feature variant
Blend [_SrcBlendRGB] [_DstBlendRGB]
HLSLPROGRAM
#pragma target 3.5
#pragma prefer_hlslcc gles
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_instancing
#pragma multi_compile_vertex _ SKINNED_SPRITE
// Feature toggles local so they only generate variants for this material
#pragma shader_feature_local_fragment _EMISSION_ON
#pragma shader_feature_local_fragment _USEREDASALPHA_ON
// Blend mode variants (local_fragment: blend equation changes are per-draw, not per-pass)
#pragma shader_feature_local _BLENDMODE_ALPHA _BLENDMODE_ADDITIVE _BLENDMODE_MULTIPLY _BLENDMODE_PREMULTIPLIED
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/Core2D.hlsl"
// -----------------------------------------------------------------------
// Shared CBUFFER (SRP Batcher compatible)
// -----------------------------------------------------------------------
TEXTURE2D(_MainTexture); SAMPLER(sampler_MainTexture);
CBUFFER_START(UnityPerMaterial)
float4 _MainTexture_ST;
half4 _BaseColor;
half4 _EmissionColor;
float _ZWrite;
float _SrcBlendRGB;
float _DstBlendRGB;
CBUFFER_END
// -----------------------------------------------------------------------
// Vertex / Fragment structs
// -----------------------------------------------------------------------
struct Attributes
{
float3 positionOS : POSITION;
float2 uv : TEXCOORD0;
half4 color : COLOR;
UNITY_SKINNED_VERTEX_INPUTS
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float2 uv : TEXCOORD0;
half4 color : COLOR;
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
// -----------------------------------------------------------------------
// Shared pixel logic (inlined as a function to avoid copy-paste)
// -----------------------------------------------------------------------
half4 ComputeColor(float2 uv, half4 vertexColor)
{
half4 texSample = SAMPLE_TEXTURE2D(_MainTexture, sampler_MainTexture, uv);
// Alpha channel selection
#if defined(_USEREDASALPHA_ON)
half texAlpha = texSample.r;
#else
half texAlpha = texSample.a;
#endif
// Reconstruct colour from texture
half4 texColor = half4(texSample.rgb, texAlpha);
// Base colour multiply (tint)
half4 color = texColor * _BaseColor;
// Emission multiply
#if defined(_EMISSION_ON)
color *= _EmissionColor;
#endif
// (when emission is OFF we simply skip the multiply equivalent to multiplying by white)
// Vertex color (Sprite tint / SpriteRenderer.color)
color *= vertexColor;
return color;
}
// -----------------------------------------------------------------------
// Vertex Shader
// -----------------------------------------------------------------------
Varyings vert(Attributes IN)
{
Varyings OUT = (Varyings)0;
UNITY_SETUP_INSTANCE_ID(IN);
UNITY_TRANSFER_INSTANCE_ID(IN, OUT);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
UNITY_SKINNED_VERTEX_COMPUTE(IN);
// Respect SpriteRenderer Flip X/Y
IN.positionOS = UnityFlipSprite(IN.positionOS, unity_SpriteProps.xy);
VertexPositionInputs vpi = GetVertexPositionInputs(IN.positionOS);
OUT.positionCS = vpi.positionCS;
OUT.uv = TRANSFORM_TEX(IN.uv, _MainTexture);
OUT.color = IN.color * unity_SpriteColor;
return OUT;
}
// -----------------------------------------------------------------------
// Fragment Shader
// -----------------------------------------------------------------------
half4 frag(Varyings IN) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(IN);
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
return ComputeColor(IN.uv, IN.color);
}
ENDHLSL
}
// ---------------------------------------------------------------------------
// Pass 2 Universal Forward (MeshRenderer / 3D object fallback path)
// ---------------------------------------------------------------------------
Pass
{
Name "BlendUnlit_Forward"
Tags { "LightMode" = "UniversalForwardOnly" }
Blend [_SrcBlendRGB] [_DstBlendRGB]
HLSLPROGRAM
#pragma target 3.5
#pragma prefer_hlslcc gles
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_instancing
#pragma multi_compile_fog
#pragma shader_feature_local_fragment _EMISSION_ON
#pragma shader_feature_local_fragment _USEREDASALPHA_ON
#pragma shader_feature_local _BLENDMODE_ALPHA _BLENDMODE_ADDITIVE _BLENDMODE_MULTIPLY _BLENDMODE_PREMULTIPLIED
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/Core2D.hlsl"
TEXTURE2D(_MainTexture); SAMPLER(sampler_MainTexture);
CBUFFER_START(UnityPerMaterial)
float4 _MainTexture_ST;
half4 _BaseColor;
half4 _EmissionColor;
float _ZWrite;
float _SrcBlendRGB;
float _DstBlendRGB;
CBUFFER_END
struct Attributes
{
float3 positionOS : POSITION;
float2 uv : TEXCOORD0;
half4 color : COLOR;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float2 uv : TEXCOORD0;
half4 color : COLOR;
half fogFactor : TEXCOORD1;
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
half4 ComputeColor(float2 uv, half4 vertexColor)
{
half4 texSample = SAMPLE_TEXTURE2D(_MainTexture, sampler_MainTexture, uv);
#if defined(_USEREDASALPHA_ON)
half texAlpha = texSample.r;
#else
half texAlpha = texSample.a;
#endif
half4 texColor = half4(texSample.rgb, texAlpha);
half4 color = texColor * _BaseColor;
#if defined(_EMISSION_ON)
color *= _EmissionColor;
#endif
color *= vertexColor;
return color;
}
Varyings vert(Attributes IN)
{
Varyings OUT = (Varyings)0;
UNITY_SETUP_INSTANCE_ID(IN);
UNITY_TRANSFER_INSTANCE_ID(IN, OUT);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
VertexPositionInputs vpi = GetVertexPositionInputs(IN.positionOS);
OUT.positionCS = vpi.positionCS;
OUT.uv = TRANSFORM_TEX(IN.uv, _MainTexture);
OUT.color = IN.color;
OUT.fogFactor = ComputeFogFactor(vpi.positionCS.z);
return OUT;
}
half4 frag(Varyings IN) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(IN);
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
half4 color = ComputeColor(IN.uv, IN.color);
color.rgb = MixFog(color.rgb, IN.fogFactor);
return color;
}
ENDHLSL
}
// ---------------------------------------------------------------------------
// Pass 3 Scene Selection (Editor picking highlight)
// ---------------------------------------------------------------------------
Pass
{
Name "SceneSelectionPass"
Tags { "LightMode" = "SceneSelectionPass" }
Cull Off
HLSLPROGRAM
#pragma target 3.5
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_instancing
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
CBUFFER_START(UnityPerMaterial)
float4 _MainTexture_ST;
half4 _BaseColor;
half4 _EmissionColor;
float _ZWrite;
float _SrcBlendRGB;
float _DstBlendRGB;
CBUFFER_END
int _ObjectId;
int _PassValue;
struct Attributes { float3 positionOS : POSITION; UNITY_VERTEX_INPUT_INSTANCE_ID };
struct Varyings { float4 positionCS : SV_POSITION; UNITY_VERTEX_INPUT_INSTANCE_ID };
Varyings vert(Attributes IN)
{
Varyings OUT = (Varyings)0;
UNITY_SETUP_INSTANCE_ID(IN);
UNITY_TRANSFER_INSTANCE_ID(IN, OUT);
OUT.positionCS = TransformObjectToHClip(IN.positionOS);
return OUT;
}
half4 frag(Varyings IN) : SV_Target
{
return half4(_ObjectId, _PassValue, 1.0, 1.0);
}
ENDHLSL
}
// ---------------------------------------------------------------------------
// Pass 4 Scene Picking (Editor object picking)
// ---------------------------------------------------------------------------
Pass
{
Name "ScenePickingPass"
Tags { "LightMode" = "Picking" }
Cull Off
HLSLPROGRAM
#pragma target 3.5
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_instancing
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
CBUFFER_START(UnityPerMaterial)
float4 _MainTexture_ST;
half4 _BaseColor;
half4 _EmissionColor;
float _ZWrite;
float _SrcBlendRGB;
float _DstBlendRGB;
CBUFFER_END
float4 _SelectionID;
struct Attributes { float3 positionOS : POSITION; UNITY_VERTEX_INPUT_INSTANCE_ID };
struct Varyings { float4 positionCS : SV_POSITION; UNITY_VERTEX_INPUT_INSTANCE_ID };
Varyings vert(Attributes IN)
{
Varyings OUT = (Varyings)0;
UNITY_SETUP_INSTANCE_ID(IN);
UNITY_TRANSFER_INSTANCE_ID(IN, OUT);
OUT.positionCS = TransformObjectToHClip(IN.positionOS);
return OUT;
}
half4 frag(Varyings IN) : SV_Target
{
return unity_SelectionID;
}
ENDHLSL
}
}
// ---------------------------------------------------------------------------
// Custom Editor: drives the Blend Mode property → actual GPU Blend state
// ---------------------------------------------------------------------------
CustomEditor "BlendUnlitShaderGUI"
FallBack "Hidden/Universal Render Pipeline/FallbackError"
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 7b9c9313dd6fd7a4c95981c520b6c617
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 70f6e77ba5967d546bca85ba9320f116
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,153 @@
// BlendUnlitShaderGUI.cs
// Custom Material Inspector for Soullies/BlendUnlit
// Drives the GPU Blend equation based on the user-selected Blend Mode.
using UnityEditor;
using UnityEngine;
using UnityEngine.Rendering;
public class BlendUnlitShaderGUI : ShaderGUI
{
// -------------------------------------------------------------------------
// Blend mode definitions
// -------------------------------------------------------------------------
enum BlendMode
{
Alpha = 0, // SrcAlpha, OneMinusSrcAlpha standard transparency
Additive = 1, // SrcAlpha, One additive / glow, black = invisible
Multiply = 2, // DstColor, Zero darkens below
Premultiplied = 3, // One, OneMinusSrcAlpha pre-multiplied alpha / HDR
}
static readonly string[] BlendModeNames =
{
"Alpha (SrcAlpha, 1-SrcAlpha)",
"Additive (SrcAlpha, One)",
"Multiply (DstColor, Zero)",
"Premultiplied (One, 1-SrcAlpha)",
};
// Src / Dst for each BlendMode entry
static readonly (UnityEngine.Rendering.BlendMode src, UnityEngine.Rendering.BlendMode dst)[] BlendEquations =
{
(UnityEngine.Rendering.BlendMode.SrcAlpha, UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha), // Alpha
(UnityEngine.Rendering.BlendMode.SrcAlpha, UnityEngine.Rendering.BlendMode.One), // Additive
(UnityEngine.Rendering.BlendMode.DstColor, UnityEngine.Rendering.BlendMode.Zero), // Multiply
(UnityEngine.Rendering.BlendMode.One, UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha), // Premultiplied
};
// -------------------------------------------------------------------------
// GUI
// -------------------------------------------------------------------------
public override void OnGUI(MaterialEditor editor, MaterialProperty[] props)
{
Material mat = editor.target as Material;
EditorGUI.BeginChangeCheck();
// Draw all standard properties EXCEPT our hidden blend props
foreach (var prop in props)
{
// Hide internal blend-equation float props from inspector
if (prop.name == "_SrcBlendRGB" || prop.name == "_DstBlendRGB")
continue;
// Replace the raw _BlendMode float with our friendly enum popup
if (prop.name == "_BlendMode")
{
EditorGUILayout.Space(4);
DrawBlendModePopup(editor, mat, prop);
EditorGUILayout.Space(4);
continue;
}
editor.ShaderProperty(prop, prop.displayName);
}
if (EditorGUI.EndChangeCheck())
{
// Apply blend equations to all selected materials
foreach (Object obj in editor.targets)
{
ApplyBlendMode((Material)obj);
}
}
EditorGUILayout.Space(8);
editor.RenderQueueField();
editor.EnableInstancingField();
editor.DoubleSidedGIField();
}
// -------------------------------------------------------------------------
// Helpers
// -------------------------------------------------------------------------
static void DrawBlendModePopup(MaterialEditor editor, Material mat, MaterialProperty prop)
{
int current = (int)prop.floatValue;
current = Mathf.Clamp(current, 0, BlendModeNames.Length - 1);
EditorGUI.BeginChangeCheck();
int selected = EditorGUILayout.Popup("Blend Mode", current, BlendModeNames);
if (EditorGUI.EndChangeCheck())
{
editor.RegisterPropertyChangeUndo("Blend Mode");
prop.floatValue = selected;
}
}
static void ApplyBlendMode(Material mat)
{
int index = Mathf.Clamp((int)mat.GetFloat("_BlendMode"), 0, BlendEquations.Length - 1);
BlendMode mode = (BlendMode)index;
// Disable all keyword variants, then enable the correct one
mat.DisableKeyword("_BLENDMODE_ALPHA");
mat.DisableKeyword("_BLENDMODE_ADDITIVE");
mat.DisableKeyword("_BLENDMODE_MULTIPLY");
mat.DisableKeyword("_BLENDMODE_PREMULTIPLIED");
switch (mode)
{
case BlendMode.Alpha:
mat.EnableKeyword("_BLENDMODE_ALPHA");
break;
case BlendMode.Additive:
mat.EnableKeyword("_BLENDMODE_ADDITIVE");
break;
case BlendMode.Multiply:
mat.EnableKeyword("_BLENDMODE_MULTIPLY");
break;
case BlendMode.Premultiplied:
mat.EnableKeyword("_BLENDMODE_PREMULTIPLIED");
break;
}
// Write the actual Blend equation floats that the Shader reads
var (src, dst) = BlendEquations[index];
mat.SetFloat("_SrcBlendRGB", (float)src);
mat.SetFloat("_DstBlendRGB", (float)dst);
// Adjust RenderQueue hint for Multiply mode
// (Multiply should typically not write ZBuffer and renders as transparent)
if (mode == BlendMode.Multiply)
{
mat.renderQueue = (int)UnityEngine.Rendering.RenderQueue.Transparent;
}
else
{
// Keep queue at Transparent for all other modes (default)
if (mat.renderQueue < (int)UnityEngine.Rendering.RenderQueue.Transparent)
mat.renderQueue = (int)UnityEngine.Rendering.RenderQueue.Transparent;
}
EditorUtility.SetDirty(mat);
}
// Called when the Shader is assigned to a material for the first time
public override void AssignNewShaderToMaterial(Material mat, Shader oldShader, Shader newShader)
{
base.AssignNewShaderToMaterial(mat, oldShader, newShader);
ApplyBlendMode(mat);
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: a63ce2b08f3c7a440abfe9cf3093850a

View File

@@ -1,16 +1,16 @@
// Made with Amplify Shader Editor v1.9.5.1
// 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
_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) = "" {}
@@ -27,6 +27,7 @@ Shader "Soullies/TrackShader"
Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" }
Cull Back
HLSLINCLUDE
#pragma target 3.5
#pragma prefer_hlslcc gles
@@ -34,13 +35,14 @@ Shader "Soullies/TrackShader"
#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" }
Tags { "LightMode"="Universal2D" }
Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
ZTest LEqual
@@ -51,26 +53,51 @@ Shader "Soullies/TrackShader"
HLSLPROGRAM
#define ASE_SRP_VERSION 140011
#define ASE_VERSION 19904
#define ASE_SRP_VERSION -1
#pragma multi_compile_instancing
#pragma vertex vert
#pragma fragment frag
#define _SURFACE_TYPE_TRANSPARENT 1
#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
@@ -86,12 +113,13 @@ Shader "Soullies/TrackShader"
struct VertexInput
{
float4 positionOS : POSITION;
float3 positionOS : POSITION;
float3 normal : NORMAL;
float4 tangent : TANGENT;
float4 uv0 : TEXCOORD0;
float4 color : COLOR;
UNITY_SKINNED_VERTEX_INPUTS
UNITY_VERTEX_INPUT_INSTANCE_ID
};
@@ -107,49 +135,53 @@ Shader "Soullies/TrackShader"
};
#if ETC1_EXTERNAL_ALPHA
TEXTURE2D( _AlphaTex ); SAMPLER( sampler_AlphaTex );
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 );
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.xyz;
float3 defaultVertexValue = v.positionOS;
#else
float3 defaultVertexValue = float3( 0, 0, 0 );
float3 defaultVertexValue = float3(0, 0, 0);
#endif
float3 vertexValue = defaultVertexValue;
#ifdef ASE_ABSOLUTE_VERTEX_POS
v.positionOS.xyz = vertexValue;
v.positionOS = vertexValue;
#else
v.positionOS.xyz += vertexValue;
v.positionOS += vertexValue;
#endif
v.normal = v.normal;
v.tangent.xyz = v.tangent.xyz;
VertexPositionInputs vertexInput = GetVertexPositionInputs( v.positionOS.xyz );
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS);
o.texCoord0 = v.uv0;
o.color = v.color;
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 );
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 );
@@ -159,7 +191,7 @@ Shader "Soullies/TrackShader"
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);
float4 color52 = IsGammaSpace() ? float4( 1, 1, 1, 1 ) : float4( 1, 1, 1, 1 );
#ifdef _EMISSION_ON
float4 staticSwitch31 = _EmissionColor;
#else
@@ -169,18 +201,18 @@ Shader "Soullies/TrackShader"
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 );
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);
InitializeInputData(positionWS.xy, half2(IN.texCoord0.xy), inputData);
half4 debugColor = 0;
SETUP_DEBUG_DATA_2D(inputData, IN.positionWS);
SETUP_DEBUG_DATA_2D(inputData, positionWS, positionCS);
if (CanDebugOverrideOutputColor(surfaceData, inputData, debugColor))
{
@@ -188,17 +220,18 @@ Shader "Soullies/TrackShader"
}
#endif
Color *= IN.color * _RendererColor;
Color *= IN.color * unity_SpriteColor;
return Color;
}
ENDHLSL
}
Pass
{
Name "Sprite Unlit Forward"
Name "Sprite Unlit Forward"
Tags { "LightMode"="UniversalForward" }
Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
@@ -210,26 +243,51 @@ Shader "Soullies/TrackShader"
HLSLPROGRAM
#define ASE_SRP_VERSION 140011
#define ASE_VERSION 19904
#define ASE_SRP_VERSION -1
#pragma multi_compile_instancing
#pragma vertex vert
#pragma fragment frag
#define _SURFACE_TYPE_TRANSPARENT 1
#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
@@ -245,12 +303,13 @@ Shader "Soullies/TrackShader"
struct VertexInput
{
float4 positionOS : POSITION;
float3 positionOS : POSITION;
float3 normal : NORMAL;
float4 tangent : TANGENT;
float4 uv0 : TEXCOORD0;
float4 color : COLOR;
UNITY_SKINNED_VERTEX_INPUTS
UNITY_VERTEX_INPUT_INSTANCE_ID
};
@@ -270,45 +329,49 @@ Shader "Soullies/TrackShader"
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 );
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.xyz;
float3 defaultVertexValue = v.positionOS;
#else
float3 defaultVertexValue = float3( 0, 0, 0 );
#endif
float3 vertexValue = defaultVertexValue;
#ifdef ASE_ABSOLUTE_VERTEX_POS
v.positionOS.xyz = vertexValue;
v.positionOS = vertexValue;
#else
v.positionOS.xyz += vertexValue;
v.positionOS += vertexValue;
#endif
v.normal = v.normal;
v.tangent.xyz = v.tangent.xyz;
VertexPositionInputs vertexInput = GetVertexPositionInputs( v.positionOS.xyz );
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS);
o.texCoord0 = v.uv0;
o.color = v.color;
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 );
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 );
@@ -318,7 +381,7 @@ Shader "Soullies/TrackShader"
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);
float4 color52 = IsGammaSpace() ? float4( 1, 1, 1, 1 ) : float4( 1, 1, 1, 1 );
#ifdef _EMISSION_ON
float4 staticSwitch31 = _EmissionColor;
#else
@@ -334,21 +397,21 @@ Shader "Soullies/TrackShader"
#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;
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, IN.positionWS);
SETUP_DEBUG_DATA_2D(inputData, positionWS, positionCS);
if (CanDebugOverrideOutputColor(surfaceData, inputData, debugColor))
{
return debugColor;
}
if (CanDebugOverrideOutputColor(surfaceData, inputData, debugColor))
{
return debugColor;
}
#endif
Color *= IN.color * _RendererColor;
Color *= IN.color * unity_SpriteColor;
return Color;
}
@@ -365,28 +428,42 @@ Shader "Soullies/TrackShader"
HLSLPROGRAM
#define ASE_SRP_VERSION 140011
#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/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
@@ -406,6 +483,7 @@ Shader "Soullies/TrackShader"
float3 normal : NORMAL;
float4 tangent : TANGENT;
float4 ase_texcoord : TEXCOORD0;
UNITY_SKINNED_VERTEX_INPUTS
UNITY_VERTEX_INPUT_INSTANCE_ID
};
@@ -416,7 +494,6 @@ Shader "Soullies/TrackShader"
UNITY_VERTEX_INPUT_INSTANCE_ID
};
int _ObjectId;
int _PassValue;
@@ -424,34 +501,38 @@ Shader "Soullies/TrackShader"
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_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.xyz;
float3 defaultVertexValue = v.positionOS;
#else
float3 defaultVertexValue = float3(0, 0, 0);
#endif
float3 vertexValue = defaultVertexValue;
#ifdef ASE_ABSOLUTE_VERTEX_POS
v.positionOS.xyz = vertexValue;
v.positionOS = vertexValue;
#else
v.positionOS.xyz += vertexValue;
v.positionOS += vertexValue;
#endif
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS.xyz);
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS);
float3 positionWS = TransformObjectToWorld(v.positionOS);
o.positionCS = TransformWorldToHClip(positionWS);
return o;
}
half4 frag(VertexOutput IN ) : SV_TARGET
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 );
@@ -461,7 +542,7 @@ Shader "Soullies/TrackShader"
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);
float4 color52 = IsGammaSpace() ? float4( 1, 1, 1, 1 ) : float4( 1, 1, 1, 1 );
#ifdef _EMISSION_ON
float4 staticSwitch31 = _EmissionColor;
#else
@@ -484,32 +565,46 @@ Shader "Soullies/TrackShader"
Name "ScenePickingPass"
Tags { "LightMode"="Picking" }
Cull Off
Cull Off
HLSLPROGRAM
#define ASE_SRP_VERSION 140011
#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/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
@@ -529,6 +624,7 @@ Shader "Soullies/TrackShader"
float3 normal : NORMAL;
float4 tangent : TANGENT;
float4 ase_texcoord : TEXCOORD0;
UNITY_SKINNED_VERTEX_INPUTS
UNITY_VERTEX_INPUT_INSTANCE_ID
};
@@ -545,27 +641,31 @@ Shader "Soullies/TrackShader"
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_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.xyz;
float3 defaultVertexValue = v.positionOS;
#else
float3 defaultVertexValue = float3(0, 0, 0);
#endif
float3 vertexValue = defaultVertexValue;
#ifdef ASE_ABSOLUTE_VERTEX_POS
v.positionOS.xyz = vertexValue;
v.positionOS = vertexValue;
#else
v.positionOS.xyz += vertexValue;
v.positionOS += vertexValue;
#endif
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS.xyz);
VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS);
float3 positionWS = TransformObjectToWorld(v.positionOS);
o.positionCS = TransformWorldToHClip(positionWS);
@@ -582,7 +682,7 @@ Shader "Soullies/TrackShader"
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);
float4 color52 = IsGammaSpace() ? float4( 1, 1, 1, 1 ) : float4( 1, 1, 1, 1 );
#ifdef _EMISSION_ON
float4 staticSwitch31 = _EmissionColor;
#else
@@ -590,7 +690,7 @@ Shader "Soullies/TrackShader"
#endif
float4 Color = ( ( appendResult13 * _BaseColor ) * staticSwitch31 );
half4 outColor = _SelectionID;
half4 outColor = unity_SelectionID;
return outColor;
}
@@ -598,27 +698,28 @@ Shader "Soullies/TrackShader"
}
}
CustomEditor "ASEMaterialInspector"
Fallback "Hidden/InternalErrorShader"
CustomEditor "AmplifyShaderEditor.MaterialInspector"
FallBack "Hidden/Shader Graph/FallbackError"
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;fe0f51232d3c144e98a40dcef497dca2;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;20;-80,208;Inherit;False;Property;_EmissionColor;EmissionColor;2;1;[HDR];Create;True;0;0;0;False;0;False;0,0,0,0;2,2,2,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.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.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;0;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;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;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
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
@@ -634,4 +735,4 @@ WireConnection;21;0;14;0
WireConnection;21;1;31;0
WireConnection;46;1;21;0
ASEEND*/
//CHKSM=E65F973E568AE6F4B05686DB263B5CECCFE0746C
//CHKSM=488EB639888F9A6C060BBF0C176BB89D0D00E0DF