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

Loss of Rendering Precision at Large Coordinates #81

Open
kreivon opened this issue Oct 21, 2024 · 1 comment
Open

Loss of Rendering Precision at Large Coordinates #81

kreivon opened this issue Oct 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@kreivon
Copy link

kreivon commented Oct 21, 2024

Light overlay will lose precision and become distorted the further away from the world origin the player travels. This ranges from the overlay flickering as the camera pans (100k) to complete distortion as shown in the attached image (10mil).

This is especially impactful for players on PVP servers where building bases in the millions is a requirement to stay secure.

Steps to Reproduce:
Tested on Fabric 1.21.1

  1. Enable overlay
  2. Teleport to X:1_000_000 or another coordinate far from the world origin
  3. Overlay will be noticeably distorted

2024-10-21_18 03 35

Possible Solution:
I believe this can be solved by translating the matrices so that the render origin is offset by subtracting the camera position. The loss of precision caused by large coordinates could be eliminated by such an offset.

@andi-makes
Copy link
Contributor

Thank you for this detailed issue! It is great to have all the relevant information from the start :)

I'll try to fix this issue within the next week or so, I'll keep you updated here!

@andi-makes andi-makes added the bug Something isn't working label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants