更新,spine和很多优化
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 13578f887a568d846ab60366a57df135
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
Shader "Universal Render Pipeline/2D/Spine/Blend Modes/Skeleton Additive" {
|
||||
Properties {
|
||||
_Color ("Tint Color", Color) = (1,1,1,1)
|
||||
[NoScaleOffset] _MainTex ("MainTex", 2D) = "black" {}
|
||||
[Toggle(_STRAIGHT_ALPHA_INPUT)] _StraightAlphaInput("Straight Alpha Texture", Int) = 0
|
||||
_Cutoff ("Shadow alpha cutoff", Range(0,1)) = 0.1
|
||||
[MaterialToggle(_TINT_BLACK_ON)] _TintBlack("Tint Black", Float) = 0
|
||||
_Black(" Dark Color", Color) = (0,0,0,0)
|
||||
[HideInInspector] _StencilRef("Stencil Reference", Float) = 1.0
|
||||
[Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp("Stencil Comparison", Float) = 8 // Set to Always as default
|
||||
}
|
||||
|
||||
SubShader {
|
||||
Tags { "RenderPipeline" = "UniversalPipeline" "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
|
||||
LOD 100
|
||||
|
||||
Fog { Mode Off }
|
||||
Cull Off
|
||||
ZWrite Off
|
||||
Blend One One
|
||||
Lighting Off
|
||||
|
||||
Stencil {
|
||||
Ref[_StencilRef]
|
||||
Comp[_StencilComp]
|
||||
Pass Keep
|
||||
}
|
||||
|
||||
Pass {
|
||||
Tags { "LightMode" = "Universal2D" }
|
||||
|
||||
HLSLPROGRAM
|
||||
// Required to compile gles 2.0 with standard srp library
|
||||
#pragma prefer_hlslcc gles
|
||||
#pragma exclude_renderers d3d11_9x
|
||||
|
||||
// -------------------------------------
|
||||
// Unity defined keywords
|
||||
#pragma multi_compile_fog
|
||||
|
||||
//--------------------------------------
|
||||
// GPU Instancing
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
//--------------------------------------
|
||||
// Spine related keywords
|
||||
#pragma shader_feature _ _STRAIGHT_ALPHA_INPUT
|
||||
#pragma shader_feature _TINT_BLACK_ON
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#undef LIGHTMAP_ON
|
||||
|
||||
#define USE_URP
|
||||
#define fixed4 half4
|
||||
#define fixed3 half3
|
||||
#define fixed half
|
||||
#define APPLY_MATERIAL_TINT_COLOR
|
||||
#include "../../Include/Spine-Input-URP.hlsl"
|
||||
#include "../../Include/Spine-Skeleton-ForwardPass-URP.hlsl"
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 89db47a797aee6e41a98c42d53175ee0
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
Shader "Universal Render Pipeline/2D/Spine/Blend Modes/Skeleton Multiply" {
|
||||
Properties {
|
||||
_Color ("Tint Color", Color) = (1,1,1,1)
|
||||
[NoScaleOffset] _MainTex ("MainTex", 2D) = "black" {}
|
||||
[Toggle(_STRAIGHT_ALPHA_INPUT)] _StraightAlphaInput("Straight Alpha Texture", Int) = 0
|
||||
_Cutoff ("Shadow alpha cutoff", Range(0,1)) = 0.1
|
||||
[MaterialToggle(_TINT_BLACK_ON)] _TintBlack("Tint Black", Float) = 0
|
||||
_Black(" Dark Color", Color) = (0,0,0,0)
|
||||
[HideInInspector] _StencilRef("Stencil Reference", Float) = 1.0
|
||||
[Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp("Stencil Comparison", Float) = 8 // Set to Always as default
|
||||
}
|
||||
|
||||
SubShader {
|
||||
Tags { "RenderPipeline" = "UniversalPipeline" "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
|
||||
LOD 100
|
||||
|
||||
Fog { Mode Off }
|
||||
Cull Off
|
||||
ZWrite Off
|
||||
Blend DstColor OneMinusSrcAlpha
|
||||
Lighting Off
|
||||
|
||||
Stencil {
|
||||
Ref[_StencilRef]
|
||||
Comp[_StencilComp]
|
||||
Pass Keep
|
||||
}
|
||||
|
||||
Pass {
|
||||
Tags { "LightMode" = "Universal2D" }
|
||||
|
||||
HLSLPROGRAM
|
||||
// Required to compile gles 2.0 with standard srp library
|
||||
#pragma prefer_hlslcc gles
|
||||
#pragma exclude_renderers d3d11_9x
|
||||
|
||||
// -------------------------------------
|
||||
// Unity defined keywords
|
||||
#pragma multi_compile_fog
|
||||
|
||||
//--------------------------------------
|
||||
// GPU Instancing
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
//--------------------------------------
|
||||
// Spine related keywords
|
||||
#pragma shader_feature _ _STRAIGHT_ALPHA_INPUT
|
||||
#pragma shader_feature _TINT_BLACK_ON
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#undef LIGHTMAP_ON
|
||||
|
||||
#define USE_URP
|
||||
#define fixed4 half4
|
||||
#define fixed3 half3
|
||||
#define fixed half
|
||||
#define APPLY_MATERIAL_TINT_COLOR
|
||||
#include "../../Include/Spine-Input-URP.hlsl"
|
||||
#include "../../Include/Spine-Skeleton-ForwardPass-URP.hlsl"
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f560912e0cd8804db3fa22dc95d50b3
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
Shader "Universal Render Pipeline/2D/Spine/Blend Modes/Skeleton Screen" {
|
||||
Properties {
|
||||
_Color ("Tint Color", Color) = (1,1,1,1)
|
||||
[NoScaleOffset] _MainTex ("MainTex", 2D) = "black" {}
|
||||
[Toggle(_STRAIGHT_ALPHA_INPUT)] _StraightAlphaInput("Straight Alpha Texture", Int) = 0
|
||||
_Cutoff ("Shadow alpha cutoff", Range(0,1)) = 0.1
|
||||
[MaterialToggle(_TINT_BLACK_ON)] _TintBlack("Tint Black", Float) = 0
|
||||
_Black(" Dark Color", Color) = (0,0,0,0)
|
||||
[HideInInspector] _StencilRef("Stencil Reference", Float) = 1.0
|
||||
[Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp("Stencil Comparison", Float) = 8 // Set to Always as default
|
||||
}
|
||||
|
||||
SubShader {
|
||||
Tags { "RenderPipeline" = "UniversalPipeline" "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
|
||||
LOD 100
|
||||
|
||||
Fog { Mode Off }
|
||||
Cull Off
|
||||
ZWrite Off
|
||||
Blend One OneMinusSrcColor
|
||||
Lighting Off
|
||||
|
||||
Stencil {
|
||||
Ref[_StencilRef]
|
||||
Comp[_StencilComp]
|
||||
Pass Keep
|
||||
}
|
||||
|
||||
Pass {
|
||||
Tags { "LightMode" = "Universal2D" }
|
||||
|
||||
HLSLPROGRAM
|
||||
// Required to compile gles 2.0 with standard srp library
|
||||
#pragma prefer_hlslcc gles
|
||||
#pragma exclude_renderers d3d11_9x
|
||||
|
||||
// -------------------------------------
|
||||
// Unity defined keywords
|
||||
#pragma multi_compile_fog
|
||||
|
||||
//--------------------------------------
|
||||
// GPU Instancing
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
//--------------------------------------
|
||||
// Spine related keywords
|
||||
#pragma shader_feature _ _STRAIGHT_ALPHA_INPUT
|
||||
#pragma shader_feature _TINT_BLACK_ON
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#undef LIGHTMAP_ON
|
||||
|
||||
#define USE_URP
|
||||
#define fixed4 half4
|
||||
#define fixed3 half3
|
||||
#define fixed half
|
||||
#define APPLY_MATERIAL_TINT_COLOR
|
||||
#include "../../Include/Spine-Input-URP.hlsl"
|
||||
#include "../../Include/Spine-Skeleton-ForwardPass-URP.hlsl"
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 34092fc5b4942fc419d3366436419178
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a693acdf2b15846428ba98907cda56ce
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
#ifndef SKELETONLIT_UNLIT_PASS_INCLUDED
|
||||
#define SKELETONLIT_UNLIT_PASS_INCLUDED
|
||||
|
||||
struct Attributes
|
||||
{
|
||||
float3 positionOS : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct Varyings
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
TEXTURE2D(_MainTex);
|
||||
SAMPLER(sampler_MainTex);
|
||||
float4 _MainTex_ST;
|
||||
|
||||
Varyings UnlitVertex(Attributes attributes)
|
||||
{
|
||||
Varyings o = (Varyings)0;
|
||||
|
||||
o.positionCS = TransformObjectToHClip(attributes.positionOS);
|
||||
o.uv = TRANSFORM_TEX(attributes.uv, _MainTex);
|
||||
o.uv = attributes.uv;
|
||||
o.color = attributes.color;
|
||||
return o;
|
||||
}
|
||||
|
||||
float4 UnlitFragment(Varyings i) : SV_Target
|
||||
{
|
||||
half4 tex = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv);
|
||||
half4 main;
|
||||
#if defined(_STRAIGHT_ALPHA_INPUT)
|
||||
main.rgb = tex.rgb * i.color.rgb * tex.a;
|
||||
#else
|
||||
main.rgb = tex.rgb * i.color.rgb;
|
||||
#endif
|
||||
main.a = tex.a * i.color.a;
|
||||
|
||||
return main;
|
||||
}
|
||||
|
||||
#endif
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 580dd7e812fc63c4a9330abe519946de
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
#ifndef SPRITE_NORMALS_PASS_URP_INCLUDED
|
||||
#define SPRITE_NORMALS_PASS_URP_INCLUDED
|
||||
|
||||
#include "Packages/com.esotericsoftware.spine.urp-shaders/Shaders/Include/SpineCoreShaders/ShaderShared.cginc"
|
||||
#include "Packages/com.esotericsoftware.spine.urp-shaders/Shaders/Include/SpineCoreShaders/SpriteLighting.cginc"
|
||||
|
||||
struct Varyings
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 uv : TEXCOORD0;
|
||||
float3 normalWS : TEXCOORD1;
|
||||
float3 tangentWS : TEXCOORD2;
|
||||
float3 bitangentWS : TEXCOORD3;
|
||||
};
|
||||
|
||||
SAMPLER(sampler_BumpMap);
|
||||
float4 _BumpMap_ST;
|
||||
|
||||
Varyings NormalsRenderingVertex(VertexInput attributes)
|
||||
{
|
||||
Varyings o = (Varyings)0;
|
||||
|
||||
o.positionCS = calculateLocalPos(attributes.vertex);
|
||||
o.uv = attributes.texcoord.xy;
|
||||
o.color = attributes.color;
|
||||
o.normalWS = TransformObjectToWorldDir(float3(0, 0, -1));
|
||||
|
||||
float3 positionWS = TransformObjectToWorld(attributes.vertex.xyz);
|
||||
|
||||
float backFaceSign = 1;
|
||||
#if defined(FIXED_NORMALS_BACKFACE_RENDERING)
|
||||
backFaceSign = calculateBackfacingSign(positionWS.xyz);
|
||||
#endif
|
||||
|
||||
half3 normalWS = calculateSpriteWorldNormal(attributes, -backFaceSign);
|
||||
o.normalWS.xyz = normalWS;
|
||||
|
||||
#if defined(_NORMALMAP)
|
||||
o.tangentWS.xyz = calculateWorldTangent(attributes.tangent);
|
||||
o.bitangentWS.xyz = calculateSpriteWorldBinormal(attributes, o.normalWS.xyz, o.tangentWS.xyz, backFaceSign);
|
||||
#endif
|
||||
return o;
|
||||
}
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/NormalsRenderingShared.hlsl"
|
||||
half4 NormalsRenderingFragment(Varyings i) : SV_Target
|
||||
{
|
||||
half4 mainTex = i.color * tex2D(_MainTex, i.uv);
|
||||
|
||||
#if defined(_NORMALMAP)
|
||||
half3 normalTS = normalize(UnpackScaleNormal(tex2D(_BumpMap, i.uv.xy), _BumpScale));
|
||||
return NormalsRenderingShared(mainTex, normalTS, i.tangentWS.xyz, i.bitangentWS.xyz, i.normalWS.xyz);
|
||||
#else
|
||||
half3 normalTS = half3(0, 0, 1);
|
||||
half3 tangentWS = half3(0, 0, 0);
|
||||
half3 bitangentWS = half3(0, 0, 0);
|
||||
half3 normalWS = i.normalWS.xyz;
|
||||
return NormalsRenderingShared(mainTex, normalTS, tangentWS, bitangentWS, normalWS);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9057c6890fc765846aa6561463305af9
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+145
@@ -0,0 +1,145 @@
|
||||
#ifndef SPRITE_STANDARD_PASS_URP_INCLUDED
|
||||
#define SPRITE_STANDARD_PASS_URP_INCLUDED
|
||||
|
||||
#include "Packages/com.esotericsoftware.spine.urp-shaders/Shaders/Include/SpineCoreShaders/ShaderShared.cginc"
|
||||
#include "Packages/com.esotericsoftware.spine.urp-shaders/Shaders/Include/SpineCoreShaders/SpriteLighting.cginc"
|
||||
#if defined(_ALPHAPREMULTIPLY_ON)
|
||||
#undef _STRAIGHT_ALPHA_INPUT
|
||||
#elif !defined(_STRAIGHT_ALPHA_INPUT)
|
||||
#define _STRAIGHT_ALPHA_INPUT
|
||||
#endif
|
||||
#include "Packages/com.esotericsoftware.spine.urp-shaders/Shaders/Include/SpineCoreShaders/Spine-Skeleton-Tint-Common.cginc"
|
||||
|
||||
#if UNITY_VERSION < 60030000 // before Unity 6000.3
|
||||
#if USE_SHAPE_LIGHT_TYPE_0
|
||||
SHAPE_LIGHT(0)
|
||||
#endif
|
||||
|
||||
#if USE_SHAPE_LIGHT_TYPE_1
|
||||
SHAPE_LIGHT(1)
|
||||
#endif
|
||||
|
||||
#if USE_SHAPE_LIGHT_TYPE_2
|
||||
SHAPE_LIGHT(2)
|
||||
#endif
|
||||
|
||||
#if USE_SHAPE_LIGHT_TYPE_3
|
||||
SHAPE_LIGHT(3)
|
||||
#endif
|
||||
#endif // #if UNITY_VERSION < 60030000 // before Unity 6000.3
|
||||
|
||||
TEXTURE2D(_MaskTex);
|
||||
SAMPLER(sampler_MaskTex);
|
||||
|
||||
struct VertexOutputSpriteURP2D
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
half4 vertexColor : COLOR;
|
||||
float3 texcoord : TEXCOORD0;
|
||||
float2 lightingUV : TEXCOORD1;
|
||||
|
||||
half3 viewDirectionWS : TEXCOORD2;
|
||||
|
||||
#if defined(_NORMALMAP)
|
||||
half4 normalWorld : TEXCOORD4;
|
||||
half4 tangentWorld : TEXCOORD5;
|
||||
half4 binormalWorld : TEXCOORD6;
|
||||
#else
|
||||
half3 normalWorld : TEXCOORD4;
|
||||
#endif
|
||||
#if defined(_RIM_LIGHTING)
|
||||
float4 positionWS : TEXCOORD8;
|
||||
#endif
|
||||
|
||||
#if defined(_TINT_BLACK_ON)
|
||||
float3 darkColor : TEXCOORD9;
|
||||
#endif
|
||||
};
|
||||
|
||||
VertexOutputSpriteURP2D CombinedShapeLightVertex(VertexInput input)
|
||||
{
|
||||
VertexOutputSpriteURP2D output = (VertexOutputSpriteURP2D)0;
|
||||
|
||||
UNITY_SETUP_INSTANCE_ID(input);
|
||||
|
||||
output.pos = calculateLocalPos(input.vertex);
|
||||
float4 clipVertex = output.pos / output.pos.w;
|
||||
output.lightingUV = ComputeScreenPos(clipVertex).xy;
|
||||
|
||||
output.vertexColor = calculateVertexColor(input.color);
|
||||
#if defined(_TINT_BLACK_ON)
|
||||
output.darkColor = GammaToTargetSpace(
|
||||
half3(input.tintBlackRG.r, input.tintBlackRG.g, input.tintBlackB.r)) + (_Black.rgb * input.color.a);
|
||||
#endif
|
||||
|
||||
output.texcoord = float3(calculateTextureCoord(input.texcoord), 0);
|
||||
|
||||
float3 positionWS = TransformObjectToWorld(input.vertex.xyz);
|
||||
|
||||
float backFaceSign = 1;
|
||||
#if defined(FIXED_NORMALS_BACKFACE_RENDERING)
|
||||
backFaceSign = calculateBackfacingSign(positionWS.xyz);
|
||||
#endif
|
||||
output.viewDirectionWS = GetCameraPositionWS() - positionWS;
|
||||
|
||||
#if defined(_RIM_LIGHTING)
|
||||
output.positionWS = float4(positionWS, 1);
|
||||
#endif
|
||||
half3 normalWS = calculateSpriteWorldNormal(input, -backFaceSign);
|
||||
output.normalWorld.xyz = normalWS;
|
||||
|
||||
#if defined(_RIM_LIGHTING)
|
||||
#if defined(_NORMALMAP)
|
||||
output.tangentWorld.xyz = calculateWorldTangent(input.tangent);
|
||||
output.binormalWorld.xyz = calculateSpriteWorldBinormal(input, output.normalWorld.xyz, output.tangentWorld.xyz, backFaceSign);
|
||||
#endif
|
||||
#endif
|
||||
return output;
|
||||
}
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/CombinedShapeLightShared.hlsl"
|
||||
|
||||
half4 CombinedShapeLightFragment(VertexOutputSpriteURP2D input) : SV_Target
|
||||
{
|
||||
fixed4 texureColor = calculateTexturePixel(input.texcoord.xy);
|
||||
RETURN_UNLIT_IF_ADDITIVE_SLOT_TINT(texureColor, input.vertexColor, input.darkColor, _Color.a, _Black.a) // shall be called before ALPHA_CLIP
|
||||
ALPHA_CLIP(texureColor, input.vertexColor)
|
||||
#if defined(_TINT_BLACK_ON)
|
||||
half4 main = fragTintedColor(texureColor, input.darkColor, input.vertexColor, _Color.a, _Black.a);
|
||||
#else
|
||||
half4 main = texureColor * input.vertexColor;
|
||||
#endif
|
||||
|
||||
half4 mask = SAMPLE_TEXTURE2D(_MaskTex, sampler_MaskTex, input.texcoord.xy);
|
||||
// un-premultiply for additive lights in CombinedShapeLightShared, reapply afterwards
|
||||
main.rgb = main.a < 0.001 ? main.rgb : main.rgb / main.a; // < epsilon prevents imprecision issues on some HW.
|
||||
#if UNITY_VERSION < 202120
|
||||
half4 pixel = half4(CombinedShapeLightShared(half4(main.rgb, 1), mask, input.lightingUV).rgb * main.a, main.a);
|
||||
#else
|
||||
SurfaceData2D surfaceData;
|
||||
InputData2D inputData;
|
||||
surfaceData.albedo = main.rgb;
|
||||
surfaceData.alpha = 1;
|
||||
surfaceData.mask = mask;
|
||||
inputData.uv = input.texcoord.xy;
|
||||
inputData.lightingUV = input.lightingUV;
|
||||
half4 pixel = half4(CombinedShapeLightShared(surfaceData, inputData).rgb * main.a, main.a);
|
||||
#endif
|
||||
|
||||
#if defined(_RIM_LIGHTING)
|
||||
#if defined(_NORMALMAP)
|
||||
half3 normalWS = calculateNormalFromBumpMap(input.texcoord.xy, input.tangentWorld.xyz, input.binormalWorld.xyz, input.normalWorld.xyz);
|
||||
#else
|
||||
half3 normalWS = input.normalWorld.xyz;
|
||||
#endif
|
||||
|
||||
pixel.rgb = applyRimLighting(input.positionWS.xyz, normalWS, pixel);
|
||||
#endif
|
||||
|
||||
APPLY_EMISSION(pixel.rgb, input.texcoord.xy)
|
||||
pixel = prepareLitPixelForOutput(pixel, texureColor.a, input.vertexColor.a);
|
||||
COLORISE(pixel)
|
||||
return pixel;
|
||||
}
|
||||
|
||||
#endif
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f1eb74802463764986790ef549c5bbe
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0af30802537ded04e8572b42120249b5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
Shader "Universal Render Pipeline/2D/Spine/Outline/Skeleton" {
|
||||
Properties {
|
||||
_Cutoff("Shadow alpha cutoff", Range(0,1)) = 0.1
|
||||
[NoScaleOffset] _MainTex("Main Texture", 2D) = "black" {}
|
||||
[Toggle(_STRAIGHT_ALPHA_INPUT)] _StraightAlphaInput("Straight Alpha Texture", Int) = 0
|
||||
[MaterialToggle(_TINT_BLACK_ON)] _TintBlack("Tint Black", Float) = 0
|
||||
_Color(" Light Color", Color) = (1,1,1,1)
|
||||
_Black(" Dark Color", Color) = (0,0,0,0)
|
||||
[HideInInspector] _StencilRef("Stencil Reference", Float) = 1.0
|
||||
[Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp("Stencil Comparison", Float) = 8 // Set to Always as default
|
||||
|
||||
// Outline properties are drawn via custom editor.
|
||||
[HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0
|
||||
[HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0
|
||||
[HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1)
|
||||
[HideInInspector][MaterialToggle(_OUTLINE_FILL_INSIDE)]_Fill("Fill", Float) = 0
|
||||
[HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024
|
||||
[HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25
|
||||
[HideInInspector] _OutlineSmoothness("Outline Smoothness", Range(0,1)) = 1.0
|
||||
[HideInInspector][MaterialToggle(_USE8NEIGHBOURHOOD_ON)] _Use8Neighbourhood("Sample 8 Neighbours", Float) = 1
|
||||
[HideInInspector] _OutlineOpaqueAlpha("Opaque Alpha", Range(0,1)) = 1.0
|
||||
[HideInInspector] _OutlineMipLevel("Outline Mip Level", Range(0,3)) = 0
|
||||
}
|
||||
|
||||
SubShader {
|
||||
// Universal Pipeline tag is required. If Universal render pipeline is not set in the graphics settings
|
||||
// this Subshader will fail.
|
||||
Tags { "RenderPipeline" = "UniversalPipeline" "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
|
||||
LOD 100
|
||||
Cull Off
|
||||
ZWrite Off
|
||||
Blend One OneMinusSrcAlpha
|
||||
|
||||
Stencil {
|
||||
Ref[_StencilRef]
|
||||
Comp[_StencilComp]
|
||||
Pass Keep
|
||||
}
|
||||
|
||||
Pass {
|
||||
Cull Off
|
||||
ZWrite Off
|
||||
Blend One OneMinusSrcAlpha
|
||||
|
||||
Name "Outline"
|
||||
Tags { "LightMode" = "SRPDefaultUnlit" "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
|
||||
HLSLPROGRAM
|
||||
// Required to compile gles 2.0 with standard srp library
|
||||
#pragma prefer_hlslcc gles
|
||||
#pragma exclude_renderers d3d11_9x
|
||||
|
||||
//--------------------------------------
|
||||
// GPU Instancing
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma vertex vertOutline
|
||||
#pragma fragment fragOutline
|
||||
#pragma shader_feature _ _USE8NEIGHBOURHOOD_ON
|
||||
#pragma shader_feature _ _USE_SCREENSPACE_OUTLINE_WIDTH
|
||||
#pragma shader_feature _ _OUTLINE_FILL_INSIDE
|
||||
|
||||
#pragma fragmentoption ARB_precision_hint_fastest
|
||||
#pragma multi_compile_local _ PIXELSNAP_ON
|
||||
|
||||
#define USE_URP
|
||||
#define fixed4 half4
|
||||
#define fixed3 half3
|
||||
#define fixed half
|
||||
#define NO_CUTOFF_PARAM
|
||||
#include "../../Include/Spine-Input-Outline-URP.hlsl"
|
||||
#include "../../Include/Spine-Outline-Pass-URP.hlsl"
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
UsePass "Universal Render Pipeline/2D/Spine/Skeleton/UNIVERSAL2D"
|
||||
}
|
||||
|
||||
FallBack "Universal Render Pipeline/2D/Sprite-Unlit-Default"
|
||||
CustomEditor "SpineShaderWithOutlineGUI"
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 50bfc4df5fd4cf442b1015e5ad01bdc9
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
Shader "Universal Render Pipeline/2D/Spine/Outline/Skeleton Lit" {
|
||||
Properties {
|
||||
[NoScaleOffset] _MainTex ("Main Texture", 2D) = "black" {}
|
||||
[NoScaleOffset] _MaskTex("Mask", 2D) = "white" {}
|
||||
[Toggle(_STRAIGHT_ALPHA_INPUT)] _StraightAlphaInput("Straight Alpha Texture", Int) = 0
|
||||
[MaterialToggle(_LIGHT_AFFECTS_ADDITIVE)] _LightAffectsAdditive("Light Affects Additive", Float) = 0
|
||||
[MaterialToggle(_TINT_BLACK_ON)] _TintBlack("Tint Black", Float) = 0
|
||||
_Color(" Light Color", Color) = (1,1,1,1)
|
||||
_Black(" Dark Color", Color) = (0,0,0,0)
|
||||
[HideInInspector] _StencilRef("Stencil Reference", Float) = 1.0
|
||||
[Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp("Stencil Compare", Float) = 8 // Set to Always as default
|
||||
|
||||
// Outline properties are drawn via custom editor.
|
||||
[HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0
|
||||
[HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0
|
||||
[HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1)
|
||||
[HideInInspector][MaterialToggle(_OUTLINE_FILL_INSIDE)]_Fill("Fill", Float) = 0
|
||||
[HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024
|
||||
[HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25
|
||||
[HideInInspector] _OutlineSmoothness("Outline Smoothness", Range(0,1)) = 1.0
|
||||
[HideInInspector][MaterialToggle(_USE8NEIGHBOURHOOD_ON)] _Use8Neighbourhood("Sample 8 Neighbours", Float) = 1
|
||||
[HideInInspector] _OutlineOpaqueAlpha("Opaque Alpha", Range(0,1)) = 1.0
|
||||
[HideInInspector] _OutlineMipLevel("Outline Mip Level", Range(0,3)) = 0
|
||||
}
|
||||
|
||||
HLSLINCLUDE
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
ENDHLSL
|
||||
|
||||
SubShader {
|
||||
// UniversalPipeline tag is required. If Universal render pipeline is not set in the graphics settings
|
||||
// this Subshader will fail.
|
||||
Tags {"Queue" = "Transparent" "RenderType" = "Transparent" "RenderPipeline" = "UniversalPipeline" "IgnoreProjector" = "True" }
|
||||
Cull Off
|
||||
ZWrite Off
|
||||
|
||||
Stencil {
|
||||
Ref[_StencilRef]
|
||||
Comp[_StencilComp]
|
||||
Pass Keep
|
||||
}
|
||||
|
||||
Pass {
|
||||
ZWrite Off
|
||||
Cull Off
|
||||
Blend One OneMinusSrcAlpha
|
||||
|
||||
Name "Outline"
|
||||
Tags { "LightMode" = "SRPDefaultUnlit" "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
|
||||
HLSLPROGRAM
|
||||
// Required to compile gles 2.0 with standard srp library
|
||||
#pragma prefer_hlslcc gles
|
||||
#pragma exclude_renderers d3d11_9x
|
||||
|
||||
//--------------------------------------
|
||||
// GPU Instancing
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma vertex vertOutline
|
||||
#pragma fragment fragOutline
|
||||
#pragma shader_feature _ _USE8NEIGHBOURHOOD_ON
|
||||
#pragma shader_feature _ _USE_SCREENSPACE_OUTLINE_WIDTH
|
||||
#pragma shader_feature _ _OUTLINE_FILL_INSIDE
|
||||
|
||||
#pragma fragmentoption ARB_precision_hint_fastest
|
||||
#pragma multi_compile_local _ PIXELSNAP_ON
|
||||
|
||||
#define USE_URP
|
||||
#define fixed4 half4
|
||||
#define fixed3 half3
|
||||
#define fixed half
|
||||
#define NO_CUTOFF_PARAM
|
||||
#include "../../Include/Spine-Input-Outline-URP.hlsl"
|
||||
#include "../../Include/Spine-Outline-Pass-URP.hlsl"
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
UsePass "Universal Render Pipeline/2D/Spine/Skeleton Lit/UNIVERSAL2D"
|
||||
|
||||
UsePass "Universal Render Pipeline/2D/Spine/Skeleton Lit/NORMALS"
|
||||
|
||||
UsePass "Universal Render Pipeline/2D/Spine/Skeleton Lit/UNLIT"
|
||||
}
|
||||
FallBack "Universal Render Pipeline/2D/Spine/Skeleton"
|
||||
CustomEditor "SpineShaderWithOutlineGUI"
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: debb879e3f89c5f41ac0ab285486e162
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
Shader "Universal Render Pipeline/2D/Spine/Outline/Sprite"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainTex("Main Texture", 2D) = "white" {}
|
||||
_MaskTex("Mask", 2D) = "white" {}
|
||||
_Color("Color", Color) = (1,1,1,1)
|
||||
|
||||
_BumpScale("Scale", Float) = 1.0
|
||||
_BumpMap("Normal Map", 2D) = "bump" {}
|
||||
|
||||
[MaterialToggle] PixelSnap("Pixel snap", Float) = 0
|
||||
|
||||
_EmissionColor("Color", Color) = (0,0,0,0)
|
||||
_EmissionMap("Emission", 2D) = "white" {}
|
||||
_EmissionPower("Emission Power", Float) = 2.0
|
||||
|
||||
_FixedNormal("Fixed Normal", Vector) = (0,0,1,1)
|
||||
_ZWrite("Depth Write", Float) = 0.0
|
||||
_Cutoff("Depth alpha cutoff", Range(0,1)) = 0.0
|
||||
_ShadowAlphaCutoff("Shadow alpha cutoff", Range(0,1)) = 0.1
|
||||
_CustomRenderQueue("Custom Render Queue", Float) = 0.0
|
||||
|
||||
_OverlayColor("Overlay Color", Color) = (0,0,0,0)
|
||||
_Hue("Hue", Range(-0.5,0.5)) = 0.0
|
||||
_Saturation("Saturation", Range(0,2)) = 1.0
|
||||
_Brightness("Brightness", Range(0,2)) = 1.0
|
||||
|
||||
_RimPower("Rim Power", Float) = 2.0
|
||||
_RimColor("Rim Color", Color) = (1,1,1,1)
|
||||
|
||||
_BlendTex("Blend Texture", 2D) = "white" {}
|
||||
_BlendAmount("Blend", Range(0,1)) = 0.0
|
||||
|
||||
[MaterialToggle(_LIGHT_AFFECTS_ADDITIVE)] _LightAffectsAdditive("Light Affects Additive", Float) = 0
|
||||
[MaterialToggle(_TINT_BLACK_ON)] _TintBlack("Tint Black", Float) = 0
|
||||
_Black("Dark Color", Color) = (0,0,0,0)
|
||||
|
||||
[HideInInspector] _SrcBlend("__src", Float) = 1.0
|
||||
[HideInInspector] _DstBlend("__dst", Float) = 0.0
|
||||
[HideInInspector] _RenderQueue("__queue", Float) = 0.0
|
||||
[HideInInspector] _Cull("__cull", Float) = 0.0
|
||||
[HideInInspector] _StencilRef("Stencil Reference", Float) = 1.0
|
||||
[Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp("Stencil Compare", Float) = 8 // Set to Always as default
|
||||
|
||||
// Outline properties are drawn via custom editor.
|
||||
[HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0
|
||||
[HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0
|
||||
[HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1)
|
||||
[HideInInspector][MaterialToggle(_OUTLINE_FILL_INSIDE)]_Fill("Fill", Float) = 0
|
||||
[HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024
|
||||
[HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25
|
||||
[HideInInspector] _OutlineSmoothness("Outline Smoothness", Range(0,1)) = 1.0
|
||||
[HideInInspector][MaterialToggle(_USE8NEIGHBOURHOOD_ON)] _Use8Neighbourhood("Sample 8 Neighbours", Float) = 1
|
||||
[HideInInspector] _OutlineOpaqueAlpha("Opaque Alpha", Range(0,1)) = 1.0
|
||||
[HideInInspector] _OutlineMipLevel("Outline Mip Level", Range(0,3)) = 0
|
||||
}
|
||||
|
||||
HLSLINCLUDE
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
ENDHLSL
|
||||
|
||||
SubShader
|
||||
{
|
||||
// UniversalPipeline tag is required. If Universal render pipeline is not set in the graphics settings
|
||||
// this Subshader will fail.
|
||||
Tags {"Queue" = "Transparent" "RenderType" = "Sprite" "RenderPipeline" = "UniversalPipeline" "IgnoreProjector" = "True" "AlphaDepth" = "False" "CanUseSpriteAtlas" = "True" }
|
||||
|
||||
Stencil {
|
||||
Ref[_StencilRef]
|
||||
Comp[_StencilComp]
|
||||
Pass Keep
|
||||
}
|
||||
|
||||
Blend One OneMinusSrcAlpha
|
||||
ZWrite[_ZWrite]
|
||||
Cull[_Cull]
|
||||
|
||||
Pass {
|
||||
Name "Outline"
|
||||
Tags { "LightMode" = "SRPDefaultUnlit" "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
|
||||
HLSLPROGRAM
|
||||
// Required to compile gles 2.0 with standard srp library
|
||||
#pragma prefer_hlslcc gles
|
||||
#pragma exclude_renderers d3d11_9x
|
||||
|
||||
//--------------------------------------
|
||||
// GPU Instancing
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma vertex vertOutline
|
||||
#pragma fragment fragOutline
|
||||
#pragma shader_feature _ _USE8NEIGHBOURHOOD_ON
|
||||
#pragma shader_feature _ _USE_SCREENSPACE_OUTLINE_WIDTH
|
||||
#pragma shader_feature _ _OUTLINE_FILL_INSIDE
|
||||
|
||||
#pragma fragmentoption ARB_precision_hint_fastest
|
||||
#pragma multi_compile_local _ PIXELSNAP_ON
|
||||
|
||||
#define USE_URP
|
||||
#define fixed4 half4
|
||||
#define fixed3 half3
|
||||
#define fixed half
|
||||
#define NO_CUTOFF_PARAM
|
||||
#include "../../Include/Spine-Input-Outline-URP.hlsl"
|
||||
#include "../../Include/Spine-Outline-Pass-URP.hlsl"
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
UsePass "Universal Render Pipeline/2D/Spine/Sprite/UNIVERSAL2D"
|
||||
|
||||
UsePass "Universal Render Pipeline/2D/Spine/Sprite/NORMALS"
|
||||
|
||||
UsePass "Universal Render Pipeline/2D/Spine/Sprite/UNLIT"
|
||||
}
|
||||
|
||||
FallBack "Universal Render Pipeline/2D/Spine/Skeleton Lit"
|
||||
CustomEditor "SpineSpriteShaderGUI"
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d8278e30a6ef40244a03e6b6227ba490
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Vendored
+82
@@ -0,0 +1,82 @@
|
||||
Shader "Universal Render Pipeline/2D/Spine/Skeleton" {
|
||||
Properties {
|
||||
_Cutoff("Shadow alpha cutoff", Range(0,1)) = 0.1
|
||||
[NoScaleOffset] _MainTex("Main Texture", 2D) = "black" {}
|
||||
[Toggle(_STRAIGHT_ALPHA_INPUT)] _StraightAlphaInput("Straight Alpha Texture", Int) = 0
|
||||
[MaterialToggle(_TINT_BLACK_ON)] _TintBlack("Tint Black", Float) = 0
|
||||
_Color(" Light Color", Color) = (1,1,1,1)
|
||||
_Black(" Dark Color", Color) = (0,0,0,0)
|
||||
[HideInInspector] _StencilRef("Stencil Reference", Float) = 1.0
|
||||
[Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp("Stencil Comparison", Float) = 8 // Set to Always as default
|
||||
|
||||
// Outline properties are drawn via custom editor.
|
||||
[HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0
|
||||
[HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0
|
||||
[HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1)
|
||||
[HideInInspector][MaterialToggle(_OUTLINE_FILL_INSIDE)]_Fill("Fill", Float) = 0
|
||||
[HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024
|
||||
[HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25
|
||||
[HideInInspector] _OutlineSmoothness("Outline Smoothness", Range(0,1)) = 1.0
|
||||
[HideInInspector][MaterialToggle(_USE8NEIGHBOURHOOD_ON)] _Use8Neighbourhood("Sample 8 Neighbours", Float) = 1
|
||||
[HideInInspector] _OutlineOpaqueAlpha("Opaque Alpha", Range(0,1)) = 1.0
|
||||
[HideInInspector] _OutlineMipLevel("Outline Mip Level", Range(0,3)) = 0
|
||||
}
|
||||
|
||||
SubShader {
|
||||
// Universal Pipeline tag is required. If Universal render pipeline is not set in the graphics settings
|
||||
// this Subshader will fail.
|
||||
Tags { "RenderPipeline" = "UniversalPipeline" "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
|
||||
LOD 100
|
||||
Cull Off
|
||||
ZWrite Off
|
||||
Blend One OneMinusSrcAlpha
|
||||
|
||||
Stencil {
|
||||
Ref[_StencilRef]
|
||||
Comp[_StencilComp]
|
||||
Pass Keep
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "Universal2D"
|
||||
Tags { "LightMode" = "Universal2D" }
|
||||
|
||||
ZWrite Off
|
||||
Cull Off
|
||||
Blend One OneMinusSrcAlpha
|
||||
|
||||
HLSLPROGRAM
|
||||
// Required to compile gles 2.0 with standard srp library
|
||||
#pragma prefer_hlslcc gles
|
||||
#pragma exclude_renderers d3d11_9x
|
||||
|
||||
// -------------------------------------
|
||||
// Unity defined keywords
|
||||
#pragma multi_compile_fog
|
||||
|
||||
//--------------------------------------
|
||||
// GPU Instancing
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
//--------------------------------------
|
||||
// Spine related keywords
|
||||
#pragma shader_feature _ _STRAIGHT_ALPHA_INPUT
|
||||
#pragma shader_feature _TINT_BLACK_ON
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#undef LIGHTMAP_ON
|
||||
|
||||
#define USE_URP
|
||||
#define fixed4 half4
|
||||
#define fixed3 half3
|
||||
#define fixed half
|
||||
#include "../Include/Spine-Input-URP.hlsl"
|
||||
#include "../Include/Spine-Skeleton-ForwardPass-URP.hlsl"
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
|
||||
FallBack "Universal Render Pipeline/2D/Sprite-Unlit-Default"
|
||||
CustomEditor "SpineShaderWithOutlineGUI"
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3bb7ed9d223c7d749bc42dad56e4ad0f
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+274
@@ -0,0 +1,274 @@
|
||||
Shader "Universal Render Pipeline/2D/Spine/Skeleton Lit" {
|
||||
Properties {
|
||||
[NoScaleOffset] _MainTex ("Main Texture", 2D) = "black" {}
|
||||
[NoScaleOffset] _MaskTex("Mask", 2D) = "white" {}
|
||||
[Toggle(_STRAIGHT_ALPHA_INPUT)] _StraightAlphaInput("Straight Alpha Texture", Int) = 0
|
||||
[MaterialToggle(_LIGHT_AFFECTS_ADDITIVE)] _LightAffectsAdditive("Light Affects Additive", Float) = 0
|
||||
[MaterialToggle(_TINT_BLACK_ON)] _TintBlack("Tint Black", Float) = 0
|
||||
_Color(" Light Color", Color) = (1,1,1,1)
|
||||
_Black(" Dark Color", Color) = (0,0,0,0)
|
||||
[HideInInspector] _StencilRef("Stencil Reference", Float) = 1.0
|
||||
[Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp("Stencil Compare", Float) = 8 // Set to Always as default
|
||||
|
||||
// Outline properties are drawn via custom editor.
|
||||
[HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0
|
||||
[HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0
|
||||
[HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1)
|
||||
[HideInInspector][MaterialToggle(_OUTLINE_FILL_INSIDE)]_Fill("Fill", Float) = 0
|
||||
[HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024
|
||||
[HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25
|
||||
[HideInInspector] _OutlineSmoothness("Outline Smoothness", Range(0,1)) = 1.0
|
||||
[HideInInspector][MaterialToggle(_USE8NEIGHBOURHOOD_ON)] _Use8Neighbourhood("Sample 8 Neighbours", Float) = 1
|
||||
[HideInInspector] _OutlineOpaqueAlpha("Opaque Alpha", Range(0,1)) = 1.0
|
||||
[HideInInspector] _OutlineMipLevel("Outline Mip Level", Range(0,3)) = 0
|
||||
}
|
||||
|
||||
HLSLINCLUDE
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
ENDHLSL
|
||||
|
||||
SubShader {
|
||||
// UniversalPipeline tag is required. If Universal render pipeline is not set in the graphics settings
|
||||
// this Subshader will fail.
|
||||
Tags {"Queue" = "Transparent" "RenderType" = "Transparent" "RenderPipeline" = "UniversalPipeline" "IgnoreProjector" = "True" }
|
||||
Cull Off
|
||||
ZWrite Off
|
||||
|
||||
Stencil {
|
||||
Ref[_StencilRef]
|
||||
Comp[_StencilComp]
|
||||
Pass Keep
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "Universal2D"
|
||||
Tags { "LightMode" = "Universal2D" }
|
||||
|
||||
ZWrite Off
|
||||
Cull Off
|
||||
Blend One OneMinusSrcAlpha
|
||||
|
||||
HLSLPROGRAM
|
||||
// Required to compile gles 2.0 with standard srp library
|
||||
#pragma prefer_hlslcc gles
|
||||
#pragma exclude_renderers d3d11_9x
|
||||
#if UNITY_VERSION < 60030000 // before Unity 6000.3
|
||||
#pragma multi_compile USE_SHAPE_LIGHT_TYPE_0 __
|
||||
#pragma multi_compile USE_SHAPE_LIGHT_TYPE_1 __
|
||||
#pragma multi_compile USE_SHAPE_LIGHT_TYPE_2 __
|
||||
#pragma multi_compile USE_SHAPE_LIGHT_TYPE_3 __
|
||||
#endif // UNITY_VERSION < 60030000
|
||||
#pragma multi_compile _ _LIGHT_AFFECTS_ADDITIVE
|
||||
#pragma shader_feature _TINT_BLACK_ON
|
||||
|
||||
struct Attributes {
|
||||
float3 positionOS : POSITION;
|
||||
half4 color : COLOR;
|
||||
float2 uv : TEXCOORD0;
|
||||
#if defined(_TINT_BLACK_ON)
|
||||
float2 tintBlackRG : TEXCOORD1;
|
||||
float2 tintBlackB : TEXCOORD2;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct Varyings {
|
||||
float4 positionCS : SV_POSITION;
|
||||
half4 color : COLOR0;
|
||||
float2 uv : TEXCOORD0;
|
||||
float2 lightingUV : TEXCOORD1;
|
||||
#if defined(_TINT_BLACK_ON)
|
||||
float3 darkColor : TEXCOORD2;
|
||||
#endif
|
||||
};
|
||||
|
||||
// Spine related keywords
|
||||
#pragma shader_feature _ _STRAIGHT_ALPHA_INPUT
|
||||
#pragma vertex CombinedShapeLightVertex
|
||||
#pragma fragment CombinedShapeLightFragment
|
||||
|
||||
#if UNITY_VERSION < 60030000 // before Unity 6000.3
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/LightingUtility.hlsl"
|
||||
#else
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/Core2D.hlsl"
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/ShapeLightShared.hlsl"
|
||||
#endif
|
||||
|
||||
#define USE_URP
|
||||
#include "../Include/SpineCoreShaders/Spine-Common.cginc"
|
||||
#include "../Include/SpineCoreShaders/Spine-Skeleton-Tint-Common.cginc"
|
||||
|
||||
#if defined(_TINT_BLACK_ON)
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
half4 _Color;
|
||||
half4 _Black;
|
||||
CBUFFER_END
|
||||
#endif
|
||||
|
||||
TEXTURE2D(_MainTex);
|
||||
SAMPLER(sampler_MainTex);
|
||||
TEXTURE2D(_MaskTex);
|
||||
SAMPLER(sampler_MaskTex);
|
||||
|
||||
#if UNITY_VERSION < 60030000 // before Unity 6000.3
|
||||
#if USE_SHAPE_LIGHT_TYPE_0
|
||||
SHAPE_LIGHT(0)
|
||||
#endif
|
||||
|
||||
#if USE_SHAPE_LIGHT_TYPE_1
|
||||
SHAPE_LIGHT(1)
|
||||
#endif
|
||||
|
||||
#if USE_SHAPE_LIGHT_TYPE_2
|
||||
SHAPE_LIGHT(2)
|
||||
#endif
|
||||
|
||||
#if USE_SHAPE_LIGHT_TYPE_3
|
||||
SHAPE_LIGHT(3)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Varyings CombinedShapeLightVertex(Attributes v)
|
||||
{
|
||||
Varyings o = (Varyings)0;
|
||||
|
||||
o.positionCS = TransformObjectToHClip(v.positionOS);
|
||||
o.uv = v.uv;
|
||||
float4 clipVertex = o.positionCS / o.positionCS.w;
|
||||
o.lightingUV = ComputeScreenPos(clipVertex).xy;
|
||||
o.color = PMAGammaToTargetSpace(v.color);
|
||||
#if !defined(_TINT_BLACK_ON)
|
||||
// un-premultiply for additive lights in CombinedShapeLightShared, reapply afterwards
|
||||
o.color.rgb = o.color.a == 0 ? o.color.rgb : o.color.rgb / o.color.a;
|
||||
#endif
|
||||
|
||||
#if defined(_TINT_BLACK_ON)
|
||||
o.color *= _Color;
|
||||
o.darkColor = GammaToTargetSpace(
|
||||
half3(v.tintBlackRG.r, v.tintBlackRG.g, v.tintBlackB.r)) + (_Black.rgb * v.color.a);
|
||||
#endif
|
||||
return o;
|
||||
}
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/CombinedShapeLightShared.hlsl"
|
||||
|
||||
half4 CombinedShapeLightFragment(Varyings i) : SV_Target
|
||||
{
|
||||
half4 tex = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv);
|
||||
|
||||
#if defined(_TINT_BLACK_ON)
|
||||
half4 main = fragTintedColor(tex, i.darkColor, i.color, _Color.a, _Black.a);
|
||||
#if !defined(_LIGHT_AFFECTS_ADDITIVE)
|
||||
if (i.color.a == 0)
|
||||
return main;
|
||||
#endif
|
||||
// un-premultiply for additive lights in CombinedShapeLightShared, reapply afterwards
|
||||
main.rgb = main.a < 0.001 ? main.rgb : main.rgb / main.a;
|
||||
#else
|
||||
#if !defined(_LIGHT_AFFECTS_ADDITIVE)
|
||||
if (i.color.a == 0) {
|
||||
return tex * i.color; // unlit additive, directly return PMA color
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(_STRAIGHT_ALPHA_INPUT)
|
||||
// un-premultiply for additive lights in CombinedShapeLightShared, reapply afterwards
|
||||
tex.rgb = tex.a < 0.001 ? tex.rgb : tex.rgb / tex.a; // < epsilon prevents imprecision issues on some HW.
|
||||
#endif
|
||||
half4 main = tex * i.color;
|
||||
#endif
|
||||
half4 mask = SAMPLE_TEXTURE2D(_MaskTex, sampler_MaskTex, i.uv);
|
||||
#if UNITY_VERSION < 202120
|
||||
return half4(CombinedShapeLightShared(half4(main.rgb, 1), mask, i.lightingUV).rgb * main.a, main.a);
|
||||
#else
|
||||
SurfaceData2D surfaceData;
|
||||
InputData2D inputData;
|
||||
surfaceData.albedo = main.rgb;
|
||||
surfaceData.alpha = 1;
|
||||
surfaceData.mask = mask;
|
||||
inputData.uv = i.uv;
|
||||
inputData.lightingUV = i.lightingUV;
|
||||
return half4(CombinedShapeLightShared(surfaceData, inputData).rgb * main.a, main.a);
|
||||
#endif
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Normals"
|
||||
Tags { "LightMode" = "NormalsRendering"}
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ZWrite Off
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma prefer_hlslcc gles
|
||||
#pragma vertex NormalsRenderingVertex
|
||||
#pragma fragment NormalsRenderingFragment
|
||||
|
||||
struct Attributes
|
||||
{
|
||||
float3 positionOS : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct Varyings
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 uv : TEXCOORD0;
|
||||
float3 normalWS : TEXCOORD1;
|
||||
};
|
||||
|
||||
TEXTURE2D(_MainTex);
|
||||
SAMPLER(sampler_MainTex);
|
||||
|
||||
Varyings NormalsRenderingVertex(Attributes attributes)
|
||||
{
|
||||
Varyings o = (Varyings)0;
|
||||
|
||||
o.positionCS = TransformObjectToHClip(attributes.positionOS);
|
||||
o.uv = attributes.uv;
|
||||
o.color = attributes.color;
|
||||
o.normalWS = TransformObjectToWorldDir(float3(0, 0, -1));
|
||||
return o;
|
||||
}
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/NormalsRenderingShared.hlsl"
|
||||
|
||||
float4 NormalsRenderingFragment(Varyings i) : SV_Target
|
||||
{
|
||||
float4 mainTex = i.color * SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv);
|
||||
half3 normalTS = half3(0, 0, 1);
|
||||
half3 tangentWS = half3(0, 0, 0);
|
||||
half3 bitangentWS = half3(0, 0, 0);
|
||||
return NormalsRenderingShared(mainTex, normalTS, tangentWS, bitangentWS, i.normalWS);
|
||||
}
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Unlit"
|
||||
Tags { "LightMode" = "UniversalForward" "Queue"="Transparent" "RenderType"="Transparent"}
|
||||
|
||||
ZWrite Off
|
||||
Cull Off
|
||||
Blend One OneMinusSrcAlpha
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma shader_feature _ _STRAIGHT_ALPHA_INPUT
|
||||
#pragma prefer_hlslcc gles
|
||||
#pragma vertex UnlitVertex
|
||||
#pragma fragment UnlitFragment
|
||||
|
||||
#include "Include/Spine-SkeletonLit-UnlitPass-URP-2D.hlsl"
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
FallBack "Universal Render Pipeline/2D/Spine/Skeleton"
|
||||
CustomEditor "SpineShaderWithOutlineGUI"
|
||||
}
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7549820bdb4e84b4bb099fb30af6e6b4
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Vendored
+197
@@ -0,0 +1,197 @@
|
||||
Shader "Universal Render Pipeline/2D/Spine/Sprite"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainTex("Main Texture", 2D) = "white" {}
|
||||
_MaskTex("Mask", 2D) = "white" {}
|
||||
_Color("Color", Color) = (1,1,1,1)
|
||||
|
||||
_BumpScale("Scale", Float) = 1.0
|
||||
_BumpMap("Normal Map", 2D) = "bump" {}
|
||||
|
||||
[MaterialToggle] PixelSnap("Pixel snap", Float) = 0
|
||||
|
||||
_EmissionColor("Color", Color) = (0,0,0,0)
|
||||
_EmissionMap("Emission", 2D) = "white" {}
|
||||
_EmissionPower("Emission Power", Float) = 2.0
|
||||
|
||||
_FixedNormal("Fixed Normal", Vector) = (0,0,1,1)
|
||||
_ZWrite("Depth Write", Float) = 0.0
|
||||
_Cutoff("Depth alpha cutoff", Range(0,1)) = 0.0
|
||||
_ShadowAlphaCutoff("Shadow alpha cutoff", Range(0,1)) = 0.1
|
||||
_CustomRenderQueue("Custom Render Queue", Float) = 0.0
|
||||
|
||||
_OverlayColor("Overlay Color", Color) = (0,0,0,0)
|
||||
_Hue("Hue", Range(-0.5,0.5)) = 0.0
|
||||
_Saturation("Saturation", Range(0,2)) = 1.0
|
||||
_Brightness("Brightness", Range(0,2)) = 1.0
|
||||
|
||||
_RimPower("Rim Power", Float) = 2.0
|
||||
_RimColor("Rim Color", Color) = (1,1,1,1)
|
||||
|
||||
_BlendTex("Blend Texture", 2D) = "white" {}
|
||||
_BlendAmount("Blend", Range(0,1)) = 0.0
|
||||
|
||||
[MaterialToggle(_LIGHT_AFFECTS_ADDITIVE)] _LightAffectsAdditive("Light Affects Additive", Float) = 0
|
||||
[MaterialToggle(_TINT_BLACK_ON)] _TintBlack("Tint Black", Float) = 0
|
||||
_Black("Dark Color", Color) = (0,0,0,0)
|
||||
|
||||
[HideInInspector] _SrcBlend("__src", Float) = 1.0
|
||||
[HideInInspector] _DstBlend("__dst", Float) = 0.0
|
||||
[HideInInspector] _RenderQueue("__queue", Float) = 0.0
|
||||
[HideInInspector] _Cull("__cull", Float) = 0.0
|
||||
[HideInInspector] _StencilRef("Stencil Reference", Float) = 1.0
|
||||
[Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp("Stencil Compare", Float) = 8 // Set to Always as default
|
||||
|
||||
// Outline properties are drawn via custom editor.
|
||||
[HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0
|
||||
[HideInInspector][MaterialToggle(_USE_SCREENSPACE_OUTLINE_WIDTH)] _UseScreenSpaceOutlineWidth("Width in Screen Space", Float) = 0
|
||||
[HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1)
|
||||
[HideInInspector][MaterialToggle(_OUTLINE_FILL_INSIDE)]_Fill("Fill", Float) = 0
|
||||
[HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024
|
||||
[HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25
|
||||
[HideInInspector] _OutlineSmoothness("Outline Smoothness", Range(0,1)) = 1.0
|
||||
[HideInInspector][MaterialToggle(_USE8NEIGHBOURHOOD_ON)] _Use8Neighbourhood("Sample 8 Neighbours", Float) = 1
|
||||
[HideInInspector] _OutlineOpaqueAlpha("Opaque Alpha", Range(0,1)) = 1.0
|
||||
[HideInInspector] _OutlineMipLevel("Outline Mip Level", Range(0,3)) = 0
|
||||
}
|
||||
|
||||
HLSLINCLUDE
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
ENDHLSL
|
||||
|
||||
SubShader
|
||||
{
|
||||
// UniversalPipeline tag is required. If Universal render pipeline is not set in the graphics settings
|
||||
// this Subshader will fail.
|
||||
Tags {"Queue" = "Transparent" "RenderType" = "Sprite" "RenderPipeline" = "UniversalPipeline" "IgnoreProjector" = "True" "AlphaDepth" = "False" "CanUseSpriteAtlas" = "True" }
|
||||
|
||||
Stencil {
|
||||
Ref[_StencilRef]
|
||||
Comp[_StencilComp]
|
||||
Pass Keep
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Universal2D"
|
||||
Tags { "LightMode" = "Universal2D" }
|
||||
Blend[_SrcBlend][_DstBlend]
|
||||
ZWrite[_ZWrite]
|
||||
Cull[_Cull]
|
||||
|
||||
HLSLPROGRAM
|
||||
// Required to compile gles 2.0 with standard srp library
|
||||
#pragma prefer_hlslcc gles
|
||||
#pragma exclude_renderers d3d11_9x
|
||||
#if UNITY_VERSION < 60030000 // before Unity 6000.3
|
||||
#pragma multi_compile USE_SHAPE_LIGHT_TYPE_0 __
|
||||
#pragma multi_compile USE_SHAPE_LIGHT_TYPE_1 __
|
||||
#pragma multi_compile USE_SHAPE_LIGHT_TYPE_2 __
|
||||
#pragma multi_compile USE_SHAPE_LIGHT_TYPE_3 __
|
||||
#endif
|
||||
|
||||
// -------------------------------------
|
||||
// Material Keywords
|
||||
#pragma shader_feature _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAPREMULTIPLY_VERTEX_ONLY _ADDITIVEBLEND _ADDITIVEBLEND_SOFT _MULTIPLYBLEND _MULTIPLYBLEND_X2
|
||||
#pragma shader_feature _ _FIXED_NORMALS_VIEWSPACE _FIXED_NORMALS_VIEWSPACE_BACKFACE _FIXED_NORMALS_MODELSPACE _FIXED_NORMALS_MODELSPACE_BACKFACE
|
||||
#pragma shader_feature _NORMALMAP
|
||||
#pragma shader_feature _ALPHA_CLIP
|
||||
#pragma shader_feature _EMISSION
|
||||
#pragma shader_feature _COLOR_ADJUST
|
||||
#pragma shader_feature _RIM_LIGHTING
|
||||
#pragma shader_feature _TEXTURE_BLEND
|
||||
#pragma shader_feature _LIGHT_AFFECTS_ADDITIVE
|
||||
#pragma shader_feature _TINT_BLACK_ON
|
||||
|
||||
#pragma fragmentoption ARB_precision_hint_fastest
|
||||
#pragma multi_compile_local _ PIXELSNAP_ON
|
||||
|
||||
//--------------------------------------
|
||||
// GPU Instancing
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
//--------------------------------------
|
||||
// Spine related keywords
|
||||
#pragma vertex CombinedShapeLightVertex
|
||||
#pragma fragment CombinedShapeLightFragment
|
||||
|
||||
#define USE_URP
|
||||
#define fixed4 half4
|
||||
#define fixed3 half3
|
||||
#define fixed half
|
||||
|
||||
#if UNITY_VERSION < 60030000 // before Unity 6000.3
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/LightingUtility.hlsl"
|
||||
#else
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/Core2D.hlsl"
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/ShapeLightShared.hlsl"
|
||||
#endif
|
||||
|
||||
#define SPRITE_SHADER_2D
|
||||
#include "../Include/Spine-Input-Sprite-URP.hlsl"
|
||||
#include "Include/Spine-Sprite-StandardPass-URP-2D.hlsl"
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Normals"
|
||||
Tags { "LightMode" = "NormalsRendering"}
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
Cull[_Cull]
|
||||
ZWrite[_ZWrite]
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma prefer_hlslcc gles
|
||||
#pragma vertex NormalsRenderingVertex
|
||||
#pragma fragment NormalsRenderingFragment
|
||||
|
||||
// -------------------------------------
|
||||
// Material Keywords
|
||||
#pragma shader_feature _ _FIXED_NORMALS_VIEWSPACE _FIXED_NORMALS_VIEWSPACE_BACKFACE _FIXED_NORMALS_MODELSPACE _FIXED_NORMALS_MODELSPACE_BACKFACE
|
||||
#pragma shader_feature _NORMALMAP
|
||||
#pragma shader_feature _ALPHA_CLIP
|
||||
|
||||
#pragma multi_compile_local _ PIXELSNAP_ON
|
||||
|
||||
//--------------------------------------
|
||||
// GPU Instancing
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#define USE_URP
|
||||
#define fixed4 half4
|
||||
#define fixed3 half3
|
||||
#define fixed half
|
||||
#define SPRITE_SHADER_2D
|
||||
#include "../Include/Spine-Input-Sprite-URP.hlsl"
|
||||
#include "Include/Spine-Sprite-NormalsPass-URP-2D.hlsl"
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Unlit"
|
||||
Tags { "LightMode" = "UniversalForward" "Queue" = "Transparent" "RenderType" = "Transparent"}
|
||||
|
||||
ZWrite Off
|
||||
Cull Off
|
||||
Blend One OneMinusSrcAlpha
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma shader_feature _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAPREMULTIPLY_VERTEX_ONLY _ADDITIVEBLEND _ADDITIVEBLEND_SOFT _MULTIPLYBLEND _MULTIPLYBLEND_X2
|
||||
|
||||
#pragma prefer_hlslcc gles
|
||||
#pragma vertex UnlitVertex
|
||||
#pragma fragment UnlitFragment
|
||||
|
||||
#include "Include/Spine-SkeletonLit-UnlitPass-URP-2D.hlsl"
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
|
||||
FallBack "Universal Render Pipeline/2D/Spine/Skeleton Lit"
|
||||
CustomEditor "SpineSpriteShaderGUI"
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a79d0a36ad5ba0542946e3c3317e2aa4
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user