DimasKama / OrthoCamera

MIT License
8 stars 3 forks source link

Improved Sodium compat #14

Closed MrNavaStar closed 1 month ago

MrNavaStar commented 1 month ago

This pr disables "Use Block Face Culling" while in ortho mode, and sets it back to the user specified setting when exiting. This makes the mod work with sodium out of the box with no need to tweak settings.

This closes #12

DimasKama commented 1 month ago

Thank you for the PR. But this solution doesn't seem very clean to me. The mod still has compatibility issues with Nvidium and with missing visible chunks. The correct solution would be to change the position in the Camera object to the back wall of the frustrum, so that culling would work correctly and the game would understand what exactly the player is seeing now. I started doing this, but ran into problems with fog, which moved with the camera and prevented me from seeing anything. There were also other problems, because of which I stopped working on this problem. But I will try again to fix this soon. Anyway, thanks for the help!

MrNavaStar commented 1 month ago

Okay, thanks for the feedback. I did actually try to do what you're describing, but it seemed like a rather complex task and something that would require some back and forth to get working.

I still think this pr might be good to merge in the meantime until a solution like that is implemented, as the performance penalty of playing with culling Always off may be annoying for some players. Up to your discretion.

Anyway thanks for the mod, and keep up the good work!