Logarithmic Z-Buffer for large worlds

junkyjunky Posts: 3Member


I'm doing a planetary game (specifically using a quadtree planet) and I need to achieve better far distance rendering (without z fighting problems) while not loosing too much near clip distance.
One common solution is to store the depth in logarithmic scale. It's "kind of easy" to do this in godot? There is any place where I can change how depth is encoded and decoded for all shaders? Or this would require little changes everywhere?

I'm in master branch and working with custom modules, so I can change c++ code if needed, no problem for that. I'm also used to glsl so not problem for that either.

Any advice/direction/place to look for, would be appreciated.


Sign In or Register to comment.