Title: Computer Graphics 3 Lecture 6: Other Hardware-Based Extensions
1Computer Graphics 3Lecture 6Other
Hardware-Based Extensions
Dr. Benjamin Mora
University of Wales Swansea
1
Benjamin Mora
2Multiple Render Targets/Draw arrays
- Can output several colors per pixel.
- Application Deferred shading.
University of Wales Swansea
2
Benjamin Mora
3High Dynamic Range
- 10, 16, 32 bits pixel color precision.
- Lighting with higher dynamic range.
- Previously dealing with clamped colors.
University of Wales Swansea
www.tomshardware.com
3
Benjamin Mora
4Render-To-Texture
- For Multi-pass renderings.
- Different extensions.
- Allows mapping the current frame buffer directly
into a texture. - Previous approach needed a copy into main memory.
- Application Mirroring, shadow mapping, etc
University of Wales Swansea
4
Benjamin Mora
5DirectX
University of Wales Swansea
5
Benjamin Mora
6History
- Introduced in 1995 with Windows95.
- With DOS, the programmer had to take into
consideration the different devices in his code. - Standardization of the APIs.
- Different parts
- Direct show, DirectInput, DirectPlay,
DirectSound, DirectMusic, Direct3D - Direct3D quickly competed with OpenGL.
- Fast evolutions.
- Fahrenheit (Merging GL and D3D) in 1998 was a
failure
University of Wales Swansea
6
Benjamin Mora
7History
- Communications with hardware are made through
device drivers. - The OS maker creates the driver specifications
(or API) for the different devices supported. - The hardware manufacturer implements the drivers
(respecting the specs). - The lambda programmer uses the API functions to
get access to the hardware functionalities. - As such, the OS maker can give a trend to the
technology. - 8 major releases between 1995-2002. 2 major
releases between 2003-2007.
University of Wales Swansea
7
Benjamin Mora
8Direct3D 10
- DirectX 10 Introduced with Vista.
- Not Available under XP.
- Virtual Memory model for graphics memory.
Picture 1 DirectX10 (Crysis)
Picture 2 DirectX9 (Halo Combat Evolved)
http//www.gamesforwindows.com/en-US/AboutGFW/Page
s/DirectX10.aspx
University of Wales Swansea
8
Benjamin Mora
9Direct3D 10
- Resources
- http//msdn.microsoft.com/DirectX
- Samples and tutorials.
- NVidia DirectX 10 SDK
- Samples, demos, white papers, etc
University of Wales Swansea
9
Benjamin Mora
10DirectX 9 VS DirectX 10
University of Wales Swansea
10
Benjamin Mora
11Direct3D 10 Novelties
- New driver model.
- More hardware consistency.
- More effort is to be made by manufacturers.
- Better for developers.
- Geometry shaders.
- Big thing.
- The 3D programmers have been waiting for such a
thing for a long time. - (Limited) Animations.
- Displacement maps.
- Particle effects, fur, water,
- Surface subdivision algorithms, Marching cubes,
etc - Shadow volumes.
University of Wales Swansea
11
Benjamin Mora
12Direct3D 10 Novelties
University of Wales Swansea
12
Benjamin Mora
13Particles
http//194.71.11.70/pub/games/PC/guru3d/generic/r6
/04_CoJDX10-RealismThroughGeometryShader.jpg
University of Wales Swansea
13
Benjamin Mora
14Fire
World In Conflict
http//www.trustedreviews.com/graphics/review/2007
/08/23/DirectX-10-the-Good-the-Bad-and-the-Pretty/
p10
University of Wales Swansea
14
Benjamin Mora
15Direct3D 10 pipeline
University of Wales Swansea
http//xtreview.com/review159.htm
15
Benjamin Mora
16Direct3D 10 shader model 4.0
http//www.tomshardware.co.uk/what-direct3d-10-is-
all-about-uk,review-1891-3.html
University of Wales Swansea
16
Benjamin Mora
17Direct3D 10
- Resource validation done once per application
instead of once per rendered image. - A lot of stuff oriented toward reducing CPU
usage communications. - Unified shaders.
- Constant buffers.
- 16x4096 from a minimum of 256
- Updated in one function call.
- Texture arrays.
- Texture atlas were used before
- Up to 81922 texture size.
- HLSL 10
- Integer and bitwise instructions.
- Switch statement.
University of Wales Swansea
17
Benjamin Mora
18Direct3D 10
- Predicated draws.
- Entirely on GPU
- Equivalent to occlusion queries but does not
require the CPU here. - Stream out.
- Geometry redirected to a buffer after geometry
shaders. - No pixel shaders.
- Official Shadow map filtering.
- Single pass Render-to-cube-map.
- Render-to-Volume.
University of Wales Swansea
18
Benjamin Mora
19Instancing
http//msdn.microsoft.com/en-us/library/bb757042.a
spx
University of Wales Swansea
19
Benjamin Mora
20Direct3D 10. Instancing
- Done with only a few calls.
- Take advantage of features like
- Texture arrays (e.g, displacement maps).
- Constant buffers.
- HLSL 10 Switch statement.
http//www.driverheaven.net/reviews/8800nvidiarevi
ewx120/DX1020TechBrief20Late20Draft2010-23-06.
pdf
University of Wales Swansea
20
Benjamin Mora
21Next DirectX 10.1
- WDDM 2.1.
- Lower overhead.
- Can handle massive datasets.
- Full anti-Aliasing control.
- Float32 precision required for filtering.
- More multicore oriented.
- Cubemap arrays.
University of Wales Swansea
21
Benjamin Mora
22Next DirectX 10.1
http//www.teamati.com/DirectX2010_120White20Pa
per20v0.4.pdf
University of Wales Swansea
22
Benjamin Mora
23NVidia Rain Sample/White Paper
University of Wales Swansea
23
Benjamin Mora
24Direct3D 10 Pipeline
Sub-D Modeling
Animation
Displacement Map
Polygon Mesh
Generate LODs
25Direct3D 11 Pipeline
Input Assembler
Direct3D 10 pipeline Plus Three new stages for
Tessellation Plus Compute Shader
Vertex Shader
Hull Shader
Tessellator
Domain Shader
Stream Output
Geometry Shader
Rasterizer
Compute Shader
Data Structure
Pixel Shader
Output Merger
University of Wales Swansea
25
Benjamin Mora
26Direct3D 11 (Microsoft, Game Fest Conf 2008)
Single-pass process!
domain shader
hull shader
tessellator
vertex shader
Evaluate surface including displacement
Tessellate!
Animate/skin Control Points
Transform basis, Determine how much to tessellate
Tess Factors
U V W domain points
transformed control points
control points in Bezier patch
patch control points
displacement map
University of Wales Swansea
26
Benjamin Mora
27Direct3D 11 Pipeline
Sub-D Modeling
Animation
Displacement Map
Optimally Tessellated Mesh
GPU
University of Wales Swansea
27
Benjamin Mora
28Direct3D 11
- Better Multithreading support.
- GP-GPU computing.
- Reducing function calls.
University of Wales Swansea
28
Benjamin Mora