![Page 1: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/1.jpg)
CSM ScrollingAn acceleration technique for the rendering of cascaded shadow maps
![Page 2: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/2.jpg)
CSM Scrolling by:Mike Day [email protected]
CSM Caching by:Al Hastings [email protected]
Who am I?Mike Acton [email protected]
![Page 3: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/3.jpg)
Quick Background
![Page 4: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/4.jpg)
From light POV, imagine whole world as single mega shadow texture
![Page 5: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/5.jpg)
On any particular frame, a shadow map represents a 2D
rectangular slice of that volume.
![Page 6: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/6.jpg)
Cascade refers to multiple resolutions of
that slice
![Page 7: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/7.jpg)
Assumptions
![Page 8: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/8.jpg)
Most of the time, the camera does not make radical changes across frames
![Page 9: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/9.jpg)
Most geometry is relatively static across
frames
![Page 10: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/10.jpg)
Geometry which has changed from the previous
frame can be identified
![Page 11: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/11.jpg)
The light direction is relatively stable across
frames
![Page 12: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/12.jpg)
Results of spatial queries can be used in the same
frame as shadow rendering
![Page 13: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/13.jpg)
Geometry is divided into small* instances
![Page 14: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/14.jpg)
Concept
![Page 15: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/15.jpg)
Store “static” geometry from previous frame in cached map
![Page 16: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/16.jpg)
Scroll cached map to account for change in camera view
![Page 17: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/17.jpg)
Render additional “static” geometry into edges exposed by scrolling
![Page 18: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/18.jpg)
Render newly “static” geometry in cached area
![Page 19: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/19.jpg)
Copy map to use as final shadow map for current frame
![Page 20: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/20.jpg)
Render non-static geometry into final shadow map for frame
![Page 21: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/21.jpg)
CSM Caching
![Page 22: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/22.jpg)
Assumption: Camera is not moving (much)
![Page 23: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/23.jpg)
Store “static” geometry from previous frame in cached map
![Page 24: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/24.jpg)
Store “static” geometry from previous frame in cached map
“static” = not moved for t time. (e.g. 5 seconds)
![Page 25: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/25.jpg)
Each frame, render non-static geometry on to cached copy
![Page 26: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/26.jpg)
Cache of previous frame shadow map
![Page 27: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/27.jpg)
Cache of previous frame shadow map
Invalid if…
![Page 28: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/28.jpg)
Cache of previous frame shadow map
Invalid if…• Camera moves• Camera FOV changes
![Page 29: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/29.jpg)
Cache of previous frame shadow map
Invalid if…• Camera moves• Camera FOV changes• “Static” geometry moves
![Page 30: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/30.jpg)
Render newly “static” geometry in cached area
![Page 31: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/31.jpg)
Query for state of “static” geometry
![Page 32: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/32.jpg)
Diff current “static” versus previous “static” query results
![Page 33: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/33.jpg)
Dynamic occlusion system used
![Page 34: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/34.jpg)
Create copy new map cache to use this frame
![Page 35: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/35.jpg)
“Dynamic” geometry rendered to temporary shadow map
![Page 36: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/36.jpg)
CSM Scrolling
![Page 37: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/37.jpg)
Assumption: Camera moves a lot (but
slowly*)
![Page 38: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/38.jpg)
Insert in to CSM Caching:1. Scroll map2. Render into exposed
edges
![Page 39: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/39.jpg)
Scroll cached map to account for change in camera view
![Page 40: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/40.jpg)
Sample shadow texels from previous frame
![Page 41: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/41.jpg)
Scrolled area is clamp-to-border (color=1.0)
![Page 42: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/42.jpg)
Observe: Camera motion is 3D
![Page 43: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/43.jpg)
Observe: Camera motion is 3D
• Lateral scrolling• Depth scrolling
![Page 44: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/44.jpg)
Lateral scrollingTranslation perpendicular to light rays
UV translated by delta camera in light frame
![Page 45: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/45.jpg)
Lateral scrollingTranslation perpendicular to light rays
Simple texture lookup(Point sampling)
![Page 46: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/46.jpg)
Depth scrollingTranslation parallel to light rays
Additional handling needed for depth scroll
![Page 47: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/47.jpg)
Depth scrollingTranslation parallel to light rays
Delta camera depth in light frame
![Page 48: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/48.jpg)
Depth scrollingTranslation parallel to light rays
Offset all previous depths (scroll depth)
![Page 49: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/49.jpg)
Depth scrollingTranslation parallel to light rays
Gotchas:• Near plane• Far plane
![Page 50: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/50.jpg)
Depth scrollingTranslation parallel to light rays
Gotchas:• Near plane• Far plane
Clamp to 0.0
![Page 51: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/51.jpg)
Depth scrollingTranslation parallel to light rays
Gotchas:• Near plane• Far plane Problem 1.0 = buffer clear
![Page 52: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/52.jpg)
Depth scrollingTranslation parallel to light rays
Gotchas:• Near plane• Far plane Problem 1.0 = buffer clear
No offset
![Page 53: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/53.jpg)
Render additional “static” geometry into edges exposed by scrolling
![Page 54: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/54.jpg)
Scrolled in area divided into slabs (thin OBBs)
![Page 55: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/55.jpg)
‘Static’ geom with overlapping bounding volume rendered
![Page 56: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/56.jpg)
Observe: Coarseness of geometry relative to view
![Page 57: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/57.jpg)
Lots of overlapping volumes
![Page 58: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/58.jpg)
Very few overlapping volumes
![Page 59: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/59.jpg)
Jagged pattern not relevant: Using square geom tiles
(Aside)
![Page 60: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/60.jpg)
Render newly “static” geometry in cached area
![Page 61: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/61.jpg)
Copy map to use as final shadow map for current frame
![Page 62: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/62.jpg)
CSM Scrolling
![Page 63: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/63.jpg)
Each map (512x512) PS3/360
![Page 64: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/64.jpg)
Another view…
![Page 65: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/65.jpg)
Wrap up
![Page 66: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/66.jpg)
Straightforward addition to CSM
Caching
![Page 67: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/67.jpg)
Key: Like 2D bitmap scrolling
![Page 68: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/68.jpg)
Do not render ~70% of ‘static’ geometry in to CSM
![Page 69: CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps](https://reader033.vdocuments.site/reader033/viewer/2022061500/56649e7a5503460f94b7b703/html5/thumbnails/69.jpg)
Detailed paper:
bit.ly/QIoBr9