SlideShare una empresa de Scribd logo
1 de 68
Shadows & Decals:
D3D10 techniques from
      Frostbite


     Johan Andersson
     Daniel Johansson
Single-pass Stable Cascaded
Bounding Box Shadow Maps

        (SSCBBSM?!)




       Johan Andersson
Overview

    Basics
»
    Shadowmap rendering
»
    Stable shadows
»
    Scene rendering
»
    Conclusions
»



» (Q&A after 2nd part)
Cascaded Shadow Maps

                                                                                                                um
                                                                                                           frust
                                                                                                      View
                                                                          Shadow 3


                                              Shadow 2


                Shadow 1

                                                                                                             Slice
                    Slice 1                     Slice 2                     Slice 3                         without
                                                                                                            shadow
                              Split plane 1




                                                          Split plane 2




                                                                                      Split plane 3
 Near plane




                                                                                                                      Far plane
              View direction
Practical Split Scheme




From: Parallel-Split Shadow Maps on Programmable GPUs [1]


for (uint sliceIt = 0; sliceIt < sliceCount; sliceIt++)
{
    float f = float(sliceIt+1)/sliceCount;
    float logDistance = nearPlane * pow(shadowDistance/nearPlane, f);
    float uniformDistance = nearPlane + (shadowDistance - nearPlane) * f;
    splitDistances[sliceIt] = lerp(uniformDistance, logDistance, weight);
}
Traditional Shadowmap
Rendering
» Render world n times to n
  shadowmaps
                          Objects interesecting multiple slices are
                   
                          rendered multiple times




                                                                                                                                  4
                                                                                                                                  w
                                                                                                                             do
                                                                                                                              a
                                                                                                                           Sh
                                                                                                                                                    m
                                                                                                                                                u
                                                                                                                                           frust
                                                                                                                                      View




                                                                                             3
                                                                                             w
                                                                                        do
                                                                                         a
                                                                                      Sh
                                                        2
                                                        w
                                                   do
                                                    a
                                                 Sh
                      1
                   w
                 do
          a
       Sh




                                                                                                                                        Slice
                       Slice 1                              Slice 2                              Slice 3                               without 4
                                                                                                                                            Slice
                                                                                                                                       shadow
                                 Split plane 1




                                                                      Split plane 2




                                                                                                           Split plane 3
   Near plane




                                                                                                                                                    Far plane
                View direction
Traditional Shadowmap
Rendering
» More/larger objects or more slices
  = more overhead
» Both a CPU & GPU issue
       CPU: draw call / state overhead
     
      GPU: primarily extra vertices & primitives




» Want to reduce CPU overhead
       More objects
     
      More slices = higher resolution
      Longer shadow view distance
DX10 Single-pass
Shadowmap Rendering
» Single draw call outputs to multiple
  slices
       Shadowmap is a texture array
     
      Depth stencil array view with multiple slices
      Geometry shader selects output slice with
       SV_RenderTargetArrayIndex


» No CPU overhead
         With many objects intersecting multiple
     
         frustums


» Multiple implementations possible
Shadowmap texture
array view
» Creation:
  D3D10_DEPTH_STENCIL_VIEW_DESC viewDesc;
  viewDesc.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
  viewDesc.ViewDimension = D3DALL_DSV_DIMENSION_TEXTURE2DARRAY;
  viewDesc.Texture2DArray.FirstArraySlice = 0;
  viewDesc.Texture2DArray.ArraySize = sliceCount;
  viewDesc.Texture2DArray.MipSlice = 0;
  device->CreateDepthStencilView(shadowmapTexture, &viewDesc, &view);




» SampleCmp only supported on 10.1
  for texture arrays
        10.0 fallback: Manual PCF-filtering
      
       Or vendor-specific APIs, ask your IHV rep.
SV_RenderTargetArrayIndex

» Geometry shader output value

» Selects which texture slice each
  primitive should be rendered to

» Available from D3D 10.0
Geometry shader cloning
#define SLICE_COUNT 4
float4x4 sliceViewProjMatrices[SLICE_COUNT];

struct GsInput
{
    float4 worldPos : SV_POSITION;
    float2 texCoord : TEXCOORD0;
};
struct PsInput
{
    float4 hPos : SV_POSITION;
    float2 texCoord : TEXCOORD0;
    uint sliceIndex : SV_RenderTargetArrayIndex;
};

[maxvertexcount(SLICE_COUNT*3)]
void main(triangle GsInput input[3],
          inout TriangleStream<PsInput> stream)
{
    for (int sliceIt = firstSlice; sliceIt != lastSlice; sliceIt++)
    {
        PsInput output;
        output.sliceIndex = sliceIt;
        for( int v = 0; v < 3; v++ )
        {
            output.hPos = mul(input[v].worldPos, sliceViewProjMatrices[sliceIt]);
            output.texCoord = input[v].texCoord;
            stream.Append(output);
        }
        stream.RestartStrip();
    }
}
Geometry shader cloning

» Benefits
         Single shadowmap draw call per object
     
         even if object intersects multiple slices


» Drawbacks
       GS data amplification can be expensive
     
      Not compatible with instancing
      Multiple GS permutations for # of slices
      Fixed max number of slices in shader
Instancing GS method
» Render multiple instances for objects
  that intersects multiple slices
         Combine with ordinary instancing that you
     
         were already doing


» Store slice index per object instance
       In vertex buffer, cbuffer or tbuffer
     
      Together with the rest of the per-instance
       values (world transform, colors, etc)


» Geometry shader only used for
  selecting output slice
Instancing geometry shader
struct GsInput
{
    float4 hPos : SV_POSITION;
    float2 texCoord : TEXCOORD0;
    uint sliceIndex : TEXCOORD1;   // from VS vbuffer or tbuffer (tbuffer faster)
};

struct PsInput
{
    float4 hPos : SV_POSITION;
    float2 texCoord : TEXCOORD0;
    uint sliceIndex : SV_RenderTargetArrayIndex;
};

[maxvertexcount(3)]
void main(triangle GsInput input[3],
          inout TriangleStream<PsInput> stream)
{
    PsInput output;
    output.sliceIndex = input[v].sliceIndex;
    output.hPos = input[v].hPos;
    output.texCoord = input[v].texCoord;
    stream.Append(output);
}
Instancing geometry shader

» Benefits
       Works together with ordinary instancing
     
      Single draw call per shadow object type!
      Arbitrary number of slices
      Fixed CPU cost for shadowmap rendering



» Drawbacks
       Increased shadowmap GPU time
     
          Radeon 4870x2: ~1% (0.7–1.3%)
          Geforce 280: ~5% (1.9–18%)
      Have to write/generate GS permutation for
       every VS output combination
Shadow Flickering

