Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Graphics Rendering Pipeline 3D SCENE Collection of 3D primitives IMAGE Array of pixels Primitives: Basic geometric structures (points, lines, triangles,

Similar presentations


Presentation on theme: "The Graphics Rendering Pipeline 3D SCENE Collection of 3D primitives IMAGE Array of pixels Primitives: Basic geometric structures (points, lines, triangles,"— Presentation transcript:

1 The Graphics Rendering Pipeline 3D SCENE Collection of 3D primitives IMAGE Array of pixels Primitives: Basic geometric structures (points, lines, triangles, polygons)

2 3D Primitives 2D Primitives PixelsGeometry Stage Rasterization Stage Vertex ProcessingPixel (Fragment) Processing Coordinate Transformation Lighting Calculation Primitive Rasterization Vertex Attribute Interpolation Texture Mapping Raster Operation (ROP) Scissor Test Alpha Test Stencil Test Depth (Z) Test Color Blending

3 Video Memory Computer Graphics Hardware CPU System Memory Frame Buffer Video Controller Video Display Device Graphics Controller Primitive Data Texture Data Motherboard Graphics Card Bus (PCI, AGP, PCI Express) Graphics Hardware Architecture

4 The frame buffer: Video memory that holds screen pixel values. Resolution: Number of horizontal and vertical pixels on the screen. The Frame Buffer 0 0 h-1h-1 w-1w-1 (x, y) x y Pixel value Color value Depth (Z) value Stencil value Frame Buffer Stencil Buffer Color Buffer Depth (Z) buffer

5 Double buffer Front stage and back stage swapping for animation. color buffer 1 color buffer 2 Front stage pointer Back stage pointer color buffer 1 color buffer 2 Front stage pointer Back stage pointer Two color buffers. Front stage for display. Back stage for drawing. Triple buffer Three color buffers. One front stage and two back stages.

6 Evolution of Graphics Controller Pre 1995: 2D era 1995-1998: First generation of 3D accelerators 1999-2000: GPU (Graphics Processing Unit) 2001: Vertex Shader 2002: Pixel Shader 2006: Geometric Shader Shader Unit: Part of graphics hardware that can be programmed Shader Program: Programs that run on shader units Vertex shader controls vertex processing Pixel shader controls pixel processing Geometric shader generates new geometries

7 Graphics Controller Rasterization Stage 1995-1998: First generation of 3D accelerators CPU System Memory Graphics Application Geometry Stage 2D Primitives Textures Rasterizer Texture Unit Video Memory ROP Unit 2D Primitives Textures Frame Buffer Bus (PCI)

8 Products: 3dfx: Voodoo, Voodoo 2, Voodoo 3, Voodoo 5 NVidia: Riva 128, Riva TNT, Riva TNT 2 ATI: Rage 128 Matrox: Mystique Rendition: Verite S3: Savage Features: Primitive rasterization Texture mapping Hardware Z-buffer

9 1999-2000: GPU (Graphics Processing Unit) GPU Rasterization Stage CPU System Memory Graphics Application 3D Primitives Textures Rasterizer Multi Texture Unit Video Memory ROP Unit 3D Primitives Textures Frame Buffer Bus (AGP) Texture Combiner Geometry Stage Transformation And Lighting Unit

10 Representative products: NVidia: Geforce 256, Geforce 2 ATI: Radeon 7500 Features: Hardware transformation and lighting (TnL) Superscalar structure (Multiple vertex and pixel processing units working in parallel) Hardware Z-buffer and Stencil-buffer The demise of 3dfx (2000) and lessons to be learned: http://www.firingsquad.com/hardware/3dfxdemise/

11 2001: Vertex Shader GPU Rasterization Stage CPU System Memory Graphics Application 3D Primitives Textures Rasterizer Multi Texture Unit Video Memory ROP Unit 3D Primitives Textures Frame Buffer Bus (AGP) Texture Combiner Geometry Stage Vertex Shader Unit

12 2002: Pixel Shader GPU Rasterization Stage CPU System Memory Graphics Application 3D Primitives Textures Rasterizer Multi Texture Unit Video Memory ROP Unit 3D Primitives Textures Frame Buffer Bus (AGP, PCIe) Pixel Shader Unit Geometry Stage Vertex Shader Unit

13 Pixel Shader Unit Vertex Shader Unit Geometric Shader Unit Shader Model NVidia ProductsCodeYear 1.xGeforce 3NV202001 Geforce 4NV252002 2.0Geforce FXNV302002 3.0Geforce 6NV402004 Geforce 7G702005 4.0Geforce 8G802006 Geometric shader was added in Shader Model 4.0 Shader Model ATI ProductsCodeYear 1.xRadeon 8500~9250R2002001 2.0Radeon 9500, 9700, X300, X550, X600 R3002002 Radeon 9800, X700, X800, X850 R4202004 3.0Radeon X1300, X1600, X1650, X1800 R5202005 4.0Radeon HD 2400, HD 2600, HD 2900 R6002007

14 CPU Graphics Application Graphics API Computer Graphics Software GPU Pixel Shader Unit Vertex Shader Unit Graphics Device Driver Vertex Program Pixel Program Bus Graphics Software Architecture Geometric Shader Unit Geometric Program

15 Graphics Applications 3D modeling software (3D Studio, Maya, etc.) CAD software (Solidedge, Solidworks, Pro/E, etc.) Medical and business visualization software Computer games Graphics API API: Application Programming Interface Low level API OpenGL Direct3D High level API Open Inventor VRML Java3D

16 Vertex and Pixel Program (Shader) Assembly Language HLSL (High Level Shading Language) Cg (C for Graphics) DirectX HLSL GLSL (OpenGL Shading Language)

17 Introduction to OpenGL OpenGL (Open Graphics Library) : API for 3D graphics rendering. Originally developed on SGI graphics workstation. Became an open standard in 1992. Limitations: No input functions. No text rendering functions. No window management functions. Features: Open standard. Hardware independent. Cross-platform (Unix, Mac OS, Linux, Microsoft Windows). Cross-language (Bindings for C, C++, Fortran, Ada, Java) Extensible through OpenGL extension mechanism

18 OpenGL versions 1.1 (July 1, 1992) Adds texture objects, texture and subtexture copying, vertex array. 1.2 (March 16, 1998) Adds 3D texture, separate specular color, imaging subsets. 1.3 (August 14, 2001) Adds compressed texture, cube map texture, multitexture, texture combiner function, multisample antialiasing. 1.4 (July 24, 2002) Adds depth texture and shadows, Fog coordinates, Point parameters. 1.5 (July 29, 2003) Adds buffer objects. 2.0 (September 7, 2004) Adds OpenGL shading language, multiple render targets, non-power-of- two texture, point sprites, two-sided stencil operation.

19 Useful websites: www.opengl.org nehe.gamedev.net www.gamedev.net www.nvidia.com www.ati.com www.anandtech.com www.tomshardware.com 3DLabs Apple ATI Dell IBM Intel Nvidia SGI Sun Microsystems OpenGL ARB (Architecture Review Board)

20 DirectX DirectDraw Direct3D DirectSound DirectMusic DirectInput DirectPlay (Deprecated) DirectShow (Deprecated) DirectX Graphics DirectX Audio History of DirectX and Direct3D DirectX was designed by Microsoft to be a hardware independent API for game and multimedia programming under Windows. DirectDraw2D graphics rendering Direct3D3D graphics rendering DirectSoundSound input, synthesizing and output DirectMusicMusic input, synthesizing and output DirectInputKeyboard, mouse and gaming devices (joysticks, gamepads) input DirectPlayMultiplayer gaming over local network and the Internet DirectShowPlayback of video and audio multimedia files

21 DirectX version history 1995.8. Windows 95 was released. But most games were still written for DOS. Microsoft needed a unified API for game programming under Windows 95. 1995.9. DirectX 1.0 was released for Windows 95. 1998. DirectX 6.0. Added support for Direct3D immediate mode. 2000. DirectX 7.0. Added support for hardware transformation and lighting. 2001. DirectX 8.0. Added support for shaders in assembly language. 2003. DirectX 9.0. Added DirectX HLSL. 2007. DirectX 10.0 for Windows Vista only. Introducing Shader Model 4.0.

22 OpenGL and Direct3D Comparison OpenGLDirect3D StandardOpenMicrosoft Proprietary PortabilitySupport Multiple platforms including Unix, Linux, Mac OS, Windows, etc. Only for Windows Programming Language Support C, C++, Fortran, Ada, Java, etc. C, C++, Visual Basic, C#, etc. Programming Interface Conventional header and library COM (Component Object Model) ExtensibilityOpenGL extension mechanics New COM interfaces


Download ppt "The Graphics Rendering Pipeline 3D SCENE Collection of 3D primitives IMAGE Array of pixels Primitives: Basic geometric structures (points, lines, triangles,"

Similar presentations


Ads by Google