SlideShare una empresa de Scribd logo
1 de 34
Eliminating Texture
Waste: Borderless Ptex
John McDonald, NVIDIA
Corporation
NVIDIA Corporation © 2013
Memory Consumption
Modern games consume a lot
of memory
The largest class of memory
usage is textures
But lots of texture is wasted!
Waste costs both memory and
increased load times
Back/Front
Gbuffer
Textures
VB/IB
Simulation
NVIDIA Corporation © 2013
Wasted?!
Two sources of texture waste:
Unmapped texture storage (major)
Duplicated texels to help
alleviate visible seams (minor)
This cannot eliminate seams.
http://www.boogotti.com/root/images/face/dffuse_texture.jpg
Waste Waste
Waste
Waste
Waste
NVIDIA Corporation © 2013
Wasted?!
Two sources of texture waste:
Unmapped texture storage (major)
Duplicated texels to help
alleviate visible seams (minor)
This cannot eliminate seams.
http://www.boogotti.com/root/images/face/dffuse_texture.jpg
NVIDIA Corporation © 2013
How much waste are we talking?
Nearly 60% of memory usage in a modern game* is texture usage
And up to 30% of that is waste.
That’s 18% of your total application footprint.
NVIDIA Corporation © 2013
Memory Waste
18% of your memory is useless.
18% of your load time is wasted.
NVIDIA Corporation © 2013
Enter Ptex (a quick recap)
The soul of Ptex:
Model with Quads instead of Triangles
You’re doing this for your next-gen engine anyways, right?
Every Quad gets its own entire texture UV-space
UV orientation is implicit in surface
definition
No explicit UV parameterization
Resolution of each face is
independent of neighbors.
NVIDIA Corporation © 2013
Ptex (cont’d)
Invented by Brent Burley at Walt Disney Animation Studios
Used in every animated film at Disney since 2007
6 features and all shorts, plus everything in
production now and for the foreseeable
future
Used on ~100% of surfaces
Rapid adoption in DCC tools
Widespread usage throughout
the film industry
NVIDIA Corporation © 2013
Ptex benefits
No UV unwraps
Allow artists to work at any resolution they want
Perform an offline pass on assets to decide what to ship for each
platform based on capabilities
Ship a texture pack later for tail revenue
Reduce your load times. And your memory footprint. Improve
your visual fidelity.
Reduce the cost of production’s long pole—art.
NVIDIA Corporation © 2013
Demo
Demo is running on a Titan.
Sorry, it’s what we have at the show. 
I’ve run on 430-680—perf scales linearly with Texture/FB.
Could run on any Dx11 capable GPU.
Could also run on Dx10 capable GPUs with small adaptations.
OpenGL 4—no vendor-specific extensions.
NVIDIA Corporation © 2013
Roadmap: Realtime Ptex v1
Load
Model
Render
Preprocess
Draw Time
Bucket
and
Sort
Generate
Mipmaps
Fill
Borders
Pack
Texture
Arrays
Reorder
Index
Buffer
Pack
Patch
Constants
Red: Vertex and Index data
Green: Patch Constant information
Blue: Texel data
Orange: Adjacency information
NVIDIA Corporation © 2013
Roadmap: Realtime Ptex v2
Load
Model
Render
Preprocess
Draw Time
Pack
Texture
Arrays
Pack
Patch
Constants
Red: Vertex and Index data
Green: Patch Constant information
Blue: Texel data
Orange: Adjacency information
NVIDIA Corporation © 2013
Realtime Ptex v2
Instead of copying texels into a border region, just go look at
them.
Use clamp to edge (border color), with a border color of (0,0,0,0)
This makes those lookups fast.
Also lets you know how close to the edge you are
We’ll need to transform our UVs into their UV space
And accumulate the results
Waste factor? 0*.
NVIDIA Corporation © 2013
Example Model
VB: …
IB:
NVIDIA Corporation © 2013
Load Model
Vertex Data
Any geometry arranged as a quad-based mesh
Example: Wavefront OBJ
Patch Texture
Power-of-two texture images
Adjacency Information
4 Neighbors of each quad patch
Easily load texture and adjacency with OSS library available from
http://ptex.us/
NVIDIA Corporation © 2013
Texture Arrays
Like 3D / Volume Textures, except:
No filtering between 2D slices
Only X and Y decrease with mipmap level (Z doesn’t)
Z indexed by integer index, not [0,1]
E.g. (0.5, 0.5, 4) would be (0.5, 0.5) from the 5th slice
API Support
Direct3D 10+: Texture2DArray
OpenGL 3.0+: GL_TEXTURE_2D_ARRAY
NVIDIA Corporation © 2013
Arrays of Texture Arrays
Both GLSL and HLSL* support arrays of TextureArrays.
This allows for stupidly powerful abuse of texturing.
Texture2DArray albedo[32]; // D3D
uniform sampler2DArray albedo[32]; // OpenGL
* HLSL support requires a little codegen—but it’s entirely a compile-time
exercise, no runtime impact.
NVIDIA Corporation © 2013
Pack Texture Arrays
One Texture2DArray per top-mipmap level
Store with complete with mipmap chain
Don’t forget to set border color to black (with 0 alpha).
NVIDIA Corporation © 2013
Packed Arrays
Texture Array (TA) 0 TA 1 TA 2
Slice 0 Slice 1 Slice 2 Slice 0 Slice 0
NVIDIA Corporation © 2013
Pack Patch Constants
Create a constant-buffer indexed by
PrimitiveID. Each entry contains:
Your Array Index and Slice in the
Texture2DArrays
Your four neighbors across the edges
Each neighbor’s UV orientation
(Again, can be prepared at baking time)
If rendering too many primitives
to fit into a constant buffer,
you can use Structured Buffers / SSBO for storage.
struct PTexParameters {
ushort usNgbrIndex[4];
ushort usNgbrXform[4];
ushort usTexIndex;
ushort usTexSlice;
};
uniform ptxDiffuseUBO {
PTexParameters ptxDiffuse[PRIMS];
};
NVIDIA Corporation © 2013
Rendering time (CPU)
Bind Texture2DArrays
(If you’re in GL, consider Bindless)
Select Shader
Setup Constants
NVIDIA Corporation © 2013
Rendering Time (DS)
In the domain shader, we need to generate our UVs.
Use SV_DomainLocation.
Exact mapping is dependent on
DCC tool used to generate
the mesh
Incorrect surface orientation
NVIDIA Corporation © 2013
Rendering Time (PS)
Conceptually, a ptex lookup is:
Sample our surface (use SV_PrimitiveID to determine our data).
For each neighbor:
Transform our UV into their UV space
Perform a lookup in that surface with transformed UVs
Accumulate the result, correct for base-level differences and return
NVIDIA Corporation © 2013
Mapping Space
There are 16 cases that
map our UV space to our
neighbors, as shown.
NVIDIA Corporation © 2013
Transforming Space
Conveniently these map
to simple 3x2 texture
transforms
NVIDIA Corporation © 2013
Bad seaming
All your base
Base level differences, wah?
When a 512x512 neighbors a 256x256, their base levels are
different.
This is an issue because samples are constant-sized in texel
(integer) space, not UV (float) space
NVIDIA Corporation © 2013
Renormalization
With unused alpha channel, code is simply:
return result / result.a;
If you need alpha, see appendix
Bad seaming Fixed!
NVIDIA Corporation © 2013
0% Waste?
Okay, not quite 0.
Need a global set of textures that match ptex resolutions used.
“Standard Candles”
But they are one-channel, and can be massively compressed (4 bits
per pixel)
<5 megs of overhead, regardless of texture footprint
For actual games, more like 1K of overhead.
Could be eliminated, but at the cost of some shader complexity.
Not needed for:
Textures without alpha
Textures used for Normal Maps
Textures less than 32 bytes per pixel
NVIDIA Corporation © 2013
A brief interlude on the expense of retrieving
texels from textured surfaces
Texture lookups by themselves are not expensive.
There are fundamentally two types of lookups:
Independent reads
Dependent reads
Independent reads can be pipelined.
The first lookup “costs” ~150 clocks
The second costs ~5 clocks.
Dependent reads must wait for previous results
The first lookup costs ~150 clocks
The second costs ~150 clocks.
Try to have no more than 2-3 “levels” of dependent reads in a single
shader
NVIDIA Corporation © 2013
Performance Impact
In this demo, Ptex costs < 30% versus no texturing at all
Costs < 20% compared to repeat texturing.
~15% versus an UV-unwrapped mesh
NVIDIA Corporation © 2013
Putting it all together
F
U
D
RL
F.(u, v) = ( 0.5, 0.5 )
R.(u, v) = ( 0.5, -0.5 )
U.(u, v) = ( 0.5, 1.5 )
L.(u, v) = ( 1.5, 0.5 )
D.(u, v) = ( 0.5, -0.5 )
In this situation, texture lookups in R, U, L and D will return the
border color (0, 0, 0, 0)
F lookup will return alpha of 1—so the weight will be exactly 1.
NVIDIA Corporation © 2013
Putting it all together
F
U
D
RL
F.(u, v) = ( 1.0, 0.5 )
R.(u, v) = ( 0.5, 0.0 )
U.(u, v) = ( 0.0, 1.5 )
L.(u, v) = ( 2.0, 0.5 )
D.(u, v) = ( 0.0, -0.5 )
In this situation, texture lookups in U, L and D will return the border color
(0, 0, 0, 0)
If R and F are the same resolution, they will each return an alpha of 0.5.
If R and F are not the same resolution, alpha will not be 1.0—renormalization
will be necessary.
NVIDIA Corporation © 2013
Questions?
jmcdonald at nvidia dot com
Demo Thanks: Johnny Costello and Timothy Lottes!
NVIDIA Corporation © 2013
In the demo
Ptex
AA
Vignetting
Lighting
Spectral Simulation (7 data points)
Volumetric Caustics (128 taps per pixel)

