Skip to content

Commit

Permalink
feat(draw): apply the temporal AA pass after the lens dust filter
Browse files Browse the repository at this point in the history
The lens dust filter adds a film grain, which would lower the neighbor
clamping technique's effectiveness if applied first.
  • Loading branch information
yvt committed Jan 17, 2021
1 parent 99f3f79 commit ae12df5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Sources/Draw/GLRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -950,11 +950,6 @@ namespace spades {
handle, std::min(settings.r_cameraBlur * 0.2f, 1.0f), sceneDef.radialBlur);
}

if (settings.r_bloom) {
GLProfiler::Context p(*profiler, "Bloom");
handle = lensDustFilter->Filter(handle);
}

if (settings.r_temporalAA) {
if (!temporalAAFilter) {
temporalAAFilter.reset(new GLTemporalAAFilter(this));
Expand All @@ -963,6 +958,11 @@ namespace spades {
handle = temporalAAFilter->Filter(handle, settings.r_fxaa);
}

if (settings.r_bloom) {
GLProfiler::Context p(*profiler, "Bloom");
handle = lensDustFilter->Filter(handle);
}

// Do r_fxaa before lens filter so that color aberration looks nice.
if (settings.r_fxaa) {
GLProfiler::Context p(*profiler, "FXAA");
Expand Down

0 comments on commit ae12df5

Please sign in to comment.