computer graphics 3 lecture 6: other hardware-based extensions benjamin mora 1 university of wales...

Post on 21-Jan-2016

215 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Computer Graphics 3Lecture 6:

Other Hardware-Based Extensions

Benjamin Mora 1University of Wales

Swansea

Dr. Benjamin Mora

Multiple Render Targets/Draw arrays

2Benjamin MoraUniversity of Wales

Swansea

• Can output several colors per pixel.

• Application : Deferred shading.

High Dynamic Range

3Benjamin MoraUniversity of Wales

Swansea

• 10, 16, 32 bits pixel color precision.

• Lighting with higher dynamic range.– Previously dealing with clamped colors.

www.tomshardware.com

Render-To-Texture

4Benjamin MoraUniversity of Wales

Swansea

• 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…

DirectX

5Benjamin MoraUniversity of Wales

Swansea

History

6Benjamin MoraUniversity of Wales

Swansea

• 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

History

7Benjamin MoraUniversity of Wales

Swansea

• 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.

Direct3D 10

8Benjamin MoraUniversity of Wales

Swansea

• DirectX 10 Introduced with Vista.– Not Available under XP.

– Virtual Memory model for graphics memory.

Picture 1: DirectX®10 (Crysis) Picture 2: DirectX®9 (Halo: Combat Evolved)

http://www.gamesforwindows.com/en-US/AboutGFW/Pages/DirectX10.aspx

Direct3D 10

9Benjamin MoraUniversity of Wales

Swansea

• Resources: – http://msdn.microsoft.com/DirectX

• Samples and tutorials.

– NVidia DirectX 10 SDK• Samples, demos, white papers, etc…

DirectX 9 VS DirectX 10

10Benjamin MoraUniversity of Wales

Swansea

Direct3D 10 Novelties

11Benjamin MoraUniversity of Wales

Swansea

• 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.

Direct3D 10 Novelties

12Benjamin MoraUniversity of Wales

Swansea

• Displacement maps:

Particles

13Benjamin MoraUniversity of Wales

Swansea

http://194.71.11.70/pub/games/PC/guru3d/generic/r6/04_CoJDX10-RealismThroughGeometryShader.jpg

Fire

14Benjamin MoraUniversity of Wales

Swansea

http://www.trustedreviews.com/graphics/review/2007/08/23/DirectX-10-the-Good-the-Bad-and-the-Pretty/p10

World In Conflict

Direct3D 10 pipeline

15Benjamin MoraUniversity of Wales

Swansea http://xtreview.com/review159.htm

Direct3D 10 shader model 4.0

16Benjamin MoraUniversity of Wales

Swansea

http://www.tomshardware.co.uk/what-direct3d-10-is-all-about-uk,review-1891-3.html

Direct3D 10

17Benjamin MoraUniversity of Wales

Swansea

• 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.

Direct3D 10

18Benjamin MoraUniversity of Wales

Swansea

• 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.

Instancing

19Benjamin MoraUniversity of Wales

Swansea

http://msdn.microsoft.com/en-us/library/bb757042.aspx

Direct3D 10. Instancing

20Benjamin MoraUniversity of Wales

Swansea

• 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/8800nvidiareviewx120/DX10%20TechBrief%20Late%20Draft%2010-23-06.pdf

Next: DirectX 10.1

21Benjamin MoraUniversity of Wales

Swansea

• WDDM 2.1.

• Lower overhead.

• Can handle massive datasets.

• Full anti-Aliasing control.

• Float32 precision required for filtering.

• More multicore oriented.

• Cubemap arrays.

Next: DirectX 10.1

22Benjamin MoraUniversity of Wales

Swansea

http://www.teamati.com/DirectX%2010_1%20White%20Paper%20v0.4.pdf

NVidia Rain Sample/White Paper

23Benjamin MoraUniversity of Wales

Swansea

Direct3D 10 PipelineDirect3D 10 Pipeline

Sub-D Modeling Animation Displacement Map

Polygon Mesh Generate LODs

25Benjamin Mora

University of Wales Swansea

Direct3D 11 PipelineDirect3D 11 Pipeline

Direct3D 10 pipeline

Plus

Three new stages for Tessellation

Plus

Compute Shader

Input Assembler

Vertex Shader

Pixel Shader

Hull Shader

Rasterizer

Output Merger

Tessellator

Domain Shader

Geometry Shader Stream Output

Compute ShaderData Structure

26Benjamin Mora

University of Wales Swansea

Direct3D 11 (Microsoft, Game Fest Conf 2008)Direct3D 11 (Microsoft, Game Fest Conf 2008)

displacementmap

Evaluate surface

includingdisplacement

domain shader

patchcontrol points

Animate/skinControlPoints

transformedcontrol points

vertex shader

Transform basis,Determine how

much to tessellate

control pointsin Bezier patch

U V {W} domain points

Single-pass process!

Sub-D Patch Bezier Patch

hull shader

Tess Factors

Tessellate!

tessellator

27Benjamin Mora

University of Wales Swansea

Direct3D 11 PipelineDirect3D 11 Pipeline

Sub-D Modeling Animation Displacement Map

Optimally Tessellated Mesh

GPU

Direct3D 11

28Benjamin MoraUniversity of Wales

Swansea

• Better Multithreading support.

• GP-GPU computing.

• Reducing function calls.

top related