SlideShare ist ein Scribd-Unternehmen logo
1 von 61
Robust Stenciled Shadow Volumes
       Cass Everitt & Mark J. Kilgard
     Graphics/Visualization Seminar to the
     Center for Computational Visualization
               University of Texas
                 March 24, 2003
Stenciled Shadow Volumes in Practice




                         Notice the proper
                         self-shadowing!
Shadow Volume Basics

                      Shadowing
                      object
 Light
 source                                     Shadow
                                            volume
                                            (infinite extent)




A shadow volume is
simply the half-space defined
by a light source and a shadowing object.
Shadow Volume Basics (2)

                               Surface outside
                               shadow volume
                               (illuminated)



Simple rule:
samples within a
shadow volume
are in shadow.

                   Partially      Surface inside
                   shadowed       shadow volume
                   object         (shadowed)
Visualizing Shadow Volumes in 3D

  Occluders and light source cast out a shadow
  volume
     Objects within the volume should be shadowed
                                                          Light
                                                         source




Scene with shadows from an Visualization of the shadow
NVIDIA logo casting a shadow          volume
           volume
Shadow Volume Advantages

 Omni-directional approach
   Not just spotlight frustums as with shadow maps
 Automatic self-shadowing
   Everything can shadow everything, including self
   Without shadow acne artifacts as with shadow maps
 Window-space shadow determination
   Shadows accurate to a pixel
   Or sub-pixel if multisampling is available
 Required stencil buffer broadly supported today
   OpenGL support since version 1.0 (1991)
   Direct3D support since DX6 (1998)
Shadow Volume Disadvantages

 Ideal light sources only
    Limited to local point and directional lights
    No area light sources for soft shadows
 Requires polygonal models with connectivity
    Models must be closed (2-manifold)
    Models must be free of non-planar polygons
 Silhouette computations are required
    Can burden CPU
    Particularly for dynamic scenes
 Inherently multi-pass algorithm
 Consumes lots of GPU fill rate
Counting Enter/Leaves With a
Stencil Buffer (Zpass approach)

 Render scene to initialize depth buffer
   Depth values indicate the closest visible fragments
 Use a stencil enter/leave counting approach
   Draw shadow volume twice using face culling
           1st pass: render front faces and increment when depth test
           passes
           2nd pass: render back faces and decrement when depth test
           passes
    Don’t update depth or color
 Afterward, pixel’s stencil is non-zero if pixel in shadow,
 and zero if illuminated
Visualizing the Stencil Buffer Counts

      Shadowed scene           Stencil buffer contents

                                                         Stencil counts
                                                         beyond 1 are
                                                         possible for
                                                         multiple or
                                                         complex
                                                         occluders.




                             red = stencil value of 1
                             green = stencil value of 0

GLUT shadowvol example credit: Tom McReynolds
Why Eye-to-Object Stencil
Counting Approach Works


Light                                   Shadowing object
source


           zero             +1

                                       zero




                       +2         +2
Eye               +1
                             +3
position
Illuminated,
Behind Shadow Volumes (Zpass)


Light                                            Shadowing object
source


            zero                 +1

                                                zero

                   +    +        + -    -   -          Unshadowed
                                                          object
                            +2         +2
Eye                +1
                                  +3
position

 Shadow Volume Count = +1+1+1-1-1-1 = 0
Shadowed, Nested in Shadow Volumes
(Zpass)


Light                                         Shadowing object
source


             zero                 +1

                                             zero

                    +    +        + -

                             +2         +2          Shadowed
Eye                 +1                                object
                                   +3
position

 Shadow Volume Count = +1+1+1-1 = 2
Illuminated, In Front of Shadow
 Volumes (Zpass)

Light                                     Shadowing object
source


             zero             +1

                                         zero




                         +2         +2          Shadowed
Eye                 +1                            object
                               +3
position

Shadow Volume Count = 0 (no depth tests pass)
Nested Shadow Volumes
Stencil Counts Beyond One
   Shadowed scene             Stencil buffer contents




      green = stencil value of 0
      red = stencil value of 1
      darker reds = stencil value > 1
Animation of Stencil Buffer Updates
for a Single Light’s Shadow Volumes




                                                     Fully shaded scene




                                                     Final stencil state

 Every frame is 5 additional stencil shadow volume
 polygon updates. Note how various intermediate
 stencil values do not reflect the final state.
Problem Created by
Near Clip Plane (Zpass)
Missed shadow volume
intersection due to near
clip plane clipping; leads
to mistaken count                                         Far clip
                                                          plane

                             zero

                                              +1
                             +1
                                     +2
                                                   zero
                                    +3
                                         +2

  Near clip
   plane
Alternative Approach: Zfail

 Render scene to initialize depth buffer
   Depth values indicate the closest visible fragments
 Use a stencil enter/leave counting approach
   Draw shadow volume twice using face culling
         1st pass: render back faces and increment when depth
         test fails
         2nd pass: render front faces and decrement when depth
         test fails
   Don’t update depth or color
 Afterward, pixel’s stencil is non-zero if pixel in
 shadow, and zero if illuminated
Illuminated,
 Behind Shadow Volumes (Zfail)


Light                                      Shadowing object
source


              zero             +1

                                          zero

                                                 Unshadowed
                                                    object
                          +2         +2
Eye                  +1
                                +3
position

Shadow Volume Count = 0 (zero depth tests fail)
Shadowed, Nested in
Shadow Volumes (Zfail)


Light                                        Shadowing object
source


            zero             +1

                                            zero

                                    +   +

                        +2         +2              Shadowed
Eye                +1                                object
                              +3
position

 Shadow Volume Count = +1+1 = 2
Illuminated, In Front of Shadow
Volumes (Zfail)


Light                                             Shadowing object
source


             zero                 +1

                                                 zero

                    -    -        - +    +   +

                             +2         +2              Shadowed
Eye                 +1                                    object
                                   +3
position

Shadow Volume Count = -1-1-1+1+1+1 = 0
Problem Created by
Far Clip Plane (Zfail)
                                                Far clip
                                                plane

                                             Missed shadow volume
                                             intersection due to far
                                             clip plane clipping;
            zero
                                             leads to mistaken count




                                 +1

                                      zero
                   +1 +2
                                +2
                           +3
Near clip
 plane
Problem Solved by
Eliminating Far Clip



            zero




                                 +1

                   +1 +2
                                +2
                           +3
Near clip
 plane
Avoiding Far Plane Clipping

 Usual practice for perspective GL projection matrix
   Use glFrustum (or gluPerspective)
   Requires two values for near & far clip planes
         Near plane’s distance from the eye
         Far plane’s distance from the eye
    Assumes a finite far plane distance
 Alternative projection matrix
    Still requires near plane’s distance from the eye
    But assume far plane is at infinity
 What is the limit of the projection matrix when
 the far plane distance goes to infinity?
Standard glFrustum Projection Matrix

      2 Near                  Right Left
                      0                          0
     Right Left               Right Left
                    2 Near   Top Bottom
         0                                       0
P                 Top Bottom Top Bottom
                               Far Near       2 Far Near
         0            0
                               Far Near        Far Near
         0            0            1              0

     Only third row depends on Far and Near