» Causes
       Lack of high-quality filtering (>2x pcf)
     
      Moving light source
      Moving player view
      Rotating player view
      Changing field-of-view




» With a few limitations, we can fix
  these for static geometry
Flickering movie
Non-flickering movie
Stabilization (1/2)
» Orthographic views
      Scene-independent
    
     Make rotationally invariant = Fixed size




                                                                                                                                           ustum
                                                                                                                                      fr
                                                                                                                                 View




                                                                                                  3
                                                                                                  w
                                                                                             do
                                                                                              a
                                                                                           Sh
                                                             2
                                                             w
                                                        do
                                                         a
                                                      Sh
                           1
                        w
                      do
               a
            Sh




                                                                                                                                 Slice
                            Slice 1                              Slice 2                              Slice 3                   without
                                                                                                                                shadow
                                      Split plane 1




                                                                           Split plane 2




                                                                                                                Split plane 3
        Near plane




                                                                                                                                                   Far plane
                     View direction
Stabilization (1/2)
» Orthographic views
      Scene-independent
    
     Make rotationally invariant = Fixed size




                                                                                                                 3
                                                                                                             ow
                                                                                                                                                    m




                                                                                                            ad
                                                                                                                                             frustu




                                                                                                        sh
                                                                                                                                        View




                                                                                                     3 le
                                                                                                      b
                                                                                                   ta
                                                                                                 Sw
                                                                         2




                                                                                                do
                                                                      ow




                                                                                                 a
                                                                    ad




                                                                                              Sh
                                                               sh
                                                                2
                                                                e
                                                             bl
                                1



                                                           aw
                                                         dto
                            ow




                                                        aS
                           ad




                                                     Sh
                          1
                        sh
                        w
                   o
                 le
                bd
              aa
            Sth




                                                                                                                                        Slice
                           Slice 1                                  Slice 2                                  Slice 3                   without
                                                                                                                                       shadow
                                     Split plane 1




                                                                              Split plane 2




                                                                                                                       Split plane 3
        Near plane




                                                                                                                                                        Far plane
                     View direction
Stabilization (2/2)

» Round light-space translation to
  even texel increments

     float f = viewSize / (float)shadowmapSize;
     translation.x = round(translation.x/f) * f;
     translation.y = round(translation.y/f) * f;




» Still flickers on FOV changes &
  light rotation
         So don’t change them 
     
Scene rendering
» Slice selection methods
          Slice plane (viewport depth)
     




                                                                                                                            m
                                                                                                                        u
                                                                                                                   frust
                                                                                                              View
                                                                                  Shadow 3


                                                      Shadow 2


                        Shadow 1

                                                                                                                     Slice
                            Slice 1                     Slice 2                     Slice 3                         without
                                                                                                                    shadow
                                      Split plane 1




                                                                  Split plane 2




                                                                                              Split plane 3
         Near plane




                                                                                                                                Far plane
                      View direction
Scene rendering
» Slice selection methods
       Slice plane (viewport depth)
     
      Bounding sphere (Killzone 2 [2])


                                                                                                                                m
                                                                                                                            u
                                                                                                                       frust
                                                                                                                  View
                                                                                       Shadow 3
                                                                                   Shadow 3

                                                      Shadow 2
                                                       Shadow 2
                         Shadow 1
                        Shadow 1

                                                                                                                         Slice
                            Slice 1                      Slice 2                     Slice 3                            without
                                                                                                                        shadow
                                      Split plane 1




                                                                   Split plane 2




                                                                                                  Split plane 3
         Near plane




                                                                                                                                    Far plane
                      View direction
Scene rendering
» Slice selection methods
       Slice plane (viewport depth)
     
      Bounding sphere (Killzone 2 [2])
      Bounding box (BFBC / Frostbite)
                                                                                                                                m
                                                                                                                            u
                                                                                                                       frust
                                                                                                                  View
                                                                                       Shadow 3
                                                                                       Shadow 3
                                                                                   Shadow 3

                                                      Shadow 2
                                                       Shadow 2
                                                       Shadow 2
                         Shadow 1
                         Shadow 1
                        Shadow 1

                                                                                                                         Slice
                            Slice 1                      Slice 2                     Slice 3                            without
                                                                                                                        shadow
                                      Split plane 1




                                                                   Split plane 2




                                                                                                  Split plane 3
         Near plane




                                                                                                                                    Far plane
                      View direction
Slice plane selection
Bounding sphere selection
Bounding box selection
Shadowmap texture
array sampling shader
float sampleShadowmapCascadedBox3Pcf2x2(
    SamplerComparisonState s,
    Texture2DArray tex,
    float4 t0,    // t0.xyz = [-0.5,+0.5]   t0.w == 0
    float4 t1,    // t1.xyz = [-0.5,+0.5]   t1.w == 1
    float4 t2)    // t2.xyz = [-0.5,+0.5]   t2.w == 2
{
    bool b0 = all(abs(t0.xyz) < 0.5f);
    bool b1 = all(abs(t1.xyz) < 0.5f);
    bool b2 = all(abs(t2.xy) < 0.5f);

    float4 t;
    t = b2 ? t2 : 0;
    t = b1 ? t1 : t;
    t = b0 ? t0 : t;
    t.xyz += 0.5f;

    float r = tex.SampleCmpLevelZero(s, t.xyw, t.z).r;
    r = (t.z < 1) ? r : 1.0;
    return r;
}
Conclusions

» Stabilization reduces flicker
         With certain limitations
     

» Bounding box slice selection
  maximizes shadowmap utilization
       Higher effective resolution
     
      Longer effective shadow view distance
      Good fit with stabilization

» Fewer draw calls by rendering to
  texture array with instancing
       Constant CPU rendering cost regardless of
     
       number of shadow casting objecs & slices
      At a small GPU cost
Decal generation using
the Geometry Shader and
       Stream Out



      Daniel Johansson
What is a Decal?
Overview

    Problem description
»
    Solution
»
    Implementation
»
    Results
»
    Future work
»

» Q & A for both parts
Problem description

» Decals were using physics collision
  meshes
       Caused major visual artifacts
     
      We need to use the actual visual meshes

» Minimize delay between impact
  and visual feedback
         Important in fast paced FPS games
     
Problem description

» Already solved on consoles using
  shared memory (Xbox360) and
  SPU jobs (PS3)
» No good solution existed for PC as
  of yet
       Duplicating meshes in CPU memory
     
      Copying to CPU via staging resource
Solution

» Use the Geometry shader to cull
  and extract decal geometry
         From mesh vertex buffers in GPU RAM
     

» Stream out the decal geometry to
  a vertex ring buffer
» Use clip planes to clip the decals
  when drawing
Solution

» Allows us to transfer UV-sets from
  the source mesh to the decal
» Takes less vertex buffer memory
  than older method
         Due to use of clipplanes instead of manual
     
         clipping
Implementation – UML
Implementation –
Geometry Shader
» GS pass ”filters” out intersecting
  geometry from the input mesh
         Also performs a number of data
     
         transforms
» GS pass parameters
         Decal transform, spawn time, position in
     
         vertex buffer etc
» Let’s take a closer look at the GS
  code!
Geometry Shader – in/output
Transform mesh geometry to world space
Setup plane equation for the triangle
Discard if angle to decal is too big
Transform triangle into decal object space
Calculate triangle bbox
Do a sphere/bbox test to discard triangle
Code break

» __asm { int 3; }
Setup decal
quad vertices
Setup clip
planes from
decal quad
edges (cookie
cutter)
Calculate
tangents and
binormals
Transform
tangents /
normals from
world to mesh
object space
Calculate
texture
coordinates
(planar
projection)
Transfer mesh
texture coords
to decal
Calculate clip
distances
Append
triangle to
output stream
Geometry Shader
Performance
» Complex GS shader - ~260
  instructions
        Room for optimization
    

» GS draw calls usually around 0.05-
  0.5 ms
        Depending on hardware of course
    

» Per frame capping/buffering used
  to avoid framerate drops
Implementation – Buffer
usage
» One decal vertex buffer used as a
  ring buffer
» One index buffer – dynamically
  updated each frame
» Decal transforms stored on the
  CPU (for proximity queries)
Implementation –
Queries
» Grouped together with each decal
  generation draw call
» Result is used to ”commit” decals
  into their decal sets or discard
  them if no triangles were written
Implementation –
Queries
» Issues
      Buffer overflows
    
     Syncronization

» No way of knowing where in the
  buffer vertices were written
        Only have NumPrimitivesWritten and
    
        PrimitiveStorageNeeded
Implementation –
Queries
» Solution: When an overflow is
  detected the buffer is wrapped
  around.
         If any decals are partially written they are
     
         discarded and redispatched.
Results
Decal movie
Skinned decal movie
Future Work

» Rewrite to make use of
  DrawAuto()
» Experiment more with material
  masking possibilites
» Port to DX11 Compute Shader
» Implement GPU-based ray/mesh
  intersection tests
» SLI/Crossfire
Questions?




                             Contact:
                    johan.andersson@dice.se
                    daniel.johansson@dice.se
igetyourfail.com
References
» [1] Zhang et al. ”Parallel-Split Shadow Maps on
  Programmable GPUsquot;. GPU Gems 3.
» [2] Valient, Michael. quot;Stable Rendering of
  Cascaded Shadow Mapsquot;. ShaderX6

Más contenido relacionado

La actualidad más candente

Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)Tiago Sousa
 
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)Johan Andersson
 
Future Directions for Compute-for-Graphics
Future Directions for Compute-for-GraphicsFuture Directions for Compute-for-Graphics
Future Directions for Compute-for-GraphicsElectronic Arts / DICE
 
Optimizing the Graphics Pipeline with Compute, GDC 2016
Optimizing the Graphics Pipeline with Compute, GDC 2016Optimizing the Graphics Pipeline with Compute, GDC 2016
Optimizing the Graphics Pipeline with Compute, GDC 2016Graham Wihlidal
 
Graphics Gems from CryENGINE 3 (Siggraph 2013)
Graphics Gems from CryENGINE 3 (Siggraph 2013)Graphics Gems from CryENGINE 3 (Siggraph 2013)
Graphics Gems from CryENGINE 3 (Siggraph 2013)Tiago Sousa
 
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
 
Z Buffer Optimizations
Z Buffer OptimizationsZ Buffer Optimizations
Z Buffer Optimizationspjcozzi
 
Volumetric Lighting for Many Lights in Lords of the Fallen
Volumetric Lighting for Many Lights in Lords of the FallenVolumetric Lighting for Many Lights in Lords of the Fallen
Volumetric Lighting for Many Lights in Lords of the FallenBenjamin Glatzel
 
Forward+ (EUROGRAPHICS 2012)
Forward+ (EUROGRAPHICS 2012)Forward+ (EUROGRAPHICS 2012)
Forward+ (EUROGRAPHICS 2012)Takahiro Harada
 
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
 
OpenGL 4.4 - Scene Rendering Techniques
OpenGL 4.4 - Scene Rendering TechniquesOpenGL 4.4 - Scene Rendering Techniques
OpenGL 4.4 - Scene Rendering TechniquesNarann29
 
Parallel Futures of a Game Engine (v2.0)
Parallel Futures of a Game Engine (v2.0)Parallel Futures of a Game Engine (v2.0)
Parallel Futures of a Game Engine (v2.0)Johan Andersson
 
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
4K Checkerboard in Battlefield 1 and Mass Effect AndromedaElectronic Arts / DICE
 
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
 
SIGGRAPH 2018 - Full Rays Ahead! From Raster to Real-Time Raytracing
SIGGRAPH 2018 - Full Rays Ahead! From Raster to Real-Time RaytracingSIGGRAPH 2018 - Full Rays Ahead! From Raster to Real-Time Raytracing
SIGGRAPH 2018 - Full Rays Ahead! From Raster to Real-Time RaytracingElectronic Arts / DICE
 
「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発Unity Technologies Japan K.K.
 
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)Philip Hammer
 
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
 

La actualidad más candente (20)

Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)
 
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
 
Future Directions for Compute-for-Graphics
Future Directions for Compute-for-GraphicsFuture Directions for Compute-for-Graphics
Future Directions for Compute-for-Graphics
 
Optimizing the Graphics Pipeline with Compute, GDC 2016
Optimizing the Graphics Pipeline with Compute, GDC 2016Optimizing the Graphics Pipeline with Compute, GDC 2016
Optimizing the Graphics Pipeline with Compute, GDC 2016
 
Graphics Gems from CryENGINE 3 (Siggraph 2013)
Graphics Gems from CryENGINE 3 (Siggraph 2013)Graphics Gems from CryENGINE 3 (Siggraph 2013)
Graphics Gems from CryENGINE 3 (Siggraph 2013)
 
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
 
Z Buffer Optimizations
Z Buffer OptimizationsZ Buffer Optimizations
Z Buffer Optimizations
 
Volumetric Lighting for Many Lights in Lords of the Fallen
Volumetric Lighting for Many Lights in Lords of the FallenVolumetric Lighting for Many Lights in Lords of the Fallen
Volumetric Lighting for Many Lights in Lords of the Fallen
 
Forward+ (EUROGRAPHICS 2012)
Forward+ (EUROGRAPHICS 2012)Forward+ (EUROGRAPHICS 2012)
Forward+ (EUROGRAPHICS 2012)
 
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
 
OpenGL 4.4 - Scene Rendering Techniques
OpenGL 4.4 - Scene Rendering TechniquesOpenGL 4.4 - Scene Rendering Techniques
OpenGL 4.4 - Scene Rendering Techniques
 
The Unique Lighting of Mirror's Edge
The Unique Lighting of Mirror's EdgeThe Unique Lighting of Mirror's Edge
The Unique Lighting of Mirror's Edge
 
Parallel Futures of a Game Engine (v2.0)
Parallel Futures of a Game Engine (v2.0)Parallel Futures of a Game Engine (v2.0)
Parallel Futures of a Game Engine (v2.0)
 
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
 
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
 
SIGGRAPH 2018 - Full Rays Ahead! From Raster to Real-Time Raytracing
SIGGRAPH 2018 - Full Rays Ahead! From Raster to Real-Time RaytracingSIGGRAPH 2018 - Full Rays Ahead! From Raster to Real-Time Raytracing
SIGGRAPH 2018 - Full Rays Ahead! From Raster to Real-Time Raytracing
 
「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発
 
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
 
Stochastic Screen-Space Reflections
Stochastic Screen-Space ReflectionsStochastic Screen-Space Reflections
Stochastic Screen-Space Reflections
 
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
 

Destacado

Building the Battlefield AI Experience
Building the Battlefield AI ExperienceBuilding the Battlefield AI Experience
Building the Battlefield AI ExperienceElectronic Arts / DICE
 
Battlelog - Building scalable web sites with tight game integration
Battlelog - Building scalable web sites with tight game integrationBattlelog - Building scalable web sites with tight game integration
Battlelog - Building scalable web sites with tight game integrationElectronic Arts / DICE
 
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
 
How data rules the world: Telemetry in Battlefield Heroes
How data rules the world: Telemetry in Battlefield HeroesHow data rules the world: Telemetry in Battlefield Heroes
How data rules the world: Telemetry in Battlefield HeroesElectronic Arts / DICE
 
Destruction Masking in Frostbite 2 using Volume Distance Fields
Destruction Masking in Frostbite 2 using Volume Distance FieldsDestruction Masking in Frostbite 2 using Volume Distance Fields
Destruction Masking in Frostbite 2 using Volume Distance FieldsElectronic Arts / DICE
 
5 Major Challenges in Interactive Rendering
5 Major Challenges in Interactive Rendering5 Major Challenges in Interactive Rendering
5 Major Challenges in Interactive RenderingElectronic Arts / DICE
 
Stylized Rendering in Battlefield Heroes
Stylized Rendering in Battlefield HeroesStylized Rendering in Battlefield Heroes
Stylized Rendering in Battlefield HeroesElectronic Arts / DICE
 
Stable SSAO in Battlefield 3 with Selective Temporal Filtering
Stable SSAO in Battlefield 3 with Selective Temporal FilteringStable SSAO in Battlefield 3 with Selective Temporal Filtering
Stable SSAO in Battlefield 3 with Selective Temporal FilteringElectronic Arts / DICE
 
Level Design Challenges & Solutions - Mirror's Edge
Level Design Challenges & Solutions - Mirror's EdgeLevel Design Challenges & Solutions - Mirror's Edge
Level Design Challenges & Solutions - Mirror's EdgeElectronic Arts / DICE
 

Destacado (14)

Building the Battlefield AI Experience
Building the Battlefield AI ExperienceBuilding the Battlefield AI Experience
Building the Battlefield AI Experience
 
Battlelog - Building scalable web sites with tight game integration
Battlelog - Building scalable web sites with tight game integrationBattlelog - Building scalable web sites with tight game integration
Battlelog - Building scalable web sites with tight game integration
 
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
 
Bending the Graphics Pipeline
Bending the Graphics PipelineBending the Graphics Pipeline
Bending the Graphics Pipeline
 
A Real-time Radiosity Architecture
A Real-time Radiosity ArchitectureA Real-time Radiosity Architecture
A Real-time Radiosity Architecture
 
How data rules the world: Telemetry in Battlefield Heroes
How data rules the world: Telemetry in Battlefield HeroesHow data rules the world: Telemetry in Battlefield Heroes
How data rules the world: Telemetry in Battlefield Heroes
 
Destruction Masking in Frostbite 2 using Volume Distance Fields
Destruction Masking in Frostbite 2 using Volume Distance FieldsDestruction Masking in Frostbite 2 using Volume Distance Fields
Destruction Masking in Frostbite 2 using Volume Distance Fields
 
5 Major Challenges in Interactive Rendering
5 Major Challenges in Interactive Rendering5 Major Challenges in Interactive Rendering
5 Major Challenges in Interactive Rendering
 
Stylized Rendering in Battlefield Heroes
Stylized Rendering in Battlefield HeroesStylized Rendering in Battlefield Heroes
Stylized Rendering in Battlefield Heroes
 
A Step Towards Data Orientation
A Step Towards Data OrientationA Step Towards Data Orientation
A Step Towards Data Orientation
 
Scope Stack Allocation
Scope Stack AllocationScope Stack Allocation
Scope Stack Allocation
 
Stable SSAO in Battlefield 3 with Selective Temporal Filtering
Stable SSAO in Battlefield 3 with Selective Temporal FilteringStable SSAO in Battlefield 3 with Selective Temporal Filtering
Stable SSAO in Battlefield 3 with Selective Temporal Filtering
 
Introduction to Data Oriented Design
Introduction to Data Oriented DesignIntroduction to Data Oriented Design
Introduction to Data Oriented Design
 
Level Design Challenges & Solutions - Mirror's Edge
Level Design Challenges & Solutions - Mirror's EdgeLevel Design Challenges & Solutions - Mirror's Edge
Level Design Challenges & Solutions - Mirror's Edge
 

Más de Johan Andersson

Parallel Futures of a Game Engine
Parallel Futures of a Game EngineParallel Futures of a Game Engine
Parallel Futures of a Game EngineJohan Andersson
 
Your Game Needs Direct3D 11, So Get Started Now!
Your Game Needs Direct3D 11, So Get Started Now!Your Game Needs Direct3D 11, So Get Started Now!
Your Game Needs Direct3D 11, So Get Started Now!Johan Andersson
 
Advanced Real-time Post-Processing using GPGPU techniques
Advanced Real-time Post-Processing using GPGPU techniquesAdvanced Real-time Post-Processing using GPGPU techniques
Advanced Real-time Post-Processing using GPGPU techniquesJohan Andersson
 
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...Johan Andersson
 
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
 
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
 

Más de Johan Andersson (7)

