SlideShare a Scribd company logo
1 of 58
Download to read offline
Bindless Deferred Decals in
Philip Hammer
(DECK13 Interactive GmbH)
Digital Dragons 2019, Krakow
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
This talk is ..
● .. about
○ our own implementation of bindless deferred decals in D3D12 and Vulkan
○ overcoming problems of past approaches
○ practical bread & butter techniques
○ how to efficiently render many decals on the GPU
○ tackling common issues and glitches
● .. but unfortunately not
○ super-fancy new research
○ a comprehensive view on our new renderer
● .. and has
○ probably more too much source code
2
2
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Introduction
● Brief overview of the latest iteration of our inhouse FLEDGE engine
● 4th generation: re-designed renderer module from ground up:
○ Vulkan + D3D12 support only
○ Dropped legacy code (D3D11)
○ No more OOP code - all in for DOD / SoA
○ New possibilities for high-level renderer design (e.g. bindless texturing)
● Improved some existing features e.g.
○ Clustered Deferred + Clustered Forward Rendering
○ Physical-based Rendering
● Some fancy new rendering features, e.g.
○ Unified Volumetric Lighting, Irradiance Probe Grid, Simulated interactive grass, Temporal Antialiasing, etc.
○ Unfortunately not part of this talk :-)
3
3
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Motivation
● Decals = one key benefit of deferred rendering
● Used in environment art + VFX
○ Static decals to detail the world
○ Dynamic decals spawned by the effect system
○ Gameplay-driven decals like footsteps
● High demands on decal count, usability and performance
8
8
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Decal usage & examples
99
9
Decal usage & examples
10
Decal usage & examples
11
Decal usage & examples
12
Decal usage & examples
13
Decal usage & examples
14
Decal usage & examples
15
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Rasterization-based deferred decals
● Had deferred decals for quite a while [LotF14]
○ Be aware of decal count, overdraw, etc.
○ Limitations led to sparse usage
● “Classic” deferred decal rendering
○ analogous to deferred light volume rendering
● Improved that a lot over the years, but basic principle stayed the same
16
16
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Rasterization-based deferred decals
● Advantages
○ Easy to implement and possible with most
(even older) graphics APIs
○ Near pixel-perfect culling and shader segmentation
● Disadvantages
○ CPU-Performance
■ one drawcall per decal
■ Lots of state setup per decal
○ GPU-Performance
■ Double work: fetching gbuffers,
rasterizing fragments, etc.
■ Need to update the G-Buffer as
intermediate blend buffer
17
17
Transformed box geometry rasterizing a decal
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Bindless Deferred Decals
● How about rendering all decals at once?
18
18
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Bindless Deferred Decals
● How about rendering all decals at once?
● Problem: Too many resource bindings
○ Each decal references a potentially unique set of textures
○ Not possible to bind arbitrary amount of texture resources
19
19
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Bindless Deferred Decals
● How about rendering all decals at once?
● Problem: Too many resource bindings
○ Each decal references a potentially unique set of textures
○ Not possible to bind arbitrary amount of texture resources
● Solution(s):
○ Texture atlases or arrays
-> limited and inflexible
○ is around since 2013 [Everitt14]
-> vendor specific and what about consoles?
20
20
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Bindless Texturing
● D3D12 + Vulkan to the rescue!
○ Built-in support for bindless texturing
○ API specific descriptor arrays
○ Create a descriptor table for all textures in the game
○ Descriptors are globally available and bound to any draw/dispatch in need
21
21
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Bindless Texturing
● D3D12 + Vulkan to the rescue!
○ Built-in support for bindless texturing
○ Create an (API specific) descriptor array for all textures in the game
○ Descriptors are globally available and bound to any draw/dispatch in need
● Idea of bindless texturing is around for a while!
○ e.g. [Reed14], [Pettineo16], [Sousa16], [Drobot17]
22
22
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Bindless Texturing
D3D12 / HLSL Vulkan / GLSL
23
23
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Non-uniform resource indices
● Texture index must be uniform
○ In GCN terms: loaded into an SGPR
○ It’s not by default if fetched from a GPU buffer
○ Non-uniform indices lead to unexpected results
and graphical corruptions
● Need to explicitly make the index uniform!
24
24
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Non-uniform resource indices
● D3D12 / HLSL:
● Vulkan / GLSL:
○ Check [GpuInfo] for availability
● Alternative: use wave intrinsics
○ D3D12: Shader Model 6 wave intrinsics
○ Vulkan: ballot extensions
● Heavily driver- and vendor-dependent
○ Availability of extensions and performance
25
25
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Clustered Deferred Decals
● We already have a clustered deferred renderer for lighting
○ Similar approach to [Persson], [Sousa16], etc.
○ Cull lights, specular cubemaps, etc. into subdivided view frustum bins
○ Render everything in one go (single compute dispatch / fullscreen quad)
○ Easy to query clustered data also for forward-rendered objects
○ Already a good coverage on the topic, so we won’t go much deeper here
26
26
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Clustered Deferred Decals
● We already have a clustered deferred renderer for lighting
○ Similar approach to [Persson], [Sousa16], etc.
○ Cull lights, specular cubemaps, etc. into subdivided view frustum bins
○ Render everything in one go (single compute dispatch / fullscreen quad)
○ Easy to query clustered data also for forward-rendered objects
○ Already a good coverage on the topic, so we won’t go much deeper here
● Good fit also for decals!
27
27
Output
scene color
Fetch
G-Buffer
Compute
decals
Compute
direct
lighting
Lighting shader
Compute
indirect
specular
Compute
indirect
diffuse
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Clustered Deferred Decals
● Decal blending only in registers, no double fetching or updating of G-Buffer
● Very efficient, but be aware of register pressure / low CU occupancy
28
28
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Bindless Decals Optimization
● High-level art optimizations
○ Cull by distance with soft fade-out
○ Switch to simpler feature set over distance
29
29
Decal overlay icons for all decals
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Bindless Decals Optimization
● High-level art optimizations
○ Cull by distance with soft fade-out
○ Switch to simpler feature set over distance
30
30
Decal overlay icons for all decals surviving distance culling
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Bindless Decals Optimization
● Low-level optimizations
● Biggest bottleneck in shader: VGPRs / CU Occupation
● GCN Loop Scalarization works great with decals
○ Load decal and material data in SGPRs and loop over necessary lanes
○ Note: not necessary anymore!
● Splitting decal and material features into isolated blocks
○ Free up registers by grouping features
○ Register lifetime is not always obvious - measure and profile
○ Reorganization of large shaders with a lot of resource access is always worth a try!
31
31
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
GCN loop scalarization
● Great in-depth coverage available [Drobot17]
● Make cluster index uniform / scalar
○ Load all related data (DecalData, MaterialData, etc.) into SGPRs
○ Index is actually not uniform, but most pixel in a wave likely hit
the same index
○ Double work can happen but higher occupancy will cancel it out
○ Only doable with wave intrinsics
32
32
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Bindless Decals Limitations
● Downsides of blending decals in registers
● Decals not visible for other (deferred) renderpasses
○ normals + albedo won’t see decal modifications (e.g. SSAO, SSR, separate ambient pass)
○ Material-ID not updated (TAA Ghosting! [Xu16])
● Could render decals before lighting and update G-Buffer
○ Additional costs for e.g. copying G-Buffer Normals
33
33
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Common decal issues
34
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Common decal issues #1: Normal blending
● Linear blending is trivial and useful for e.g.
snow accumulation
○ Perfect for thick covers like layers of sand or snow
○ Tends to “flatten” normals in gradual blending:
normal directions cancel out each other
35
35
Decal with linear normal blending
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Common decal issues #1: Normal blending
● Re-orientated normal mapping [Hill12]
○ Our default mode for blending, works best for most decals
○ Decal normal will always follow surface normal
○ Fits mostly better into the scene
36
36
Decal with re-oriented normal blending
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Common decal issues #2: screenspace UV gradients
● UV- and Z-gradients cannot be derived correctly in screenspace
○ No hardware gradient data (ddx/ddy) available in shader loops
○ No mip-mapping and wrong UV-gradients around object boundaries
● Solution:
○ Sample a fixed Mip Level :-(
○ Compute gradients in shader
■ Slightly higher runtime cost
■ Need to compute 2 addition decal-space positions with 1-pixel-offset in X and Y direction
■ Be aware of decal & uv scaling!
37
37
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Common decal issues #2: screenspace UV gradients
● Computation of UV gradients in the shader
● Be aware that hardware gradients of position is not correct
38
38
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Common decal issues #3: screenspace Z gradients
● UV gradients = almost good
● But can get huge at depth discontinuities
if gradient is computed in the shader
● Two possibilities
○ Store z-gradients in G-Buffer and compute
with these
○ Or check for depth discontinuities
in shader + fix-up [Hammer18]
39
39
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Common decal issues #3: screenspace Z gradients
● Checkerboard is a prime example because of
maximum contrast
○ lower mips converge to middle gray due to downscale
● Large UV gradients will fetch a very low mip
ending up in a color discontinuity
40
40
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Common decal issues #3: screenspace Z gradients
● Find the edges causing the trouble
● Sample Lod0 if fragment is on edge
● Can be done directly in the decal fullscreen
shader based on two depth quads
41
41
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Common decal issues #3: screenspace Z gradients
● Find the edges causing the trouble
● Sample Lod0 if fragment is on edge
● Can be done directly in the decal fullscreen
shader based on two depth quads
42
42
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Common decal issues #3: screenspace Z gradients
● Color discontinuities are now gone
● Fixed edges can now suffer from Mip-Flickering
● In practice a rather minor issue
○ Barely noticeable during gameplay
○ Antialiasing - especially Temporal AA - migitates as well
43
43
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Common decal issues #4: Leaking and object separation
● Decals may leak into areas where they don’t belong
44
44
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Common decal issues #4: Leaking and object separation
● Decals may leak into areas where they don’t belong
● Solution:
○ Decals and materials both store a “DecalGroup” bitmask
○ Bitwise AND the masks and check if at least one bit matches
○ Up to artists how to assign bits (e.g. character, vegetation,
environment, transparent, etc.)
45
45
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Dirty decal tricks
4646
46
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Dirty decal tricks #1 - Smoothing Edges
● Modify decal normal to “smooth” corners and edges
● Interpolate surface normal towards (uniform) decal direction
● Simple but effective and artists love the hack
● Useful for covering uneven geometry e.g. with mud
47
47
Smoothed Edges off (smoothFactor = 0.0)
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Dirty decal tricks #1 - Smoothing Edges
● Modify decal normal to “smooth” corners and edges
● Interpolate surface normal towards (uniform) decal direction
● Simple but effective and artists love the hack
● Useful for covering uneven geometry e.g. with mud
● Geometry normal is otherwise hard to override
● Be careful, it’s a hack
48
48
Smoothed Edges on (smoothFactor = 1.0)
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Dirty decal tricks #2 - Water puddles
● Decalling shallow water puddles
○ Faking surface porosity by blending
black decal albedo (only 10-20% opacity)
○ low roughness (100%)
○ water ripple normal (100%)
● No special code path, just special
parametrization
49
49
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Dirty decal tricks #3 - Texturing the world
● Base model (no decals)
50
50
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Dirty decal tricks #3 - Texturing the world
● Base model + decal with UV-free texturing
aka Triplanar mapping
○ Sample texture(s) 3x from different directions
and blend based on decal normal
○ Triplanar contrast defines the “steepness”
of the blending according to the normal
51
51
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Dirty decal tricks #3 - Texturing the world
● Base model + decal with triplanar +
slope dependent blending
○ Generate a blend mask based on the slope of the
underlying surface and the decal direction
52
52
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Future improvements
53
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Future improvements
54
54
● Better tooling for bulk decalling
○ Brush decals with randomized parameters
We already have that for small geometry instances like plants, debris, etc.!
○ Procedural placement based on world parameters
(e.g. biomes, material types, indoor/outdoor)
○ Physically simulated placement
(e.g. rigid body / particle simulation)
● Extend system to go full bindless
○ Bindless texturing also for scene rendering
○ Prototype exists but not yet ready for production
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Thank you for listening!
@philiphammer0
phammer@deck13.com
55
Also a big thanks to the amazing DECK13 team which helped
with contributions, reviews and suggestions!
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
We’re hiring! :)
@deck13_de
https://www.deck13.com/jobs/
56
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
Q & A
57
Philip Hammer (Deck13 Interactive)
Digital Dragons 2019, Krakow
References
[Persson] “Practical Clustered Shading”, Emil Persson,
http://www.humus.name/Articles/PracticalClusteredShading.pdf
[Drobot17] “Improved Culling for Tiled and Clustered Rendering”, Michal Drobot, Siggraph 2017
http://advances.realtimerendering.com/s2017/
[Hammer18] “Dissecting the Rendering of The Surge”, Philip Hammer, Quo Vadis Berlin 2018
https://de.slideshare.net/philiphammer/dissecting-the-rendering-of-the-surge
[Xu16] "Temporal Antialiasing in Uncharted 4", Ke Xu, Siggraph 2016
http://advances.realtimerendering.com/s2016/
[Lagarde14] “Moving Frostbite to physical based rendering”, Sébastien Lagarde, Siggraph 2014
https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf
[Wronski15] “Fixing screen-space deferred decals”, Bart Wronski, 2015
https://bartwronski.com/2015/03/12/fixing-screen-space-deferred-decals/
[Sawicki15] "Watch out for non-uniform resource index!", Adam Sawicki,
http://www.asawicki.info/news_1608_direct3d_12_-_watch_out_for_non-uniform_resource_index.html
[Sousa16] "The Devil is in the Details: idTech 666", Tiago Sousa, Siggraph 2016
https://de.slideshare.net/TiagoAlexSousa/siggraph2016-the-devil-is-in-the-details-idtech-666
[Pettineo16] “Bindless Texturing for Deferred Rendering and Decals”, Matt Pettineo
https://mynameismjp.wordpress.com/2016/03/25/bindless-texturing-for-deferred-rendering-and-decals/
[Reed14] “Deferred Texturing”
http://www.reedbeta.com/blog/deferred-texturing/
[LotF14] “Building your own engine, part 3 – Visual effects for the next generation”, Benjamin Glatzel, David Reinig
https://www.makinggames.biz/news/building-your-own-engine-part-3-visual-effects-for-the-next-generation,6330.html
[Hill12] “Blending in Detail”, Stephen Hill, 2012
https://blog.selfshadow.com/publications/blending-in-detail/
[Everitt14] “Approaching zero driver overhead”, Cass Everitt et. al.,, Siggraph 2014
https://de.slideshare.net/CassEveritt/approaching-zero-driver-overhead
[GpuInfo] “Vulkan Hardware Database”, Sascha Willems
https://vulkan.gpuinfo.org/listextensions.php
58
58

More Related Content

What's hot

Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonLow-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonAMD Developer Central
 
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...Johan Andersson
 
Screen Space Reflections in The Surge
Screen Space Reflections in The SurgeScreen Space Reflections in The Surge
Screen Space Reflections in The SurgeMichele Giacalone
 
Physically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in FrostbitePhysically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in FrostbiteElectronic Arts / DICE
 
Siggraph2016 - The Devil is in the Details: idTech 666
Siggraph2016 - The Devil is in the Details: idTech 666Siggraph2016 - The Devil is in the Details: idTech 666
Siggraph2016 - The Devil is in the Details: idTech 666Tiago Sousa
 
A Scalable Real-Time Many-Shadowed-Light Rendering System
A Scalable Real-Time Many-Shadowed-Light Rendering SystemA Scalable Real-Time Many-Shadowed-Light Rendering System
A Scalable Real-Time Many-Shadowed-Light Rendering SystemBo Li
 
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14AMD Developer Central
 
Secrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologySecrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologyTiago Sousa
 
Rendering AAA-Quality Characters of Project A1
Rendering AAA-Quality Characters of Project A1Rendering AAA-Quality Characters of Project A1
Rendering AAA-Quality Characters of Project A1Ki Hyunwoo
 
SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3
SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3
SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3Electronic Arts / DICE
 
