Closed Shimitty closed 3 months ago
I'm trying out this addon and found some strange banding when viewed from far away. I saw a function for avoiding this in the script, but it doesn't seem to be working. Is there something I'm missing? Is it because the planet is just a default sphere mesh? Any assistance is appreciated.
Which option are you referring to?
If you mean the Sphere Depth
shader parameter, this is not a function, and while it helps a little at high distances, it
doesn't help that much. It's also a parameter you have to set yourself. I just tested and it does have an effect. In your case I think it might not make much of a difference since you seem to be using a sphere already for your planet and it seems pretty far and thin.
If you mean the transition between full screen quad and box, that has nothing to do with banding. It doesn't aim to solve that. It's only an optimization to avoid computing the shader in full screen from far away and allow easier compositing of multiple atmospheres. That feature is known to not work reliably in the editor, but should work in game. In your case it should also not make a visible difference since you only have one planet it seems.
Which version of Godot are you using? How far away is your planet?
I'm suspecting you're using Godot 4.2 and your planet is too big/far for the renderer's depth precision. In my demo, I tricked the camera by increasing the near plane while in space since nothing gets rendered up-close, which increases depth precision and reduces that kind of banding.
In Godot 4.3 the renderer is starting to use reverse-Z, which has much better precision and might reduce that issue further.
Ok that makes sense. You're right that I'm using 4.2. I guess I'll have to disable visibility at long range or wait for Godot 4.3. planets are slightly on the back burner for me right now so I'll make a plan in the mean time. Thank you for your quick response.