Más contenido relacionado

La actualidad más candente

SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3
SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3
SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3Electronic Arts / DICE
 
OpenGL 3.2 and More
OpenGL 3.2 and MoreOpenGL 3.2 and More
OpenGL 3.2 and MoreMark Kilgard
 
OpenGL NVIDIA Command-List: Approaching Zero Driver Overhead
OpenGL NVIDIA Command-List: Approaching Zero Driver OverheadOpenGL NVIDIA Command-List: Approaching Zero Driver Overhead
OpenGL NVIDIA Command-List: Approaching Zero Driver OverheadTristan Lorach
 
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
 
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...Johan Andersson
 
Dissecting the Rendering of The Surge
Dissecting the Rendering of The SurgeDissecting the Rendering of The Surge
Dissecting the Rendering of The SurgePhilip Hammer
 
Terrain in Battlefield 3: A Modern, Complete and Scalable System
Terrain in Battlefield 3: A Modern, Complete and Scalable SystemTerrain in Battlefield 3: A Modern, Complete and Scalable System
Terrain in Battlefield 3: A Modern, Complete and Scalable SystemElectronic Arts / DICE
 
Lighting Shading by John Hable
Lighting Shading by John HableLighting Shading by John Hable
Lighting Shading by John HableNaughty Dog
 
Checkerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOCCheckerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOCQLOC
 
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)Philip Hammer
 
Graphics Gems from CryENGINE 3 (Siggraph 2013)
Graphics Gems from CryENGINE 3 (Siggraph 2013)Graphics Gems from CryENGINE 3 (Siggraph 2013)
Graphics Gems from CryENGINE 3 (Siggraph 2013)Tiago Sousa
 
Secrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologySecrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologyTiago Sousa
 
Five Rendering Ideas from Battlefield 3 & Need For Speed: The Run
Five Rendering Ideas from Battlefield 3 & Need For Speed: The RunFive Rendering Ideas from Battlefield 3 & Need For Speed: The Run
Five Rendering Ideas from Battlefield 3 & Need For Speed: The RunElectronic Arts / DICE
 
Crysis Next-Gen Effects (GDC 2008)
Crysis Next-Gen Effects (GDC 2008)Crysis Next-Gen Effects (GDC 2008)
Crysis Next-Gen Effects (GDC 2008)Tiago Sousa
 
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)Johan Andersson
 
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
 
Masked Software Occlusion Culling
Masked Software Occlusion CullingMasked Software Occlusion Culling
Masked Software Occlusion CullingIntel® Software
 
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
 
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
 

La actualidad más candente (20)

SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3
SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3
SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3
 
OpenGL 3.2 and More
OpenGL 3.2 and MoreOpenGL 3.2 and More
OpenGL 3.2 and More
 
