Pedersen LasseJonFuglsang TemporalReprojectionAntiAliasing
Pedersen LasseJonFuglsang TemporalReprojectionAntiAliasing
Anti-Aliasing in INSIDE
Lasse Jon Fuglsang Pedersen
Programmer // PLAYDEAD
@codeverses
Background
Temporal Pass
What it looks like
no AA our temporal AA
What it looks like …
no AA our temporal AA
What it looks like …
no AA our temporal AA
First some basic intuition
current frame
view N
Stepping back in time
view N
Stepping into void
view N
Step 1: Jitter your view frustum
input frame N
output
(jittered)
input frame N
output
(jittered)
raster
p_uv
Reprojection of static scenes
p_uv
Reprojection of static scenes
p_uv
Reprojection of static scenes
p_uv
Reprojection of static scenes
buf_history
Reprojection and edge motion
input frame N
output
(jittered)
● have to constrain
Constraining history sample …
r
b
Neighbourhood clamping, first pass
clip
A little note on line-box clipping
// note: clips towards aabb center + p.w
● proper line clip is “slow” float4 clip_aabb(
float3 aabb_min, // cn_min
float3 aabb_max, // cn_max
float4 p, // c_in’
● we just clip towards aabb center float4 q) // c_hist
{
○ transform color vector into unit space float3 p_clip = 0.5 * (aabb_max + aabb_min);
○ calc divisor and apply in clip space float3 e_clip = 0.5 * (aabb_max - aabb_min);
input frame N
output
(jittered)
input frame N
output
(jittered)
● forces transition to motion blur (no history!) for fast moving fragments
○ includes immediate neighbours, due to v relying on closest_fragment( … )
Final blend with motion blur fallback …
16 frames
● nice to revisit same sub-pixel regions often
○ clamp/clip will compress tail
○ quickly return to that data
uniform4 helix
● stochastic everything
○ shadows
○ reflections
○ volumetrics
Questions?
email me at
@codeverses
Bonus slides
Clipping in YCoCg