Past, Present and Future Challenges of Global Illumination in Games
Past, Present and Future Challenges of Global Illumination in GamesPast, Present and Future Challenges of Global Illumination in Games
Past, Present and Future Challenges of Global Illumination in GamesColin Barré-Brisebois
 
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)Johan Andersson
 
Advancements in-tiled-rendering
Advancements in-tiled-renderingAdvancements in-tiled-rendering
Advancements in-tiled-renderingmistercteam
 
Moving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based RenderingMoving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based RenderingElectronic Arts / DICE
 
Forward+ (EUROGRAPHICS 2012)
Forward+ (EUROGRAPHICS 2012)Forward+ (EUROGRAPHICS 2012)
Forward+ (EUROGRAPHICS 2012)Takahiro Harada
 
Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite
Physically Based Sky, Atmosphere and Cloud Rendering in FrostbitePhysically Based Sky, Atmosphere and Cloud Rendering in Frostbite
Physically Based Sky, Atmosphere and Cloud Rendering in FrostbiteElectronic Arts / DICE
 
Terrain in Battlefield 3: A Modern, Complete and Scalable System
Terrain in Battlefield 3: A Modern, Complete and Scalable SystemTerrain in Battlefield 3: A Modern, Complete and Scalable System
Terrain in Battlefield 3: A Modern, Complete and Scalable SystemElectronic Arts / DICE
 

What's hot (20)

Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonLow-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
 
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
 
Screen Space Reflections in The Surge
Screen Space Reflections in The SurgeScreen Space Reflections in The Surge
Screen Space Reflections in The Surge
 
Physically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in FrostbitePhysically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in Frostbite
 
Siggraph2016 - The Devil is in the Details: idTech 666
Siggraph2016 - The Devil is in the Details: idTech 666Siggraph2016 - The Devil is in the Details: idTech 666
Siggraph2016 - The Devil is in the Details: idTech 666
 
A Scalable Real-Time Many-Shadowed-Light Rendering System
A Scalable Real-Time Many-Shadowed-Light Rendering SystemA Scalable Real-Time Many-Shadowed-Light Rendering System
A Scalable Real-Time Many-Shadowed-Light Rendering System
 
Light prepass
Light prepassLight prepass
Light prepass
 
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
 
Frostbite on Mobile
Frostbite on MobileFrostbite on Mobile
Frostbite on Mobile
 
Secrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologySecrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics Technology
 
Rendering AAA-Quality Characters of Project A1
Rendering AAA-Quality Characters of Project A1Rendering AAA-Quality Characters of Project A1
Rendering AAA-Quality Characters of Project A1
 
SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3
SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3
SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3
 
Past, Present and Future Challenges of Global Illumination in Games
Past, Present and Future Challenges of Global Illumination in GamesPast, Present and Future Challenges of Global Illumination in Games
Past, Present and Future Challenges of Global Illumination in Games
 
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
 
Advancements in-tiled-rendering
Advancements in-tiled-renderingAdvancements in-tiled-rendering
Advancements in-tiled-rendering
 
Lighting the City of Glass
Lighting the City of GlassLighting the City of Glass
Lighting the City of Glass
 
Moving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based RenderingMoving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based Rendering
 
Forward+ (EUROGRAPHICS 2012)
Forward+ (EUROGRAPHICS 2012)Forward+ (EUROGRAPHICS 2012)
Forward+ (EUROGRAPHICS 2012)
 
Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite
Physically Based Sky, Atmosphere and Cloud Rendering in FrostbitePhysically Based Sky, Atmosphere and Cloud Rendering in Frostbite
Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite
 
Terrain in Battlefield 3: A Modern, Complete and Scalable System
Terrain in Battlefield 3: A Modern, Complete and Scalable SystemTerrain in Battlefield 3: A Modern, Complete and Scalable System
Terrain in Battlefield 3: A Modern, Complete and Scalable System
 

Similar to Bindless Deferred Decals in The Surge 2

Metail Skin Colour Authoring Tool
Metail Skin Colour Authoring ToolMetail Skin Colour Authoring Tool
Metail Skin Colour Authoring ToolDavid Gavilan
 
Animations and Native Deployment for games in Winter by Alvaro Piorno
Animations and Native Deployment for games in Winter by Alvaro PiornoAnimations and Native Deployment for games in Winter by Alvaro Piorno
Animations and Native Deployment for games in Winter by Alvaro PiornoFAST
 
PSGL (PlayStation Graphics Library)
PSGL (PlayStation Graphics Library)PSGL (PlayStation Graphics Library)
PSGL (PlayStation Graphics Library)Slide_N
 
The rendering technology of 'lords of the fallen' philip hammer
The rendering technology of 'lords of the fallen'   philip hammerThe rendering technology of 'lords of the fallen'   philip hammer
The rendering technology of 'lords of the fallen' philip hammerMary Chan
 
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...Electronic Arts / DICE
 
DD18 - SEED - Raytracing in Hybrid Real-Time Rendering
DD18 - SEED - Raytracing in Hybrid Real-Time RenderingDD18 - SEED - Raytracing in Hybrid Real-Time Rendering
DD18 - SEED - Raytracing in Hybrid Real-Time RenderingElectronic Arts / DICE
 
WT-4072, Rendering Web Content at 60fps, by Vangelis Kokkevis, Antoine Labour...
WT-4072, Rendering Web Content at 60fps, by Vangelis Kokkevis, Antoine Labour...WT-4072, Rendering Web Content at 60fps, by Vangelis Kokkevis, Antoine Labour...
WT-4072, Rendering Web Content at 60fps, by Vangelis Kokkevis, Antoine Labour...AMD Developer Central
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentDavid Galeano
 
