Skip to content
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: Emit a node configuration warning when GeometryInstance3D fade is enabled, but the margin is set to 0 #55366

Closed
Calinou opened this issue Nov 26, 2021 · 1 comment · Fixed by #55370

Comments

@Calinou
Copy link
Member

Calinou commented Nov 26, 2021

Related to #55367.

Godot version

4.0.dev (5efe80f)

System information

Fedora 34, GeForce GTX 1080 (NVIDIA 470.74)

Issue description

The transparency-based distance fade implemented in #54222 doesn't seem to work as expected, both on opaque and transparent (alpha blended) materials.

From left to right:

  • Opaque material, no LOD
  • Opaque material, standard LOD (no fade)
  • Opaque material, LOD with Self fade
  • Opaque material, LOD with Dependencies fade
  • Transparent material, LOD with Self fade
  • Transparent material, LOD with Dependencies fade

Spheres on the top have Transparency set to 0.2, spheres on the bottom have Transparency set to 0.0.

visibility-range-fade.mp4

Steps to reproduce

  • Add a MeshInstance3D node.
  • Configure a LOD distance on the MeshInstance3D in Visibility Range > End.
  • Set the fade mode to Self.
  • Move away and notice that the mesh still fades in and out instantly. This occurs both if the mesh has an opaque or transparent material.

Minimal reproduction project

test_visibility_range_fade.zip

@Calinou
Copy link
Member Author

Calinou commented Nov 26, 2021

It's due to a configuration mistake on my side. You need to set the Visibility Range End Margin (which normally acts as hysteresis) to a value greater than 0.0 for the fading effect to be visible.

@Calinou Calinou changed the title Vulkan: Visibility Range transparency fade doesn't work as expected Vulkan: Emit a node configuration warning when GeometryInstance3D fade is enabled, but the margin is set to 0 Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants