SlideShare a Scribd company logo
1 of 38
presented for Dr. Bajaj’s graphics class
                              University of Texas, Austin
                                             April 29, 2010




Anatomy of a
Texture Fetch
Mark J. Kilgard
mjk@nvidia.com
About Me

 Principal System Software Engineer
    NVIDIA Distinguished Inventor
 Native Texan, living in Austin
    But instead of UT, attended Rice (C.S. 1991)
    Yet I root for Texas in football (unless playing Rice)
 Interested in
    Programmable shading languages for GPUs
    Novel GPU-accelerated rendering paradigms
    OpenGL & GPU Architecture Improvements
Our Topic: the Texture Fetch Dissected

 Texture Fetch
    All modern 3D games rely on texture-rich rendering
    Basis for all sorts of richness and detail
    More than graphics—GPU compute supports texture fetches
 Conceptually
    An image load with built-in re-sampling
 GeForce 480 capable of 42,000,000,000 per second! *

         * 700 Mhz clock × 15 Streaming Multiprocessors × 4 fetches per clock
A Texture Fetch Simplified

                      Fetch at
  Seems pretty        (s,t) = (0.6, 0.25)
  simple…
  Given
  1. An image
  2. A position
  Return the
  color of image at
  position


                                            RGBA Result is
                                            0.95,0.4,0.24,1.0)
Texture Supplies Detail to Rendered Scenes


                                With texture




   Without texture
Textures Make Graphics Pretty

                  Texture → detail,
                  detail → immersion,
                  immersion → fun




              Microsoft Flight Simulator X
Shaders Combine Multiple Textures
                                           decal only

                            
                         (modulate)



     lightmaps only




       =
                                       * Id Software’s Quake 2
                      combined scene                circa 1997
Projected Texturing for Shadow Mapping



 without   light                                           with
           position
shadows                                                    shadows




                      “what the
                      light sees”   Depth map from light’s point of view
                                    is re-used as a texture and
                                    re-projected into eye’s view
                                    to generate shadows
Shadow Mapping Explained
 Planar distance from light          Depth map projected onto scene




                              ≤                                  =
                              less                             equals
                              than




                                                      True “un-shadowed”
                                                      region shown green
Texture’s Not All Fun and Games
What’s so hard?

 Filtering
     Poor quality results if you just return the closest color sample in the
     image
     Bilinear filtering + mipmapping needed
 Complications
     Wrap modes, formats, compression, color spaces, other dimensionalities
     (1D, 3D, cube maps), etc.
 Gotta be quick
     Applications desire billions of fetches per second
     What’s done per-fragment in the shader, must be done per-texel in the
     texture fetch—so 8x times as much work!
 Essentially a miniature, real-time re-sampling kernel
Anatomy of a Texture Fetch

                         Texture images
              Texel                              Texel
             offsets                             data



   Texture
coordinate                                                  Filtered
    vector     Texel                             Texel      texel vector
             Selection                        Combination
                           Combination
                            parameters



                         Texture parameters
Texture Fetch Functionality (1)
 Texture coordinate processing
     Projective texturing (OpenGL 1.0)
     Cube map face selection (OpenGL 1.3)
     Texture array indexing (OpenGL 2.1)
     Coordinate scale: normalization (ARB_texture_rectangle)
 Level-of-detail (LOD) computation
     Log of maximum texture coordinate partial derivative (OpenGL 1.0)
     LOD clamping (OpenGL 1.2)
     LOD bias (OpenGL 1.3)
     Anisotropic scaling of partial derivatives (SGIX_texture_lod_bias)
 Wrap modes
     Repeat, clamp (OpenGL 1.0)
     Clamp to edge (OpenGL 1.2), Clamp to border (OpenGL 1.3)
     Mirrored repeat (OpenGL 1.4)
     Fully generalized clamped mirror repeat (EXT_texture_mirror_clamp)
     Wrap to adjacent cube map face
     Region clamp & mirror (PlayStation 2)
Arrays of 2D Textures

                       Multiple skins packed in texture array
                            Motivation: binding to one multi-skin texture array avoids
                            texture bind per object

                                                Texture array index

                                0           1            2            3        4
  Mipmap level index




                        0



                        1

                        2
                        3
                        4
Texture Fetch Functionality (2)

 Filter modes
     Minification / magnification transition (OpenGL 1.0)
     Nearest, linear, mipmap (OpenGL 1.0)
     1D & 2D (OpenGL 1.0), 3D (OpenGL 1.2), 4D (SGIS_texture4D)
     Anisotropic (EXT_texture_filter_anisotropic)
     Fixed-weights: Quincunx, 3x3 Gaussian
         Used for multi-sample resolves
     Detail texture magnification (SGIS_detail_texture)
     Sharpen texture magnification (SGIS_sharpen_texture)
     4x4 filter (SGIS_texture_filter4)
     Sharp-edge texture magnification (E&S Harmony)
     Floating-point texture filtering (ARB_texture_float, OpenGL 3.0)
Texture Fetch Functionality (3)

 Texture formats
     Uncompressed
         Packing: RGBA8, RGB5A1, etc. (OpenGL 1.1)
         Type: unsigned, signed (NV_texture_shader)
         Normalized: fixed-point vs. integer (OpenGL 3.0)
     Compressed
         DXT compression formats (EXT_texture_compression_s3tc)
         4:2:2 video compression (various extensions)
         1- and 2-component compression (EXT_texture_compression_latc,
         OpenGL 3.0)
         Other approaches: IDCT, VQ, differential encoding, normal maps, separable
         decompositions
     Alternate encodings
         RGB9 with 5-bit shared exponent (EXT_texture_shared_exponent)
         Spherical harmonics
         Sum of product decompositions
Texture Fetch Functionality (4)

 Pre-filtering operations
     Gamma correction (OpenGL 2.1)
        Table: sRGB / arbitrary
     Shadow map comparison (OpenGL 1.4)
        Compare functions: LEQUAL, GREATER, etc. (OpenGL 1.5)
        Needs “R” depth value per texel
     Palette lookup (EXT_paletted_texture)
     Thresh-holding
        Color key
        Generalized thresh-holding
Delicate Color Fidelity with sRGB
      Problem: PC display devices have a legacy non-linear (sRGB)
      display gamut—delicate color shading looks wrong