OpenGL NVIDIA Command-List: Approaching Zero Driver Overhead
OpenGL NVIDIA Command-List: Approaching Zero Driver OverheadOpenGL NVIDIA Command-List: Approaching Zero Driver Overhead
OpenGL NVIDIA Command-List: Approaching Zero Driver Overhead
 
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
 
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...
 
Dissecting the Rendering of The Surge
Dissecting the Rendering of The SurgeDissecting the Rendering of The Surge
Dissecting the Rendering of The Surge
 
Terrain in Battlefield 3: A Modern, Complete and Scalable System
Terrain in Battlefield 3: A Modern, Complete and Scalable SystemTerrain in Battlefield 3: A Modern, Complete and Scalable System
Terrain in Battlefield 3: A Modern, Complete and Scalable System
 
Lighting Shading by John Hable
Lighting Shading by John HableLighting Shading by John Hable
Lighting Shading by John Hable
 
Checkerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOCCheckerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOC
 
Shiny PC Graphics in Battlefield 3
Shiny PC Graphics in Battlefield 3Shiny PC Graphics in Battlefield 3
Shiny PC Graphics in Battlefield 3
 
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
 
Graphics Gems from CryENGINE 3 (Siggraph 2013)
Graphics Gems from CryENGINE 3 (Siggraph 2013)Graphics Gems from CryENGINE 3 (Siggraph 2013)
Graphics Gems from CryENGINE 3 (Siggraph 2013)
 
Secrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologySecrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics Technology
 
Five Rendering Ideas from Battlefield 3 & Need For Speed: The Run
Five Rendering Ideas from Battlefield 3 & Need For Speed: The RunFive Rendering Ideas from Battlefield 3 & Need For Speed: The Run
Five Rendering Ideas from Battlefield 3 & Need For Speed: The Run
 
Crysis Next-Gen Effects (GDC 2008)
Crysis Next-Gen Effects (GDC 2008)Crysis Next-Gen Effects (GDC 2008)
Crysis Next-Gen Effects (GDC 2008)
 
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
 
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
 
Masked Software Occlusion Culling
Masked Software Occlusion CullingMasked Software Occlusion Culling
Masked Software Occlusion Culling
 
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...
 
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
 

Similar a Borderless Per Face Texture Mapping

CS 354 Programmable Shading
CS 354 Programmable ShadingCS 354 Programmable Shading
CS 354 Programmable ShadingMark Kilgard
 
Your Game Needs Direct3D 11, So Get Started Now!
Your Game Needs Direct3D 11, So Get Started Now!Your Game Needs Direct3D 11, So Get Started Now!
Your Game Needs Direct3D 11, So Get Started Now!Johan Andersson
 
The Rendering Pipeline - Challenges & Next Steps
The Rendering Pipeline - Challenges & Next StepsThe Rendering Pipeline - Challenges & Next Steps
The Rendering Pipeline - Challenges & Next StepsJohan Andersson
 
Gdc 14 bringing unreal engine 4 to open_gl
Gdc 14 bringing unreal engine 4 to open_glGdc 14 bringing unreal engine 4 to open_gl
Gdc 14 bringing unreal engine 4 to open_glchangehee lee
 
Gpu presentation
Gpu presentationGpu presentation
Gpu presentationspartasoft
 
Deferred rendering in_leadwerks_engine[1]
Deferred rendering in_leadwerks_engine[1]Deferred rendering in_leadwerks_engine[1]
Deferred rendering in_leadwerks_engine[1]ozlael ozlael
 
Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Li...
Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Li...Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Li...
Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Li...Ontico
 
NVIDIA's OpenGL Functionality
NVIDIA's OpenGL FunctionalityNVIDIA's OpenGL Functionality
NVIDIA's OpenGL FunctionalityMark Kilgard
 
FlameWorks GTC 2014
FlameWorks GTC 2014FlameWorks GTC 2014
FlameWorks GTC 2014Simon Green
 
Improving Shadows and Reflections via the Stencil Buffer
Improving Shadows and Reflections via the Stencil BufferImproving Shadows and Reflections via the Stencil Buffer
Improving Shadows and Reflections via the Stencil BufferMark Kilgard
 
Hardware Shaders
Hardware ShadersHardware Shaders
Hardware Shadersgueste52f1b
 
Scalability for All: Unreal Engine* 4 with Intel
Scalability for All: Unreal Engine* 4 with Intel Scalability for All: Unreal Engine* 4 with Intel
Scalability for All: Unreal Engine* 4 with Intel Intel® Software
 
