-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Vulkan: Decal and Light3D distance fade uses view plane distance, resulting in unstable fading when the camera rotates (unlike GeometryInstance3D) #58513
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
This is an unrelated issue. Please don't hijack issues with comments like these – just create a new issue instead. |
I didn't hijack, how is this not the same issue as I'm having? The decals don't display properly when the camera rotates, exactly the same issue here (except my example has some additional issues). |
According to that issue's description, you don't seem to have distance fade enabled on the decals (it's disabled by default). Hence, it's a different issue entirely. We can't know for sure anyway as you didn't upload a minimal reproduction project 🙂 |
Ah okay, I didn't realize this issue was with distance fade, it just seemed very similar to problems I'm having with decals. |
Fixed by #71709 |
Godot version
4.0.dev (872e8a4)
System information
Fedora 34, GeForce GTX 1080 (NVIDIA 495.46)
Issue description
Decal's distance fade works using a view plane distance calculation, rather than an actual distance between the camera and the Decal node:
godot/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
Lines 3665 to 3676 in 80baa13
This means that decals that should be hidden due to distance may be visible again when the camera is rotated. Not only this increases GPU performance demands, but this also makes the image appear less stable in motion. The issue is more noticeable at higher camera FOVs, but even at the default FOV, it's quite visible already.
GeometryInstance3D visibility ranges do not suffer from this issue, as a
distance_to()
function is used. We should use the same formula for all kinds of LOD to ensure consistency, while making sure that LOD does not break with orthogonal cameras.Since #58512 uses the same distance fade calculation, it's also affected by this issue.
simplescreenrecorder-2022-02-25_00.02.14.mp4
Steps to reproduce
icon.png
or a new NoiseTexture will do).Minimal reproduction project
test_decal_distance_fade.zip
The text was updated successfully, but these errors were encountered: