-
-
Notifications
You must be signed in to change notification settings - Fork 20.2k
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
Basic fast filtering implementation #36588
Conversation
Clang warning:
|
bce022f
to
1ec9767
Compare
@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
@akien-mga I will push a version with docs later today. Please don't merge until then. |
bc9df09
to
821ee3d
Compare
@akien-mga Should be ready to merge pending the outcome of CI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs reviewed.
821ee3d
to
35629cd
Compare
The build failure looks like an issue with the CI itself. |
CI passed but there's a conflict with recent docs changes. |
35629cd
to
3e299aa
Compare
Fixed :) |
Thanks! |
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