GFSDK Shadows - Detailed Partner Info
GFSDK Shadows - Detailed Partner Info
1 NVIDIA Confidential
Agenda
Features
Comparison Screenshots
Integration
API
Artistic Requirements
Performance
2 NVIDIA Confidential
Features - Overview
3 NVIDIA Confidential
Features – PCSS+
4 NVIDIA Confidential
Regular PCF - Fixed Filter Size
5 NVIDIA Confidential
PCSS+ - Physically Based Filter Size
6 NVIDIA Confidential
CHS – Fixed Filter Size
Fixed kernel
size is
problematic
for cascades
7 NVIDIA Confidential
PCSS+
8 NVIDIA Confidential
CHS – Upper Limit to Penumbra Size
9 NVIDIA Confidential
PCSS+
10 NVIDIA Confidential
CHS – Aliasing
11 NVIDIA Confidential
PCSS+ - Reduced Aliasing
12 NVIDIA Confidential
Integration - Overview
13 NVIDIA Confidential
Integration – How Long?
Providing your own shadow maps:
This is the path of least resistance
Only requires 1 full screen pass to render the shadow buffer
~1 day with engine programmer & technical artist
Library renders shadow maps:
Need to group draw calls in a function (passed to the lib)
~2-3 days with engine programmer & technical artist (really
depends on engine architecture...)
Tuning
Very quick when params can be changed at runtime
~1/2 a day
14 NVIDIA Confidential
Integration - Tips
NV_ShadowLib_GetVersion()
Check that header file matches DLL version
NV_ShadowLib_OpenDX()
Pass in ID3D11Device & ID3D11DeviceContext
Returns a NV_ShadowLib_Ctx
NV_ShadowLib_AddBuffer()
Creates a shadow buffer
NV_ShadowLib_AddMap()
Optional – if not providing your own shadow maps
16 NVIDIA Confidential
API – On Resize Window
NV_ShadowLib_RemoveBuffer()
Release the existing shadow buffer
NV_ShadowLib_AddBuffer()
Create a new one of the correct size
17 NVIDIA Confidential
API – On Render
NV_ShadowLib_RenderMap()
Optional – if not providing your own shadow maps
NV_ShadowLib_ClearBuffer()
Clears the shadow buffer
NV_ShadowLib_RenderBuffer()
Can be called multiple times to composite from different
shadow maps
NV_ShadowLib_FinalizeBuffer()
Gives back the finalized shadow buffer
18 NVIDIA Confidential
API – On Destroy Device
NV_ShadowLib_RemoveMap()
Optional – if not providing your own shadow maps
NV_ShadowLib_RemoveBuffer()
Release the shadow buffer
NV_ShadowLib_CloseDX()
Fully release all resources and the NV_ShadowLib_Ctx
19 NVIDIA Confidential
API – On Debug!
NV_ShadowLib_DevModeDisplayMap()
NV_ShadowLib_DevModeDisplayMapFrustum()
NV_ShadowLib_DevModeDisplayBuffer()
NV_ShadowLib_DevModeToggleDebugCascadeShader()
...
20 NVIDIA Confidential
Artistic Requirements
21 NVIDIA Confidential
Performance: Directional Light
PCSS+ CHS 15x15
5 6
4 5
4
3 GTX680 GTX680
3
2
2
1 HD7970 HD7970
GHz 1 GHz
0 0
Shadow Shadow Shadow Shadow
Map Buffer Map Buffer
23 NVIDIA Confidential