Conventional                                             Gamma correct
   rendering                                             (sRGB rendered)
(uncorrected
       color)
                                                         Softer and more natural

 Unnaturally
                                                          Implication for texture
 deep facial
                                                          hardware: Should perform
   shadows
                                                          sRGB-to-linear color space
                                                          convert per-texel, so 24
                                                          scalar conversions—or
                                                          more—per fetch
                NVIDIA’s Adriana GeForce 8 Launch Demo
Texture Fetch Functionality (5)

 Optimizations
     Level-of-detail weighting adjustments
     Mid-maps (extra pre-filtered levels in-between existing levels)
 Unconventional uses
     Bitmap textures for fonts with large filters (Direct3D 10)
     Rip-mapping
     Non-uniform texture border color
     Clip-mapping (SGIX_clipmap)
     Multi-texel borders
     Silhouette maps (Pardeep Sen’s work)
         Shadow mapping
         Sharp piecewise linear magnification
Phased Data Flow
  Must hide long memory read latency between Selection
  and Combination phases
                                    Texture images
     Memory
                        Texel                              Texel
    reads for
                       offsets                             data
     samples

                                                                      Filtered
                                                                      texel
   Texture                                                            vector
                         Texel                             Texel
coordinate
                       Selection                        Combination
    vector                           Combination
                                      parameters
               FIFOing of
             combination
              parameters           Texture parameters
What really happens?

 Let’s consider a simple tri-linear mip-mapped 2D
 projective texture fetch                    High-level language
 Logically just one instruction              statement (Cg/HLSL)
  float4 color = tex2Dproj(decalSampler, st);
  TXP o[COLR], f[TEX3], TEX2, 2D;

 Logically                                 Assembly instruction
    Texel selection                        (NV_fragment_program)
    Texel combination
 How many operations are involved?
Medium-Level Dissection
   of a Texture Fetch
                                                                 texture images



 interpolated
texture coords
    vector
                                                    texel                                 texel data
                                                  offsets



                                        integer                                                        integer /
                                     coords &                                                          fixed-point                      filtered
  Convert                                            Convert                                                                            texel
                   texel             fractional                                                        texel
  texture                              weights
                                                      texel                            integer /       intermediates
                                                                                                                       floating-point   vector
                 coords
  coords                   floor /                   coords                          fixed-point                          scaling
     to                     frac                        to                               texel                               and
   texel                                              texel        combination      combination                         combination
                                                                   parameters
  coords                                             offsets



                                                               texture parameters
Interpolation

 First we need to interpolate (s,t,r,q)
 This is the f[TEX3] part of the TXP instruction
 Projective texturing means we want (s/q, t/q)
      And possible r/q if shadow mapping
 In order to correct for perspective, hardware actually interpolates
      (s/w, t/w, r/w, q/w)
 If not projective texturing, could linearly interpolate inverse w (or 1/w)
      Then compute its reciprocal to get w                        Observe projective
         Since 1/(1/w) equals w                                   texturing is same cost
      Then multiply (s/w,t/w,r/w,q/w) times w                     as perspective
                                                                  correction
         To get (s,t,r,q)
 If projective texturing, we can instead
      Compute reciprocal of q/w to get w/q
      Then multiple (s/w,t/w,r/w) by w/q to get (s/q, t/q, r/q)
Interpolation Operations

 Ax + By + C per scalar linear interpolation
    2 MADs
 One reciprocal to invert q/w for projective texturing
    Or one reciprocal to invert 1/w for perspective texturing
 Then 1 MUL per component for s/w * w/q
    Or s/w * w
 For (s,t) means
    4 MADs, 2 MULs, & 1 RCP
    (s,t,r) requires 6 MADs, 3 MULs, & 1 RCP
 All floating-point operations
Texture Space Mapping

 Have interpolated & projected coordinates
 Now need to determine what texels to fetch

 Multiple (s,t) by (width,height) of texture base level
    Could convert (s,t) to fixed-point first
       Or do math in floating-point
    Say based texture is 256x256 so
       So compute (s*256, t*256)=(u,v)
Mipmap Level-of-detail Selection

 Tri-linear mip-mapping means compute
 appropriate mipmap level
 Hardware rasterizes in 2x2 pixel entities
    Typically called quad-pixels or just quad
    Finite difference with neighbors to get change in
    u and v with respect to window space
       Approximation to ∂u/∂x, ∂u/∂y, ∂v/∂x, ∂v/∂y      one-pixel separation
       Means 4 subtractions per quad (1 per pixel)
 Now compute approximation to gradient
 length
    p = max(sqrt((∂u/∂x)2+(∂u/∂y)2),
           sqrt((∂v/∂x)2+(∂v/∂y)2))
Level-of-detail Bias and Clamping

 Convert p length to power-of-two level-of-detail and
 apply LOD bias
    λ = log2(p) + lodBias
 Now clamp λ to valid LOD range
    λ’ = max(minLOD, min(maxLOD, λ))
Determine Mipmap Levels and
Level Filtering Weight

 Determine lower and upper mipmap levels
    b = floor(λ’)) is bottom mipmap level
    t = floor(λ’+1) is top mipmap level
 Determine filter weight between levels
    w = frac(λ’) is filter weight
Determine Texture Sample Point

 Get (u,v) for selected top and bottom mipmap levels
    Consider a level l which could be either level t or b
      With (u,v) locations (ul,vl)
 Perform GL_CLAMP_TO_EDGE wrap modes
    uw = max(1/2*widthOfLevel(l),
         min(1-1/2*widthOfLevel(l), u))
    vw = max(1/2*heightOfLevel(l),
         min(1-1/2*heightOfLevel(l), v))          t
                                                            edge

 Get integer location (i,j) within each level         s
                                                            border

    (i,j) = ( floor(uw* widthOfLevel(l)),
              floor(vw* ) )
Determine Texel Locations

 Bilinear sample needs 4 texel locations
    (i0,j0), (i0,j1), (i1,j0), (i1,j1)
 With integer texel coordinates
    i0 = floor(i-1/2)
    i1 = floor(i+1/2)
    j0 = floor(j-1/2)
    j1 = floor(j+1/2)
 Also compute fractional weights for bilinear filtering
    a = frac(i-1/2)
    b = frac(j-1/2)
Determine Texel Addresses

 Assuming a texture level image’s base pointer, compute a texel
 address of each texel to fetch
    Assume bytesPerTexel = 4 bytes for RGBA8 texture
 Example
    addr00 = baseOfLevel(l) +
             bytesPerTexel*(i0+j0*widthOfLevel(l))
    addr01 = baseOfLevel(l) +
             bytesPerTexel*(i0+j1*widthOfLevel(l))
    addr10 = baseOfLevel(l) +
             bytesPerTexel*(i1+j0*widthOfLevel(l))
    addr11 = baseOfLevel(l) +
             bytesPerTexel*(i1+j1*widthOfLevel(l))
 More complicated address schemes are needed for good texture
 locality!
Initiate Texture Reads

 Initiate texture memory reads at the 8 texel addresses
    addr00, addr01, addr10, addr11 for the upper level
    addr00, addr01, addr10, addr11 for the lower level
 Queue the weights a, b, and w
    Latency FIFO in hardware makes these weights available
    when texture reads complete
Phased Data Flow
   Must hide long memory read latency between Selection
   and Combination phases
                                    Texture images
      Memory
                        Texel                              Texel
     reads for
                       offsets                             data
      samples

                                                                      Filtered
                                                                      texel
   Texture                                                            vector
                         Texel                             Texel
coordinate
                       Selection                        Combination
    vector                           Combination
                                      parameters
               FIFOing of
             combination
              parameters           Texture parameters
Texel Combination
 When texels reads are returned, begin filtering
     Assume results are
        Top texels: t00, t01, t10, t11
        Bottom texels: b00, b01, b10, b11
 Per-component filtering math is tri-linear filter
     RGBA8 is four components
 result = (1-a)*(1-b)*(1-w)*b00 +
         (1-a)*b*(1-w)*b*b01 +
         a*(1-b)*(1-w)*b10 +
         a*b*(1-w)*b11 +
         (1-a)*(1-b)*w*t00 +
         (1-a)*b*w*t01 +
         a*(1-b)*w*t10 +
         a*b*w*t11;
 24 MADs per component, or 96 for RGBA
     Lerp-tree could do 14 MADs per component, or 56 for RGBA
Total Texture Fetch Operations

 Interpolation
       6 MADs, 3 MULs, & 1 RCP (floating-point)
 Texel selection
       Texture space mapping
            2 MULs (fixed-point)
       LOD determination (floating-point)
            1 pixel difference, 2 SQRTs, 4 MULs, 1 LOG2
       LOD bias and clamping (fixed-point)
            1 ADD, 1 MIN, 1 MAX
                                                               Assuming a fixed-point RGBA
       Level determination and level weighting (fixed-point)   tri-linear mipmap filtered
            1 FLOOR, 1 ADD, 1 FRAC                             projective texture fetch
       Texture sample point
            4 MAXs, 4 MINs, 2 FLOORs (fixed-point)
       Texel locations and bi-linear weights
            8 FLOORs, 4 FRACs, 8 ADDs (fixed-point)
       Addressing
            16 integer MADs (integer)
 Texel combination
       56 fixed-point MADs (fixed-point)
Observations about the Texture Fetch

 Lots of ways to implement the math
    Lots of clever ways to be efficient
    Lots more texture operations not considered in this analysis
       Compression
       Anisotropic filtering
       sRGB
       Shadow mapping
 Arguably TEX instructions are “world’s most CISC instructions”
    Texture fetches are incredibly complex instructions
 Good deal of GPU’s superiority at graphics operations over CPUs
 is attributable to TEX instruction efficiency
    Good for compute too
Take Away Information

 The GPU texture fetch is about two orders of magnitude
 more complex than the most complex CPU instruction
    And texture fetches are extremely common
    Dozens of billions of texture fetches are expected by modern
    GPU applications
 Not just a graphics thing
    Using CUDA, you can access textures from within your
    compute- and bandwidth-intensive parallel kernels
GPU Technology Conference 2010
Monday, Sept. 20 - Thurs., Sept. 23, 2010                                                            Opportunities
San Jose Convention Center, San Jose, California
                                                                                                  Call for Submissions
The most important event in the GPU ecosystem                                                      Sessions & posters
     Learn about seismic shifts in GPU computing
     Preview disruptive technologies and emerging applications                                    Sponsors / Exhibitors
                                                                                                  Reach decision makers
     Get tools and techniques to impact mission critical projects
     Network with experts, colleagues, and peers across industries                                    “CEO on Stage”
                                                                                                  Showcase for Startups
  “I consider the GPU Technology Conference to be the single best place to see the amazing       Tell your story to VCs and
  work enabled by the GPU. It’s a great venue for meeting researchers, developers, scientists,
  and entrepreneurs from around the world.”                                                                analysts

  -- Professor Hanspeter Pfister, Harvard University and GTC 2009 keynote speaker

More Related Content

What's hot

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
 
Lighting of Killzone: Shadow Fall
Lighting of Killzone: Shadow FallLighting of Killzone: Shadow Fall
Lighting of Killzone: Shadow FallGuerrilla
 
Practical Occlusion Culling in Killzone 3
Practical Occlusion Culling in Killzone 3Practical Occlusion Culling in Killzone 3
Practical Occlusion Culling in Killzone 3Guerrilla
 
Penner pre-integrated skin rendering (siggraph 2011 advances in real-time r...
Penner   pre-integrated skin rendering (siggraph 2011 advances in real-time r...Penner   pre-integrated skin rendering (siggraph 2011 advances in real-time r...
Penner pre-integrated skin rendering (siggraph 2011 advances in real-time r...JP Lee
 
쉐도우맵을 압축하여 대규모씬에 라이팅을 적용해보자
쉐도우맵을 압축하여 대규모씬에 라이팅을 적용해보자쉐도우맵을 압축하여 대규모씬에 라이팅을 적용해보자
쉐도우맵을 압축하여 대규모씬에 라이팅을 적용해보자Seongdae Kim
 
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
 
Unite 2013 optimizing unity games for mobile platforms
Unite 2013 optimizing unity games for mobile platformsUnite 2013 optimizing unity games for mobile platforms
Unite 2013 optimizing unity games for mobile platformsナム-Nam Nguyễn
 
Secrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologySecrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologyTiago Sousa
 
Rendering Techniques in Rise of the Tomb Raider
Rendering Techniques in Rise of the Tomb RaiderRendering Techniques in Rise of the Tomb Raider
Rendering Techniques in Rise of the Tomb RaiderEidos-Montréal
 
제노블레이도 2 ray marching을사용한 구름 표현
제노블레이도 2 ray marching을사용한 구름 표현제노블레이도 2 ray marching을사용한 구름 표현
제노블레이도 2 ray marching을사용한 구름 표현민웅 이
 
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
 
Calibrating Lighting and Materials in Far Cry 3
Calibrating Lighting and Materials in Far Cry 3Calibrating Lighting and Materials in Far Cry 3
Calibrating Lighting and Materials in Far Cry 3stevemcauley
 
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
 
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019devCAT Studio, NEXON
 
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
 
Crysis 2-key-rendering-features
Crysis 2-key-rendering-featuresCrysis 2-key-rendering-features
Crysis 2-key-rendering-featuresRaimundo Renato
 
Optimization in Unity: simple tips for developing with "no surprises" / Anton...
Optimization in Unity: simple tips for developing with "no surprises" / Anton...Optimization in Unity: simple tips for developing with "no surprises" / Anton...
Optimization in Unity: simple tips for developing with "no surprises" / Anton...DevGAMM Conference
 

What's hot (20)

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
 
Lighting of Killzone: Shadow Fall
Lighting of Killzone: Shadow FallLighting of Killzone: Shadow Fall
Lighting of Killzone: Shadow Fall
 
DirectX 11 Rendering in Battlefield 3
DirectX 11 Rendering in Battlefield 3DirectX 11 Rendering in Battlefield 3
DirectX 11 Rendering 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
 
Lighting the City of Glass
Lighting the City of GlassLighting the City of Glass
Lighting the City of Glass
 
Penner pre-integrated skin rendering (siggraph 2011 advances in real-time r...
Penner   pre-integrated skin rendering (siggraph 2011 advances in real-time r...Penner   pre-integrated skin rendering (siggraph 2011 advances in real-time r...
Penner pre-integrated skin rendering (siggraph 2011 advances in real-time r...
 
쉐도우맵을 압축하여 대규모씬에 라이팅을 적용해보자
쉐도우맵을 압축하여 대규모씬에 라이팅을 적용해보자쉐도우맵을 압축하여 대규모씬에 라이팅을 적용해보자
쉐도우맵을 압축하여 대규모씬에 라이팅을 적용해보자
 
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
 
Unite 2013 optimizing unity games for mobile platforms
Unite 2013 optimizing unity games for mobile platformsUnite 2013 optimizing unity games for mobile platforms
Unite 2013 optimizing unity games for mobile platforms
 
画像処理(二値化)
画像処理(二値化)画像処理(二値化)
画像処理(二値化)
 
Secrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologySecrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics Technology
 
Rendering Techniques in Rise of the Tomb Raider
Rendering Techniques in Rise of the Tomb RaiderRendering Techniques in Rise of the Tomb Raider
Rendering Techniques in Rise of the Tomb Raider
 
제노블레이도 2 ray marching을사용한 구름 표현
제노블레이도 2 ray marching을사용한 구름 표현제노블레이도 2 ray marching을사용한 구름 표현
제노블레이도 2 ray marching을사용한 구름 표현
 
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
 
Calibrating Lighting and Materials in Far Cry 3
Calibrating Lighting and Materials in Far Cry 3Calibrating Lighting and Materials in Far Cry 3
Calibrating Lighting and Materials in Far Cry 3
 
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...
 
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
 
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
 
Crysis 2-key-rendering-features
Crysis 2-key-rendering-featuresCrysis 2-key-rendering-features
Crysis 2-key-rendering-features
 
Optimization in Unity: simple tips for developing with "no surprises" / Anton...
Optimization in Unity: simple tips for developing with "no surprises" / Anton...Optimization in Unity: simple tips for developing with "no surprises" / Anton...
Optimization in Unity: simple tips for developing with "no surprises" / Anton...
 

Viewers also liked

SIGGRAPH Asia 2008 Modern OpenGL
SIGGRAPH Asia 2008 Modern OpenGLSIGGRAPH Asia 2008 Modern OpenGL
SIGGRAPH Asia 2008 Modern OpenGLMark Kilgard
 
CS 354 Texture Mapping
CS 354 Texture MappingCS 354 Texture Mapping
CS 354 Texture MappingMark Kilgard
 
Geometry Batching Using Texture-Arrays
Geometry Batching Using Texture-ArraysGeometry Batching Using Texture-Arrays
Geometry Batching Using Texture-ArraysMatthias Trapp
 
2010-JOGL-09-Texture-Mapping
2010-JOGL-09-Texture-Mapping2010-JOGL-09-Texture-Mapping
2010-JOGL-09-Texture-MappingJohannes Diemke
 
2010-JOGL-11-Toon-Shading
2010-JOGL-11-Toon-Shading2010-JOGL-11-Toon-Shading
2010-JOGL-11-Toon-ShadingJohannes Diemke
 
Alex_Vlachos_Advanced_VR_Rendering_GDC2015
Alex_Vlachos_Advanced_VR_Rendering_GDC2015Alex_Vlachos_Advanced_VR_Rendering_GDC2015
Alex_Vlachos_Advanced_VR_Rendering_GDC2015Alex Vlachos
 
Yoda - HTML5 Content Authoring Tool
Yoda - HTML5 Content Authoring ToolYoda - HTML5 Content Authoring Tool
Yoda - HTML5 Content Authoring ToolHyekyoung Lee
 
Exploring Cultures through Cuisines at the Ultimate Travel Show 2016 - Toronto
Exploring Cultures through Cuisines at the Ultimate Travel Show 2016 - Toronto Exploring Cultures through Cuisines at the Ultimate Travel Show 2016 - Toronto
Exploring Cultures through Cuisines at the Ultimate Travel Show 2016 - Toronto Yashy Murphy
 
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonLow-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonAMD Developer Central
 
Adobe Digital Publishing Solution
Adobe Digital Publishing SolutionAdobe Digital Publishing Solution
Adobe Digital Publishing Solutionjeon jun
 
VMsoft clairview 제품소개서 (2014.03)
VMsoft clairview 제품소개서 (2014.03)VMsoft clairview 제품소개서 (2014.03)
VMsoft clairview 제품소개서 (2014.03)Daniel Park
 
내손남 Solution
내손남 Solution내손남 Solution
내손남 Solution샬라 박
 
Neoply China Intro 한중벤처인큐베이터 네오플라이차이나
Neoply China Intro 한중벤처인큐베이터 네오플라이차이나 Neoply China Intro 한중벤처인큐베이터 네오플라이차이나
Neoply China Intro 한중벤처인큐베이터 네오플라이차이나 Eliot Dongwon Shin
 
Geometry Shader-based Bump Mapping Setup
Geometry Shader-based Bump Mapping SetupGeometry Shader-based Bump Mapping Setup
Geometry Shader-based Bump Mapping SetupMark Kilgard
 
03 class service_design
03 class service_design03 class service_design
03 class service_designJY LEE
 
Presentation (Education and Welfare business PPT Template)
Presentation (Education and Welfare business PPT Template)Presentation (Education and Welfare business PPT Template)
Presentation (Education and Welfare business PPT Template)Bizforms
 

Viewers also liked (20)

SIGGRAPH Asia 2008 Modern OpenGL
SIGGRAPH Asia 2008 Modern OpenGLSIGGRAPH Asia 2008 Modern OpenGL
SIGGRAPH Asia 2008 Modern OpenGL
 
CS 354 Texture Mapping
CS 354 Texture MappingCS 354 Texture Mapping
CS 354 Texture Mapping
 
Geometry Batching Using Texture-Arrays
Geometry Batching Using Texture-ArraysGeometry Batching Using Texture-Arrays
Geometry Batching Using Texture-Arrays
 
2010-JOGL-09-Texture-Mapping
2010-JOGL-09-Texture-Mapping2010-JOGL-09-Texture-Mapping
2010-JOGL-09-Texture-Mapping
 
2010-JOGL-11-Toon-Shading
2010-JOGL-11-Toon-Shading2010-JOGL-11-Toon-Shading
2010-JOGL-11-Toon-Shading
 
Alex_Vlachos_Advanced_VR_Rendering_GDC2015
Alex_Vlachos_Advanced_VR_Rendering_GDC2015Alex_Vlachos_Advanced_VR_Rendering_GDC2015
Alex_Vlachos_Advanced_VR_Rendering_GDC2015
 
TWJournal2
TWJournal2TWJournal2
TWJournal2
 
Yoda - HTML5 Content Authoring Tool
Yoda - HTML5 Content Authoring ToolYoda - HTML5 Content Authoring Tool
Yoda - HTML5 Content Authoring Tool
 
Exploring Cultures through Cuisines at the Ultimate Travel Show 2016 - Toronto
Exploring Cultures through Cuisines at the Ultimate Travel Show 2016 - Toronto Exploring Cultures through Cuisines at the Ultimate Travel Show 2016 - Toronto
Exploring Cultures through Cuisines at the Ultimate Travel Show 2016 - Toronto
 
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonLow-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
 
Adobe Digital Publishing Solution
Adobe Digital Publishing SolutionAdobe Digital Publishing Solution
Adobe Digital Publishing Solution
 
VMsoft clairview 제품소개서 (2014.03)
VMsoft clairview 제품소개서 (2014.03)VMsoft clairview 제품소개서 (2014.03)
VMsoft clairview 제품소개서 (2014.03)
 
내손남 Solution
내손남 Solution내손남 Solution
내손남 Solution
 
Curs 1.2. Legal Open Data (28/03)
Curs 1.2. Legal Open Data (28/03)Curs 1.2. Legal Open Data (28/03)
Curs 1.2. Legal Open Data (28/03)
 
Neoply China Intro 한중벤처인큐베이터 네오플라이차이나
Neoply China Intro 한중벤처인큐베이터 네오플라이차이나 Neoply China Intro 한중벤처인큐베이터 네오플라이차이나
Neoply China Intro 한중벤처인큐베이터 네오플라이차이나
 
Geometry Shader-based Bump Mapping Setup
Geometry Shader-based Bump Mapping SetupGeometry Shader-based Bump Mapping Setup
Geometry Shader-based Bump Mapping Setup
 
Curs 1.5. Procés de Publicació de Dades
Curs 1.5. Procés de Publicació de Dades Curs 1.5. Procés de Publicació de Dades
Curs 1.5. Procés de Publicació de Dades
 
03 class service_design
03 class service_design03 class service_design
03 class service_design
 
Presentation (Education and Welfare business PPT Template)
Presentation (Education and Welfare business PPT Template)Presentation (Education and Welfare business PPT Template)
Presentation (Education and Welfare business PPT Template)
 
Agrideas manual
Agrideas manualAgrideas manual
Agrideas manual
 

Similar to Anatomy of a Texture Fetch

Texture Classification based on Gabor Wavelet
Texture Classification based on Gabor Wavelet Texture Classification based on Gabor Wavelet
Texture Classification based on Gabor Wavelet IJORCS
 
Angel cunado_The Terrain Of KUF2
Angel cunado_The Terrain Of KUF2Angel cunado_The Terrain Of KUF2
Angel cunado_The Terrain Of KUF2drandom
 
Texture mapping in_opengl
Texture mapping in_openglTexture mapping in_opengl
Texture mapping in_openglManas Nayak
 
Order Independent Transparency
Order Independent TransparencyOrder Independent Transparency
Order Independent Transparencyacbess
 
Texture By Priyanka Chauhan
Texture By Priyanka ChauhanTexture By Priyanka Chauhan
Texture By Priyanka ChauhanPriyanka Chauhan
 
The Technology behind Shadow Warrior, ZTG 2014
The Technology behind Shadow Warrior, ZTG 2014The Technology behind Shadow Warrior, ZTG 2014
The Technology behind Shadow Warrior, ZTG 2014Jarosław Pleskot
 
Rendering basics
Rendering basicsRendering basics
Rendering basicsicedmaster
 
GFX Part 4 - Introduction to Texturing in OpenGL ES
GFX Part 4 - Introduction to Texturing in OpenGL ESGFX Part 4 - Introduction to Texturing in OpenGL ES
GFX Part 4 - Introduction to Texturing in OpenGL ESPrabindh Sundareson
 
Image texture analysis techniques survey-1
Image texture analysis techniques  survey-1Image texture analysis techniques  survey-1
Image texture analysis techniques survey-1anitadixitjoshi
 
CS 354 GPU Architecture
CS 354 GPU ArchitectureCS 354 GPU Architecture
CS 354 GPU ArchitectureMark Kilgard
 
Computer Graphics Part1
Computer Graphics Part1Computer Graphics Part1
Computer Graphics Part1qpqpqp
 
Volume Rendering in Unity3D
Volume Rendering in Unity3DVolume Rendering in Unity3D
Volume Rendering in Unity3DMatias Lavik
 
Image segmentation ajal
Image segmentation ajalImage segmentation ajal
Image segmentation ajalAJAL A J
 
Next generation graphics programming on xbox 360
Next generation graphics programming on xbox 360Next generation graphics programming on xbox 360
Next generation graphics programming on xbox 360VIKAS SINGH BHADOURIA
 

Similar to Anatomy of a Texture Fetch (20)

Texture Classification based on Gabor Wavelet
Texture Classification based on Gabor Wavelet Texture Classification based on Gabor Wavelet
Texture Classification based on Gabor Wavelet
 
XNA L05–Texturing
XNA L05–TexturingXNA L05–Texturing
XNA L05–Texturing
 
Angel cunado_The Terrain Of KUF2
Angel cunado_The Terrain Of KUF2Angel cunado_The Terrain Of KUF2
Angel cunado_The Terrain Of KUF2
 
Texture mapping in_opengl
Texture mapping in_openglTexture mapping in_opengl
Texture mapping in_opengl
 
PPT s08-machine vision-s2
PPT s08-machine vision-s2PPT s08-machine vision-s2
PPT s08-machine vision-s2
 
Order Independent Transparency
Order Independent TransparencyOrder Independent Transparency
Order Independent Transparency
 
Texture By Priyanka Chauhan
Texture By Priyanka ChauhanTexture By Priyanka Chauhan
Texture By Priyanka Chauhan
 
The Technology behind Shadow Warrior, ZTG 2014
The Technology behind Shadow Warrior, ZTG 2014The Technology behind Shadow Warrior, ZTG 2014
The Technology behind Shadow Warrior, ZTG 2014
 
Rendering basics
Rendering basicsRendering basics
Rendering basics
 
GPU - how can we use it?
GPU - how can we use it?GPU - how can we use it?
GPU - how can we use it?
 
GFX Part 4 - Introduction to Texturing in OpenGL ES
GFX Part 4 - Introduction to Texturing in OpenGL ESGFX Part 4 - Introduction to Texturing in OpenGL ES
GFX Part 4 - Introduction to Texturing in OpenGL ES
 
Image texture analysis techniques survey-1
Image texture analysis techniques  survey-1Image texture analysis techniques  survey-1
Image texture analysis techniques survey-1
 
A0280105
A0280105A0280105
A0280105
 
CS 354 GPU Architecture
CS 354 GPU ArchitectureCS 354 GPU Architecture
CS 354 GPU Architecture
 
Computer Graphics Part1
Computer Graphics Part1Computer Graphics Part1
Computer Graphics Part1
 
Volume Rendering in Unity3D
Volume Rendering in Unity3DVolume Rendering in Unity3D
Volume Rendering in Unity3D
 
Beyond porting
Beyond portingBeyond porting
Beyond porting
 
Reyes
ReyesReyes
Reyes
 
Image segmentation ajal
Image segmentation ajalImage segmentation ajal
Image segmentation ajal
 
Next generation graphics programming on xbox 360
Next generation graphics programming on xbox 360Next generation graphics programming on xbox 360
Next generation graphics programming on xbox 360
 

More from 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
 
NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016Mark 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
 

More from 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
 
NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016
 
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
 

Recently uploaded

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
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
 
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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
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
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"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
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
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
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 

Recently uploaded (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
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.
 
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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
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
 
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
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"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
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
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
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
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)
 

Anatomy of a Texture Fetch

  • 1. presented for Dr. Bajaj’s graphics class University of Texas, Austin April 29, 2010 Anatomy of a Texture Fetch Mark J. Kilgard mjk@nvidia.com
  • 2. About Me Principal System Software Engineer NVIDIA Distinguished Inventor Native Texan, living in Austin But instead of UT, attended Rice (C.S. 1991) Yet I root for Texas in football (unless playing Rice) Interested in Programmable shading languages for GPUs Novel GPU-accelerated rendering paradigms OpenGL & GPU Architecture Improvements
  • 3. Our Topic: the Texture Fetch Dissected Texture Fetch All modern 3D games rely on texture-rich rendering Basis for all sorts of richness and detail More than graphics—GPU compute supports texture fetches Conceptually An image load with built-in re-sampling GeForce 480 capable of 42,000,000,000 per second! * * 700 Mhz clock × 15 Streaming Multiprocessors × 4 fetches per clock
  • 4. A Texture Fetch Simplified Fetch at Seems pretty (s,t) = (0.6, 0.25) simple… Given 1. An image 2. A position Return the color of image at position RGBA Result is 0.95,0.4,0.24,1.0)
  • 5. Texture Supplies Detail to Rendered Scenes With texture Without texture
  • 6. Textures Make Graphics Pretty Texture → detail, detail → immersion, immersion → fun Microsoft Flight Simulator X
  • 7. Shaders Combine Multiple Textures decal only  (modulate) lightmaps only = * Id Software’s Quake 2 combined scene circa 1997
  • 8. Projected Texturing for Shadow Mapping without light with position shadows shadows “what the light sees” Depth map from light’s point of view is re-used as a texture and re-projected into eye’s view to generate shadows
  • 9. Shadow Mapping Explained Planar distance from light Depth map projected onto scene ≤ = less equals than True “un-shadowed” region shown green
  • 10. Texture’s Not All Fun and Games
  • 11. What’s so hard? Filtering Poor quality results if you just return the closest color sample in the image Bilinear filtering + mipmapping needed Complications Wrap modes, formats, compression, color spaces, other dimensionalities (1D, 3D, cube maps), etc. Gotta be quick Applications desire billions of fetches per second What’s done per-fragment in the shader, must be done per-texel in the texture fetch—so 8x times as much work! Essentially a miniature, real-time re-sampling kernel
  • 12. Anatomy of a Texture Fetch Texture images Texel Texel offsets data Texture coordinate Filtered vector Texel Texel texel vector Selection Combination Combination parameters Texture parameters
  • 13. Texture Fetch Functionality (1) Texture coordinate processing Projective texturing (OpenGL 1.0) Cube map face selection (OpenGL 1.3) Texture array indexing (OpenGL 2.1) Coordinate scale: normalization (ARB_texture_rectangle) Level-of-detail (LOD) computation Log of maximum texture coordinate partial derivative (OpenGL 1.0) LOD clamping (OpenGL 1.2) LOD bias (OpenGL 1.3) Anisotropic scaling of partial derivatives (SGIX_texture_lod_bias) Wrap modes Repeat, clamp (OpenGL 1.0) Clamp to edge (OpenGL 1.2), Clamp to border (OpenGL 1.3) Mirrored repeat (OpenGL 1.4) Fully generalized clamped mirror repeat (EXT_texture_mirror_clamp) Wrap to adjacent cube map face Region clamp & mirror (PlayStation 2)
  • 14. Arrays of 2D Textures Multiple skins packed in texture array Motivation: binding to one multi-skin texture array avoids texture bind per object Texture array index 0 1 2 3 4 Mipmap level index 0 1 2 3 4
  • 15. Texture Fetch Functionality (2) Filter modes Minification / magnification transition (OpenGL 1.0) Nearest, linear, mipmap (OpenGL 1.0) 1D & 2D (OpenGL 1.0), 3D (OpenGL 1.2), 4D (SGIS_texture4D) Anisotropic (EXT_texture_filter_anisotropic) Fixed-weights: Quincunx, 3x3 Gaussian Used for multi-sample resolves Detail texture magnification (SGIS_detail_texture) Sharpen texture magnification (SGIS_sharpen_texture) 4x4 filter (SGIS_texture_filter4) Sharp-edge texture magnification (E&S Harmony) Floating-point texture filtering (ARB_texture_float, OpenGL 3.0)
  • 16. Texture Fetch Functionality (3) Texture formats Uncompressed Packing: RGBA8, RGB5A1, etc. (OpenGL 1.1) Type: unsigned, signed (NV_texture_shader) Normalized: fixed-point vs. integer (OpenGL 3.0) Compressed DXT compression formats (EXT_texture_compression_s3tc) 4:2:2 video compression (various extensions) 1- and 2-component compression (EXT_texture_compression_latc, OpenGL 3.0) Other approaches: IDCT, VQ, differential encoding, normal maps, separable decompositions Alternate encodings RGB9 with 5-bit shared exponent (EXT_texture_shared_exponent) Spherical harmonics Sum of product decompositions
  • 17. Texture Fetch Functionality (4) Pre-filtering operations Gamma correction (OpenGL 2.1) Table: sRGB / arbitrary Shadow map comparison (OpenGL 1.4) Compare functions: LEQUAL, GREATER, etc. (OpenGL 1.5) Needs “R” depth value per texel Palette lookup (EXT_paletted_texture) Thresh-holding Color key Generalized thresh-holding
  • 18. Delicate Color Fidelity with sRGB Problem: PC display devices have a legacy non-linear (sRGB) display gamut—delicate color shading looks wrong Conventional Gamma correct rendering (sRGB rendered) (uncorrected color) Softer and more natural Unnaturally Implication for texture deep facial hardware: Should perform shadows sRGB-to-linear color space convert per-texel, so 24 scalar conversions—or more—per fetch NVIDIA’s Adriana GeForce 8 Launch Demo
  • 19. Texture Fetch Functionality (5) Optimizations Level-of-detail weighting adjustments Mid-maps (extra pre-filtered levels in-between existing levels) Unconventional uses Bitmap textures for fonts with large filters (Direct3D 10) Rip-mapping Non-uniform texture border color Clip-mapping (SGIX_clipmap) Multi-texel borders Silhouette maps (Pardeep Sen’s work) Shadow mapping Sharp piecewise linear magnification
  • 20. Phased Data Flow Must hide long memory read latency between Selection and Combination phases Texture images Memory Texel Texel reads for offsets data samples Filtered texel Texture vector Texel Texel coordinate Selection Combination vector Combination parameters FIFOing of combination parameters Texture parameters
  • 21. What really happens? Let’s consider a simple tri-linear mip-mapped 2D projective texture fetch High-level language Logically just one instruction statement (Cg/HLSL) float4 color = tex2Dproj(decalSampler, st); TXP o[COLR], f[TEX3], TEX2, 2D; Logically Assembly instruction Texel selection (NV_fragment_program) Texel combination How many operations are involved?
  • 22. Medium-Level Dissection of a Texture Fetch texture images interpolated texture coords vector texel texel data offsets integer integer / coords & fixed-point filtered Convert Convert texel texel fractional texel texture weights texel integer / intermediates floating-point vector coords coords floor / coords fixed-point scaling to frac to texel and texel texel combination combination combination parameters coords offsets texture parameters
  • 23. Interpolation First we need to interpolate (s,t,r,q) This is the f[TEX3] part of the TXP instruction Projective texturing means we want (s/q, t/q) And possible r/q if shadow mapping In order to correct for perspective, hardware actually interpolates (s/w, t/w, r/w, q/w) If not projective texturing, could linearly interpolate inverse w (or 1/w) Then compute its reciprocal to get w Observe projective Since 1/(1/w) equals w texturing is same cost Then multiply (s/w,t/w,r/w,q/w) times w as perspective correction To get (s,t,r,q) If projective texturing, we can instead Compute reciprocal of q/w to get w/q Then multiple (s/w,t/w,r/w) by w/q to get (s/q, t/q, r/q)
  • 24. Interpolation Operations Ax + By + C per scalar linear interpolation 2 MADs One reciprocal to invert q/w for projective texturing Or one reciprocal to invert 1/w for perspective texturing Then 1 MUL per component for s/w * w/q Or s/w * w For (s,t) means 4 MADs, 2 MULs, & 1 RCP (s,t,r) requires 6 MADs, 3 MULs, & 1 RCP All floating-point operations
  • 25. Texture Space Mapping Have interpolated & projected coordinates Now need to determine what texels to fetch Multiple (s,t) by (width,height) of texture base level Could convert (s,t) to fixed-point first Or do math in floating-point Say based texture is 256x256 so So compute (s*256, t*256)=(u,v)
  • 26. Mipmap Level-of-detail Selection Tri-linear mip-mapping means compute appropriate mipmap level Hardware rasterizes in 2x2 pixel entities Typically called quad-pixels or just quad Finite difference with neighbors to get change in u and v with respect to window space Approximation to ∂u/∂x, ∂u/∂y, ∂v/∂x, ∂v/∂y one-pixel separation Means 4 subtractions per quad (1 per pixel) Now compute approximation to gradient length p = max(sqrt((∂u/∂x)2+(∂u/∂y)2), sqrt((∂v/∂x)2+(∂v/∂y)2))
  • 27. Level-of-detail Bias and Clamping Convert p length to power-of-two level-of-detail and apply LOD bias λ = log2(p) + lodBias Now clamp λ to valid LOD range λ’ = max(minLOD, min(maxLOD, λ))
  • 28. Determine Mipmap Levels and Level Filtering Weight Determine lower and upper mipmap levels b = floor(λ’)) is bottom mipmap level t = floor(λ’+1) is top mipmap level Determine filter weight between levels w = frac(λ’) is filter weight
  • 29. Determine Texture Sample Point Get (u,v) for selected top and bottom mipmap levels Consider a level l which could be either level t or b With (u,v) locations (ul,vl) Perform GL_CLAMP_TO_EDGE wrap modes uw = max(1/2*widthOfLevel(l), min(1-1/2*widthOfLevel(l), u)) vw = max(1/2*heightOfLevel(l), min(1-1/2*heightOfLevel(l), v)) t edge Get integer location (i,j) within each level s border (i,j) = ( floor(uw* widthOfLevel(l)), floor(vw* ) )
  • 30. Determine Texel Locations Bilinear sample needs 4 texel locations (i0,j0), (i0,j1), (i1,j0), (i1,j1) With integer texel coordinates i0 = floor(i-1/2) i1 = floor(i+1/2) j0 = floor(j-1/2) j1 = floor(j+1/2) Also compute fractional weights for bilinear filtering a = frac(i-1/2) b = frac(j-1/2)
  • 31. Determine Texel Addresses Assuming a texture level image’s base pointer, compute a texel address of each texel to fetch Assume bytesPerTexel = 4 bytes for RGBA8 texture Example addr00 = baseOfLevel(l) + bytesPerTexel*(i0+j0*widthOfLevel(l)) addr01 = baseOfLevel(l) + bytesPerTexel*(i0+j1*widthOfLevel(l)) addr10 = baseOfLevel(l) + bytesPerTexel*(i1+j0*widthOfLevel(l)) addr11 = baseOfLevel(l) + bytesPerTexel*(i1+j1*widthOfLevel(l)) More complicated address schemes are needed for good texture locality!
  • 32. Initiate Texture Reads Initiate texture memory reads at the 8 texel addresses addr00, addr01, addr10, addr11 for the upper level addr00, addr01, addr10, addr11 for the lower level Queue the weights a, b, and w Latency FIFO in hardware makes these weights available when texture reads complete
  • 33. Phased Data Flow Must hide long memory read latency between Selection and Combination phases Texture images Memory Texel Texel reads for offsets data samples Filtered texel Texture vector Texel Texel coordinate Selection Combination vector Combination parameters FIFOing of combination parameters Texture parameters
  • 34. Texel Combination When texels reads are returned, begin filtering Assume results are Top texels: t00, t01, t10, t11 Bottom texels: b00, b01, b10, b11 Per-component filtering math is tri-linear filter RGBA8 is four components result = (1-a)*(1-b)*(1-w)*b00 + (1-a)*b*(1-w)*b*b01 + a*(1-b)*(1-w)*b10 + a*b*(1-w)*b11 + (1-a)*(1-b)*w*t00 + (1-a)*b*w*t01 + a*(1-b)*w*t10 + a*b*w*t11; 24 MADs per component, or 96 for RGBA Lerp-tree could do 14 MADs per component, or 56 for RGBA
  • 35. Total Texture Fetch Operations Interpolation 6 MADs, 3 MULs, & 1 RCP (floating-point) Texel selection Texture space mapping 2 MULs (fixed-point) LOD determination (floating-point) 1 pixel difference, 2 SQRTs, 4 MULs, 1 LOG2 LOD bias and clamping (fixed-point) 1 ADD, 1 MIN, 1 MAX Assuming a fixed-point RGBA Level determination and level weighting (fixed-point) tri-linear mipmap filtered 1 FLOOR, 1 ADD, 1 FRAC projective texture fetch Texture sample point 4 MAXs, 4 MINs, 2 FLOORs (fixed-point) Texel locations and bi-linear weights 8 FLOORs, 4 FRACs, 8 ADDs (fixed-point) Addressing 16 integer MADs (integer) Texel combination 56 fixed-point MADs (fixed-point)
  • 36. Observations about the Texture Fetch Lots of ways to implement the math Lots of clever ways to be efficient Lots more texture operations not considered in this analysis Compression Anisotropic filtering sRGB Shadow mapping Arguably TEX instructions are “world’s most CISC instructions” Texture fetches are incredibly complex instructions Good deal of GPU’s superiority at graphics operations over CPUs is attributable to TEX instruction efficiency Good for compute too
  • 37. Take Away Information The GPU texture fetch is about two orders of magnitude more complex than the most complex CPU instruction And texture fetches are extremely common Dozens of billions of texture fetches are expected by modern GPU applications Not just a graphics thing Using CUDA, you can access textures from within your compute- and bandwidth-intensive parallel kernels
  • 38. GPU Technology Conference 2010 Monday, Sept. 20 - Thurs., Sept. 23, 2010 Opportunities San Jose Convention Center, San Jose, California Call for Submissions The most important event in the GPU ecosystem Sessions & posters Learn about seismic shifts in GPU computing Preview disruptive technologies and emerging applications Sponsors / Exhibitors Reach decision makers Get tools and techniques to impact mission critical projects Network with experts, colleagues, and peers across industries “CEO on Stage” Showcase for Startups “I consider the GPU Technology Conference to be the single best place to see the amazing Tell your story to VCs and work enabled by the GPU. It’s a great venue for meeting researchers, developers, scientists, and entrepreneurs from around the world.” analysts -- Professor Hanspeter Pfister, Harvard University and GTC 2009 keynote speaker