Low-level Graphics APIs
Low-level Graphics APIsLow-level Graphics APIs
Low-level Graphics APIs
 
Parallel Futures of a Game Engine
Parallel Futures of a Game EngineParallel Futures of a Game Engine
Parallel Futures of a Game Engine
 
Your Game Needs Direct3D 11, So Get Started Now!
Your Game Needs Direct3D 11, So Get Started Now!Your Game Needs Direct3D 11, So Get Started Now!
Your Game Needs Direct3D 11, So Get Started Now!
 
Advanced Real-time Post-Processing using GPGPU techniques
Advanced Real-time Post-Processing using GPGPU techniquesAdvanced Real-time Post-Processing using GPGPU techniques
Advanced Real-time Post-Processing using GPGPU techniques
 
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...
 
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)
 
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...
 

Último

Gomti Nagar & High Profile Call Girls in Lucknow (Adult Only) 8923113531 Esc...
Gomti Nagar & High Profile Call Girls in Lucknow  (Adult Only) 8923113531 Esc...Gomti Nagar & High Profile Call Girls in Lucknow  (Adult Only) 8923113531 Esc...
Gomti Nagar & High Profile Call Girls in Lucknow (Adult Only) 8923113531 Esc...gurkirankumar98700
 
VIP Ramnagar Call Girls, Ramnagar escorts Girls 📞 8617697112
VIP Ramnagar Call Girls, Ramnagar escorts Girls 📞 8617697112VIP Ramnagar Call Girls, Ramnagar escorts Girls 📞 8617697112
VIP Ramnagar Call Girls, Ramnagar escorts Girls 📞 8617697112Nitya salvi
 
Indira Nagar Lucknow #Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payme...
Indira Nagar Lucknow #Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payme...Indira Nagar Lucknow #Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payme...
Indira Nagar Lucknow #Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payme...akbard9823
 
Editorial sephora annual report design project
Editorial sephora annual report design projectEditorial sephora annual report design project
Editorial sephora annual report design projecttbatkhuu1
 
Young⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort ServiceYoung⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort Servicesonnydelhi1992
 
Lucknow 💋 best call girls in Lucknow (Adult Only) 8923113531 Escort Service ...
Lucknow 💋 best call girls in Lucknow  (Adult Only) 8923113531 Escort Service ...Lucknow 💋 best call girls in Lucknow  (Adult Only) 8923113531 Escort Service ...
Lucknow 💋 best call girls in Lucknow (Adult Only) 8923113531 Escort Service ...anilsa9823
 
Lucknow 💋 Call Girls in Lucknow | Service-oriented sexy call girls 8923113531...
Lucknow 💋 Call Girls in Lucknow | Service-oriented sexy call girls 8923113531...Lucknow 💋 Call Girls in Lucknow | Service-oriented sexy call girls 8923113531...
Lucknow 💋 Call Girls in Lucknow | Service-oriented sexy call girls 8923113531...anilsa9823
 
Jeremy Casson - Top Tips for Pottery Wheel Throwing
Jeremy Casson - Top Tips for Pottery Wheel ThrowingJeremy Casson - Top Tips for Pottery Wheel Throwing
Jeremy Casson - Top Tips for Pottery Wheel ThrowingJeremy Casson
 
Lucknow 💋 Russian Call Girls Lucknow | Whatsapp No 8923113531 VIP Escorts Ser...
Lucknow 💋 Russian Call Girls Lucknow | Whatsapp No 8923113531 VIP Escorts Ser...Lucknow 💋 Russian Call Girls Lucknow | Whatsapp No 8923113531 VIP Escorts Ser...
Lucknow 💋 Russian Call Girls Lucknow | Whatsapp No 8923113531 VIP Escorts Ser...anilsa9823
 
Charbagh ! (Call Girls) in Lucknow Finest Escorts Service 🥗 8923113531 🏊 Avai...
Charbagh ! (Call Girls) in Lucknow Finest Escorts Service 🥗 8923113531 🏊 Avai...Charbagh ! (Call Girls) in Lucknow Finest Escorts Service 🥗 8923113531 🏊 Avai...
Charbagh ! (Call Girls) in Lucknow Finest Escorts Service 🥗 8923113531 🏊 Avai...gurkirankumar98700
 
Young⚡Call Girls in Lajpat Nagar Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Lajpat Nagar Delhi >༒9667401043 Escort ServiceYoung⚡Call Girls in Lajpat Nagar Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Lajpat Nagar Delhi >༒9667401043 Escort Servicesonnydelhi1992
 
Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...
Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...
Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...home
 
OYO GIRLS Call Girls in Lucknow Best Escorts Service Near You 8923113531 Call...
OYO GIRLS Call Girls in Lucknow Best Escorts Service Near You 8923113531 Call...OYO GIRLS Call Girls in Lucknow Best Escorts Service Near You 8923113531 Call...
OYO GIRLS Call Girls in Lucknow Best Escorts Service Near You 8923113531 Call...hanshkumar9870
 
Lucknow 💋 (Call Girls) in Mahanagar | Service-oriented sexy call girls 892311...
Lucknow 💋 (Call Girls) in Mahanagar | Service-oriented sexy call girls 892311...Lucknow 💋 (Call Girls) in Mahanagar | Service-oriented sexy call girls 892311...
Lucknow 💋 (Call Girls) in Mahanagar | Service-oriented sexy call girls 892311...anilsa9823
 
Call girls in Kanpur - 9761072362 with room service
Call girls in Kanpur - 9761072362 with room serviceCall girls in Kanpur - 9761072362 with room service
Call girls in Kanpur - 9761072362 with room servicediscovermytutordmt
 
Admirable # 00971529501107 # Call Girls at dubai by Dubai Call Girl
Admirable # 00971529501107 # Call Girls at dubai by Dubai Call GirlAdmirable # 00971529501107 # Call Girls at dubai by Dubai Call Girl
Admirable # 00971529501107 # Call Girls at dubai by Dubai Call Girlhome
 
Hazratganj / Call Girl in Lucknow - Phone 🫗 8923113531 ☛ Escorts Service at 6...
Hazratganj / Call Girl in Lucknow - Phone 🫗 8923113531 ☛ Escorts Service at 6...Hazratganj / Call Girl in Lucknow - Phone 🫗 8923113531 ☛ Escorts Service at 6...
Hazratganj / Call Girl in Lucknow - Phone 🫗 8923113531 ☛ Escorts Service at 6...akbard9823
 
Lucknow 💋 Cheap Call Girls In Lucknow Finest Escorts Service 8923113531 Avail...
Lucknow 💋 Cheap Call Girls In Lucknow Finest Escorts Service 8923113531 Avail...Lucknow 💋 Cheap Call Girls In Lucknow Finest Escorts Service 8923113531 Avail...
Lucknow 💋 Cheap Call Girls In Lucknow Finest Escorts Service 8923113531 Avail...anilsa9823
 
