0% found this document useful (0 votes)
22 views15 pages

GPUOpen Hybrid Shadows

The document outlines a hybrid shadow rendering technique that utilizes depth, normal, and shadow cascade data to classify pixel inputs and outputs for efficient ray tracing. It details the process of blocker search, pixel classification, ray interval optimization, and the ray tracing procedure, along with optimizations to reduce memory usage and improve performance. Additionally, it addresses artifact management and provides disclaimers regarding the information's accuracy and liability.

Uploaded by

Blu Waltz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views15 pages

GPUOpen Hybrid Shadows

The document outlines a hybrid shadow rendering technique that utilizes depth, normal, and shadow cascade data to classify pixel inputs and outputs for efficient ray tracing. It details the process of blocker search, pixel classification, ray interval optimization, and the ray tracing procedure, along with optimizations to reduce memory usage and improve performance. Additionally, it addresses artifact management and provides disclaimers regarding the information's accuracy and liability.

Uploaded by

Blu Waltz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

HYBRID SHADOWS

JORDAN LOGAN
[AMD Public Use]

DATA FLOW

Depth

Normal

Shadow
Cascades

Tile list Shadow mask


Raytrace Resolve or
Classify Tiles
Shadows Denoise
Ray hit mask Ray hit mask

GPUOPEN 2
[AMD Public Use]

CLASSIFY INPUTS CLASSIFY OUTPUTS


• Depth buffer • Tile list
• Used to reconstruct world position • List of all 8x4 tiles that need to ray
• Used to reject sky pixels trace
• Each tile has a mask of which pixels in
• Normal buffer the tile need raytracing.
• Used to reject pixels that don’t face • Each tile also has min and max ray
the sun. length.
• Cascaded shadow maps • Ray hit mask
• Used to reject pixels that don’t • uint mask for each 8x4 tile.
need raytracing
• Preloading with results of the cascaded
shadow map blocker search.

GPUOPEN 3
[AMD Public Use]

BLOCKER SEARCH
• Need to check if there are any blockers between our pixel and the shadow near
plane.
• Use light space depth to scale the sun size to the shadow near plane.
• Use Poisson disc samples to uniformly sample the search area.
• Use the max and min depth values from the shadow map to decide if we can
reject a pixel.
• Can calculate the ray interval from the shadow maps.

GPUOPEN 4
[AMD Public Use]

GPUOPEN 5
[AMD Public Use]

PIXEL CLASSIFICATION

Min depth value is behind receiver. Max depth value is in front of receiver.
Can reject as a lit pixel. Can reject as a shadowed pixel.

Receiver
Blocker

GPUOPEN 6
[AMD Public Use]

PIXEL CLASSIFICATION

Max is behind and min is in front of receiver.


Needs more data from raytracing.

Receiver
Blocker

GPUOPEN 7
[AMD Public Use]

RAY INTERVAL OPTIMIZATION


Farthest point in front of receiver.
Used to find ray t max.

Closest point in front of receiver. Interval of ray we need to search.


Used to find ray t min.
Receiver
Blocker

GPUOPEN 8
[AMD Public Use]

RAY TRACE RAY TRACE


INPUTS OUTPUTS
• Depth buffer • Ray hit mask
• Used to reconstruct world position • uint mask for each 8x4 tile.
• Normal buffer • Combining ray hit results with the
prefilled mask.
• Offset ray along pixel normal.
• Tile list
• Used to decide what pixel to fire a
ray from.

GPUOPEN 9
[AMD Public Use]

RAY TRACE
• Use tile data from classify to set up a workgroup to work on a 8x4 tile, one
wave32.
• Sample blue noise to create a new ray to fire.
• If using depth interval, the ray can be reversed to trace from the sun to the
surface for faster traversal though the acceleration structure.

GPUOPEN 10
[AMD Public Use]

RESOLVE/DENOISE
• Either decompress the ray hit results into a shadow map or use the Fidelity-FX
shadow denoiser.

GPUOPEN 11
[AMD Public Use]

OPTIMIZATIONS USED
• Wave active mask.
• Using a uint to store the results of the blocker search allows a 32:1 reduction in the
amount of memory needed to store.
• Ray hit mask.
• With one ray per pixel, the hit result buffer’s memory size can be reduced by 32:1.
• Replace samples with image loads.
• Loads are faster at moving data from the cache to the shader core on RDNA.

GPUOPEN 12
[AMD Public Use]

DEALING WITH ARTIFACTS


• Use reverse depth buffer to improve accuracy of the reconstructed world space.
• Change depth offset used in blocker search.
• High values will create light leakage and peter panning.
• Change number of Poisson disc samples.
• Change ray min t push off value.
• High values will create light leakage and peter panning.
• Increase shadow map resolution and/or cascades.

GPUOPEN 13
[AMD Public Use]

DISCLAIMER
DISCLAIMERS
The information contained herein is for informational purposes only and is subject to change without notice. While every
precaution has been taken in the preparation of this document, it may contain technical inaccuracies, omissions and
typographical errors, and AMD is under no obligation to update or otherwise correct this information. Advanced Micro
Devices, Inc. makes no representations or warranties with respect to the accuracy or completeness of the contents of this
document, and assumes no liability of any kind, including the implied warranties of noninfringement, merchantability or
fitness for particular purposes, with respect to the operation or use of AMD hardware, software or other products described
herein. No license, including implied or arising by estoppel, to any intellectual property rights is granted by this document.
Terms and limitations applicable to the purchase or use of AMD’s products are as set forth in a signed agreement between
the parties or in AMD's Standard Terms and Conditions of Sale.
© 2021 Advanced Micro Devices, Inc. All rights reserved. AMD, the AMD Arrow logo, EPYC, Radeon, Ryzen, and
combinations thereof are trademarks of Advanced Micro Devices, Inc. in the United States and/or other jurisdictions. Other
names are for informational purposes only and may be trademarks of their respective owners.

GPUOPEN 15

You might also like