Add minimum roughness project setting to improve VoxelGI/SDFGI performance #63468
+87
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to #56804.
The roughness will be clamped for the purposes of VoxelGI and SDFGI rendering. This avoids rendering sharp reflections, which are very demanding when taking significant portions of the screen.
Other sources of reflection such as ReflectionProbes and environment sky aren't affected.
This closes godotengine/godot-proposals#4811 and partially addresses godotengine/godot-proposals#3012.
Testing project: test_gi_opt.zip
Benchmark (using testing project)
Note that the test scene only uses smooth materials, so the performance gain demonstrated here is greater than it would be in a typical real world scene.
OS: Fedora 36
GPU: GeForce GTX 1080 (NVIDIA 510.68.02)
Resolution: 2560×1440
No GI
For reference purposes.
306 FPS (3.27 mspf)
VoxelGI only
SDFGI only
Note: The sudden increase in performance at 0.2 is due to all sharp reflections being disabled within the SDFGI shader.
VoxelGI + SDFGI