Lucknow 💋 Call Girl in Lucknow 10k @ I'm VIP Independent Escorts Girls 892311...
Lucknow 💋 Call Girl in Lucknow 10k @ I'm VIP Independent Escorts Girls 892311...Lucknow 💋 Call Girl in Lucknow 10k @ I'm VIP Independent Escorts Girls 892311...
Lucknow 💋 Call Girl in Lucknow 10k @ I'm VIP Independent Escorts Girls 892311...anilsa9823
 
Lucknow 💋 Escort Service in Lucknow (Adult Only) 8923113531 Escort Service 2...
Lucknow 💋 Escort Service in Lucknow  (Adult Only) 8923113531 Escort Service 2...Lucknow 💋 Escort Service in Lucknow  (Adult Only) 8923113531 Escort Service 2...
Lucknow 💋 Escort Service in Lucknow (Adult Only) 8923113531 Escort Service 2...anilsa9823
 

Último (20)

Gomti Nagar & High Profile Call Girls in Lucknow (Adult Only) 8923113531 Esc...
Gomti Nagar & High Profile Call Girls in Lucknow  (Adult Only) 8923113531 Esc...Gomti Nagar & High Profile Call Girls in Lucknow  (Adult Only) 8923113531 Esc...
Gomti Nagar & High Profile Call Girls in Lucknow (Adult Only) 8923113531 Esc...
 
VIP Ramnagar Call Girls, Ramnagar escorts Girls 📞 8617697112
VIP Ramnagar Call Girls, Ramnagar escorts Girls 📞 8617697112VIP Ramnagar Call Girls, Ramnagar escorts Girls 📞 8617697112
VIP Ramnagar Call Girls, Ramnagar escorts Girls 📞 8617697112
 
Indira Nagar Lucknow #Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payme...
Indira Nagar Lucknow #Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payme...Indira Nagar Lucknow #Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payme...
Indira Nagar Lucknow #Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payme...
 
Editorial sephora annual report design project
Editorial sephora annual report design projectEditorial sephora annual report design project
Editorial sephora annual report design project
 
Young⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort ServiceYoung⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort Service
 
Lucknow 💋 best call girls in Lucknow (Adult Only) 8923113531 Escort Service ...
Lucknow 💋 best call girls in Lucknow  (Adult Only) 8923113531 Escort Service ...Lucknow 💋 best call girls in Lucknow  (Adult Only) 8923113531 Escort Service ...
Lucknow 💋 best call girls in Lucknow (Adult Only) 8923113531 Escort Service ...
 
Lucknow 💋 Call Girls in Lucknow | Service-oriented sexy call girls 8923113531...
Lucknow 💋 Call Girls in Lucknow | Service-oriented sexy call girls 8923113531...Lucknow 💋 Call Girls in Lucknow | Service-oriented sexy call girls 8923113531...
Lucknow 💋 Call Girls in Lucknow | Service-oriented sexy call girls 8923113531...
 
Jeremy Casson - Top Tips for Pottery Wheel Throwing
Jeremy Casson - Top Tips for Pottery Wheel ThrowingJeremy Casson - Top Tips for Pottery Wheel Throwing
Jeremy Casson - Top Tips for Pottery Wheel Throwing
 
Lucknow 💋 Russian Call Girls Lucknow | Whatsapp No 8923113531 VIP Escorts Ser...
Lucknow 💋 Russian Call Girls Lucknow | Whatsapp No 8923113531 VIP Escorts Ser...Lucknow 💋 Russian Call Girls Lucknow | Whatsapp No 8923113531 VIP Escorts Ser...
Lucknow 💋 Russian Call Girls Lucknow | Whatsapp No 8923113531 VIP Escorts Ser...
 
Charbagh ! (Call Girls) in Lucknow Finest Escorts Service 🥗 8923113531 🏊 Avai...
Charbagh ! (Call Girls) in Lucknow Finest Escorts Service 🥗 8923113531 🏊 Avai...Charbagh ! (Call Girls) in Lucknow Finest Escorts Service 🥗 8923113531 🏊 Avai...
Charbagh ! (Call Girls) in Lucknow Finest Escorts Service 🥗 8923113531 🏊 Avai...
 
Young⚡Call Girls in Lajpat Nagar Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Lajpat Nagar Delhi >༒9667401043 Escort ServiceYoung⚡Call Girls in Lajpat Nagar Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Lajpat Nagar Delhi >༒9667401043 Escort Service
 
Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...
Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...
Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...
 
OYO GIRLS Call Girls in Lucknow Best Escorts Service Near You 8923113531 Call...
OYO GIRLS Call Girls in Lucknow Best Escorts Service Near You 8923113531 Call...OYO GIRLS Call Girls in Lucknow Best Escorts Service Near You 8923113531 Call...
OYO GIRLS Call Girls in Lucknow Best Escorts Service Near You 8923113531 Call...
 
Lucknow 💋 (Call Girls) in Mahanagar | Service-oriented sexy call girls 892311...
Lucknow 💋 (Call Girls) in Mahanagar | Service-oriented sexy call girls 892311...Lucknow 💋 (Call Girls) in Mahanagar | Service-oriented sexy call girls 892311...
Lucknow 💋 (Call Girls) in Mahanagar | Service-oriented sexy call girls 892311...
 
Call girls in Kanpur - 9761072362 with room service
Call girls in Kanpur - 9761072362 with room serviceCall girls in Kanpur - 9761072362 with room service
Call girls in Kanpur - 9761072362 with room service
 
Admirable # 00971529501107 # Call Girls at dubai by Dubai Call Girl
Admirable # 00971529501107 # Call Girls at dubai by Dubai Call GirlAdmirable # 00971529501107 # Call Girls at dubai by Dubai Call Girl
Admirable # 00971529501107 # Call Girls at dubai by Dubai Call Girl
 
Hazratganj / Call Girl in Lucknow - Phone 🫗 8923113531 ☛ Escorts Service at 6...
Hazratganj / Call Girl in Lucknow - Phone 🫗 8923113531 ☛ Escorts Service at 6...Hazratganj / Call Girl in Lucknow - Phone 🫗 8923113531 ☛ Escorts Service at 6...
Hazratganj / Call Girl in Lucknow - Phone 🫗 8923113531 ☛ Escorts Service at 6...
 
Lucknow 💋 Cheap Call Girls In Lucknow Finest Escorts Service 8923113531 Avail...
Lucknow 💋 Cheap Call Girls In Lucknow Finest Escorts Service 8923113531 Avail...Lucknow 💋 Cheap Call Girls In Lucknow Finest Escorts Service 8923113531 Avail...
Lucknow 💋 Cheap Call Girls In Lucknow Finest Escorts Service 8923113531 Avail...
 
