mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-05 18:26:52 +08:00
[unity] URP Skeleton Lit shader does not apply GI in shadow areas. Closes #2343.
This commit is contained in:
parent
5a7360d39c
commit
d9d836d5e5
@ -144,9 +144,6 @@ VertexOutput vert(appdata v) {
|
|||||||
#endif // !defined(_LIGHT_AFFECTS_ADDITIVE)
|
#endif // !defined(_LIGHT_AFFECTS_ADDITIVE)
|
||||||
|
|
||||||
color.rgb *= LightweightLightVertexSimplified(positionWS, normalWS, shadowedColor);
|
color.rgb *= LightweightLightVertexSimplified(positionWS, normalWS, shadowedColor);
|
||||||
#if defined(SKELETONLIT_RECEIVE_SHADOWS)
|
|
||||||
o.shadowedColor = shadowedColor;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Note: ambient light is also handled via SH.
|
// Note: ambient light is also handled via SH.
|
||||||
half3 vertexSH;
|
half3 vertexSH;
|
||||||
@ -155,10 +152,14 @@ VertexOutput vert(appdata v) {
|
|||||||
#else
|
#else
|
||||||
OUTPUT_SH(normalWS.xyz, vertexSH);
|
OUTPUT_SH(normalWS.xyz, vertexSH);
|
||||||
#endif
|
#endif
|
||||||
color.rgb += SAMPLE_GI(v.lightmapUV, vertexSH, normalWS);
|
half3 bakedGI = SAMPLE_GI(v.lightmapUV, vertexSH, normalWS);
|
||||||
|
color.rgb += bakedGI;
|
||||||
o.color = color;
|
o.color = color;
|
||||||
|
|
||||||
#if defined(SKELETONLIT_RECEIVE_SHADOWS)
|
#if defined(SKELETONLIT_RECEIVE_SHADOWS)
|
||||||
|
shadowedColor += bakedGI;
|
||||||
|
o.shadowedColor = shadowedColor;
|
||||||
|
|
||||||
VertexPositionInputs vertexInput;
|
VertexPositionInputs vertexInput;
|
||||||
vertexInput.positionWS = positionWS;
|
vertexInput.positionWS = positionWS;
|
||||||
vertexInput.positionCS = o.pos;
|
vertexInput.positionCS = o.pos;
|
||||||
|
|||||||
@ -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.1.\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.1.\n(See http://esotericsoftware.com/git/spine-runtimes/spine-unity)",
|
||||||
"version": "4.1.19",
|
"version": "4.1.20",
|
||||||
"unity": "2019.3",
|
"unity": "2019.3",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Esoteric Software",
|
"name": "Esoteric Software",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user