mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 09:46:02 +08:00
[unity] Fixed URP shader compile errors on Unity 6. Closes #2603.
This commit is contained in:
parent
d774632ccf
commit
80fb9f3c5a
@ -14,6 +14,12 @@
|
||||
#endif
|
||||
#if IS_URP_14_OR_NEWER && !defined(_USE_WEBGL1_LIGHTS)
|
||||
#define IS_URP_15_OR_NEWER 1
|
||||
#include "Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolume.hlsl"
|
||||
#if defined(_APVWorldOffset)
|
||||
#define IS_URP_17_OR_NEWER 1
|
||||
#else
|
||||
#define IS_URP_17_OR_NEWER 0
|
||||
#endif
|
||||
#else
|
||||
#define IS_URP_15_OR_NEWER 0
|
||||
#endif
|
||||
|
||||
@ -149,7 +149,12 @@ VertexOutput vert(appdata v) {
|
||||
half3 vertexSH;
|
||||
#if IS_URP_15_OR_NEWER
|
||||
#ifdef OUTPUT_SH4
|
||||
#if IS_URP_17_OR_NEWER
|
||||
float4 ignoredProbeOcclusion;
|
||||
OUTPUT_SH4(positionWS, normalWS.xyz, GetWorldSpaceNormalizeViewDir(positionWS), vertexSH, ignoredProbeOcclusion);
|
||||
#else // 15 or newer
|
||||
OUTPUT_SH4(positionWS, normalWS.xyz, GetWorldSpaceNormalizeViewDir(positionWS), vertexSH);
|
||||
#endif
|
||||
#else
|
||||
OUTPUT_SH(positionWS, normalWS.xyz, GetWorldSpaceNormalizeViewDir(positionWS), vertexSH);
|
||||
#endif
|
||||
|
||||
@ -313,7 +313,12 @@ VertexOutputLWRP ForwardPassVertexSprite(VertexInput input)
|
||||
|
||||
#if IS_URP_15_OR_NEWER
|
||||
#ifdef OUTPUT_SH4
|
||||
#if IS_URP_17_OR_NEWER
|
||||
float4 ignoredProbeOcclusion;
|
||||
OUTPUT_SH4(positionWS, normalWS.xyz, GetWorldSpaceNormalizeViewDir(positionWS), output.vertexSH, ignoredProbeOcclusion);
|
||||
#else // 15 or newer
|
||||
OUTPUT_SH4(positionWS, normalWS.xyz, GetWorldSpaceNormalizeViewDir(positionWS), output.vertexSH);
|
||||
#endif
|
||||
#else
|
||||
OUTPUT_SH(positionWS, normalWS.xyz, GetWorldSpaceNormalizeViewDir(positionWS), output.vertexSH);
|
||||
#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.2.\n(See http://esotericsoftware.com/git/spine-runtimes/spine-unity)",
|
||||
"version": "4.2.37",
|
||||
"version": "4.2.38",
|
||||
"unity": "2019.3",
|
||||
"author": {
|
||||
"name": "Esoteric Software",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user