Lucknow 💋 Call Girl in Lucknow 10k @ I'm VIP Independent Escorts Girls 892311...
Lucknow 💋 Call Girl in Lucknow 10k @ I'm VIP Independent Escorts Girls 892311...Lucknow 💋 Call Girl in Lucknow 10k @ I'm VIP Independent Escorts Girls 892311...
Lucknow 💋 Call Girl in Lucknow 10k @ I'm VIP Independent Escorts Girls 892311...
 
Lucknow 💋 Escort Service in Lucknow (Adult Only) 8923113531 Escort Service 2...
Lucknow 💋 Escort Service in Lucknow  (Adult Only) 8923113531 Escort Service 2...Lucknow 💋 Escort Service in Lucknow  (Adult Only) 8923113531 Escort Service 2...
Lucknow 💋 Escort Service in Lucknow (Adult Only) 8923113531 Escort Service 2...
 

Shadows & Decals: D3D10 Techniques in Frostbite (GDC'09)

  • 1.
  • 2. Shadows & Decals: D3D10 techniques from Frostbite Johan Andersson Daniel Johansson
  • 3. Single-pass Stable Cascaded Bounding Box Shadow Maps (SSCBBSM?!) Johan Andersson
  • 4. Overview Basics » Shadowmap rendering » Stable shadows » Scene rendering » Conclusions » » (Q&A after 2nd part)
  • 5. Cascaded Shadow Maps um frust View Shadow 3 Shadow 2 Shadow 1 Slice Slice 1 Slice 2 Slice 3 without shadow Split plane 1 Split plane 2 Split plane 3 Near plane Far plane View direction
  • 6. Practical Split Scheme From: Parallel-Split Shadow Maps on Programmable GPUs [1] for (uint sliceIt = 0; sliceIt < sliceCount; sliceIt++) { float f = float(sliceIt+1)/sliceCount; float logDistance = nearPlane * pow(shadowDistance/nearPlane, f); float uniformDistance = nearPlane + (shadowDistance - nearPlane) * f; splitDistances[sliceIt] = lerp(uniformDistance, logDistance, weight); }
  • 7. Traditional Shadowmap Rendering » Render world n times to n shadowmaps Objects interesecting multiple slices are  rendered multiple times 4 w do a Sh m u frust View 3 w do a Sh 2 w do a Sh 1 w do a Sh Slice Slice 1 Slice 2 Slice 3 without 4 Slice shadow Split plane 1 Split plane 2 Split plane 3 Near plane Far plane View direction
  • 8. Traditional Shadowmap Rendering » More/larger objects or more slices = more overhead » Both a CPU & GPU issue CPU: draw call / state overhead   GPU: primarily extra vertices & primitives » Want to reduce CPU overhead More objects   More slices = higher resolution  Longer shadow view distance
  • 9. DX10 Single-pass Shadowmap Rendering » Single draw call outputs to multiple slices Shadowmap is a texture array   Depth stencil array view with multiple slices  Geometry shader selects output slice with SV_RenderTargetArrayIndex » No CPU overhead With many objects intersecting multiple  frustums » Multiple implementations possible
  • 10. Shadowmap texture array view » Creation: D3D10_DEPTH_STENCIL_VIEW_DESC viewDesc; viewDesc.Format = DXGI_FORMAT_D24_UNORM_S8_UINT; viewDesc.ViewDimension = D3DALL_DSV_DIMENSION_TEXTURE2DARRAY; viewDesc.Texture2DArray.FirstArraySlice = 0; viewDesc.Texture2DArray.ArraySize = sliceCount; viewDesc.Texture2DArray.MipSlice = 0; device->CreateDepthStencilView(shadowmapTexture, &viewDesc, &view); » SampleCmp only supported on 10.1 for texture arrays 10.0 fallback: Manual PCF-filtering   Or vendor-specific APIs, ask your IHV rep.
  • 11. SV_RenderTargetArrayIndex » Geometry shader output value » Selects which texture slice each primitive should be rendered to » Available from D3D 10.0
  • 12. Geometry shader cloning #define SLICE_COUNT 4 float4x4 sliceViewProjMatrices[SLICE_COUNT]; struct GsInput { float4 worldPos : SV_POSITION; float2 texCoord : TEXCOORD0; }; struct PsInput { float4 hPos : SV_POSITION; float2 texCoord : TEXCOORD0; uint sliceIndex : SV_RenderTargetArrayIndex; }; [maxvertexcount(SLICE_COUNT*3)] void main(triangle GsInput input[3], inout TriangleStream<PsInput> stream) { for (int sliceIt = firstSlice; sliceIt != lastSlice; sliceIt++) { PsInput output; output.sliceIndex = sliceIt; for( int v = 0; v < 3; v++ ) { output.hPos = mul(input[v].worldPos, sliceViewProjMatrices[sliceIt]); output.texCoord = input[v].texCoord; stream.Append(output); } stream.RestartStrip(); } }
  • 13. Geometry shader cloning » Benefits Single shadowmap draw call per object  even if object intersects multiple slices » Drawbacks GS data amplification can be expensive   Not compatible with instancing  Multiple GS permutations for # of slices  Fixed max number of slices in shader
  • 14. Instancing GS method » Render multiple instances for objects that intersects multiple slices Combine with ordinary instancing that you  were already doing » Store slice index per object instance In vertex buffer, cbuffer or tbuffer   Together with the rest of the per-instance values (world transform, colors, etc) » Geometry shader only used for selecting output slice
  • 15. Instancing geometry shader struct GsInput { float4 hPos : SV_POSITION; float2 texCoord : TEXCOORD0; uint sliceIndex : TEXCOORD1; // from VS vbuffer or tbuffer (tbuffer faster) }; struct PsInput { float4 hPos : SV_POSITION; float2 texCoord : TEXCOORD0; uint sliceIndex : SV_RenderTargetArrayIndex; }; [maxvertexcount(3)] void main(triangle GsInput input[3], inout TriangleStream<PsInput> stream) { PsInput output; output.sliceIndex = input[v].sliceIndex; output.hPos = input[v].hPos; output.texCoord = input[v].texCoord; stream.Append(output); }
  • 16. Instancing geometry shader » Benefits Works together with ordinary instancing   Single draw call per shadow object type!  Arbitrary number of slices  Fixed CPU cost for shadowmap rendering » Drawbacks Increased shadowmap GPU time   Radeon 4870x2: ~1% (0.7–1.3%)  Geforce 280: ~5% (1.9–18%)  Have to write/generate GS permutation for every VS output combination
  • 17. Shadow Flickering » Causes Lack of high-quality filtering (>2x pcf)   Moving light source  Moving player view  Rotating player view  Changing field-of-view » With a few limitations, we can fix these for static geometry
  • 20. Stabilization (1/2) » Orthographic views Scene-independent   Make rotationally invariant = Fixed size ustum fr View 3 w do a Sh 2 w do a Sh 1 w do a Sh Slice Slice 1 Slice 2 Slice 3 without shadow Split plane 1 Split plane 2 Split plane 3 Near plane Far plane View direction
  • 21. Stabilization (1/2) » Orthographic views Scene-independent   Make rotationally invariant = Fixed size 3 ow m ad frustu sh View 3 le b ta Sw 2 do ow a ad Sh sh 2 e bl 1 aw dto ow aS ad Sh 1 sh w o le bd aa Sth Slice Slice 1 Slice 2 Slice 3 without shadow Split plane 1 Split plane 2 Split plane 3 Near plane Far plane View direction
  • 22. Stabilization (2/2) » Round light-space translation to even texel increments float f = viewSize / (float)shadowmapSize; translation.x = round(translation.x/f) * f; translation.y = round(translation.y/f) * f; » Still flickers on FOV changes & light rotation So don’t change them  
  • 23. Scene rendering » Slice selection methods Slice plane (viewport depth)  m u frust View Shadow 3 Shadow 2 Shadow 1 Slice Slice 1 Slice 2 Slice 3 without shadow Split plane 1 Split plane 2 Split plane 3 Near plane Far plane View direction
  • 24. Scene rendering » Slice selection methods Slice plane (viewport depth)   Bounding sphere (Killzone 2 [2]) m u frust View Shadow 3 Shadow 3 Shadow 2 Shadow 2 Shadow 1 Shadow 1 Slice Slice 1 Slice 2 Slice 3 without shadow Split plane 1 Split plane 2 Split plane 3 Near plane Far plane View direction
  • 25. Scene rendering » Slice selection methods Slice plane (viewport depth)   Bounding sphere (Killzone 2 [2])  Bounding box (BFBC / Frostbite) m u frust View Shadow 3 Shadow 3 Shadow 3 Shadow 2 Shadow 2 Shadow 2 Shadow 1 Shadow 1 Shadow 1 Slice Slice 1 Slice 2 Slice 3 without shadow Split plane 1 Split plane 2 Split plane 3 Near plane Far plane View direction
  • 29. Shadowmap texture array sampling shader float sampleShadowmapCascadedBox3Pcf2x2( SamplerComparisonState s, Texture2DArray tex, float4 t0, // t0.xyz = [-0.5,+0.5] t0.w == 0 float4 t1, // t1.xyz = [-0.5,+0.5] t1.w == 1 float4 t2) // t2.xyz = [-0.5,+0.5] t2.w == 2 { bool b0 = all(abs(t0.xyz) < 0.5f); bool b1 = all(abs(t1.xyz) < 0.5f); bool b2 = all(abs(t2.xy) < 0.5f); float4 t; t = b2 ? t2 : 0; t = b1 ? t1 : t; t = b0 ? t0 : t; t.xyz += 0.5f; float r = tex.SampleCmpLevelZero(s, t.xyw, t.z).r; r = (t.z < 1) ? r : 1.0; return r; }
  • 30. Conclusions » Stabilization reduces flicker With certain limitations  » Bounding box slice selection maximizes shadowmap utilization Higher effective resolution   Longer effective shadow view distance  Good fit with stabilization » Fewer draw calls by rendering to texture array with instancing Constant CPU rendering cost regardless of  number of shadow casting objecs & slices  At a small GPU cost
  • 31. Decal generation using the Geometry Shader and Stream Out Daniel Johansson
  • 32. What is a Decal?
  • 33. Overview Problem description » Solution » Implementation » Results » Future work » » Q & A for both parts
  • 34. Problem description » Decals were using physics collision meshes Caused major visual artifacts   We need to use the actual visual meshes » Minimize delay between impact and visual feedback Important in fast paced FPS games 
  • 35. Problem description » Already solved on consoles using shared memory (Xbox360) and SPU jobs (PS3) » No good solution existed for PC as of yet Duplicating meshes in CPU memory   Copying to CPU via staging resource
  • 36. Solution » Use the Geometry shader to cull and extract decal geometry From mesh vertex buffers in GPU RAM  » Stream out the decal geometry to a vertex ring buffer » Use clip planes to clip the decals when drawing
  • 37. Solution » Allows us to transfer UV-sets from the source mesh to the decal » Takes less vertex buffer memory than older method Due to use of clipplanes instead of manual  clipping
  • 39. Implementation – Geometry Shader » GS pass ”filters” out intersecting geometry from the input mesh Also performs a number of data  transforms » GS pass parameters Decal transform, spawn time, position in  vertex buffer etc » Let’s take a closer look at the GS code!
  • 40. Geometry Shader – in/output
  • 41. Transform mesh geometry to world space
  • 42. Setup plane equation for the triangle
  • 43. Discard if angle to decal is too big
  • 44. Transform triangle into decal object space
  • 46. Do a sphere/bbox test to discard triangle
  • 47. Code break » __asm { int 3; }
  • 49. Setup clip planes from decal quad edges (cookie cutter)
  • 56. Geometry Shader Performance » Complex GS shader - ~260 instructions Room for optimization  » GS draw calls usually around 0.05- 0.5 ms Depending on hardware of course  » Per frame capping/buffering used to avoid framerate drops
  • 57. Implementation – Buffer usage » One decal vertex buffer used as a ring buffer » One index buffer – dynamically updated each frame » Decal transforms stored on the CPU (for proximity queries)
  • 58. Implementation – Queries » Grouped together with each decal generation draw call » Result is used to ”commit” decals into their decal sets or discard them if no triangles were written
  • 59.
  • 60. Implementation – Queries » Issues Buffer overflows   Syncronization » No way of knowing where in the buffer vertices were written Only have NumPrimitivesWritten and  PrimitiveStorageNeeded
  • 61. Implementation – Queries » Solution: When an overflow is detected the buffer is wrapped around. If any decals are partially written they are  discarded and redispatched.
  • 62.
  • 66. Future Work » Rewrite to make use of DrawAuto() » Experiment more with material masking possibilites » Port to DX11 Compute Shader » Implement GPU-based ray/mesh intersection tests » SLI/Crossfire
  • 67. Questions? Contact: johan.andersson@dice.se daniel.johansson@dice.se igetyourfail.com
  • 68. References » [1] Zhang et al. ”Parallel-Split Shadow Maps on Programmable GPUsquot;. GPU Gems 3. » [2] Valient, Michael. quot;Stable Rendering of Cascaded Shadow Mapsquot;. ShaderX6