mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-05 23:05:01 +08:00
[unity] Fixed Sprite URP shader incorrectly applying light probe GI when Specular is enabled. Closes #2256. Fixed a shader compile error on older Unity version.
This commit is contained in:
parent
a3888f5e99
commit
41dc6cc84f
@ -123,10 +123,10 @@ half4 LightweightFragmentPBRSimplified(InputData inputData, half4 texAlbedoAlpha
|
||||
Light mainLight = GetMainLight();
|
||||
#endif
|
||||
|
||||
half3 finalColor = inputData.bakedGI;
|
||||
half3 finalColor = inputData.bakedGI * albedo.rgb;
|
||||
finalColor += LightingPhysicallyBased(brdfData, mainLight, inputData.normalWS, inputData.viewDirectionWS);
|
||||
#else // _MAIN_LIGHT_VERTEX
|
||||
half3 finalColor = inputData.bakedGI;
|
||||
half3 finalColor = inputData.bakedGI * albedo.rgb;
|
||||
#endif // _MAIN_LIGHT_VERTEX
|
||||
|
||||
#ifdef _ADDITIONAL_LIGHTS
|
||||
@ -222,9 +222,9 @@ half4 LightweightFragmentBlinnPhongSimplified(InputData inputData, half4 texDiff
|
||||
}
|
||||
#endif
|
||||
uint pixelLightCount = GetAdditionalLightsCount();
|
||||
LIGHT_LOOP_BEGIN(pixelLightCount)
|
||||
LIGHT_LOOP_BEGIN_SPINE(pixelLightCount)
|
||||
diffuseLighting += ProcessLightLambert(inputData, shadowMask, meshRenderingLayers, lightIndex);
|
||||
LIGHT_LOOP_END
|
||||
LIGHT_LOOP_END_SPINE
|
||||
|
||||
#endif
|
||||
#ifdef _ADDITIONAL_LIGHTS_VERTEX
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user