-
Notifications
You must be signed in to change notification settings - Fork 3
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
Extreme z-far value yields empty far plane due to precision rerror when reconstructing from matrix #15
Comments
|
This fixes z-far in place, not flexible. |
This is the source of an error for large z-far values. |
|
|
4.x27fe14e#diff-0cb84c1b45f2b149fc0080b8f23b1cc760ea1fd30bbf9a38ab3f7e67fe3e7795 3.xeaa1e69#diff-b2d5c99da5f28f4792ce2835118fcd78fcd61246e0d952a7a3fc4f73f5831063 Implemented the value storage as a separate class. |
@roalyr any chance you can check whether this PR godotengine#95944 solves the issue ? |
Sure, will check. |
I don't see a reason it couldn't. Will create PRs for other branches whenever I get reviews from maintainers. |
If editor and far plane limits are set to 1e19 (I didn't try inf), it then doesn't matter what kind of depth buffer you use, because you can have custom shader log depth, but precision-proofing far plane is just a logical decision. In fact, my godot for 3d open worlds does exactly that: 1e19 far plane and editor zoom limit, a bit increased editor zoom increment, and my makeshift far plane fix. That's all. In 3.x and 4.x you can just implement log depth via custom shader if normal depth or reverse z depth is not enough:
|
The only difference the ordinary user sees is increased far plane limit in editor and camera settings. Other than that there is no difference from upstream 3.x or 4.x in terms of UX. |
Godot version:
3.x and 4.x
OS/device including version:
Mobile and desktop (Android, linux).
Issue description:
When z-far is below 1e6 (which is the cap value on stock Godot 3) everything renders properly.
Otherwise - arbitrary culling occurs because z-far Plane which is returned by
normalize()
function - is empty.Steps to reproduce:
Open MRP and navigate the view in editor at different z-far values as on the video:
https://youtu.be/sY_DiETtkl8
Also in-game video:
https://youtu.be/ukl9RUnHEOw
Minimal reproduction project:
cull_bug_test_for_zfar_above_1e6.tar.gz
The text was updated successfully, but these errors were encountered: