diff --git a/Templates/BaseGame/game/core/rendering/shaders/gl/lighting.glsl b/Templates/BaseGame/game/core/rendering/shaders/gl/lighting.glsl index f9b3d272b..62b49ca04 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/gl/lighting.glsl +++ b/Templates/BaseGame/game/core/rendering/shaders/gl/lighting.glsl @@ -353,7 +353,7 @@ float defineSphereSpaceInfluence(vec3 wsPosition, vec3 wsProbePosition, float ra { float3 L = (wsProbePosition.xyz - wsPosition); float innerRadius = radius-(radius*atten); - float contribution = 1.0-saturate(mix(length(L), radius-innerRadius, atten)/radius); + float contribution = 1.0-pow(saturate(length(L)/mix(radius, innerRadius, atten)), M_2PI_F*(1.0-atten)); return saturate(contribution); } diff --git a/Templates/BaseGame/game/core/rendering/shaders/lighting.hlsl b/Templates/BaseGame/game/core/rendering/shaders/lighting.hlsl index 58789ee20..43d066c4a 100644 --- a/Templates/BaseGame/game/core/rendering/shaders/lighting.hlsl +++ b/Templates/BaseGame/game/core/rendering/shaders/lighting.hlsl @@ -356,7 +356,7 @@ float defineSphereSpaceInfluence(float3 wsPosition, float3 wsProbePosition, floa { float3 L = (wsProbePosition.xyz - wsPosition); float innerRadius = radius-(radius*atten); - float contribution = 1.0-saturate(lerp(length(L), radius-innerRadius, atten)/radius); + float contribution = 1.0-pow(saturate(length(L)/lerp(radius, innerRadius, atten)), M_2PI_F*(1.0-atten)); return saturate(contribution); }