Some blocks/chunks flashing
UsainSrht opened this issue ยท 15 comments
Version information
sodium-fabric-mc1.17.1-0.3.3+build.8
Expected Behavior
Normal game without flashing
Actual Behavior
Game flashing
Reproduction Steps
- join a world
- fly around / rotate your head
- see flashing
Java version
Java 16
CPU
Incel Core 2 Duo E7500
GPU
AMD RADEON HD 5500
Additional information
Javaw.2021-11-29.18-55-02-659-1.mp4
version: Sodium 0.4.0-alpha5
java: AdoptJDK17
cpu: fx 6300
gpu: amd hd 8490
same here
SNpYFfzIFB.mp4
Looks like the problem has to do with the player being located at extreme coordinate values.
I was several hundred thousand blocks away from spawn. Tried with the same mods near spawn in a singleplayer world and did not experience the issue.
We might just want to revert the problematic commit if it's indeed the culprit. The performance improvement was minor & it complicates rendering. A more complete solution in the future would be to use an octree for storing chunks & recursively check nodes against the frustum (an idea that has been on my radar for some time) but I haven't gotten around to it, like most other things...
Checking git bisect
showed it being caused by e7afa14, after some further testing it specifically seems to be related to the frustum.intersectAab
part
Setting visflag
to always return FrustumIntersection.INSIDE
does appear to completely stop all flashing, but this obviously has some performance implications, and I don't know enough about JOML or Sodium rendering to suggest a real fix.
Looks like the problem has to do with the player being located at extreme coordinate values.
Yes you're right.
Apologies for being technically illiterate, but will whatever fix you're thinking of be in a new version that I can see from Curseforge? Or is there something different I need to do?
Checking
git bisect
showed it being caused by e7afa14, after some further testing it specifically seems to be related to thefrustum.intersectAab
partSetting
visflag
to always returnFrustumIntersection.INSIDE
does appear to completely stop all flashing, but this obviously has some performance implications, and I don't know enough about JOML or Sodium rendering to suggest a real fix.
uh how do i do this im dumb as shit lmao
Just thought I'd add my 2 cents here as well. This flickering seems to increase gradually based on how far away the player is from x0 z0, it's pretty noticeable from x1,000,000 x1,000,000 onwards and basically happens constantly from around x10,000,000 y10,000,000 onwards.
Note that I'm using Fabulously Optimized 3.1.0-alpha.1 which uses Sodium 0.4.0-alpha5+build.9.
https://www.youtube.com/watch?v=PSM7XvzAMrw
(Uploaded to YouTube because the file size was too big for GitHub, note that higher resolutions might still be processing on their side)
https://www.youtube.com/watch?v=CjYvWDXC_vI
This is from an older version but the latest version 1.18.1, Java 17, latest Fabric API etc. still has this issue. This makes Sodium unusable for me. Please fix.
Use build 750 (if e7afa14 actually caused this issue)
Download from here: github.com/CaffeineMC/sodium-fabric/actions/runs/1491875735
I can upload my copy of the build if you can't download it