Lexpartizan/Godot_sky_shader

Vertical blurred line in middle of screen

Closed this issue · 7 comments

On my build I see a vertical blurred line in the middle of the screen. Best visible when it's "night", but also visible during "day". I guess it is a screen tearing issue, because it cuts off the clouds... But VSync on or off makes no difference. I tested your settings of default_env.tres in my own project, but that does not look like the root cause...

blurred_line_in_middle_of_screen

Sounds like this issue, but here is no fast movement necessary and it's only in the build:
https://www.nvidia.com/en-us/geforce/forums/discover/177143/screen-tearing-blurred-line-in-middle-of-screen/

I have a NVIDIA GeForce GTX 970.

I think this is impossible to fix. At this point there is a UV seam when a square texture is pulled over a panorama sphere.
In 3.2 this effect smaller, but present.
You can change position Sun and Moon in script to make it less noticeable.

Might this be a mipmapping issue as described here (including solution)?

godotengine/godot#25976

In mipmapping issue due to the inaccuracy of the float, it turns out that the coordinates go beyond the size of the texture. Therefore, the border around the islands helps. In this case, due to the same inaccuracy of the floats, the edges of the texture just do not always coincide. And I don’t know how to deal with it. That is, our line is 0. On the left -0.1, on the right +0.1 This is in 3D coordinates. And on the texture itself - these are two opposite edges. Which, in terms of texture, have nothing to do. And at these edges, the noise generator for the clouds produces not quite the same values.
In addition, such a fight will require resources, which will make the shader slower.

In general, if the truth is, then I just do not see the solutions.
The solution with the mipmap will not work here.

Hm...
then, can the sun and moon move on a different path? You can't see it on the sun, but the seam also appears on the moon -> if the moon (and sun -> to keep it the same) do not move along the seam, then there won't be any seam on them, at least

in script func _DAY_TIME_changed(value):
sun_pos = Vector3(0.0,-1.0,0.0).normalized().rotated(Vector3(1.0,0.0,0.0).normalized(),phi)

first vector - initial position of the sun (y=-1.0,bottom) ,second vector axis of rotation (around axis X)
For moon same vectors. So you can play with it))
This is what was intended, so the vectors are normalized. You can easily change the axis of rotation or move the sun away from the zenith to horizon.

Indeed, thanks for the tip.

I changed the z-float in the Vector3 used in rotated() to 0.5:

sun_pos = Vector3(0.0,-1.0,0.0).normalized().rotated(Vector3(1.0,0.0,0.5).normalized(),phi)
moon_pos = Vector3(0.0,1.0,0.0).normalized().rotated(Vector3(1.0,0.0,0.5).normalized(),phi)

Should we close this issue?

Close, since I don't know how to solve this problem and it is insignificant.