Shaders and the black magic
Shaders and the black magicShaders and the black magic
Shaders and the black magicRaju Kandasamy
 
【Unite 2018 Tokyo】スクリプタブルレンダーパイプライン入門
【Unite 2018 Tokyo】スクリプタブルレンダーパイプライン入門【Unite 2018 Tokyo】スクリプタブルレンダーパイプライン入門
【Unite 2018 Tokyo】スクリプタブルレンダーパイプライン入門Unity Technologies Japan K.K.
 
Domain adaptation for Image Segmentation
Domain adaptation for Image SegmentationDomain adaptation for Image Segmentation
Domain adaptation for Image SegmentationDeepak Thukral
 
AGIT 2017: Cesium 1.35, WebGL Virtual Globe and Map Engine
AGIT 2017: Cesium 1.35, WebGL Virtual Globe and Map EngineAGIT 2017: Cesium 1.35, WebGL Virtual Globe and Map Engine
AGIT 2017: Cesium 1.35, WebGL Virtual Globe and Map EngineCamptocamp
 
Video Terminal Evolution and The Future of Browsers
Video Terminal Evolution and The Future of BrowsersVideo Terminal Evolution and The Future of Browsers
Video Terminal Evolution and The Future of BrowsersThomas Walker Lynch
 
GPGPU Programming @DroidconNL 2012 by Alten
GPGPU Programming @DroidconNL 2012 by AltenGPGPU Programming @DroidconNL 2012 by Alten
GPGPU Programming @DroidconNL 2012 by AltenArjan Somers
 
Dataflow Visualization using ASCII DAG
Dataflow Visualization using ASCII DAGDataflow Visualization using ASCII DAG
Dataflow Visualization using ASCII DAGgree_tech
 
High Performance Rust UI.pdf
High Performance Rust UI.pdfHigh Performance Rust UI.pdf
High Performance Rust UI.pdfmraaaaa
 
NVIDIA Graphics, Cg, and Transparency
NVIDIA Graphics, Cg, and TransparencyNVIDIA Graphics, Cg, and Transparency
NVIDIA Graphics, Cg, and TransparencyMark Kilgard
 
3D Games Rendering - Érico de Morais Nunes
3D Games Rendering - Érico de Morais Nunes3D Games Rendering - Érico de Morais Nunes
3D Games Rendering - Érico de Morais NunesTchelinux
 

Similar to Bindless Deferred Decals in The Surge 2 (20)

Metail Skin Colour Authoring Tool
Metail Skin Colour Authoring ToolMetail Skin Colour Authoring Tool
Metail Skin Colour Authoring Tool
 
Animations and Native Deployment for games in Winter by Alvaro Piorno
Animations and Native Deployment for games in Winter by Alvaro PiornoAnimations and Native Deployment for games in Winter by Alvaro Piorno
Animations and Native Deployment for games in Winter by Alvaro Piorno
 
PSGL (PlayStation Graphics Library)
PSGL (PlayStation Graphics Library)PSGL (PlayStation Graphics Library)
PSGL (PlayStation Graphics Library)
 
Masked Occlusion Culling
Masked Occlusion CullingMasked Occlusion Culling
Masked Occlusion Culling
 
The rendering technology of 'lords of the fallen' philip hammer
The rendering technology of 'lords of the fallen'   philip hammerThe rendering technology of 'lords of the fallen'   philip hammer
The rendering technology of 'lords of the fallen' philip hammer
 
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
 
DD18 - SEED - Raytracing in Hybrid Real-Time Rendering
DD18 - SEED - Raytracing in Hybrid Real-Time RenderingDD18 - SEED - Raytracing in Hybrid Real-Time Rendering
DD18 - SEED - Raytracing in Hybrid Real-Time Rendering
 
WT-4072, Rendering Web Content at 60fps, by Vangelis Kokkevis, Antoine Labour...
WT-4072, Rendering Web Content at 60fps, by Vangelis Kokkevis, Antoine Labour...WT-4072, Rendering Web Content at 60fps, by Vangelis Kokkevis, Antoine Labour...
WT-4072, Rendering Web Content at 60fps, by Vangelis Kokkevis, Antoine Labour...
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game development
 
Shaders and the black magic
Shaders and the black magicShaders and the black magic
Shaders and the black magic
 
【Unite 2018 Tokyo】スクリプタブルレンダーパイプライン入門
【Unite 2018 Tokyo】スクリプタブルレンダーパイプライン入門【Unite 2018 Tokyo】スクリプタブルレンダーパイプライン入門
【Unite 2018 Tokyo】スクリプタブルレンダーパイプライン入門
 
Domain adaptation for Image Segmentation
Domain adaptation for Image SegmentationDomain adaptation for Image Segmentation
Domain adaptation for Image Segmentation
 
AGIT 2017: Cesium 1.35, WebGL Virtual Globe and Map Engine
AGIT 2017: Cesium 1.35, WebGL Virtual Globe and Map EngineAGIT 2017: Cesium 1.35, WebGL Virtual Globe and Map Engine
AGIT 2017: Cesium 1.35, WebGL Virtual Globe and Map Engine
 
MacGyver Learns Spark
MacGyver Learns SparkMacGyver Learns Spark
MacGyver Learns Spark
 
Video Terminal Evolution and The Future of Browsers
Video Terminal Evolution and The Future of BrowsersVideo Terminal Evolution and The Future of Browsers
Video Terminal Evolution and The Future of Browsers
 
