-
Notifications
You must be signed in to change notification settings - Fork 23
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
Known issues: very big atmosphere. [FIX] #4
Comments
Thanks, I'll look into it, although from what I know the issue comes from depth buffer precision issues. Where in the docs is this issue specified? |
I tried this, but it doesn't actually solve the issue, the z-fighting still occurs |
To be clear, this solution solves the "black box" effect at distance. Pure z-fighting over large distances is another matter. Vec3 contains 32 bit single precision floats. One is for pos/neg, half a dozen or so are for the exponent leaving you with twenty odd for decimal resolution. More definition than that cannot be stored. This comes down to GPU architecture favouring a fast and wide computational wavefront rather than depth so they don't do 64 bit double floats (because 32bit gives more than enough colours). This is fundamental to the equipment we're working with and there's no coding round it. But you can do things like swap to a billboard over a certain distance, which would be much cheaper too. That's best handled that CPU side. |
Hmm, I haven't heard of the black box thing |
Can you check if it works in godot 4 now? They migh have fixed it in the engine. |
The docs make reference to an issue in Godot with large meshes where the centre of the bounding box isn't rendered. This limit on draw distance is implemented by Godot because, without it, there would be floating point rounding errors close up.
A solution is to manually override the draw distance with:
render_mode skip_vertex_transform;
and within the vertex shader set the z axis max draw equal to the max w distance minus some small amount:
Credit to Bastian Olij.
The text was updated successfully, but these errors were encountered: