mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 01:06:00 +08:00
[unity] Fixed URP shaders compile error on Unity 6.3. Closes #2993.
This commit is contained in:
parent
6625d08227
commit
2538c3401a
@ -39,10 +39,12 @@ Shader "Universal Render Pipeline/2D/Spine/Skeleton Lit" {
|
||||
// Required to compile gles 2.0 with standard srp library
|
||||
#pragma prefer_hlslcc gles
|
||||
#pragma exclude_renderers d3d11_9x
|
||||
#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 __
|
||||
#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
|
||||
|
||||
@ -71,7 +73,13 @@ Shader "Universal Render Pipeline/2D/Spine/Skeleton Lit" {
|
||||
#pragma vertex CombinedShapeLightVertex
|
||||
#pragma fragment CombinedShapeLightFragment
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/LightingUtility.hlsl"
|
||||
#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"
|
||||
|
||||
@ -71,10 +71,12 @@ Shader "Universal Render Pipeline/2D/Spine/Sprite"
|
||||
// Required to compile gles 2.0 with standard srp library
|
||||
#pragma prefer_hlslcc gles
|
||||
#pragma exclude_renderers d3d11_9x
|
||||
#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 __
|
||||
#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
|
||||
@ -106,7 +108,12 @@ Shader "Universal Render Pipeline/2D/Spine/Sprite"
|
||||
#define fixed3 half3
|
||||
#define fixed half
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/LightingUtility.hlsl"
|
||||
#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"
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "com.esotericsoftware.spine.urp-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.3.20 or newer.\n(See http://esotericsoftware.com/git/spine-runtimes/spine-unity)",
|
||||
"version": "4.3.23",
|
||||
"version": "4.3.24",
|
||||
"unity": "2019.3",
|
||||
"author": {
|
||||
"name": "Esoteric Software",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user