Limit of glFrustum Matrix as
      Far Plane is Moved to Infinity

                 2 Near                  Right Left
                                 0                      0
                Right Left               Right Left
                               2 Near   Top Bottom
lim P    Pinf       0                                   0
Far                          Top Bottom Top Bottom
                    0            0            1       2 Near
                    0             0           1         0

       First, second, and fourth rows are the same as in P
       But third row no longer depends on Far
          Effectively, Far equals ∞
Verifying Pinf Will Not Clip
Infinitely Far Away Vertices (1)

 What is the most distant possible vertex in front of the
 eye?
    Ok to use homogeneous coordinates
    OpenGL convention looks down the negative Z axis
    So most distant vertex is (0,0,-D,0) where D>0
 Transform (0,0,-D,0) to window space
    Is such a vertex clipped by Pinf?
    No, it is not clipped, as explained on the next slide
Verifying Pinf Will Not Clip
Infinitely Far Away Vertices (2)
 Transform eye-space (0,0,-D,0) to clip-space
               2 Near                  Right Left
   xc    xc                    0                     0       0
              Right Left               Right Left
   yc    yc                  2 Near   Top Bottom             0
                  0                                  0
    D    zc                Top Bottom Top Bottom             D
    D    wc       0            0            1       2 Near   0
                  0            0            1        0

 Then, assuming glDepthRange(0,1), transform clip-
 space position to window-space position
                  zc                            D
        zw    0.5            0.5 0.5              0.5 1
                  wc                            D
 So ∞ in front of eye transforms to the maximum
 window-space Z value, but is still within the valid
 depth range (i.e., not clipped)
Robust Shadow Volumes sans Near (or
Far) Plane Capping

 Use Zfail Stenciling Approach
    Must render geometry to close shadow volume extrusion
    on the model and at infinity (explained later)
 Use the Pinf Projection Matrix
    No worries about far plane clipping
    Losses some depth buffer precision (but not much)
 Draw the infinite vertices of the shadow volume using
 homogeneous coordinates (w=0)
Rendering Closed, but Infinite,
Shadow Volumes

 To be robust, the shadow volume geometry must be
 closed, even at infinity
 Three sets of polygons close the shadow volume
  1. Possible silhouette edges extruded to infinity away from
     the light
  2. All of the occluder’s back-facing (w.r.t. the light) triangles
     projected away from the light to infinity
  3. All of the occluder’s front-facing (w.r.t. the light) triangles
 We assume the object vertices and light position are
 homogeneous coordinates, i.e. (x,y,z,w)
    Where w 0
1st Set of
Shadow Volume Polygons

 Assuming
    A and B are vertices of an occluder model’s possible
    silhouette edge
    And L is the light position
 For all A and B on silhouette edges of the occluder
 model, render the quad
    B x , B y , B z , Bw
    Ax , Ay , Az , Aw
                                                                Homogenous
    Ax Lw      Lx Aw , Ay Lw      L y Aw , Az Lw     Lz Aw ,0   vector differences
    B x Lw     L x B w , B y Lw   L y B w , B z Lw   Lz Bw ,0

 What is a possible silhouette edge?
    One polygon sharing an edge faces toward L
    Other faces away from L
Examples of Possible Silhouette Edges
for Quake2 Models

                        An object viewed from the
                        same basic direction that
                        the light is shining on the
                        object has an identifiable
                        light-view silhouette


                        An object’s light-view
                        silhouette appears quite
                        jumbled when viewed form
                        a point-of-view that does
                        not correspond well with
                        the light’s point-of-view
2nd and 3rd Set of
Shadow Volume Polygons

 2nd set of polygons
   Assuming A, B, and C are each vertices of occluder
   model’s back-facing triangles w.r.t. light position L
   These vertices are effectively directions (w=0)

     Ax Lw      Lx Aw , Ay Lw    Ly Aw , Az Lw    Lz Aw ,0
                                                             Homogenous vector
     Bx Lw      Lx Bw , B y Lw   Ly Bw , Bz Lw    Lz Bw ,0   differences
    C x Lw      Lx Cw , C y Lw   Ly Cw , C z Lw   Lz Cw ,0
 3rd set of polygons
   Assuming A, B, and C are each vertices of occluder
   model’s front-facing triangles w.r.t. light position L
             Ax , Ay , Az , Aw
             Bx , By , Bz , Bw
         C x , C y , C z , Cw
Complete Stenciled Shadow Volume
Rendering Technique

 See our paper “Practical and Robust Stenciled Shadow
 Volumes for Hardware-Accelerated Rendering”
   In the accompanying course notes
   And on-line at developer.nvidia.com
 Paper has pseudo-code for rendering procedure
   OpenGL state settings & rendering commands
   Supports multiple per-vertex lights
   Assumes application computes object-space
   determination of occluder model’s polygons orientation
   w.r.t. each light
Requirements for Our Stenciled Shadow
Volume Technique (1)

1.   Models must be composed of triangles only (avoiding
     non-planar polygons)
2.   Models must be closed (2-manifold) and have a
     consistent winding order
        Bergeron [’86] approach could be used to handle “open”
        models if necessary
3.   Homogeneous object coordinates are permitted,
     assuming w 0
        If not, (x, y, z, -1) = (-x, -y, -z, 1)
4.   Ideal light sources only
        Directional or positional, assuming w 0
Requirements for Our Stenciled Shadow
Volume Technique (2)

5.   Connectivity information for occluding models must
     be available
        So silhouette edges w.r.t. light positions can be
        determined at shadow volume construction time
6.   Projection matrix must be perspective
        Not orthographic
        NV_depth_clamp extension provides orthographic
        support (more later)
7.   Render must guarantee “watertight” rasterization
        No double hitting pixels at shared polygon edges
        No missed pixels at shared polygon edges
Requirements for Our Stenciled Shadow
Volume Technique (3)

8.   Enough stencil bits
        N stencil bits where 2N is greater than the maximum
        shadow depth count ever encountered
        Scene dependent
        8-bits is usually quite adequate & what all recent stencil
        hardware provides
        Wrapping stencil increment/decrement operations (i.e.
        OpenGL’s EXT_stencil_wrap) permit deeper shadow
        counts, modulo aliasing with zero
        Realize that shadow depths > 255 imply too
        much fill rate for interactive applications
Requirements for Our Stenciled Shadow
Volume Technique (4)

9.   Rendering features provided by OpenGL 1.0 or DirectX
     6 (or subsequent versions)
       Transformation & clipping of homogenous positions
       Front- and back-face culling
       Masking color and depth buffer writes
       Depth buffering (i.e. conventional Z-buffering)
       Stencil-testing support


 In practice, these are quite reasonable
 requirements for nearly any polygonal-based
 3D game or application
Our Approach in Practice (1)




Scene with shadows.             Same scene visualizing
Yellow light is embedded in     the shadow volumes.
the green three-holed object.
Pinf is used for all the
following scenes.
Our Approach in Practice (2)
Details worth noting . . .




Fine details: Shadows           Hard case: The shadow volume
of the A, N, and T letters on   from the front-facing hole would
the knight’s armor and          definitely intersect
shield.                         the near clip plane.
Our Approach in Practice (3)




