ShadowFX Effect Library for DirectX 12

Today, we are excited to announce that we are releasing an update for ShadowFX that adds support for DirectX® 12.


Different shadowing modes

  • Union of multiple light sources
  • Weighted average of multiple light sources
  • Cascaded shadow maps
  • Cube shadow maps

Different filtering modes

  • Percentage Closer Filtering
  • Contact Hardening Shadows

Different shadow map sampling modes

  • Box sampling
  • Poisson sampling

Considerations when integrating ShadowFX

As with the DirectX 11 version, integrating ShadowFX into an existing DirectX 12 renderer is simple. The usage of the library changed very little in comparison to DirectX 11.

State handling

The user has to be aware that the library binds its own Pipeline State Object (PSO) and Shader Resources Descriptor Heap (SRD Heap). The library does not save and restore states as in DirectX 11. After calling the library the PSO and SRD heap need to be explicitly reset.

Constant buffers

For maximum efficiency the library does not automatically rename constant buffers. At initialization, the user has to provide the maximum number of instances that can potentially execute in parallel. The library uses this information to determine the amount of memory that needs to be allocated for constant buffers. Every time the library gets called the user provides an instance ID and the library uses this ID to read from the right constant buffer.

Sample and More Info

The ShadowFX12 sample on GitHub demonstrates how to use this new version of ShadowFX. Additional information can be found in the ShadowFX page.

Latest news

AMD at GDC 2023

Learn about our GDC 2023 activities, including the latest developments with our FidelityFX technologies, new GI techniques, and more.

Looking for a good place to get started with exploring GPUOpen?

Getting started: our software

New or fairly new to AMD’s tools, libraries, and effects? This is the best place to get started on GPUOpen!

Getting started: development and performance

Looking for tips on getting started with developing and/or optimizing your game, whether on AMD hardware or generally? We’ve got you covered!

You may also like...

Explore our huge collection of detailed tutorials, sample code, presentations, and documentation to find answers to your graphics development questions.

Create wonder. No black boxes.

The home of great performance and optimization advice for AMD RDNA™ 2 GPUs, AMD Ryzen™ CPUs, and so much more.

Browse all our useful samples. Perfect for when you’re needing to get started, want to integrate one of our libraries, and much more.

Discover what our SDK technologies can offer you. Query hardware or software, manage memory, create rendering applications or machine learning, and much more!

Analyze, Optimize, Profile, Benchmark. We provide you with the developer tools you need to make sure your game is the best it can be!