GPGPU Programming @DroidconNL 2012 by Alten
GPGPU Programming @DroidconNL 2012 by AltenGPGPU Programming @DroidconNL 2012 by Alten
GPGPU Programming @DroidconNL 2012 by Alten
 
Dataflow Visualization using ASCII DAG
Dataflow Visualization using ASCII DAGDataflow Visualization using ASCII DAG
Dataflow Visualization using ASCII DAG
 
High Performance Rust UI.pdf
High Performance Rust UI.pdfHigh Performance Rust UI.pdf
High Performance Rust UI.pdf
 
NVIDIA Graphics, Cg, and Transparency
NVIDIA Graphics, Cg, and TransparencyNVIDIA Graphics, Cg, and Transparency
NVIDIA Graphics, Cg, and Transparency
 
3D Games Rendering - Érico de Morais Nunes
3D Games Rendering - Érico de Morais Nunes3D Games Rendering - Érico de Morais Nunes
3D Games Rendering - Érico de Morais Nunes
 

Recently uploaded

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

Bindless Deferred Decals in The Surge 2

  • 1. Bindless Deferred Decals in Philip Hammer (DECK13 Interactive GmbH) Digital Dragons 2019, Krakow
  • 2. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow This talk is .. ● .. about ○ our own implementation of bindless deferred decals in D3D12 and Vulkan ○ overcoming problems of past approaches ○ practical bread & butter techniques ○ how to efficiently render many decals on the GPU ○ tackling common issues and glitches ● .. but unfortunately not ○ super-fancy new research ○ a comprehensive view on our new renderer ● .. and has ○ probably more too much source code 2 2
  • 3. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Introduction ● Brief overview of the latest iteration of our inhouse FLEDGE engine ● 4th generation: re-designed renderer module from ground up: ○ Vulkan + D3D12 support only ○ Dropped legacy code (D3D11) ○ No more OOP code - all in for DOD / SoA ○ New possibilities for high-level renderer design (e.g. bindless texturing) ● Improved some existing features e.g. ○ Clustered Deferred + Clustered Forward Rendering ○ Physical-based Rendering ● Some fancy new rendering features, e.g. ○ Unified Volumetric Lighting, Irradiance Probe Grid, Simulated interactive grass, Temporal Antialiasing, etc. ○ Unfortunately not part of this talk :-) 3 3
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Motivation ● Decals = one key benefit of deferred rendering ● Used in environment art + VFX ○ Static decals to detail the world ○ Dynamic decals spawned by the effect system ○ Gameplay-driven decals like footsteps ● High demands on decal count, usability and performance 8 8
  • 9. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Decal usage & examples 99 9
  • 10. Decal usage & examples 10
  • 11. Decal usage & examples 11
  • 12. Decal usage & examples 12
  • 13. Decal usage & examples 13
  • 14. Decal usage & examples 14
  • 15. Decal usage & examples 15
  • 16. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Rasterization-based deferred decals ● Had deferred decals for quite a while [LotF14] ○ Be aware of decal count, overdraw, etc. ○ Limitations led to sparse usage ● “Classic” deferred decal rendering ○ analogous to deferred light volume rendering ● Improved that a lot over the years, but basic principle stayed the same 16 16
  • 17. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Rasterization-based deferred decals ● Advantages ○ Easy to implement and possible with most (even older) graphics APIs ○ Near pixel-perfect culling and shader segmentation ● Disadvantages ○ CPU-Performance ■ one drawcall per decal ■ Lots of state setup per decal ○ GPU-Performance ■ Double work: fetching gbuffers, rasterizing fragments, etc. ■ Need to update the G-Buffer as intermediate blend buffer 17 17 Transformed box geometry rasterizing a decal
  • 18. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Bindless Deferred Decals ● How about rendering all decals at once? 18 18
  • 19. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Bindless Deferred Decals ● How about rendering all decals at once? ● Problem: Too many resource bindings ○ Each decal references a potentially unique set of textures ○ Not possible to bind arbitrary amount of texture resources 19 19
  • 20. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Bindless Deferred Decals ● How about rendering all decals at once? ● Problem: Too many resource bindings ○ Each decal references a potentially unique set of textures ○ Not possible to bind arbitrary amount of texture resources ● Solution(s): ○ Texture atlases or arrays -> limited and inflexible ○ is around since 2013 [Everitt14] -> vendor specific and what about consoles? 20 20
  • 21. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Bindless Texturing ● D3D12 + Vulkan to the rescue! ○ Built-in support for bindless texturing ○ API specific descriptor arrays ○ Create a descriptor table for all textures in the game ○ Descriptors are globally available and bound to any draw/dispatch in need 21 21
  • 22. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Bindless Texturing ● D3D12 + Vulkan to the rescue! ○ Built-in support for bindless texturing ○ Create an (API specific) descriptor array for all textures in the game ○ Descriptors are globally available and bound to any draw/dispatch in need ● Idea of bindless texturing is around for a while! ○ e.g. [Reed14], [Pettineo16], [Sousa16], [Drobot17] 22 22
  • 23. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Bindless Texturing D3D12 / HLSL Vulkan / GLSL 23 23
  • 24. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Non-uniform resource indices ● Texture index must be uniform ○ In GCN terms: loaded into an SGPR ○ It’s not by default if fetched from a GPU buffer ○ Non-uniform indices lead to unexpected results and graphical corruptions ● Need to explicitly make the index uniform! 24 24
  • 25. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Non-uniform resource indices ● D3D12 / HLSL: ● Vulkan / GLSL: ○ Check [GpuInfo] for availability ● Alternative: use wave intrinsics ○ D3D12: Shader Model 6 wave intrinsics ○ Vulkan: ballot extensions ● Heavily driver- and vendor-dependent ○ Availability of extensions and performance 25 25
  • 26. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Clustered Deferred Decals ● We already have a clustered deferred renderer for lighting ○ Similar approach to [Persson], [Sousa16], etc. ○ Cull lights, specular cubemaps, etc. into subdivided view frustum bins ○ Render everything in one go (single compute dispatch / fullscreen quad) ○ Easy to query clustered data also for forward-rendered objects ○ Already a good coverage on the topic, so we won’t go much deeper here 26 26
  • 27. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Clustered Deferred Decals ● We already have a clustered deferred renderer for lighting ○ Similar approach to [Persson], [Sousa16], etc. ○ Cull lights, specular cubemaps, etc. into subdivided view frustum bins ○ Render everything in one go (single compute dispatch / fullscreen quad) ○ Easy to query clustered data also for forward-rendered objects ○ Already a good coverage on the topic, so we won’t go much deeper here ● Good fit also for decals! 27 27 Output scene color Fetch G-Buffer Compute decals Compute direct lighting Lighting shader Compute indirect specular Compute indirect diffuse
  • 28. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Clustered Deferred Decals ● Decal blending only in registers, no double fetching or updating of G-Buffer ● Very efficient, but be aware of register pressure / low CU occupancy 28 28
  • 29. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Bindless Decals Optimization ● High-level art optimizations ○ Cull by distance with soft fade-out ○ Switch to simpler feature set over distance 29 29 Decal overlay icons for all decals
  • 30. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Bindless Decals Optimization ● High-level art optimizations ○ Cull by distance with soft fade-out ○ Switch to simpler feature set over distance 30 30 Decal overlay icons for all decals surviving distance culling
  • 31. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Bindless Decals Optimization ● Low-level optimizations ● Biggest bottleneck in shader: VGPRs / CU Occupation ● GCN Loop Scalarization works great with decals ○ Load decal and material data in SGPRs and loop over necessary lanes ○ Note: not necessary anymore! ● Splitting decal and material features into isolated blocks ○ Free up registers by grouping features ○ Register lifetime is not always obvious - measure and profile ○ Reorganization of large shaders with a lot of resource access is always worth a try! 31 31
  • 32. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow GCN loop scalarization ● Great in-depth coverage available [Drobot17] ● Make cluster index uniform / scalar ○ Load all related data (DecalData, MaterialData, etc.) into SGPRs ○ Index is actually not uniform, but most pixel in a wave likely hit the same index ○ Double work can happen but higher occupancy will cancel it out ○ Only doable with wave intrinsics 32 32
  • 33. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Bindless Decals Limitations ● Downsides of blending decals in registers ● Decals not visible for other (deferred) renderpasses ○ normals + albedo won’t see decal modifications (e.g. SSAO, SSR, separate ambient pass) ○ Material-ID not updated (TAA Ghosting! [Xu16]) ● Could render decals before lighting and update G-Buffer ○ Additional costs for e.g. copying G-Buffer Normals 33 33
  • 34. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Common decal issues 34
  • 35. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Common decal issues #1: Normal blending ● Linear blending is trivial and useful for e.g. snow accumulation ○ Perfect for thick covers like layers of sand or snow ○ Tends to “flatten” normals in gradual blending: normal directions cancel out each other 35 35 Decal with linear normal blending
  • 36. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Common decal issues #1: Normal blending ● Re-orientated normal mapping [Hill12] ○ Our default mode for blending, works best for most decals ○ Decal normal will always follow surface normal ○ Fits mostly better into the scene 36 36 Decal with re-oriented normal blending
  • 37. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Common decal issues #2: screenspace UV gradients ● UV- and Z-gradients cannot be derived correctly in screenspace ○ No hardware gradient data (ddx/ddy) available in shader loops ○ No mip-mapping and wrong UV-gradients around object boundaries ● Solution: ○ Sample a fixed Mip Level :-( ○ Compute gradients in shader ■ Slightly higher runtime cost ■ Need to compute 2 addition decal-space positions with 1-pixel-offset in X and Y direction ■ Be aware of decal & uv scaling! 37 37
  • 38. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Common decal issues #2: screenspace UV gradients ● Computation of UV gradients in the shader ● Be aware that hardware gradients of position is not correct 38 38
  • 39. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Common decal issues #3: screenspace Z gradients ● UV gradients = almost good ● But can get huge at depth discontinuities if gradient is computed in the shader ● Two possibilities ○ Store z-gradients in G-Buffer and compute with these ○ Or check for depth discontinuities in shader + fix-up [Hammer18] 39 39
  • 40. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Common decal issues #3: screenspace Z gradients ● Checkerboard is a prime example because of maximum contrast ○ lower mips converge to middle gray due to downscale ● Large UV gradients will fetch a very low mip ending up in a color discontinuity 40 40
  • 41. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Common decal issues #3: screenspace Z gradients ● Find the edges causing the trouble ● Sample Lod0 if fragment is on edge ● Can be done directly in the decal fullscreen shader based on two depth quads 41 41
  • 42. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Common decal issues #3: screenspace Z gradients ● Find the edges causing the trouble ● Sample Lod0 if fragment is on edge ● Can be done directly in the decal fullscreen shader based on two depth quads 42 42
  • 43. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Common decal issues #3: screenspace Z gradients ● Color discontinuities are now gone ● Fixed edges can now suffer from Mip-Flickering ● In practice a rather minor issue ○ Barely noticeable during gameplay ○ Antialiasing - especially Temporal AA - migitates as well 43 43
  • 44. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Common decal issues #4: Leaking and object separation ● Decals may leak into areas where they don’t belong 44 44
  • 45. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Common decal issues #4: Leaking and object separation ● Decals may leak into areas where they don’t belong ● Solution: ○ Decals and materials both store a “DecalGroup” bitmask ○ Bitwise AND the masks and check if at least one bit matches ○ Up to artists how to assign bits (e.g. character, vegetation, environment, transparent, etc.) 45 45
  • 46. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Dirty decal tricks 4646 46
  • 47. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Dirty decal tricks #1 - Smoothing Edges ● Modify decal normal to “smooth” corners and edges ● Interpolate surface normal towards (uniform) decal direction ● Simple but effective and artists love the hack ● Useful for covering uneven geometry e.g. with mud 47 47 Smoothed Edges off (smoothFactor = 0.0)
  • 48. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Dirty decal tricks #1 - Smoothing Edges ● Modify decal normal to “smooth” corners and edges ● Interpolate surface normal towards (uniform) decal direction ● Simple but effective and artists love the hack ● Useful for covering uneven geometry e.g. with mud ● Geometry normal is otherwise hard to override ● Be careful, it’s a hack 48 48 Smoothed Edges on (smoothFactor = 1.0)
  • 49. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Dirty decal tricks #2 - Water puddles ● Decalling shallow water puddles ○ Faking surface porosity by blending black decal albedo (only 10-20% opacity) ○ low roughness (100%) ○ water ripple normal (100%) ● No special code path, just special parametrization 49 49
  • 50. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Dirty decal tricks #3 - Texturing the world ● Base model (no decals) 50 50
  • 51. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Dirty decal tricks #3 - Texturing the world ● Base model + decal with UV-free texturing aka Triplanar mapping ○ Sample texture(s) 3x from different directions and blend based on decal normal ○ Triplanar contrast defines the “steepness” of the blending according to the normal 51 51
  • 52. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Dirty decal tricks #3 - Texturing the world ● Base model + decal with triplanar + slope dependent blending ○ Generate a blend mask based on the slope of the underlying surface and the decal direction 52 52
  • 53. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Future improvements 53
  • 54. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Future improvements 54 54 ● Better tooling for bulk decalling ○ Brush decals with randomized parameters We already have that for small geometry instances like plants, debris, etc.! ○ Procedural placement based on world parameters (e.g. biomes, material types, indoor/outdoor) ○ Physically simulated placement (e.g. rigid body / particle simulation) ● Extend system to go full bindless ○ Bindless texturing also for scene rendering ○ Prototype exists but not yet ready for production
  • 55. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Thank you for listening! @philiphammer0 phammer@deck13.com 55 Also a big thanks to the amazing DECK13 team which helped with contributions, reviews and suggestions!
  • 56. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow We’re hiring! :) @deck13_de https://www.deck13.com/jobs/ 56
  • 57. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow Q & A 57
  • 58. Philip Hammer (Deck13 Interactive) Digital Dragons 2019, Krakow References [Persson] “Practical Clustered Shading”, Emil Persson, http://www.humus.name/Articles/PracticalClusteredShading.pdf [Drobot17] “Improved Culling for Tiled and Clustered Rendering”, Michal Drobot, Siggraph 2017 http://advances.realtimerendering.com/s2017/ [Hammer18] “Dissecting the Rendering of The Surge”, Philip Hammer, Quo Vadis Berlin 2018 https://de.slideshare.net/philiphammer/dissecting-the-rendering-of-the-surge [Xu16] "Temporal Antialiasing in Uncharted 4", Ke Xu, Siggraph 2016 http://advances.realtimerendering.com/s2016/ [Lagarde14] “Moving Frostbite to physical based rendering”, Sébastien Lagarde, Siggraph 2014 https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf [Wronski15] “Fixing screen-space deferred decals”, Bart Wronski, 2015 https://bartwronski.com/2015/03/12/fixing-screen-space-deferred-decals/ [Sawicki15] "Watch out for non-uniform resource index!", Adam Sawicki, http://www.asawicki.info/news_1608_direct3d_12_-_watch_out_for_non-uniform_resource_index.html [Sousa16] "The Devil is in the Details: idTech 666", Tiago Sousa, Siggraph 2016 https://de.slideshare.net/TiagoAlexSousa/siggraph2016-the-devil-is-in-the-details-idtech-666 [Pettineo16] “Bindless Texturing for Deferred Rendering and Decals”, Matt Pettineo https://mynameismjp.wordpress.com/2016/03/25/bindless-texturing-for-deferred-rendering-and-decals/ [Reed14] “Deferred Texturing” http://www.reedbeta.com/blog/deferred-texturing/ [LotF14] “Building your own engine, part 3 – Visual effects for the next generation”, Benjamin Glatzel, David Reinig https://www.makinggames.biz/news/building-your-own-engine-part-3-visual-effects-for-the-next-generation,6330.html [Hill12] “Blending in Detail”, Stephen Hill, 2012 https://blog.selfshadow.com/publications/blending-in-detail/ [Everitt14] “Approaching zero driver overhead”, Cass Everitt et. al.,, Siggraph 2014 https://de.slideshare.net/CassEveritt/approaching-zero-driver-overhead [GpuInfo] “Vulkan Hardware Database”, Sascha Willems https://vulkan.gpuinfo.org/listextensions.php 58 58