Correlation-Aware Semi-Analytic Visibility for Antialiased Rendering Cyril Crassin, Chris Wyman, Morgan McGuire, Aaron Lefohn 2018
1 spp 1/4 RESOLUTION
256x MSAA Semi-Analytic
Alpha-Blending Correlation -aware
Beam rasterization pipeline Correlation-aware 𝐵 𝐶 Visibility Model Prim. order Prim. order Streaming Conservative Raster Composition Depth-order Fragments Pixel Aggregate fragment shader : 1 primitive at a time - Compute all visibility attributes … ����(�) α A = Fixed compact per-pixel Clipped area -> Coverage: ����(�����) storage A-Buffer - Shading at centroid
Alpha-Composition Fractional coverage Probability of coverage ����(�) α A = α A = P(A) in [0,1] α A OVER α B = P(A B) ����(�����) = P(A) + P(B) - P(A ∩ B) = P(A) + P(B) - P(A) x P(B) = P(A) + P(B) x (1-P(A)) = α A + α B x (1- α A ) Assuming A, B statistically independent (uncorrelated): Visible contribution of B P(A ∩ B) = P(A) x P(B) 𝐵 𝐶 “Some”-correlation Full-correlation : Anti-correlation : Decorrelation P(A | B) = 1, P(A | B) = 0, P(B | A) = 0, A OVER B P(A ∩ B) = P(B) * P(A ∩ B) = 0 → P(A ∪ B) = P(A) → P(A ∪ B) = P(A) + P(B) Structured geometry Aggregate geometry Correlated coverages Uncorrelated coverages *[if P(A)>P(B)]
Correlation tracking 32-bit Mask Localization bitmasks: Track the spatial location of coverage Jittered positions NOT Coverage masks ! (Hammersley sequence) α O ? M A M B α A = 0.2 α B = 0.13 | M A | = 5 | M B | = 3
Generating localization masks Lookup table fetches: [Waller et al. 2000, Sintorn et al. 2008…] (2D Table (Theta, r) , 16KB) 32-bit Mask Jittered positions & & (Hammersley sequence) (2) (3) (1) Tiny, zero-coverage triangles: Select up to 3 closest samples Zero generated samples
1 PIXEL
Correlation tracking Localization bitmasks: Track the spatial location of coverage Bitwise AND α O ? M O M A M B = & α A = 0.2 α B = 0.13 | M O | = 1 A = | M O | | M A | = 5 α O | M A | α A | M B | = 3 B = | M O | α O | M B | α B
Correlation tracking Localization bitmasks: Track the spatial location of coverage New occluder’s Bitwise OR aggregate mask M A M B = | α A = 0.2 α B = 0.13 α' A | M A | = 5 | M B | = 3 | M’ A |
Potentially overlapping regions Inside the potential overlap region O Assuming decorrelation → OVER blending (multiplicative composition) - Use ad-hoc fuzziness heuristic → Transition ADD <-> OVER - | M A | - α A x sadp(A, B)
Surface Intersections 𝐶 𝐵 … View dir. (z) Depth-plane Depth-slab Z-range Loc. Mask Front Fuzzy Back
1 PIXEL
1/4 Resolution MSAA Semi-Analytic 256x ~6x faster 64x 32x
MSAA Semi-Analytic 256x 32x 8x
MSAA Semi-Analytic 32x 8x 1x
1 PIXEL
[1/4 Resolution] MSAA Semi-Analytic 64x TAA 1spp
256x MSAA Semi-Analytic
256x MSAA 8x MSAA Semi-Analytic
Thank You !
Memory consumption - Without color : Aggregate / Fragment Visibility rep. (42 Bytes) - C : Color (3x 2B) Our approach: 36 Bytes/pixel - α : Coverage (4B) MSAA 8x: 24-32 Bytes/pixel - M : Localization Mask (4B) - S : Depth Slab MSAA 32x: 96-128 Bytes/pixel Plane equation (4x 4B) + thickness (4B) - Z min ,Z max : Depth range (2x 4B) - With fp16 color : Our approach: 42 Bytes/pixel MSAA 8x: 72-80 Bytes/pixel MSAA 32x: 288-320 Bytes/pixel
Recommend
More recommend