Merge branch '3.8' into 3.9-beta

This commit is contained in:
Harald Csaszar 2020-01-14 19:28:14 +01:00
commit 661f773e14

View File

@ -167,16 +167,15 @@ inline VertexLightInfo getVertexLightAttenuatedInfo(int index, float3 viewPos)
return lightInfo;
}
fixed3 calculateAmbientLight(half3 normalWorld)
{
#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;
fixed3 calculateAmbientLight(half3 normalWorld)
{
#if defined(_SPHERICAL_HARMONICS)
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.