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: GeometryInstance3D visibility range alpha fade stopped working between 4.0.beta1 and 4.0.beta2 #69877

Closed
Calinou opened this issue Dec 10, 2022 · 3 comments

Comments

@Calinou
Copy link
Member

Calinou commented Dec 10, 2022

Godot version

4.0.beta7 (also reproduced as early as 4.0.beta2)

System information

Fedora 36, Vulkan Forward Plus, AMD Radeon RX 6900 XT

Issue description

GeometryInstance3D visibility range alpha fade stopped working between 4.0.beta1 and 4.0.beta2. When set to Self or Dependencies, it now acts as if the fade mode is set to Disabled, but without hysteresis support (if Begin Margin and/or End Margin is set to a value greater than 0.0).

The last version where this works as expected is 4.0.beta1. I've tried to bisect this between 4ba934bf3d1e697d8f332b5e8cfd694cdf49a7ba (good) and f8745f2f71c79972df66f17a3da75f6e328bc55d (bad) to no avail, as the feature always seemed broken during my bisect (which meant I landed on a5ffd25).

Steps to reproduce

  • Add a MeshInstance3D node with a BoxMesh.
  • Configure its Visibility Range section in the inspector as follows:
    • Begin: 2m
    • Begin Margin: 1m
    • End: 5m
    • End Margin: 2m
  • Set the visibility range fade mode to Self.
  • Move the camera in the editor. Notice how the cube doesn't smoothly fade in and out as expected.

Minimal reproduction project

test_geometryinstance_fade.zip

@Calinou Calinou added this to the 4.0 milestone Dec 10, 2022
@Calinou Calinou moved this to To Assess in 4.x Priority Issues Dec 10, 2022
@clayjohn clayjohn moved this from To Assess to Todo in 4.x Priority Issues Jan 6, 2023
@clayjohn clayjohn removed the confirmed label Jan 6, 2023
@clayjohn clayjohn removed this from the 4.0 milestone Jan 6, 2023
@clayjohn
Copy link
Member

clayjohn commented Jan 6, 2023

Initially I thought I could reproduce this issue as it seemed to be broken in Beta2 onward. However, after debugging I realized that the example project was using the mobile renderer. Visibility range isn't available in the mobile renderer right now.

Visibility range works fine in the clustered renderer.

The misunderstanding present in this bug report comes from the fact that project setting for switching between the clustered and mobile renderers changed between beta 1 and 2. So in the beta1 build the MRP ran on the clustered renderer while in the beta2 build it utilized the project setting and ran on the mobile renderer.

@Calinou
Copy link
Member Author

Calinou commented Jan 7, 2023

Visibility range isn't available in the mobile renderer right now.

Is there a technical reason for that? I thought the culling part of the renderer was shared between clustered and mobile – it happens on the CPU after all.

I guess https://github.com/godot-extended-libraries/godot-lod will need an update for 4.0 then (also for the Compatibility backend).

@clayjohn
Copy link
Member

clayjohn commented Jan 7, 2023

Visibility range blending isn't implemented in the culling phase as it uses alpha blend. I'm not sure if there is a technical barrier to adding it to the mobile renderer it's just not implemented right now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants