-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
View Z-Far distance above 5000 causes SSAO banding in GLES3 #42390
Comments
This was already opened as #13129, but I closed that issue as it was fixed in the PS: You generally don't want to set the Z far distance so high due to the limited precision in physics (making the high viewing distance not very useful). I would recommend using a value lower than 4000. Ideally, you should use the lowest Z far distance you can afford to use. See discussion in #33207. |
I tested this out and can confirm that it becomes a problem after a z-far of about 5000. However, I'm not sure what the solution is, or if it is worth finding one. I quickly tried using 32 bit depth buffers (for the scene and for the SSAO effect) and the issue didnt go away. This leads me to thinking it may actually be a precision issue in the shader. Which would require a much more complex solution. The only thing I can think of that would solve this in a satisfactory way would be to cap out the depth of the SSAO effect to something more reasonable like 1000 meters. Anything beyond that just wouldn't receive SSAO. However, even this solution would introduce significant complexity that may not be worth it. |
I agree that generically one shouldn't use a z-far beyond 2000 or maybe 3000... But it is still a problem that should be addressed at some point, especially for games with really big landscapes or calls from large objects really far away. Perhaps a solution could be a simple bool tick box added to objects to allow them to exempt from the z-far "filter" or whatever it's technically called, thus they would always render and be unaffected by the z-far distance. Perhaps there is a way to write a script to do this that I'm unaware of, but I could definitely find a use for that if I can't go beyond say 5000 meters. |
You can probably do something like this in Godot using a shader: https://aras-p.info/blog/2019/02/01/Infinite-sky-shader-for-Unity/ |
Godot Version 3.2.2 Stable
Windows 10 Pro, AMD Ryzen, RTX 2070
Description:
When you increase the view distance of the main viewport (view z-far distance setting) beyond about 5000, objects close-up appear to have lines all over them in a weird pattern, see image attachment for example. This is an issue in every project I've tested so far.
The text was updated successfully, but these errors were encountered: