-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
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
RectAreaLightUniformsLib.js is broken on iOS 14 #20415
Comments
Sounds good. Do you mind creating a PR with the fix? |
Thanks @Mugen87 we'll look into that. It's nice to know a PR would be welcome! |
I've added a draft pull request (see above), which works when I tested it on iOS 14, and also still works on iOS 13 and Chrome for Windows. However, to access the renderer I changed the API from I'd love suggestions on how to avoid changing the API if possible. |
Reconsidering this issue: I'm not sure anymore if using Maybe it would be better to check if
|
I agree that would be a better approach, as it would avoid rendering area lights with visible artefacts, but it would take a little bit longer to implement. From a quick test on iOS 13 and 14 using Khronos comformance tests, it looks like Using half-float for area lighting involves converting the two 16k float32 arrays in three.js/examples/js/loaders/RGBELoader.js Line 348 in ff48de5
|
I've created PR #20477 which uses half-float instead of float and renders area lighting without artefacts on Windows, iOS 13 and iOS 14. I've put some to-do items and questions in the PR. |
Describe the bug
examples/js/lights/RectAreaLightUniformsLib.js
does not work in iOS 14. It used to work on iOS 13 (with some linear banding artefacts in the reflection of the area light), but under iOS 14 an area light created using this library is simply black and gives no light.To Reproduce
Steps to reproduce the behavior:
Screenshots
Desktop (Chrome on Win 10):
iOS 13 (iPad Air 2019 model):
iOS 14 (iPhone 11):
Diagnosis:
The problem seems to be caused by a change in Webkit in Safari on iOS 14. Previously in iOS 13 Webkit would claim it supported the WebGL extension
OES_texture_float_linear
but it actually didn't. Now in iOS 14, Webkit correctly reports that it does not support that extension.Suggested fix:
Change RectAreaLightUniformsLib to fallback from
THREE.LinearFilter
toTHREE.NearestFilter
when theOES_texture_float_linear
WebGL extension is not available.The text was updated successfully, but these errors were encountered: