mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-21 17:26:45 +08:00
[unity] Fixed shader compile error occurring during build on Unity URP versions 12.x and 13.x.
This commit is contained in:
parent
15f9e39b14
commit
2f1b0b860c
@ -1,6 +1,16 @@
|
||||
#ifndef SPINE_COMMON_URP_INCLUDED
|
||||
#define SPINE_COMMON_URP_INCLUDED
|
||||
|
||||
#ifdef USE_FORWARD_PLUS
|
||||
#define IS_URP_14_OR_NEWER 1
|
||||
#else
|
||||
#define IS_URP_14_OR_NEWER 0
|
||||
#endif
|
||||
|
||||
#if defined(_WRITE_RENDERING_LAYERS) && IS_URP_14_OR_NEWER
|
||||
#define USE_WRITE_RENDERING_LAYERS
|
||||
#endif
|
||||
|
||||
#ifdef _LIGHT_LAYERS
|
||||
uint GetMeshRenderingLayerBackwardsCompatible()
|
||||
{
|
||||
|
||||
@ -152,7 +152,7 @@ VertexOutput vert(appdata v) {
|
||||
}
|
||||
|
||||
half4 frag(VertexOutput i
|
||||
#ifdef _WRITE_RENDERING_LAYERS
|
||||
#ifdef USE_WRITE_RENDERING_LAYERS
|
||||
, out float4 outRenderingLayers : SV_Target1
|
||||
#endif
|
||||
) : SV_Target0
|
||||
|
||||
@ -285,7 +285,7 @@ VertexOutputLWRP ForwardPassVertexSprite(VertexInput input)
|
||||
}
|
||||
|
||||
half4 ForwardPassFragmentSprite(VertexOutputLWRP input
|
||||
#ifdef _WRITE_RENDERING_LAYERS
|
||||
#ifdef USE_WRITE_RENDERING_LAYERS
|
||||
, out float4 outRenderingLayers : SV_Target1
|
||||
#endif
|
||||
) : SV_Target0
|
||||
@ -302,7 +302,7 @@ half4 ForwardPassFragmentSprite(VertexOutputLWRP input
|
||||
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
|
||||
inputData.shadowCoord = input.shadowCoord;
|
||||
#elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
|
||||
inputData.shadowCoord = TransformWorldToShadowCoord(input.positionWS);
|
||||
inputData.shadowCoord = TransformWorldToShadowCoord(input.positionWS.xyz);
|
||||
#elif defined(_MAIN_LIGHT_SHADOWS)
|
||||
inputData.shadowCoord = input.shadowCoord;
|
||||
#else
|
||||
@ -352,7 +352,7 @@ half4 ForwardPassFragmentSprite(VertexOutputLWRP input
|
||||
COLORISE(pixel)
|
||||
APPLY_FOG_LWRP(pixel, input.fogFactorAndVertexLight.x)
|
||||
|
||||
#ifdef _WRITE_RENDERING_LAYERS
|
||||
#ifdef USE_WRITE_RENDERING_LAYERS
|
||||
uint renderingLayers = GetMeshRenderingLayerBackwardsCompatible();
|
||||
outRenderingLayers = float4(EncodeMeshRenderingLayer(renderingLayers), 0, 0, 0);
|
||||
#endif
|
||||
|
||||
@ -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.1.\n(See http://esotericsoftware.com/git/spine-runtimes/spine-unity)",
|
||||
"version": "4.1.9",
|
||||
"version": "4.1.10",
|
||||
"unity": "2019.3",
|
||||
"author": {
|
||||
"name": "Esoteric Software",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user