mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-23 10:11:23 +08:00
[unity] Fixed shader compilation error on PS4 platform related to static const in function. Closes #1600.
This commit is contained in:
parent
3cf66670cc
commit
9acf99e763
@ -167,16 +167,15 @@ inline VertexLightInfo getVertexLightAttenuatedInfo(int index, float3 viewPos)
|
|||||||
return lightInfo;
|
return lightInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Magic constants used to tweak ambient to approximate pixel shader spherical harmonics
|
||||||
|
static const fixed3 worldUp = fixed3(0, 1, 0);
|
||||||
|
static const float skyGroundDotMul = 2.5;
|
||||||
|
static const float minEquatorMix = 0.5;
|
||||||
|
static const float equatorColorBlur = 0.33;
|
||||||
|
|
||||||
fixed3 calculateAmbientLight(half3 normalWorld)
|
fixed3 calculateAmbientLight(half3 normalWorld)
|
||||||
{
|
{
|
||||||
#if defined(_SPHERICAL_HARMONICS)
|
#if defined(_SPHERICAL_HARMONICS)
|
||||||
|
|
||||||
//Magic constants used to tweak ambient to approximate pixel shader spherical harmonics
|
|
||||||
static const fixed3 worldUp = fixed3(0,1,0);
|
|
||||||
static const float skyGroundDotMul = 2.5;
|
|
||||||
static const float minEquatorMix = 0.5;
|
|
||||||
static const float equatorColorBlur = 0.33;
|
|
||||||
|
|
||||||
float upDot = dot(normalWorld, worldUp);
|
float upDot = dot(normalWorld, worldUp);
|
||||||
|
|
||||||
//Fade between a flat lerp from sky to ground and a 3 way lerp based on how bright the equator light is.
|
//Fade between a flat lerp from sky to ground and a 3 way lerp based on how bright the equator light is.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user