diff --git a/examples/js/SkyShader.js b/examples/js/SkyShader.js index 8d2828f61e89b8b85d79bc9686d346aec85720ce..bab37d98ea64aa0de81ac51d1bea26cc3ffa3874 100644 --- a/examples/js/SkyShader.js +++ b/examples/js/SkyShader.js @@ -126,7 +126,10 @@ THREE.ShaderLib[ 'sky' ] = { "float sunIntensity(float zenithAngleCos)", "{", - "return EE * max(0.0, 1.0 - exp(-((cutoffAngle - acos(zenithAngleCos))/steepness)));", + // This function originally used `exp(n)`, but it returns an incorrect value + // on Samsung S6 phones. So it has been replaced with the equivalent `pow(e, n)`. + // See https://github.com/mrdoob/three.js/issues/8382 + "return EE * max(0.0, 1.0 - pow(e, -((cutoffAngle - acos(zenithAngleCos))/steepness)));", "}", "// float logLuminance(vec3 c)",