Open GL ES Android
Open GL ES AndroidOpen GL ES Android
Open GL ES AndroidMindos Cheng
 
Jeff Johnson, Research Engineer, Facebook at MLconf NYC
Jeff Johnson, Research Engineer, Facebook at MLconf NYCJeff Johnson, Research Engineer, Facebook at MLconf NYC
Jeff Johnson, Research Engineer, Facebook at MLconf NYCMLconf
 
Pixel shaders based UI components + writing your first pixel shader
Pixel shaders based UI components + writing your first pixel shaderPixel shaders based UI components + writing your first pixel shader
Pixel shaders based UI components + writing your first pixel shaderDenis Radin
 
thu-blake-gdc-2014-final
thu-blake-gdc-2014-finalthu-blake-gdc-2014-final
thu-blake-gdc-2014-finalRobert Taylor
 
GFX Part 7 - Introduction to Rendering Targets in OpenGL ES
GFX Part 7 - Introduction to Rendering Targets in OpenGL ESGFX Part 7 - Introduction to Rendering Targets in OpenGL ES
GFX Part 7 - Introduction to Rendering Targets in OpenGL ESPrabindh Sundareson
 

Similar a Borderless Per Face Texture Mapping (20)

CS 354 Programmable Shading
CS 354 Programmable ShadingCS 354 Programmable Shading
CS 354 Programmable Shading
 
Your Game Needs Direct3D 11, So Get Started Now!
Your Game Needs Direct3D 11, So Get Started Now!Your Game Needs Direct3D 11, So Get Started Now!
Your Game Needs Direct3D 11, So Get Started Now!
 
The Rendering Pipeline - Challenges & Next Steps
The Rendering Pipeline - Challenges & Next StepsThe Rendering Pipeline - Challenges & Next Steps
The Rendering Pipeline - Challenges & Next Steps
 
Beyond porting
Beyond portingBeyond porting
Beyond porting
 
Gdc 14 bringing unreal engine 4 to open_gl
Gdc 14 bringing unreal engine 4 to open_glGdc 14 bringing unreal engine 4 to open_gl
Gdc 14 bringing unreal engine 4 to open_gl
 
OpenGL 4 for 2010
OpenGL 4 for 2010OpenGL 4 for 2010
OpenGL 4 for 2010
 
Gpu presentation
Gpu presentationGpu presentation
Gpu presentation
 
Deferred rendering in_leadwerks_engine[1]
Deferred rendering in_leadwerks_engine[1]Deferred rendering in_leadwerks_engine[1]
Deferred rendering in_leadwerks_engine[1]
 
Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Li...
Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Li...Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Li...
Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Li...
 
NVIDIA's OpenGL Functionality
NVIDIA's OpenGL FunctionalityNVIDIA's OpenGL Functionality
NVIDIA's OpenGL Functionality
 
FlameWorks GTC 2014
FlameWorks GTC 2014FlameWorks GTC 2014
FlameWorks GTC 2014
 
Improving Shadows and Reflections via the Stencil Buffer
Improving Shadows and Reflections via the Stencil BufferImproving Shadows and Reflections via the Stencil Buffer
Improving Shadows and Reflections via the Stencil Buffer
 
Hardware Shaders
Hardware ShadersHardware Shaders
Hardware Shaders
 
Scalability for All: Unreal Engine* 4 with Intel
Scalability for All: Unreal Engine* 4 with Intel Scalability for All: Unreal Engine* 4 with Intel
Scalability for All: Unreal Engine* 4 with Intel
 
Open GL ES Android
Open GL ES AndroidOpen GL ES Android
Open GL ES Android
 
Jeff Johnson, Research Engineer, Facebook at MLconf NYC
Jeff Johnson, Research Engineer, Facebook at MLconf NYCJeff Johnson, Research Engineer, Facebook at MLconf NYC
Jeff Johnson, Research Engineer, Facebook at MLconf NYC
 
Haskell Accelerate
Haskell  AccelerateHaskell  Accelerate
Haskell Accelerate
 
Pixel shaders based UI components + writing your first pixel shader
Pixel shaders based UI components + writing your first pixel shaderPixel shaders based UI components + writing your first pixel shader
Pixel shaders based UI components + writing your first pixel shader
 
