Skip to content
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

BatchedMesh example sortObjects bugs on Safari iOS WebGPU #29581

Open
Makio64 opened this issue Oct 7, 2024 · 6 comments
Open

BatchedMesh example sortObjects bugs on Safari iOS WebGPU #29581

Makio64 opened this issue Oct 7, 2024 · 6 comments

Comments

@Makio64
Copy link
Contributor

Makio64 commented Oct 7, 2024

Description

On iOS it seems BatchedMesh example have 3 bugs :

  • indexing problem (my guess) : always present
  • sorting problem : sortObjects = false reduce the visibility of the bug
  • perInstanceFrustumCulled problem : perInstanceFrustumCulled = false reduce the visibility of the bug
Video.07-10-2024.18.47.37.mp4

Note : sortObjects = true also lead to a bug on Android Chrome on one of my current mission but I cant figured out whats the condition of the bug as the project is complexe and involve multiple BatchedMesh / custom nodes .. ( but sortObjects=false solve the bugs I got on Android ) I'll dive more on it when i ll got the time.

Note 2 : on the same project on iOS it feels like the index of the BatchedMesh is slowly degenerating, this second one might be related to : #29379 but i prefer to notify it here as it might be linked.

Related to #29041 but I prefered create a new issue.

@mwyrzykowski

Reproduction steps

  1. get iOS 18.0 / 18.1
  2. enabled flag WebGPU on Safari
  3. Open the example with webGPU: https://threejs.org/examples/webgpu_mesh_batch.html

Code

https://github.com/mrdoob/three.js/blob/master/examples/webgpu_mesh_batch.html

Live example

https://threejs.org/examples/webgpu_mesh_batch.html

Screenshots

No response

Version

r169

Device

Mobile

Browser

Safari

OS

iOS

@mwyrzykowski
Copy link

@Makio64 it seems fine on ToT WebKit (I tried an iPhone 15 Pro):

ScreenRecording_10-07-2024.12-34-10_1.MP4

Understandably it would be hard to verify, but if it looks correct on STP, I think the only difference between for WebGPU between an Apple Silicon Mac and some iPhones is lack of float32 filtering support (excludes Apple9+ phones like iPhone 15 Pro).

@mwyrzykowski
Copy link

This should be fixed by https://bugs.webkit.org/show_bug.cgi?id=277465

That fix did not make it into iOS 18.0 or 18.1, which is why you see the behavior on iOS but not Safari Technology Preview. I imagine macOS 18.0 and macOS 18.1 also exhibit the same issue on Apple Silicon as iOS

@Makio64
Copy link
Contributor Author

Makio64 commented Oct 7, 2024

@mwyrzykowski thanks for your quick answer!
I installed macOs 15.0.1 and STP and I do have glitchs on Mac M3 Pro Max , see the recording :

output_smaller.mp4

@mwyrzykowski
Copy link

mwyrzykowski commented Oct 7, 2024

Which version of STP @Makio64 ?

I tried on an M2 Mac Studio with STP 204 and seems ok:

stp_204_1080.mov

@Makio64
Copy link
Contributor Author

Makio64 commented Oct 7, 2024

Which version of STP @Makio64 ?

I downloaded it today :
STP : Release 204 (Safari 18.0, WebKit 20621.1.1.111.3)
MacOs : 15.0.1 (24A348)
Apple M3 Max, 16-inch, Nov 2023

@mwyrzykowski
Copy link

I will attempt to reproduce on an M3 chip, maybe the flicker is due to a race condition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants