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

Trying to get rid of <Grid> jitter #2279

Open
geoff-harper-qii opened this issue Dec 27, 2024 · 2 comments
Open

Trying to get rid of <Grid> jitter #2279

geoff-harper-qii opened this issue Dec 27, 2024 · 2 comments
Labels
question Further information is requested

Comments

@geoff-harper-qii
Copy link

What is your question:

I'm getting a fair bit of jitter on the Grid component. For reasons out of my control, everything is placed at an offset to something to the tune of 500_000, 300_000, 50. I realize this is likely to cause jitter but I've grouped everything in the scene and placed the group at an offset. The grid is locally positioned around 0, 0, -30. My solid meshes in the scene don't get any problems with this fix but the Grid seems to remain jittery. I tried putting everything at 0, 0, 0 world coordinates and the jitter unsurprisingly disappeared. Is there a way to resolve this or is there some fundamental difference between solid meshes and the grid's line mesh? I'm afraid zeroing out the world positions is out of the question

@geoff-harper-qii geoff-harper-qii added the question Further information is requested label Dec 27, 2024
@CodyJasonBennett
Copy link
Member

Can you show what this jitter looks like and share some details about your system (GPU, Windows/DirectX)?

This sounds purely like precision, but symptoms can vary depending on device/driver. Wider desktop/gaming GPUs will opt for 32-bit even where precision can be relaxed, but mobile or handheld systems will opt for the least precision permittable. Other times, symptoms can show at oblique angles depending on depth precision.

You might be interested in reverseDepthBuffer mrdoob/three.js#29445 if you absolutely cannot modify the camera frustum or the scene positioning. This requires EXT_clip_control which is not implemented in Firefox.

@geoff-harper-qii
Copy link
Author

geoff-harper-qii commented Jan 13, 2025

I've created a simple repro here and I'm seeing the same jitter as my project. I can take a screen capture if you like but I'm not sure how well it would represent the problem. Here are my specs

  • dx12
  • Ryzen 5 2600
  • GTX 1060
  • windows 11 22631

Also I should have mentioned it's specifically bad while rotating but that probably isnt surprising

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants