Skip to content

Use prefiltered radiance for Sky high quality update mode#58177

Merged
akien-mga merged 1 commit into
godotengine:masterfrom
clayjohn:VULKAN-prefiltered-radiance
Feb 17, 2022
Merged

Use prefiltered radiance for Sky high quality update mode#58177
akien-mga merged 1 commit into
godotengine:masterfrom
clayjohn:VULKAN-prefiltered-radiance

Conversation

@clayjohn
Copy link
Copy Markdown
Member

Fixes: #43763
The first of the improvements discussed #43763 (comment)

This PR substantially improves the quality of the high quality update mode and improves the performance (from ~60ms per frame to ~5ms per frame on my device). High Quality mode is still not suitable for updating every frame, but the incremental mode is now faster than the real time mode making it the most suitable for updates in the editor (Once this is merged we can revert #57931 and #58165 and allow skys to default to "automatic mode").

Further, High Quality/Incremental can be made very fast by setting the radiance size to 128 (which is the default size in many other engines) or by disabling "use_arrays" in the project settings. With a radiance size of 128, high quality mode takes the same amount of time to update as Realtime at 256. So Realtime is still the preferred choice when updating every frame, but the performance quality tradeoff is more even now

Photo comparison

Using 1024 samples (~65ms):
Screenshot (251)

Using 32 samples (~5ms):
Screenshot (252)

Old version using 32 samples (~4ms):
Screenshot (253)

Old version with 1024 samples (~60ms):
Screenshot (254)

@akien-mga
Copy link
Copy Markdown
Member

The class reference needs an update for the new default values.

@clayjohn clayjohn force-pushed the VULKAN-prefiltered-radiance branch from f697262 to 48728a7 Compare February 17, 2022 05:37
@clayjohn
Copy link
Copy Markdown
Member Author

Pushed changes that allow the mobile renderer to benefit from the prefiltering and I pulled some calculations out of the loop to improve performance slightly.

@clayjohn clayjohn requested a review from JFonS February 17, 2022 05:38
@akien-mga akien-mga merged commit e1b8a86 into godotengine:master Feb 17, 2022
@akien-mga
Copy link
Copy Markdown
Member

Thanks!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vulkan: Artifacts when using a HDRI with PanoramaSkyMaterial (only with HighQuality update mode, not RealTime)

3 participants