-
-
Notifications
You must be signed in to change notification settings - Fork 35.9k
Fix Sky Shader on Android/S6 (#8382) #8614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
`exp(n)` does not return the correct value, so I replaced it with `pow(e, n)`.
@zz85 looks good? |
Does this only happen on Samsung S6? This would seems to be such a strange bug. Otherwise seems good to me. 👍 |
I wonder if this is still an issue. Maybe the device has had driver updates that addressed this since then? |
I can confirm Samsung S6 with Android 6 running on the stock firmware still has this issue. http://threejsworker.com/api/pullrequests/8614/examples/webgl_shaders_sky.html works. |
Actually... Unless this is already a known issue, I'm sure @kenrussell would appreciate a conformance test for this. |
Yes, if there is a confirmed bug on this device, a conformance test would definitely be appreciated. Please submit pull requests against https://github.com/KhronosGroup/WebGL , perhaps in sdk/tests/conformance/glsl/bugs/ . Please note that there are already tests for similar sounding bugs like pow-of-small-constant-in-user-defined-function.html, so please check to see if something there already catches this bug. Thanks. (We don't run the WebGL conformance tests on this device in house.) |
Sure, I can add a comment... I just tried the conformance tests on my S6 in Chrome, and all the |
I added a comment to the code as @zz85 requested and have updated the branch to the latest dev. |
👍 since I don't think we don't have better solutions right now. |
Thanks for adding the comment! |
If anyone can confirm that this is a bug in the exp() function on the Samsung Galaxy S6, yes, please submit a pull request against https://github.com/KhronosGroup/WebGL adding a conformance test. The best place would probably be https://github.com/KhronosGroup/WebGL/tree/master/sdk/tests/conformance/glsl/bugs . Thanks. |
@kenrussell - I'm not sure how the conformance tests works or how exp should be tested. https://www.shadertoy.com/view/4lsSDl is another example that uses |
@zz85 the conformance tests for these kinds of GLSL bugs are very simple. See for example sdk/tests/conformance/glsl/bugs/pow-of-small-constant-in-user-defined-function.html . If you can figure out a couple of values where exp() is being computed incorrectly on the Galaxy S6, but correctly on other devices, then it should be possible to write a test that fails on the S6 and passes everywhere else. This would offer great value and hopefully prevent this sort of bug from slipping into their drivers again. I don't have such a device to test with, so a pull request against https://github.com/KhronosGroup/WebGL would be greatly appreciated. Thanks. |
exp(n)
does not return the correct value, so I replaced it withpow(e, n)
.