thu-blake-gdc-2014-final
thu-blake-gdc-2014-finalthu-blake-gdc-2014-final
thu-blake-gdc-2014-final
 
GFX Part 7 - Introduction to Rendering Targets in OpenGL ES
GFX Part 7 - Introduction to Rendering Targets in OpenGL ESGFX Part 7 - Introduction to Rendering Targets in OpenGL ES
GFX Part 7 - Introduction to Rendering Targets in OpenGL ES
 

Más de basisspace

Avoiding Catastrophic Performance Loss
Avoiding Catastrophic Performance LossAvoiding Catastrophic Performance Loss
Avoiding Catastrophic Performance Lossbasisspace
 
Porting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons LearnedPorting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons Learnedbasisspace
 
Efficient Buffer Management
Efficient Buffer ManagementEfficient Buffer Management
Efficient Buffer Managementbasisspace
 
The nitty gritty of game development
The nitty gritty of game developmentThe nitty gritty of game development
The nitty gritty of game developmentbasisspace
 
Realtime Per Face Texture Mapping (PTEX)
Realtime Per Face Texture Mapping (PTEX)Realtime Per Face Texture Mapping (PTEX)
Realtime Per Face Texture Mapping (PTEX)basisspace
 
Tessellation on any_budget-gdc2011
Tessellation on any_budget-gdc2011Tessellation on any_budget-gdc2011
Tessellation on any_budget-gdc2011basisspace
 

Más de basisspace (6)

Avoiding Catastrophic Performance Loss
Avoiding Catastrophic Performance LossAvoiding Catastrophic Performance Loss
Avoiding Catastrophic Performance Loss
 
Porting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons LearnedPorting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons Learned
 
Efficient Buffer Management
Efficient Buffer ManagementEfficient Buffer Management
Efficient Buffer Management
 
The nitty gritty of game development
The nitty gritty of game developmentThe nitty gritty of game development
The nitty gritty of game development
 
Realtime Per Face Texture Mapping (PTEX)
Realtime Per Face Texture Mapping (PTEX)Realtime Per Face Texture Mapping (PTEX)
Realtime Per Face Texture Mapping (PTEX)
 
Tessellation on any_budget-gdc2011
Tessellation on any_budget-gdc2011Tessellation on any_budget-gdc2011
Tessellation on any_budget-gdc2011
 

Último

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 

Último (20)

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 

Borderless Per Face Texture Mapping

  • 1. Eliminating Texture Waste: Borderless Ptex John McDonald, NVIDIA Corporation
  • 2. NVIDIA Corporation © 2013 Memory Consumption Modern games consume a lot of memory The largest class of memory usage is textures But lots of texture is wasted! Waste costs both memory and increased load times Back/Front Gbuffer Textures VB/IB Simulation
  • 3. NVIDIA Corporation © 2013 Wasted?! Two sources of texture waste: Unmapped texture storage (major) Duplicated texels to help alleviate visible seams (minor) This cannot eliminate seams. http://www.boogotti.com/root/images/face/dffuse_texture.jpg Waste Waste Waste Waste Waste
  • 4. NVIDIA Corporation © 2013 Wasted?! Two sources of texture waste: Unmapped texture storage (major) Duplicated texels to help alleviate visible seams (minor) This cannot eliminate seams. http://www.boogotti.com/root/images/face/dffuse_texture.jpg
  • 5. NVIDIA Corporation © 2013 How much waste are we talking? Nearly 60% of memory usage in a modern game* is texture usage And up to 30% of that is waste. That’s 18% of your total application footprint.
  • 6. NVIDIA Corporation © 2013 Memory Waste 18% of your memory is useless. 18% of your load time is wasted.
  • 7. NVIDIA Corporation © 2013 Enter Ptex (a quick recap) The soul of Ptex: Model with Quads instead of Triangles You’re doing this for your next-gen engine anyways, right? Every Quad gets its own entire texture UV-space UV orientation is implicit in surface definition No explicit UV parameterization Resolution of each face is independent of neighbors.
  • 8. NVIDIA Corporation © 2013 Ptex (cont’d) Invented by Brent Burley at Walt Disney Animation Studios Used in every animated film at Disney since 2007 6 features and all shorts, plus everything in production now and for the foreseeable future Used on ~100% of surfaces Rapid adoption in DCC tools Widespread usage throughout the film industry
  • 9. NVIDIA Corporation © 2013 Ptex benefits No UV unwraps Allow artists to work at any resolution they want Perform an offline pass on assets to decide what to ship for each platform based on capabilities Ship a texture pack later for tail revenue Reduce your load times. And your memory footprint. Improve your visual fidelity. Reduce the cost of production’s long pole—art.
  • 10. NVIDIA Corporation © 2013 Demo Demo is running on a Titan. Sorry, it’s what we have at the show.  I’ve run on 430-680—perf scales linearly with Texture/FB. Could run on any Dx11 capable GPU. Could also run on Dx10 capable GPUs with small adaptations. OpenGL 4—no vendor-specific extensions.
  • 11. NVIDIA Corporation © 2013 Roadmap: Realtime Ptex v1 Load Model Render Preprocess Draw Time Bucket and Sort Generate Mipmaps Fill Borders Pack Texture Arrays Reorder Index Buffer Pack Patch Constants Red: Vertex and Index data Green: Patch Constant information Blue: Texel data Orange: Adjacency information
  • 12. NVIDIA Corporation © 2013 Roadmap: Realtime Ptex v2 Load Model Render Preprocess Draw Time Pack Texture Arrays Pack Patch Constants Red: Vertex and Index data Green: Patch Constant information Blue: Texel data Orange: Adjacency information
  • 13. NVIDIA Corporation © 2013 Realtime Ptex v2 Instead of copying texels into a border region, just go look at them. Use clamp to edge (border color), with a border color of (0,0,0,0) This makes those lookups fast. Also lets you know how close to the edge you are We’ll need to transform our UVs into their UV space And accumulate the results Waste factor? 0*.
  • 14. NVIDIA Corporation © 2013 Example Model VB: … IB:
  • 15. NVIDIA Corporation © 2013 Load Model Vertex Data Any geometry arranged as a quad-based mesh Example: Wavefront OBJ Patch Texture Power-of-two texture images Adjacency Information 4 Neighbors of each quad patch Easily load texture and adjacency with OSS library available from http://ptex.us/
  • 16. NVIDIA Corporation © 2013 Texture Arrays Like 3D / Volume Textures, except: No filtering between 2D slices Only X and Y decrease with mipmap level (Z doesn’t) Z indexed by integer index, not [0,1] E.g. (0.5, 0.5, 4) would be (0.5, 0.5) from the 5th slice API Support Direct3D 10+: Texture2DArray OpenGL 3.0+: GL_TEXTURE_2D_ARRAY
  • 17. NVIDIA Corporation © 2013 Arrays of Texture Arrays Both GLSL and HLSL* support arrays of TextureArrays. This allows for stupidly powerful abuse of texturing. Texture2DArray albedo[32]; // D3D uniform sampler2DArray albedo[32]; // OpenGL * HLSL support requires a little codegen—but it’s entirely a compile-time exercise, no runtime impact.
  • 18. NVIDIA Corporation © 2013 Pack Texture Arrays One Texture2DArray per top-mipmap level Store with complete with mipmap chain Don’t forget to set border color to black (with 0 alpha).
  • 19. NVIDIA Corporation © 2013 Packed Arrays Texture Array (TA) 0 TA 1 TA 2 Slice 0 Slice 1 Slice 2 Slice 0 Slice 0
  • 20. NVIDIA Corporation © 2013 Pack Patch Constants Create a constant-buffer indexed by PrimitiveID. Each entry contains: Your Array Index and Slice in the Texture2DArrays Your four neighbors across the edges Each neighbor’s UV orientation (Again, can be prepared at baking time) If rendering too many primitives to fit into a constant buffer, you can use Structured Buffers / SSBO for storage. struct PTexParameters { ushort usNgbrIndex[4]; ushort usNgbrXform[4]; ushort usTexIndex; ushort usTexSlice; }; uniform ptxDiffuseUBO { PTexParameters ptxDiffuse[PRIMS]; };
  • 21. NVIDIA Corporation © 2013 Rendering time (CPU) Bind Texture2DArrays (If you’re in GL, consider Bindless) Select Shader Setup Constants
  • 22. NVIDIA Corporation © 2013 Rendering Time (DS) In the domain shader, we need to generate our UVs. Use SV_DomainLocation. Exact mapping is dependent on DCC tool used to generate the mesh Incorrect surface orientation
  • 23. NVIDIA Corporation © 2013 Rendering Time (PS) Conceptually, a ptex lookup is: Sample our surface (use SV_PrimitiveID to determine our data). For each neighbor: Transform our UV into their UV space Perform a lookup in that surface with transformed UVs Accumulate the result, correct for base-level differences and return
  • 24. NVIDIA Corporation © 2013 Mapping Space There are 16 cases that map our UV space to our neighbors, as shown.
  • 25. NVIDIA Corporation © 2013 Transforming Space Conveniently these map to simple 3x2 texture transforms
  • 26. NVIDIA Corporation © 2013 Bad seaming All your base Base level differences, wah? When a 512x512 neighbors a 256x256, their base levels are different. This is an issue because samples are constant-sized in texel (integer) space, not UV (float) space
  • 27. NVIDIA Corporation © 2013 Renormalization With unused alpha channel, code is simply: return result / result.a; If you need alpha, see appendix Bad seaming Fixed!
  • 28. NVIDIA Corporation © 2013 0% Waste? Okay, not quite 0. Need a global set of textures that match ptex resolutions used. “Standard Candles” But they are one-channel, and can be massively compressed (4 bits per pixel) <5 megs of overhead, regardless of texture footprint For actual games, more like 1K of overhead. Could be eliminated, but at the cost of some shader complexity. Not needed for: Textures without alpha Textures used for Normal Maps Textures less than 32 bytes per pixel
  • 29. NVIDIA Corporation © 2013 A brief interlude on the expense of retrieving texels from textured surfaces Texture lookups by themselves are not expensive. There are fundamentally two types of lookups: Independent reads Dependent reads Independent reads can be pipelined. The first lookup “costs” ~150 clocks The second costs ~5 clocks. Dependent reads must wait for previous results The first lookup costs ~150 clocks The second costs ~150 clocks. Try to have no more than 2-3 “levels” of dependent reads in a single shader
  • 30. NVIDIA Corporation © 2013 Performance Impact In this demo, Ptex costs < 30% versus no texturing at all Costs < 20% compared to repeat texturing. ~15% versus an UV-unwrapped mesh
  • 31. NVIDIA Corporation © 2013 Putting it all together F U D RL F.(u, v) = ( 0.5, 0.5 ) R.(u, v) = ( 0.5, -0.5 ) U.(u, v) = ( 0.5, 1.5 ) L.(u, v) = ( 1.5, 0.5 ) D.(u, v) = ( 0.5, -0.5 ) In this situation, texture lookups in R, U, L and D will return the border color (0, 0, 0, 0) F lookup will return alpha of 1—so the weight will be exactly 1.
  • 32. NVIDIA Corporation © 2013 Putting it all together F U D RL F.(u, v) = ( 1.0, 0.5 ) R.(u, v) = ( 0.5, 0.0 ) U.(u, v) = ( 0.0, 1.5 ) L.(u, v) = ( 2.0, 0.5 ) D.(u, v) = ( 0.0, -0.5 ) In this situation, texture lookups in U, L and D will return the border color (0, 0, 0, 0) If R and F are the same resolution, they will each return an alpha of 0.5. If R and F are not the same resolution, alpha will not be 1.0—renormalization will be necessary.
  • 33. NVIDIA Corporation © 2013 Questions? jmcdonald at nvidia dot com Demo Thanks: Johnny Costello and Timothy Lottes!
  • 34. NVIDIA Corporation © 2013 In the demo Ptex AA Vignetting Lighting Spectral Simulation (7 data points) Volumetric Caustics (128 taps per pixel)

Notas del editor

  1. * Based on a survey of memory usage from 5 currently shipping AAA titles.
  2. Used Border TexelsCons:Load time preparationBorder depended on maximum anisoChanging texture quality required restart (redo expensive border prep)High levels of texture waste for game-resolution assets when high aniso used
  3. Each texture already has complete mipmap chain
  4. Introduced in Direct3D 10
  5. gl_PrimitiveID
  6. Standard Model rendering stuff
  7. Explain bottom-&gt;bottom.
  8. Derive bottom-&gt;bottom again
  9. Go through 4x4 adjoinging 16x16 image
  10. Note that cost here is really just an increase in latency, which itself is only significant if latency is what’s preventing you from running faster. TLDR; Profile, Profile, Profile.
  11. Completelyunoptimized