提交 e62a212b 编写于 作者: B Brian Chirls 提交者: Mr.doob

Fix Sky Shader on Android/S6 (#8382) (#8614)

* Fix Sky Shader on Android/S6 (#8382)

`exp(n)` does not return the correct value, so I replaced it with `pow(e, n)`.

* Editor: Include VRControls/VREffect when needed.

* Editor: Workaround for Storage not being ready in time.

* Editor: Fixed edit button.

* Added comment explaining change in shader function #8382, #8614
上级 23404d4b
......@@ -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)",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册