Why does iOS often report an error when loading HDR?


Why does ios often report an error when loading hdr?
It doesn’t always come up, but it’s a really hard problem to solve。
And my code:

What is the error? Helps if you post more info.

Now the model is black, I guess it should be hdr load error or load failure, because my scene is illuminated by HDR

iPhones have artificially-lower resource limits than other devices typically. Try making assets smaller perhaps.

The HDR is only 56k and the model is only 1.5MB, but these problems still occur,and I can’t fix it

It seems like a recurring problem, and most likely on Apple side.

Just a shot in the dark, reduce the resolution of your asset or try to resize it to the power of two. Sharing your HDR can also be helpful as someone can test it.

HDR workflows in three.js require half float textures since r136. I could imagine that older iOS devices with no WebGL 2 support might not support the half float texture WebGL extension and thus the application breaks.

@superTigery What iOS version are you using and what device? Can you please make sure the device supports WebGL 2 (you can set a break point after the renderer has been created and check its rendering context)?

Also iOS Safari has had bugs where even if a webgl extension exists, you have to manually turn on the extension first before rendering with iOS or things also break.

What could help us help is more info. F.e. assets, live demo, etc. Here’s a CodePen starter:

1 Like

It is not a fixed version that will cause problems, such as ios16.5.1

Uploading: HDR_250(1).hdr…
I used this HDR of 256 * 256,thank u

That’s pretty small. Make sure other assets aren’t too big either.