Alternate view of same scene    Shadow volumes from the
with shadows. Yellow lines      alternate view.
indicate previous view’s view
frustum boundary. Recall
shadows are view-independent.
Our Approach in Practice (4)




Clip-space view. Original view’s        Clip-space view of shadow
scene seen from clip space. The         volumes. Back-facing triangles
back plane is “at infinity” with very   w.r.t. light are seen projected
little effective depth precision near   onto far plane at infinity.
infinity.
Another Example (1)




Original eye’s view. Again,    Eye-space view of previous
yellow light is embedded in    eye’s view. Clipped to the
the green three-holed          previous eye’s Pinf view
object. Pinf is used for all   frustum. Shows knight’s
the following scenes.          projection to infinity.
Another Example (2)

                            Clip-space view of previous
                            eye’s view. Shows shadow
                            volume closed at infinity and
                            other shadow volume’s
                            intersection with the near clip
                            plane.




Original eye’s far   Original eye’s near
clip plane           clip plane
Stenciled Shadow Volumes &
Multiple Lights

                        Three colored lights.
                        Diffuse/specular bump
                        mapped animated
                        characters with
                        shadows. 34 fps on
                        GeForce4 Ti 4600;
                        80+ fps for one light.
Stenciled Shadow Volumes for
Simulating Soft Shadows

                       Cluster of 12 dim
                       lights approximating
                       an area light source.
                       Generates a soft
                       shadow effect; careful
                       about banding. 8 fps on
                       GeForce4 Ti 4600.


                      The cluster of
                      point lights.
Shadows in a Real Game Scene




                               Abducted game
                               images courtesy
                               Joe Riedel at
                               Contraband
                               Entertainment
Scene’s Visible
Geometric Complexity


                               Wireframe shows
                               geometric
                               complexity of
                               visible geometry




             Primary light
             source location
Blow-up of Shadow Detail

                           Notice cable
                           shadows on
                           player model




                           Notice player’s
                           own shadow on
                           floor
Scene’s Shadow Volume
Geometric Complexity

                        Wireframe shows
                        geometric
                        complexity of
                        shadow volume
                        geometry


                        Shadow volume
                        geometry projects
                        away from the
                        light source
Visible Geometry vs.
Shadow Volume Geometry




                           <<


   Visible geometry                 Shadow volume geometry

          Typically, shadow volumes generate
          considerably more pixel updates than
          visible geometry
Other Example Scenes (1 of 2)




                                                  Visible geometry




Dramatic chase scene with shadows                 Shadow volume
                                                  geometry
         Abducted game images courtesy
         Joe Riedel at Contraband Entertainment
Other Example Scenes (2 of 2)




                                                   Visible geometry




Scene with multiple light sources                  Shadow volume
                                                   geometry
          Abducted game images courtesy
          Joe Riedel at Contraband Entertainment
Situations When
    Shadow Volumes Are Too Expensive




                                                                   Chain-link fence is
                                                                   shadow volume
                                                                   nightmare!


                                                             Chain-link fence’s
                                                             shadow appears on
                                                             truck & ground with
                                                             shadow maps



Fuel game image courtesy Nathan d’Obrenan at Firetoad Software
Shadow Volumes vs. Shadow Maps

 Shadow mapping via projective texturing
    The other prominent hardware-accelerated shadow
    technique
    Standard part of OpenGL 1.4
 Shadow mapping advantages
    Requires no explicit knowledge of object geometry
    No 2-manifold requirements, etc.
    View independent
 Shadow mapping disadvantages
    Sampling artifacts
    Not omni-directional
Stenciled Shadow Volumes
Optimizations
 Fill Rate Optimizations
    Dynamic Zpass vs. Zfail determination
    Bounds
 Culling Optimizations
    Portal-based culling
    Occluder and cap culling
 Silhouette Determination Optimizations
    Efficient data structures for static occluder & dynamic
    light
    Cache shadow volumes, update only when necessary
    Simplified occluder geometry
 Shadow Volume Rendering Optimizations
    Vertex programs for shadow volume rendering
    Two-sided stencil testing
    Directional lights
Shadow Volume History (1)

 Invented by Frank Crow [’77]
    Software rendering scan-line approach
 Brotman and Badler [’84]
    Software-based depth-buffered approach
    Used lots of point lights to simulate soft shadows
 Pixel-Planes [Fuchs, et. al. ’85] hardware
    First hardware approach
    Point within a volume, rather than ray intersection
 Bergeron [’96] generalizations
    Explains how to handle open models
    And non-planar polygons
Shadow Volume History (2)

 Fournier & Fussell [’88] theory
    Provides theory for shadow volume counting approach within
    a frame buffer
 Akeley & Foran invent the stencil buffer
    IRIS GL functionality, later made part of OpenGL 1.0
    Patent filed in ’92
 Heidmann [IRIS Universe article, ’91]
    IRIS GL stencil buffer-based approach
 Deifenbach’s thesis [’96]
    Used stenciled volumes in multi-pass framework
Shadow Volume History (3)

 Dietrich slides [March ’99] at GDC
     Proposes Zfail based stenciled shadow volumes
 Kilgard whitepaper [March ’99] at GDC
    Invert approach for planar cut-outs
 Bilodeau slides [May ’99] at Creative seminar
    Proposes way around near plane clipping problems
    Reverses depth test function to reverse stencil volume ray
    intersection sense
 Carmack [unpublished, early 2000]
    First detailed discussion of the equivalence of
    Zpass and Zfail stenciled shadow
    volume methods
Shadow Volume History (4)

 Kilgard [2001] at GDC and CEDEC Japan
   Proposes Zpass capping scheme
          Project back-facing (w.r.t. light) geometry to the near clip
          plane for capping
          Establishes near plane ledge for crack-free
          near plane capping
   Applies homogeneous coordinates (w=0) for
   rendering infinite shadow volume geometry
   Requires much CPU effort for capping
   Not totally robust because CPU and GPU
   computations will not match exactly,
   resulting in cracks
Shadow Volume History (5) –
Our Contribution

 Everitt & Kilgard [2002] Integrate Multiple Ideas into a robust
 solution
    Dietrich, Bilodeau, and Carmack’s Zfail approach
    Kilgard’s homogeneous coordinates (w=0) for rendering infinite
    shadow volume geometry
    Somewhat-obscure [Blinn ’93] infinite far plane projection matrix
    formulation
    DirectX 6’s wrapping stencil increment & decrement
            OpenGL’s EXT_stencil_wrap extension
 NVIDIA Hardware Enhancements
    Depth clamping [2001]: better depth precision
    Two-sided stencil testing [2002]: performance
    Depth/stencil-only hyper-rasterization: performance
    Depth bounds test [2003]: culling support
The Future

 Expect many games to have dynamic “everything
 shadows everything” shadows
 Expect hardware vendors to optimize hardware for
 this technique
   The “Doom3 effect”
 Expect research to optimize shadow volume
 culling/rendering/etc.
 Other applications
   Hardware-accelerated collision detection
   Computational Geometry
      Problems related to the visibility problem

Weitere ähnliche Inhalte

Was ist angesagt?

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
 
Multi sensor calibration by deep learning
Multi sensor calibration by deep learningMulti sensor calibration by deep learning
Multi sensor calibration by deep learningYu Huang
 
