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

Regression in mesh LOD behavior with shadows since 4.0.beta3 #67479

Closed
mrjustaguy opened this issue Oct 16, 2022 · 4 comments · Fixed by #92287
Closed

Regression in mesh LOD behavior with shadows since 4.0.beta3 #67479

mrjustaguy opened this issue Oct 16, 2022 · 4 comments · Fixed by #92287

Comments

@mrjustaguy
Copy link
Contributor

Godot version

4.0 Beta 3

System information

Windows 11, Vulkan, GTX 1050 Ti 516.94

Issue description

A regression since Beta 2, Directional Shadow ALODs are acting up. They're more aggressive compared to the Camera, but also inconsistent within splits.

Steps to reproduce

Move around Shadowed Objects with ALODs (directional shadows) and observe inconsistent LODs between View and Shadows, and even changing within splits.

Minimal reproduction project

LOD.zip

@clayjohn
Copy link
Member

Could be a regression from #67307 I wonder if it's causing something funky to happen with LOD selection in the shadow pass

@Calinou Calinou changed the title Wierd LOD behavior with Shadows Regression in mesh LOD behavior with shadows since 4.0.beta3 Oct 16, 2022
@TechnoPorg
Copy link
Contributor

There still seem to be camera planes used in relation to LOD when rendering shadows:

shadow_pass.rp_uniform_set = RID(); //will be filled later when instance buffer is complete
shadow_pass.camera_plane = p_camera_plane;
shadow_pass.screen_mesh_lod_threshold = scene_data.screen_mesh_lod_threshold;
shadow_pass.lod_distance_multiplier = scene_data.lod_distance_multiplier;

@mrjustaguy
Copy link
Contributor Author

I think maybe it's time to change up the LOD logic for Shadows (directional atleast), as they should use the same logic as orthogonal cameras do, from the perspective of the Light ofc, so that the LODs change based on splits and their resolution, regardless of distance from the camera.

@mrjustaguy
Copy link
Contributor Author

one observation made with #82000: If you line up a series of an identical mesh, and cast directional shadows upon them, you'll notice how the LOD decision goes something like "High Lod - Mid Lod - Low Lod - Mid Lod - Low Lod" as you're going away from the casters following the line..

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.

4 participants