sraa - i3d.pptx
TRANSCRIPT
![Page 1: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/1.jpg)
Matthäus G. Chajdas1,2 Morgan McGuire2,3 David Luebke2
1 Technische Universität München, 2 NVIDIA, 3 Williams College
![Page 2: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/2.jpg)
Courtesy of Vicarious Visions
![Page 3: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/3.jpg)
![Page 4: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/4.jpg)
![Page 5: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/5.jpg)
! Shading frequency is typically lower than geometric frequency
Shading changes smoothly
Geometry changes introduce high frequencies
![Page 6: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/6.jpg)
! Several algorithms use the fact that shading varies slower than geometry ! REYES ! Irradiance Caching ! Upsampling for SSAO
![Page 7: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/7.jpg)
![Page 8: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/8.jpg)
![Page 9: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/9.jpg)
Great, but no AA
![Page 10: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/10.jpg)
REYES: Lots of geometry, not efficient on GPUs yet
Irradiance Caching: Difficult to parallize well
Upsampling: Low frequency only
![Page 11: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/11.jpg)
! Interpolate in world-space and check if the source/target locations are similar enough
! In screen-space, use a cross-bilateral filter when upsampling ! Guarantees that shading does not get smeared across geometry edges ! Requires geometric information
! Cross-bilateral interpolation is equivalent to the error metric in irradiance cache ! Only use a sample if source “location” is similar to target
! Upsample low-frequency information like SSAO ! Upsampling complex shading results usually in very blurry output
![Page 12: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/12.jpg)
Shader runs only once!
![Page 13: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/13.jpg)
Shader must run per-sample!
![Page 14: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/14.jpg)
! MSAA: Great technique to get anti-aliasing without super-sampling the shading ! Shade each primitive once per pixel, independent of sample count
! Deferred rendering ! Has to shade all incoming samples ! No efficient way to reconstruct which samples come from the same primitive ! With MSAA, deferred shading degenerates to SSAA (!) ! Stencil mask tricks work against warp-packing and don’t solve all issues
![Page 15: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/15.jpg)
![Page 16: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/16.jpg)
! Pure post-process ! Analyses the image content and blurs if something edge-like is found
! Finds geometric and shading edges! ! Text usually suffers worst (no information that this area should be excluded) ! Runtime depends on edge count: Even though strictly a post-process, the
runtime cannot be bound easily (x5 between best/worst case is common)!
! Can be easily used on any kind of pipeline ! Has some artifacts
![Page 17: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/17.jpg)
Eww, enabled AMD's driver-based GPU MLAA filter and it attacked our innocent 'FrostEd' editor that uses WPF
![Page 18: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/18.jpg)
![Page 19: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/19.jpg)
![Page 20: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/20.jpg)
! Unlike MLAA, SRAA knows where sub-pixel edges are ! Blur only where necessary
Reference, 16384x AA
MLAA SRAA
![Page 21: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/21.jpg)
! Capture shading and geometry information at different frequencies ! Geometry information is comparatively cheap to get (MSAA’ed G-Buffer has
very little overhead) ! Shading information is expensive (texture lookups, complex shaders, ray-
tracing, you name it)
! Using high-frequency geometric information, try to estimate which shading sample corresponds to each geometric sample
! Works directly with MSAA ! Can be used with both deferred and forward rendering
![Page 22: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/22.jpg)
Shaded sample (expensive)
Geometry sample (cheap)
![Page 23: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/23.jpg)
?
![Page 24: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/24.jpg)
![Page 25: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/25.jpg)
![Page 26: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/26.jpg)
![Page 27: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/27.jpg)
! We introduce geometry and shading samples ! A pixel can contain N geometry samples and M shading samples (M
<= N) ! Geometry samples capture local surface properties: Position & Normal ! Shading samples capture color ! SRAA 4: N = 4, M = 1 ! SRAA 16: N = 16, M = 1
![Page 28: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/28.jpg)
! Two pass algorithm ! Render the depth/normals for the complete scene
! Shade a subset of the samples (typically, only the first) ! Run the SRAA filter which combines the MSAA’ed depth/normals with
the shaded data ! Post-process the data as usual ! For deferred renderers, the only change is to generate the G-Buffers
with MSAA ! For forward renderers, augment the z-Pre-Pass with normals
![Page 29: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/29.jpg)
![Page 30: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/30.jpg)
![Page 31: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/31.jpg)
Shaded sample (expensive)
Some cheap geometric information
![Page 32: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/32.jpg)
! What‘s cheap?
![Page 33: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/33.jpg)
![Page 34: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/34.jpg)
Normal edges Depth edges
![Page 35: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/35.jpg)
! Magic happens in SRAA kernel ! Looks at every geometric sample in a pixel, analyses all surrounding
shaded samples ! Compute a weight for each shaded sample ! Reconstruct color for each geometric sample ! Box-Filter
! Could use more advanced filters here!
![Page 36: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/36.jpg)
Courtesy of DICE
![Page 37: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/37.jpg)
Courtesy of DICE
![Page 38: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/38.jpg)
Courtesy of DICE
![Page 39: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/39.jpg)
Courtesy of DICE
![Page 40: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/40.jpg)
Courtesy of DICE
![Page 41: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/41.jpg)
Courtesy of DICE
![Page 42: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/42.jpg)
Courtesy of DICE
![Page 43: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/43.jpg)
Courtesy of DICE
![Page 44: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/44.jpg)
Courtesy of DICE
![Page 45: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/45.jpg)
Courtesy of DICE
![Page 46: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/46.jpg)
! High-quality with depth/normals, SRAA pass only ! On a GTX 480, SRAA at 1920x1200 takes ~2 ms ! On 1280x720, ~1 ms
![Page 47: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/47.jpg)
All we want to know is which samples belong together
![Page 48: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/48.jpg)
Primitive 1
Primitive 2
![Page 49: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/49.jpg)
! We use the geometry samples to reconstruct surfaces ! Ideally, we want triangle Ids with adjacency information …
! That‘s what MSAA computes actually, but doesn‘t give us access to
! Can use basically anything as „geometry samples“ as long as it changes at geometry edges
![Page 50: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/50.jpg)
![Page 51: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/51.jpg)
! High-quality with depth/normals, SRAA pass only ! On a GTX 480, SRAA at 1920x1200 takes ~2 ms ! On 1280x720, ~1 ms
! SV_PrimitiveID: 1 ms for 1920x1200 on a GTX 460 ! Ready to deploy as DX11 pixel shader
! Sample MSAA’ed depth/normal/primitive buffers ! MSAA makes the G-Buffer creation slightly more expensive
![Page 52: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/52.jpg)
We actually don‘t want that one …
![Page 53: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/53.jpg)
! Instead of using depth/normal to estimate discontinuities … ! Use just depth
! Finds most edges ! Depending on the depth range, can work with 8 bit depth buffer (See Crysis 2
images in paper) ! Use an object/primitive ID
! SV_PrimitiveID does the job quite well, hash it to 8 bit ! SRAA becomes very similar to MSAA here!
! Any other source of discontinuities ! Material IDs ! UVs ! …
![Page 54: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/54.jpg)
1. Generate MSAA Depth/Normal 2. Shade a subset of all samples
• Forward or deferred!
3. Reconstruct per-sample color 4. Filter
![Page 55: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/55.jpg)
![Page 56: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/56.jpg)
![Page 57: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/57.jpg)
![Page 58: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/58.jpg)
! Use SRAA to guide MLAA ! Help MLAA to find all sub-pixel edges ! Use MLAA to clean up after SRAA removed sub-pixel aliasing
! Investigate higher-quality modes ! We have 1.5 shading samples at 16 geometry samples, which starts to look
equal to 16x SSAA ! Both are fully decoupled: Can shade any subset of the geometric samples ! Only shade interesting samples
! Better edge finder ! Tessellation makes SV_PrimitiveID miss in-patch edges ! Depth/Normal can fail if depth-range is extremely large
![Page 59: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/59.jpg)
! Johan Andersson, DICE, @repi ! Anton Kaplanyan, Crytek, @tofic ! Timothy Lottes, NVIDIA, @TimothyLottes
! Authors ! Morgan McGuire, NVIDIA, @morgan3d ! David Luebke, NVIDIA, @davedotlubke ! Matthäus Chajdas, TUM, @NIV_Anteru
![Page 60: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/60.jpg)
Courtesy of Crytek
![Page 61: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/61.jpg)
Courtesy of Crytek
![Page 62: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/62.jpg)
![Page 63: SRAA - I3D.pptx](https://reader036.vdocuments.mx/reader036/viewer/2022062504/58a2d9171a28ab90228c1f52/html5/thumbnails/63.jpg)