Physically Based Rendering
Physically Based RenderingPhysically Based Rendering
Physically Based RenderingKoray Hagen
 
OpenGL 3.2 and More
OpenGL 3.2 and MoreOpenGL 3.2 and More
OpenGL 3.2 and MoreMark Kilgard
 
Efficient Rendering with DirectX* 12 on Intel® Graphics
Efficient Rendering with DirectX* 12 on Intel® GraphicsEfficient Rendering with DirectX* 12 on Intel® Graphics
Efficient Rendering with DirectX* 12 on Intel® GraphicsGael Hofemeier
 
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
 
Bindless Deferred Decals in The Surge 2
Bindless Deferred Decals in The Surge 2Bindless Deferred Decals in The Surge 2
Bindless Deferred Decals in The Surge 2Philip Hammer
 
Deferred rendering in Dying Light
Deferred rendering in Dying LightDeferred rendering in Dying Light
Deferred rendering in Dying LightMaciej Jamrozik
 
Physically Based Lighting in Unreal Engine 4
Physically Based Lighting in Unreal Engine 4Physically Based Lighting in Unreal Engine 4
Physically Based Lighting in Unreal Engine 4Lukas Lang
 
smallpt: Global Illumination in 99 lines of C++
smallpt:  Global Illumination in 99 lines of C++smallpt:  Global Illumination in 99 lines of C++
smallpt: Global Illumination in 99 lines of C++鍾誠 陳鍾誠
 
HPG 2018 - Game Ray Tracing: State-of-the-Art and Open Problems
HPG 2018 - Game Ray Tracing: State-of-the-Art and Open ProblemsHPG 2018 - Game Ray Tracing: State-of-the-Art and Open Problems
HPG 2018 - Game Ray Tracing: State-of-the-Art and Open ProblemsElectronic Arts / DICE
 
Progressive Lightmapper: An Introduction to Lightmapping in Unity
Progressive Lightmapper: An Introduction to Lightmapping in UnityProgressive Lightmapper: An Introduction to Lightmapping in Unity
Progressive Lightmapper: An Introduction to Lightmapping in UnityUnity Technologies
 
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
 
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
 
A Bit More Deferred Cry Engine3
A Bit More Deferred   Cry Engine3A Bit More Deferred   Cry Engine3
A Bit More Deferred Cry Engine3guest11b095
 
Practical Occlusion Culling in Killzone 3
Practical Occlusion Culling in Killzone 3Practical Occlusion Culling in Killzone 3
Practical Occlusion Culling in Killzone 3Guerrilla
 
Advancements in-tiled-rendering
Advancements in-tiled-renderingAdvancements in-tiled-rendering
Advancements in-tiled-renderingmistercteam
 
Shadow mapping 정리
Shadow mapping 정리Shadow mapping 정리
Shadow mapping 정리changehee lee
 

Was ist angesagt? (20)

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
 
Multi sensor calibration by deep learning
Multi sensor calibration by deep learningMulti sensor calibration by deep learning
Multi sensor calibration by deep learning
 
Physically Based Rendering
Physically Based RenderingPhysically Based Rendering
Physically Based Rendering
 
OpenGL 3.2 and More
OpenGL 3.2 and MoreOpenGL 3.2 and More
OpenGL 3.2 and More
 
Efficient Rendering with DirectX* 12 on Intel® Graphics
Efficient Rendering with DirectX* 12 on Intel® GraphicsEfficient Rendering with DirectX* 12 on Intel® Graphics
Efficient Rendering with DirectX* 12 on Intel® Graphics
 
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...
 
Bindless Deferred Decals in The Surge 2
Bindless Deferred Decals in The Surge 2Bindless Deferred Decals in The Surge 2
Bindless Deferred Decals in The Surge 2
 
Deferred rendering in Dying Light
Deferred rendering in Dying LightDeferred rendering in Dying Light
Deferred rendering in Dying Light
 
Physically Based Lighting in Unreal Engine 4
Physically Based Lighting in Unreal Engine 4Physically Based Lighting in Unreal Engine 4
Physically Based Lighting in Unreal Engine 4
 
smallpt: Global Illumination in 99 lines of C++
smallpt:  Global Illumination in 99 lines of C++smallpt:  Global Illumination in 99 lines of C++
smallpt: Global Illumination in 99 lines of C++
 
Quake3BSPRendering
Quake3BSPRenderingQuake3BSPRendering
Quake3BSPRendering
 
HPG 2018 - Game Ray Tracing: State-of-the-Art and Open Problems
HPG 2018 - Game Ray Tracing: State-of-the-Art and Open ProblemsHPG 2018 - Game Ray Tracing: State-of-the-Art and Open Problems
HPG 2018 - Game Ray Tracing: State-of-the-Art and Open Problems
 
Progressive Lightmapper: An Introduction to Lightmapping in Unity
Progressive Lightmapper: An Introduction to Lightmapping in UnityProgressive Lightmapper: An Introduction to Lightmapping in Unity
Progressive Lightmapper: An Introduction to Lightmapping in Unity
 
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
 
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
 
A Bit More Deferred Cry Engine3
A Bit More Deferred   Cry Engine3A Bit More Deferred   Cry Engine3
A Bit More Deferred Cry Engine3
 
Lighting you up in Battlefield 3
Lighting you up in Battlefield 3Lighting you up in Battlefield 3
Lighting you up in Battlefield 3
 
Practical Occlusion Culling in Killzone 3
Practical Occlusion Culling in Killzone 3Practical Occlusion Culling in Killzone 3
Practical Occlusion Culling in Killzone 3
 
Advancements in-tiled-rendering
Advancements in-tiled-renderingAdvancements in-tiled-rendering
Advancements in-tiled-rendering
 
Shadow mapping 정리
Shadow mapping 정리Shadow mapping 정리
Shadow mapping 정리
 

Andere mochten auch

Order Independent Transparency
Order Independent TransparencyOrder Independent Transparency
Order Independent Transparencyacbess
 
CS 354 Final Exam Review
CS 354 Final Exam ReviewCS 354 Final Exam Review
CS 354 Final Exam ReviewMark Kilgard
 
CS 354 Procedural Methods
CS 354 Procedural MethodsCS 354 Procedural Methods
CS 354 Procedural MethodsMark Kilgard
 
CS 354 Performance Analysis
CS 354 Performance AnalysisCS 354 Performance Analysis
CS 354 Performance AnalysisMark Kilgard
 
CS 354 Global Illumination
CS 354 Global IlluminationCS 354 Global Illumination
CS 354 Global IlluminationMark Kilgard
 
CS 354 Acceleration Structures
CS 354 Acceleration StructuresCS 354 Acceleration Structures
CS 354 Acceleration StructuresMark Kilgard
 
CS 354 Shadows (cont'd) and Scene Graphs
CS 354 Shadows (cont'd) and Scene GraphsCS 354 Shadows (cont'd) and Scene Graphs
CS 354 Shadows (cont'd) and Scene GraphsMark Kilgard
 
CS 354 Surfaces, Programmable Tessellation, and NPR Graphics
CS 354 Surfaces, Programmable Tessellation, and NPR GraphicsCS 354 Surfaces, Programmable Tessellation, and NPR Graphics
CS 354 Surfaces, Programmable Tessellation, and NPR GraphicsMark Kilgard
 
CS 354 Viewing Stuff
CS 354 Viewing StuffCS 354 Viewing Stuff
CS 354 Viewing StuffMark Kilgard
 
CS 354 Project 1 Discussion
CS 354 Project 1 DiscussionCS 354 Project 1 Discussion
CS 354 Project 1 DiscussionMark Kilgard
 
CS 354 Introduction
CS 354 IntroductionCS 354 Introduction
CS 354 IntroductionMark Kilgard
 
NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016Mark Kilgard
 
CS 354 Ray Casting & Tracing
CS 354 Ray Casting & TracingCS 354 Ray Casting & Tracing
CS 354 Ray Casting & TracingMark Kilgard
 

Andere mochten auch (14)

Order Independent Transparency
Order Independent TransparencyOrder Independent Transparency
Order Independent Transparency
 
CS 354 Final Exam Review
CS 354 Final Exam ReviewCS 354 Final Exam Review
CS 354 Final Exam Review
 
CS 354 Procedural Methods
CS 354 Procedural MethodsCS 354 Procedural Methods
CS 354 Procedural Methods
 
CS 354 Performance Analysis
CS 354 Performance AnalysisCS 354 Performance Analysis
CS 354 Performance Analysis
 
CS 354 Global Illumination
CS 354 Global IlluminationCS 354 Global Illumination
CS 354 Global Illumination
 
CS 354 Acceleration Structures
CS 354 Acceleration StructuresCS 354 Acceleration Structures
CS 354 Acceleration Structures
 
CS 354 Shadows (cont'd) and Scene Graphs
CS 354 Shadows (cont'd) and Scene GraphsCS 354 Shadows (cont'd) and Scene Graphs
CS 354 Shadows (cont'd) and Scene Graphs
 
CS 354 Shadows
CS 354 ShadowsCS 354 Shadows
CS 354 Shadows
 
CS 354 Surfaces, Programmable Tessellation, and NPR Graphics
CS 354 Surfaces, Programmable Tessellation, and NPR GraphicsCS 354 Surfaces, Programmable Tessellation, and NPR Graphics
CS 354 Surfaces, Programmable Tessellation, and NPR Graphics
 
CS 354 Viewing Stuff
CS 354 Viewing StuffCS 354 Viewing Stuff
CS 354 Viewing Stuff
 
CS 354 Project 1 Discussion
CS 354 Project 1 DiscussionCS 354 Project 1 Discussion
CS 354 Project 1 Discussion
 
CS 354 Introduction
CS 354 IntroductionCS 354 Introduction
CS 354 Introduction
 
NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016
 
CS 354 Ray Casting & Tracing
CS 354 Ray Casting & TracingCS 354 Ray Casting & Tracing
CS 354 Ray Casting & Tracing
 

Mehr von Mark Kilgard

D11: a high-performance, protocol-optional, transport-optional, window system...
D11: a high-performance, protocol-optional, transport-optional, window system...D11: a high-performance, protocol-optional, transport-optional, window system...
D11: a high-performance, protocol-optional, transport-optional, window system...Mark Kilgard
 
Computers, Graphics, Engineering, Math, and Video Games for High School Students
Computers, Graphics, Engineering, Math, and Video Games for High School StudentsComputers, Graphics, Engineering, Math, and Video Games for High School Students
Computers, Graphics, Engineering, Math, and Video Games for High School StudentsMark Kilgard
 
NVIDIA OpenGL and Vulkan Support for 2017
NVIDIA OpenGL and Vulkan Support for 2017NVIDIA OpenGL and Vulkan Support for 2017
NVIDIA OpenGL and Vulkan Support for 2017Mark Kilgard
 
NVIDIA OpenGL 4.6 in 2017
NVIDIA OpenGL 4.6 in 2017NVIDIA OpenGL 4.6 in 2017
NVIDIA OpenGL 4.6 in 2017Mark Kilgard
 
Virtual Reality Features of NVIDIA GPUs
Virtual Reality Features of NVIDIA GPUsVirtual Reality Features of NVIDIA GPUs
Virtual Reality Features of NVIDIA GPUsMark Kilgard
 
Migrating from OpenGL to Vulkan
Migrating from OpenGL to VulkanMigrating from OpenGL to Vulkan
Migrating from OpenGL to VulkanMark Kilgard
 
EXT_window_rectangles
EXT_window_rectanglesEXT_window_rectangles
EXT_window_rectanglesMark Kilgard
 
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...Mark Kilgard
 
Accelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
Accelerating Vector Graphics Rendering using the Graphics Hardware PipelineAccelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
Accelerating Vector Graphics Rendering using the Graphics Hardware PipelineMark Kilgard
 
NV_path rendering Functional Improvements
NV_path rendering Functional ImprovementsNV_path rendering Functional Improvements
NV_path rendering Functional ImprovementsMark Kilgard
 
OpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUsOpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUsMark Kilgard
 
SIGGRAPH Asia 2012: GPU-accelerated Path Rendering
SIGGRAPH Asia 2012: GPU-accelerated Path RenderingSIGGRAPH Asia 2012: GPU-accelerated Path Rendering
SIGGRAPH Asia 2012: GPU-accelerated Path RenderingMark Kilgard
 
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and BeyondSIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and BeyondMark Kilgard
 
Programming with NV_path_rendering: An Annex to the SIGGRAPH Asia 2012 paper...
Programming with NV_path_rendering:  An Annex to the SIGGRAPH Asia 2012 paper...Programming with NV_path_rendering:  An Annex to the SIGGRAPH Asia 2012 paper...
Programming with NV_path_rendering: An Annex to the SIGGRAPH Asia 2012 paper...Mark Kilgard
 
GPU accelerated path rendering fastforward
GPU accelerated path rendering fastforwardGPU accelerated path rendering fastforward
GPU accelerated path rendering fastforwardMark Kilgard
 
GPU-accelerated Path Rendering
GPU-accelerated Path RenderingGPU-accelerated Path Rendering
GPU-accelerated Path RenderingMark Kilgard
 
SIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
SIGGRAPH 2012: GPU-Accelerated 2D and Web RenderingSIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
SIGGRAPH 2012: GPU-Accelerated 2D and Web RenderingMark Kilgard
 
SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012Mark Kilgard
 
GTC 2012: GPU-Accelerated Path Rendering
GTC 2012: GPU-Accelerated Path RenderingGTC 2012: GPU-Accelerated Path Rendering
GTC 2012: GPU-Accelerated Path Rendering Mark Kilgard
 

Mehr von Mark Kilgard (20)

D11: a high-performance, protocol-optional, transport-optional, window system...
D11: a high-performance, protocol-optional, transport-optional, window system...D11: a high-performance, protocol-optional, transport-optional, window system...
D11: a high-performance, protocol-optional, transport-optional, window system...
 
Computers, Graphics, Engineering, Math, and Video Games for High School Students
Computers, Graphics, Engineering, Math, and Video Games for High School StudentsComputers, Graphics, Engineering, Math, and Video Games for High School Students
Computers, Graphics, Engineering, Math, and Video Games for High School Students
 
NVIDIA OpenGL and Vulkan Support for 2017
NVIDIA OpenGL and Vulkan Support for 2017NVIDIA OpenGL and Vulkan Support for 2017
NVIDIA OpenGL and Vulkan Support for 2017
 
NVIDIA OpenGL 4.6 in 2017
NVIDIA OpenGL 4.6 in 2017NVIDIA OpenGL 4.6 in 2017
NVIDIA OpenGL 4.6 in 2017
 
Virtual Reality Features of NVIDIA GPUs
Virtual Reality Features of NVIDIA GPUsVirtual Reality Features of NVIDIA GPUs
Virtual Reality Features of NVIDIA GPUs
 
Migrating from OpenGL to Vulkan
Migrating from OpenGL to VulkanMigrating from OpenGL to Vulkan
Migrating from OpenGL to Vulkan
 
EXT_window_rectangles
EXT_window_rectanglesEXT_window_rectangles
EXT_window_rectangles
 
OpenGL for 2015
OpenGL for 2015OpenGL for 2015
OpenGL for 2015
 
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
 
Accelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
Accelerating Vector Graphics Rendering using the Graphics Hardware PipelineAccelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
Accelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
 
NV_path rendering Functional Improvements
NV_path rendering Functional ImprovementsNV_path rendering Functional Improvements
NV_path rendering Functional Improvements
 
OpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUsOpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUs
 
SIGGRAPH Asia 2012: GPU-accelerated Path Rendering
SIGGRAPH Asia 2012: GPU-accelerated Path RenderingSIGGRAPH Asia 2012: GPU-accelerated Path Rendering
SIGGRAPH Asia 2012: GPU-accelerated Path Rendering
 
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and BeyondSIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
 
Programming with NV_path_rendering: An Annex to the SIGGRAPH Asia 2012 paper...
Programming with NV_path_rendering:  An Annex to the SIGGRAPH Asia 2012 paper...Programming with NV_path_rendering:  An Annex to the SIGGRAPH Asia 2012 paper...
Programming with NV_path_rendering: An Annex to the SIGGRAPH Asia 2012 paper...
 
GPU accelerated path rendering fastforward
GPU accelerated path rendering fastforwardGPU accelerated path rendering fastforward
GPU accelerated path rendering fastforward
 
GPU-accelerated Path Rendering
GPU-accelerated Path RenderingGPU-accelerated Path Rendering
GPU-accelerated Path Rendering
 
SIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
SIGGRAPH 2012: GPU-Accelerated 2D and Web RenderingSIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
SIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
 
SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012
 
GTC 2012: GPU-Accelerated Path Rendering
GTC 2012: GPU-Accelerated Path RenderingGTC 2012: GPU-Accelerated Path Rendering
GTC 2012: GPU-Accelerated Path Rendering
 

Kürzlich hochgeladen

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 

Kürzlich hochgeladen (20)

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 

Robust Stenciled Shadow Volumes

  • 1. Robust Stenciled Shadow Volumes Cass Everitt & Mark J. Kilgard Graphics/Visualization Seminar to the Center for Computational Visualization University of Texas March 24, 2003
  • 2. Stenciled Shadow Volumes in Practice Notice the proper self-shadowing!
  • 3. Shadow Volume Basics Shadowing object Light source Shadow volume (infinite extent) A shadow volume is simply the half-space defined by a light source and a shadowing object.
  • 4. Shadow Volume Basics (2) Surface outside shadow volume (illuminated) Simple rule: samples within a shadow volume are in shadow. Partially Surface inside shadowed shadow volume object (shadowed)
  • 5. Visualizing Shadow Volumes in 3D Occluders and light source cast out a shadow volume Objects within the volume should be shadowed Light source Scene with shadows from an Visualization of the shadow NVIDIA logo casting a shadow volume volume
  • 6. Shadow Volume Advantages Omni-directional approach Not just spotlight frustums as with shadow maps Automatic self-shadowing Everything can shadow everything, including self Without shadow acne artifacts as with shadow maps Window-space shadow determination Shadows accurate to a pixel Or sub-pixel if multisampling is available Required stencil buffer broadly supported today OpenGL support since version 1.0 (1991) Direct3D support since DX6 (1998)
  • 7. Shadow Volume Disadvantages Ideal light sources only Limited to local point and directional lights No area light sources for soft shadows Requires polygonal models with connectivity Models must be closed (2-manifold) Models must be free of non-planar polygons Silhouette computations are required Can burden CPU Particularly for dynamic scenes Inherently multi-pass algorithm Consumes lots of GPU fill rate
  • 8. Counting Enter/Leaves With a Stencil Buffer (Zpass approach) Render scene to initialize depth buffer Depth values indicate the closest visible fragments Use a stencil enter/leave counting approach Draw shadow volume twice using face culling 1st pass: render front faces and increment when depth test passes 2nd pass: render back faces and decrement when depth test passes Don’t update depth or color Afterward, pixel’s stencil is non-zero if pixel in shadow, and zero if illuminated
  • 9. Visualizing the Stencil Buffer Counts Shadowed scene Stencil buffer contents Stencil counts beyond 1 are possible for multiple or complex occluders. red = stencil value of 1 green = stencil value of 0 GLUT shadowvol example credit: Tom McReynolds
  • 10. Why Eye-to-Object Stencil Counting Approach Works Light Shadowing object source zero +1 zero +2 +2 Eye +1 +3 position
  • 11. Illuminated, Behind Shadow Volumes (Zpass) Light Shadowing object source zero +1 zero + + + - - - Unshadowed object +2 +2 Eye +1 +3 position Shadow Volume Count = +1+1+1-1-1-1 = 0
  • 12. Shadowed, Nested in Shadow Volumes (Zpass) Light Shadowing object source zero +1 zero + + + - +2 +2 Shadowed Eye +1 object +3 position Shadow Volume Count = +1+1+1-1 = 2
  • 13. Illuminated, In Front of Shadow Volumes (Zpass) Light Shadowing object source zero +1 zero +2 +2 Shadowed Eye +1 object +3 position Shadow Volume Count = 0 (no depth tests pass)
  • 14. Nested Shadow Volumes Stencil Counts Beyond One Shadowed scene Stencil buffer contents green = stencil value of 0 red = stencil value of 1 darker reds = stencil value > 1
  • 15. Animation of Stencil Buffer Updates for a Single Light’s Shadow Volumes Fully shaded scene Final stencil state Every frame is 5 additional stencil shadow volume polygon updates. Note how various intermediate stencil values do not reflect the final state.
  • 16. Problem Created by Near Clip Plane (Zpass) Missed shadow volume intersection due to near clip plane clipping; leads to mistaken count Far clip plane zero +1 +1 +2 zero +3 +2 Near clip plane
  • 17. Alternative Approach: Zfail Render scene to initialize depth buffer Depth values indicate the closest visible fragments Use a stencil enter/leave counting approach Draw shadow volume twice using face culling 1st pass: render back faces and increment when depth test fails 2nd pass: render front faces and decrement when depth test fails Don’t update depth or color Afterward, pixel’s stencil is non-zero if pixel in shadow, and zero if illuminated
  • 18. Illuminated, Behind Shadow Volumes (Zfail) Light Shadowing object source zero +1 zero Unshadowed object +2 +2 Eye +1 +3 position Shadow Volume Count = 0 (zero depth tests fail)
  • 19. Shadowed, Nested in Shadow Volumes (Zfail) Light Shadowing object source zero +1 zero + + +2 +2 Shadowed Eye +1 object +3 position Shadow Volume Count = +1+1 = 2
  • 20. Illuminated, In Front of Shadow Volumes (Zfail) Light Shadowing object source zero +1 zero - - - + + + +2 +2 Shadowed Eye +1 object +3 position Shadow Volume Count = -1-1-1+1+1+1 = 0
  • 21. Problem Created by Far Clip Plane (Zfail) Far clip plane Missed shadow volume intersection due to far clip plane clipping; zero leads to mistaken count +1 zero +1 +2 +2 +3 Near clip plane
  • 22. Problem Solved by Eliminating Far Clip zero +1 +1 +2 +2 +3 Near clip plane
  • 23. Avoiding Far Plane Clipping Usual practice for perspective GL projection matrix Use glFrustum (or gluPerspective) Requires two values for near & far clip planes Near plane’s distance from the eye Far plane’s distance from the eye Assumes a finite far plane distance Alternative projection matrix Still requires near plane’s distance from the eye But assume far plane is at infinity What is the limit of the projection matrix when the far plane distance goes to infinity?
  • 24. Standard glFrustum Projection Matrix 2 Near Right Left 0 0 Right Left Right Left 2 Near Top Bottom 0 0 P Top Bottom Top Bottom Far Near 2 Far Near 0 0 Far Near Far Near 0 0 1 0 Only third row depends on Far and Near
  • 25. Limit of glFrustum Matrix as Far Plane is Moved to Infinity 2 Near Right Left 0 0 Right Left Right Left 2 Near Top Bottom lim P Pinf 0 0 Far Top Bottom Top Bottom 0 0 1 2 Near 0 0 1 0 First, second, and fourth rows are the same as in P But third row no longer depends on Far Effectively, Far equals ∞
  • 26. Verifying Pinf Will Not Clip Infinitely Far Away Vertices (1) What is the most distant possible vertex in front of the eye? Ok to use homogeneous coordinates OpenGL convention looks down the negative Z axis So most distant vertex is (0,0,-D,0) where D>0 Transform (0,0,-D,0) to window space Is such a vertex clipped by Pinf? No, it is not clipped, as explained on the next slide
  • 27. Verifying Pinf Will Not Clip Infinitely Far Away Vertices (2) Transform eye-space (0,0,-D,0) to clip-space 2 Near Right Left xc xc 0 0 0 Right Left Right Left yc yc 2 Near Top Bottom 0 0 0 D zc Top Bottom Top Bottom D D wc 0 0 1 2 Near 0 0 0 1 0 Then, assuming glDepthRange(0,1), transform clip- space position to window-space position zc D zw 0.5 0.5 0.5 0.5 1 wc D So ∞ in front of eye transforms to the maximum window-space Z value, but is still within the valid depth range (i.e., not clipped)
  • 28. Robust Shadow Volumes sans Near (or Far) Plane Capping Use Zfail Stenciling Approach Must render geometry to close shadow volume extrusion on the model and at infinity (explained later) Use the Pinf Projection Matrix No worries about far plane clipping Losses some depth buffer precision (but not much) Draw the infinite vertices of the shadow volume using homogeneous coordinates (w=0)
  • 29. Rendering Closed, but Infinite, Shadow Volumes To be robust, the shadow volume geometry must be closed, even at infinity Three sets of polygons close the shadow volume 1. Possible silhouette edges extruded to infinity away from the light 2. All of the occluder’s back-facing (w.r.t. the light) triangles projected away from the light to infinity 3. All of the occluder’s front-facing (w.r.t. the light) triangles We assume the object vertices and light position are homogeneous coordinates, i.e. (x,y,z,w) Where w 0
  • 30. 1st Set of Shadow Volume Polygons Assuming A and B are vertices of an occluder model’s possible silhouette edge And L is the light position For all A and B on silhouette edges of the occluder model, render the quad B x , B y , B z , Bw Ax , Ay , Az , Aw Homogenous Ax Lw Lx Aw , Ay Lw L y Aw , Az Lw Lz Aw ,0 vector differences B x Lw L x B w , B y Lw L y B w , B z Lw Lz Bw ,0 What is a possible silhouette edge? One polygon sharing an edge faces toward L Other faces away from L
  • 31. Examples of Possible Silhouette Edges for Quake2 Models An object viewed from the same basic direction that the light is shining on the object has an identifiable light-view silhouette An object’s light-view silhouette appears quite jumbled when viewed form a point-of-view that does not correspond well with the light’s point-of-view
  • 32. 2nd and 3rd Set of Shadow Volume Polygons 2nd set of polygons Assuming A, B, and C are each vertices of occluder model’s back-facing triangles w.r.t. light position L These vertices are effectively directions (w=0) Ax Lw Lx Aw , Ay Lw Ly Aw , Az Lw Lz Aw ,0 Homogenous vector Bx Lw Lx Bw , B y Lw Ly Bw , Bz Lw Lz Bw ,0 differences C x Lw Lx Cw , C y Lw Ly Cw , C z Lw Lz Cw ,0 3rd set of polygons Assuming A, B, and C are each vertices of occluder model’s front-facing triangles w.r.t. light position L Ax , Ay , Az , Aw Bx , By , Bz , Bw C x , C y , C z , Cw
  • 33. Complete Stenciled Shadow Volume Rendering Technique See our paper “Practical and Robust Stenciled Shadow Volumes for Hardware-Accelerated Rendering” In the accompanying course notes And on-line at developer.nvidia.com Paper has pseudo-code for rendering procedure OpenGL state settings & rendering commands Supports multiple per-vertex lights Assumes application computes object-space determination of occluder model’s polygons orientation w.r.t. each light
  • 34. Requirements for Our Stenciled Shadow Volume Technique (1) 1. Models must be composed of triangles only (avoiding non-planar polygons) 2. Models must be closed (2-manifold) and have a consistent winding order Bergeron [’86] approach could be used to handle “open” models if necessary 3. Homogeneous object coordinates are permitted, assuming w 0 If not, (x, y, z, -1) = (-x, -y, -z, 1) 4. Ideal light sources only Directional or positional, assuming w 0
  • 35. Requirements for Our Stenciled Shadow Volume Technique (2) 5. Connectivity information for occluding models must be available So silhouette edges w.r.t. light positions can be determined at shadow volume construction time 6. Projection matrix must be perspective Not orthographic NV_depth_clamp extension provides orthographic support (more later) 7. Render must guarantee “watertight” rasterization No double hitting pixels at shared polygon edges No missed pixels at shared polygon edges
  • 36. Requirements for Our Stenciled Shadow Volume Technique (3) 8. Enough stencil bits N stencil bits where 2N is greater than the maximum shadow depth count ever encountered Scene dependent 8-bits is usually quite adequate & what all recent stencil hardware provides Wrapping stencil increment/decrement operations (i.e. OpenGL’s EXT_stencil_wrap) permit deeper shadow counts, modulo aliasing with zero Realize that shadow depths > 255 imply too much fill rate for interactive applications
  • 37. Requirements for Our Stenciled Shadow Volume Technique (4) 9. Rendering features provided by OpenGL 1.0 or DirectX 6 (or subsequent versions) Transformation & clipping of homogenous positions Front- and back-face culling Masking color and depth buffer writes Depth buffering (i.e. conventional Z-buffering) Stencil-testing support In practice, these are quite reasonable requirements for nearly any polygonal-based 3D game or application
  • 38. Our Approach in Practice (1) Scene with shadows. Same scene visualizing Yellow light is embedded in the shadow volumes. the green three-holed object. Pinf is used for all the following scenes.
  • 39. Our Approach in Practice (2) Details worth noting . . . Fine details: Shadows Hard case: The shadow volume of the A, N, and T letters on from the front-facing hole would the knight’s armor and definitely intersect shield. the near clip plane.
  • 40. Our Approach in Practice (3) Alternate view of same scene Shadow volumes from the with shadows. Yellow lines alternate view. indicate previous view’s view frustum boundary. Recall shadows are view-independent.
  • 41. Our Approach in Practice (4) Clip-space view. Original view’s Clip-space view of shadow scene seen from clip space. The volumes. Back-facing triangles back plane is “at infinity” with very w.r.t. light are seen projected little effective depth precision near onto far plane at infinity. infinity.
  • 42. Another Example (1) Original eye’s view. Again, Eye-space view of previous yellow light is embedded in eye’s view. Clipped to the the green three-holed previous eye’s Pinf view object. Pinf is used for all frustum. Shows knight’s the following scenes. projection to infinity.
  • 43. Another Example (2) Clip-space view of previous eye’s view. Shows shadow volume closed at infinity and other shadow volume’s intersection with the near clip plane. Original eye’s far Original eye’s near clip plane clip plane
  • 44. Stenciled Shadow Volumes & Multiple Lights Three colored lights. Diffuse/specular bump mapped animated characters with shadows. 34 fps on GeForce4 Ti 4600; 80+ fps for one light.
  • 45. Stenciled Shadow Volumes for Simulating Soft Shadows Cluster of 12 dim lights approximating an area light source. Generates a soft shadow effect; careful about banding. 8 fps on GeForce4 Ti 4600. The cluster of point lights.
  • 46. Shadows in a Real Game Scene Abducted game images courtesy Joe Riedel at Contraband Entertainment
  • 47. Scene’s Visible Geometric Complexity Wireframe shows geometric complexity of visible geometry Primary light source location
  • 48. Blow-up of Shadow Detail Notice cable shadows on player model Notice player’s own shadow on floor
  • 49. Scene’s Shadow Volume Geometric Complexity Wireframe shows geometric complexity of shadow volume geometry Shadow volume geometry projects away from the light source
  • 50. Visible Geometry vs. Shadow Volume Geometry << Visible geometry Shadow volume geometry Typically, shadow volumes generate considerably more pixel updates than visible geometry
  • 51. Other Example Scenes (1 of 2) Visible geometry Dramatic chase scene with shadows Shadow volume geometry Abducted game images courtesy Joe Riedel at Contraband Entertainment
  • 52. Other Example Scenes (2 of 2) Visible geometry Scene with multiple light sources Shadow volume geometry Abducted game images courtesy Joe Riedel at Contraband Entertainment
  • 53. Situations When Shadow Volumes Are Too Expensive Chain-link fence is shadow volume nightmare! Chain-link fence’s shadow appears on truck & ground with shadow maps Fuel game image courtesy Nathan d’Obrenan at Firetoad Software
  • 54. Shadow Volumes vs. Shadow Maps Shadow mapping via projective texturing The other prominent hardware-accelerated shadow technique Standard part of OpenGL 1.4 Shadow mapping advantages Requires no explicit knowledge of object geometry No 2-manifold requirements, etc. View independent Shadow mapping disadvantages Sampling artifacts Not omni-directional
  • 55. Stenciled Shadow Volumes Optimizations Fill Rate Optimizations Dynamic Zpass vs. Zfail determination Bounds Culling Optimizations Portal-based culling Occluder and cap culling Silhouette Determination Optimizations Efficient data structures for static occluder & dynamic light Cache shadow volumes, update only when necessary Simplified occluder geometry Shadow Volume Rendering Optimizations Vertex programs for shadow volume rendering Two-sided stencil testing Directional lights
  • 56. Shadow Volume History (1) Invented by Frank Crow [’77] Software rendering scan-line approach Brotman and Badler [’84] Software-based depth-buffered approach Used lots of point lights to simulate soft shadows Pixel-Planes [Fuchs, et. al. ’85] hardware First hardware approach Point within a volume, rather than ray intersection Bergeron [’96] generalizations Explains how to handle open models And non-planar polygons
  • 57. Shadow Volume History (2) Fournier & Fussell [’88] theory Provides theory for shadow volume counting approach within a frame buffer Akeley & Foran invent the stencil buffer IRIS GL functionality, later made part of OpenGL 1.0 Patent filed in ’92 Heidmann [IRIS Universe article, ’91] IRIS GL stencil buffer-based approach Deifenbach’s thesis [’96] Used stenciled volumes in multi-pass framework
  • 58. Shadow Volume History (3) Dietrich slides [March ’99] at GDC Proposes Zfail based stenciled shadow volumes Kilgard whitepaper [March ’99] at GDC Invert approach for planar cut-outs Bilodeau slides [May ’99] at Creative seminar Proposes way around near plane clipping problems Reverses depth test function to reverse stencil volume ray intersection sense Carmack [unpublished, early 2000] First detailed discussion of the equivalence of Zpass and Zfail stenciled shadow volume methods
  • 59. Shadow Volume History (4) Kilgard [2001] at GDC and CEDEC Japan Proposes Zpass capping scheme Project back-facing (w.r.t. light) geometry to the near clip plane for capping Establishes near plane ledge for crack-free near plane capping Applies homogeneous coordinates (w=0) for rendering infinite shadow volume geometry Requires much CPU effort for capping Not totally robust because CPU and GPU computations will not match exactly, resulting in cracks
  • 60. Shadow Volume History (5) – Our Contribution Everitt & Kilgard [2002] Integrate Multiple Ideas into a robust solution Dietrich, Bilodeau, and Carmack’s Zfail approach Kilgard’s homogeneous coordinates (w=0) for rendering infinite shadow volume geometry Somewhat-obscure [Blinn ’93] infinite far plane projection matrix formulation DirectX 6’s wrapping stencil increment & decrement OpenGL’s EXT_stencil_wrap extension NVIDIA Hardware Enhancements Depth clamping [2001]: better depth precision Two-sided stencil testing [2002]: performance Depth/stencil-only hyper-rasterization: performance Depth bounds test [2003]: culling support
  • 61. The Future Expect many games to have dynamic “everything shadows everything” shadows Expect hardware vendors to optimize hardware for this technique The “Doom3 effect” Expect research to optimize shadow volume culling/rendering/etc. Other applications Hardware-accelerated collision detection Computational Geometry Problems related to the visibility problem