|
@@ -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)",
|