Closed kreivon closed 1 month ago
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!
This got fixed in Lighty v3.0.0-beta.5 for Minecraft 1.21.3. I don't know if I have time to do a release for 1.21.1 though, so if you need the fix on 1.21.1, let me know here and I'll look into it on the next weekend.
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
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.