mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[unity] Fixed errors in URP blend mode shaders when main and additional lights are disabled. Closes #2592.
This commit is contained in:
parent
94d26d2b52
commit
0bcdc314b4
@ -63,6 +63,44 @@
|
|||||||
ENDHLSL
|
ENDHLSL
|
||||||
}
|
}
|
||||||
|
|
||||||
UsePass "Universal Render Pipeline/Spine/Skeleton/SHADOWCASTER"
|
// UsePass "Universal Render Pipeline/Spine/Skeleton/SHADOWCASTER"
|
||||||
|
// Note: UsePass above fails when both main and additional lights are disabled, thus inlined below.
|
||||||
|
Pass
|
||||||
|
{
|
||||||
|
Name "ShadowCaster"
|
||||||
|
Tags{"LightMode" = "ShadowCaster"}
|
||||||
|
|
||||||
|
ZWrite On
|
||||||
|
ColorMask 0
|
||||||
|
ZTest LEqual
|
||||||
|
Cull Off
|
||||||
|
|
||||||
|
HLSLPROGRAM
|
||||||
|
// Required to compile gles 2.0 with standard srp library
|
||||||
|
#pragma prefer_hlslcc gles
|
||||||
|
#pragma exclude_renderers d3d11_9x
|
||||||
|
#pragma target 2.0
|
||||||
|
|
||||||
|
// -------------------------------------
|
||||||
|
// Material Keywords
|
||||||
|
#pragma shader_feature _ALPHATEST_ON
|
||||||
|
|
||||||
|
//--------------------------------------
|
||||||
|
// GPU Instancing
|
||||||
|
#pragma multi_compile_instancing
|
||||||
|
#pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
|
||||||
|
|
||||||
|
#pragma vertex ShadowPassVertexSkeletonLit
|
||||||
|
#pragma fragment ShadowPassFragmentSkeletonLit
|
||||||
|
|
||||||
|
#define USE_URP
|
||||||
|
#define fixed4 half4
|
||||||
|
#define fixed3 half3
|
||||||
|
#define fixed half
|
||||||
|
#include "../Include/Spine-Input-URP.hlsl"
|
||||||
|
#include "../Include/Spine-SkeletonLit-ShadowCasterPass-URP.hlsl"
|
||||||
|
|
||||||
|
ENDHLSL
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -63,6 +63,44 @@
|
|||||||
ENDHLSL
|
ENDHLSL
|
||||||
}
|
}
|
||||||
|
|
||||||
UsePass "Universal Render Pipeline/Spine/Skeleton/SHADOWCASTER"
|
// UsePass "Universal Render Pipeline/Spine/Skeleton/SHADOWCASTER"
|
||||||
|
// Note: UsePass above fails when both main and additional lights are disabled, thus inlined below.
|
||||||
|
Pass
|
||||||
|
{
|
||||||
|
Name "ShadowCaster"
|
||||||
|
Tags{"LightMode" = "ShadowCaster"}
|
||||||
|
|
||||||
|
ZWrite On
|
||||||
|
ColorMask 0
|
||||||
|
ZTest LEqual
|
||||||
|
Cull Off
|
||||||
|
|
||||||
|
HLSLPROGRAM
|
||||||
|
// Required to compile gles 2.0 with standard srp library
|
||||||
|
#pragma prefer_hlslcc gles
|
||||||
|
#pragma exclude_renderers d3d11_9x
|
||||||
|
#pragma target 2.0
|
||||||
|
|
||||||
|
// -------------------------------------
|
||||||
|
// Material Keywords
|
||||||
|
#pragma shader_feature _ALPHATEST_ON
|
||||||
|
|
||||||
|
//--------------------------------------
|
||||||
|
// GPU Instancing
|
||||||
|
#pragma multi_compile_instancing
|
||||||
|
#pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
|
||||||
|
|
||||||
|
#pragma vertex ShadowPassVertexSkeletonLit
|
||||||
|
#pragma fragment ShadowPassFragmentSkeletonLit
|
||||||
|
|
||||||
|
#define USE_URP
|
||||||
|
#define fixed4 half4
|
||||||
|
#define fixed3 half3
|
||||||
|
#define fixed half
|
||||||
|
#include "../Include/Spine-Input-URP.hlsl"
|
||||||
|
#include "../Include/Spine-SkeletonLit-ShadowCasterPass-URP.hlsl"
|
||||||
|
|
||||||
|
ENDHLSL
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -63,6 +63,44 @@
|
|||||||
ENDHLSL
|
ENDHLSL
|
||||||
}
|
}
|
||||||
|
|
||||||
UsePass "Universal Render Pipeline/Spine/Skeleton/SHADOWCASTER"
|
// UsePass "Universal Render Pipeline/Spine/Skeleton/SHADOWCASTER"
|
||||||
|
// Note: UsePass above fails when both main and additional lights are disabled, thus inlined below.
|
||||||
|
Pass
|
||||||
|
{
|
||||||
|
Name "ShadowCaster"
|
||||||
|
Tags{"LightMode" = "ShadowCaster"}
|
||||||
|
|
||||||
|
ZWrite On
|
||||||
|
ColorMask 0
|
||||||
|
ZTest LEqual
|
||||||
|
Cull Off
|
||||||
|
|
||||||
|
HLSLPROGRAM
|
||||||
|
// Required to compile gles 2.0 with standard srp library
|
||||||
|
#pragma prefer_hlslcc gles
|
||||||
|
#pragma exclude_renderers d3d11_9x
|
||||||
|
#pragma target 2.0
|
||||||
|
|
||||||
|
// -------------------------------------
|
||||||
|
// Material Keywords
|
||||||
|
#pragma shader_feature _ALPHATEST_ON
|
||||||
|
|
||||||
|
//--------------------------------------
|
||||||
|
// GPU Instancing
|
||||||
|
#pragma multi_compile_instancing
|
||||||
|
#pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
|
||||||
|
|
||||||
|
#pragma vertex ShadowPassVertexSkeletonLit
|
||||||
|
#pragma fragment ShadowPassFragmentSkeletonLit
|
||||||
|
|
||||||
|
#define USE_URP
|
||||||
|
#define fixed4 half4
|
||||||
|
#define fixed3 half3
|
||||||
|
#define fixed half
|
||||||
|
#include "../Include/Spine-Input-URP.hlsl"
|
||||||
|
#include "../Include/Spine-SkeletonLit-ShadowCasterPass-URP.hlsl"
|
||||||
|
|
||||||
|
ENDHLSL
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"name": "com.esotericsoftware.spine.urp-shaders",
|
"name": "com.esotericsoftware.spine.urp-shaders",
|
||||||
"displayName": "Spine Universal RP Shaders",
|
"displayName": "Spine Universal RP Shaders",
|
||||||
"description": "This plugin provides universal render pipeline (URP) shaders for the spine-unity runtime.\n\nPrerequisites:\nIt requires a working installation of the spine-unity runtime, version 4.2.\n(See http://esotericsoftware.com/git/spine-runtimes/spine-unity)",
|
"description": "This plugin provides universal render pipeline (URP) shaders for the spine-unity runtime.\n\nPrerequisites:\nIt requires a working installation of the spine-unity runtime, version 4.2.\n(See http://esotericsoftware.com/git/spine-runtimes/spine-unity)",
|
||||||
"version": "4.2.36",
|
"version": "4.2.37",
|
||||||
"unity": "2019.3",
|
"unity": "2019.3",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Esoteric Software",
|
"name": "Esoteric Software",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user