Basic fast filtering implementation#36588
Merged
akien-mga merged 1 commit intogodotengine:masterfrom Feb 28, 2020
Merged
Conversation
Member
|
Clang warning: |
bce022f to
1ec9767
Compare
Member
Author
|
@akien-mga Thanks! Funny enough, that typo would have made the new code run 6 times every frame instead of once and I didn't even notice cause I still had > 60 FPS. |
1ec9767 to
bc9df09
Compare
reduz
approved these changes
Feb 27, 2020
Member
Author
|
@akien-mga I will push a version with docs later today. Please don't merge until then. |
bc9df09 to
821ee3d
Compare
Member
Author
|
@akien-mga Should be ready to merge pending the outcome of CI. |
821ee3d to
35629cd
Compare
Member
Author
|
The build failure looks like an issue with the CI itself. |
Member
|
CI passed but there's a conflict with recent docs changes. |
35629cd to
3e299aa
Compare
Member
Author
|
Fixed :) |
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR implements the fast filtering algorithm described here.
Fast filtering uses a two pass approach to blur environment maps to create radiance maps. It has incredible speed benefits over traditional importance sampling but comes at the cost of quality in certain scenarios. The implementation in this PR is both faster and higher quality than our current implementation of importance sampling, however, it can only be used to generate a 128x128 radiance map. So the current importance sampling implementation is left in place so users can have crisper environment reflections if they need.
comparison of fast filtering (top, 10ms) and importance sampling (below, 75ms)

I have left the options structure more or less the same. Because there is no longer a low quality importance sampling I removed the "realtime_ggx" project setting and added a setting to choose the quality to use for the fast filtering algorithm. Low quality is default and provides excellent quality for most scenes. High quality can be used for use with especially high detail scenes.
Following this PR I would like to make another one improving the current importance sampling technique so that it is higher quality than the realtime option.
Speed Comparison
Current implementation using Importance Sampling
Proposed implementation using Fast Filtering