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: Reflection probe rendering breaks if Max Distance is greater than 262144 #79448

Closed
Calinou opened this issue Jul 13, 2023 · 0 comments · Fixed by #82415
Closed

Vulkan: Reflection probe rendering breaks if Max Distance is greater than 262144 #79448

Calinou opened this issue Jul 13, 2023 · 0 comments · Fixed by #82415

Comments

@Calinou
Copy link
Member

Calinou commented Jul 13, 2023

Godot version

4.1.stable

System information

Godot v4.2.dev (287f3aa) - Fedora Linux 38 (KDE Plasma) - Vulkan (Compatibility) - NVIDIA GeForce RTX 4090 (nvidia; 535.54.03) - 13th Gen Intel(R) Core(TM) i9-13900K (32 Threads)

Issue description

Reflection probe rendering breaks if Max Distance is greater than 262144. This can be reproduced in both Forward+ and Mobile rendering methods. (Compatibility doesn't have reflection probes implemented yet.)

We can probably fix this by clamping the value in set_max_distance(), so that you can't set it to a value higher than 262144 (including with the inspector's or_greater hint). See also #61492.

Max Distance = 262144

Screenshot_20230714_010300

Max Distance = 262144.1

Notice how ambient light on the boxes appears slightly darker, as ambient is no longer generated correctly. It looks the same as the Disabled ambient mode.

Screenshot_20230714_010324

Max Distance = 262144.1 + custom ambient color set to red

Only the automatic ambient generation is broken, not the custom color shader.

Screenshot_20230714_010346

Steps to reproduce

  • Create a ReflectionProbe and two meshes with a reflective material to view its results.
  • Set its Max Distance to 262144. Notice the reflection and ambient light computation being functional.
  • Set its Max Distance to 262144.1. Notice the reflection and ambient light breaking.

Minimal reproduction project

test_reflection_probe_max_distance.zip

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