Unformatted text preview:

Spring 2011 Prof. Hyesoon Kim• Each stage cane be also pipelined• The slowest of the pipeline stage determines the rendering speed.• Frames per second (fps) RasterizerGeometryApplicationCPU• Executes on the CPU- Collision detection – may provide the feedback - Global acceleration algorithms, etc - Generate rendering primitives, points, lines, triangles ..- Input from other sources (keyboard, mouse..) -..• The majority of the per-polygon and per-vertex operations (Floating point operations)• Intel’s MMX/SSE• Old time: Software implementation.• Move objects (matrix multiplication)• Move the camera (matrix multiplication)• Compute lighting at vertices of triangle• Project onto screen (3D to 2D)• Clipping (avoid triangles outside screen)• Map to windowModel & View TransformVertexShading Projection Clipping Screen Mapping• The defining “corners” of a primitive• Often means a triangleATriangleVertices© David Kirk/NVIDIA and Wen-mei W. Hwu, 2007 ECE 498AL, UIUC• From GEOMETRY to visible pixels on screen Add textures and various other per-pixel operations And visibility is resolved here: sorts the primitives in the z-direction Per pixel operation Mostly integer operationsRasterizerGeometryApplicationFrame Buffer• 2D array of R,G,B color pixel values• 8 bits (256 levels) per color component• Three 8-bit components can represent 16 million different colors, including 256 shades of gray• 4thcomponent: alpha; used for blending© David Kirk/NVIDIA and Wen-mei W. Hwu, 2007 ECE 498AL, UIUC• AGP: Advanced Graphics Port – an interface between the computer core logic and the graphics processor– AGP 1x: 266 MB/sec – twice as fast as PCI– AGP 2x: 533 MB/sec– AGP 4x: 1 GB/sec  AGP 8x: 2 GB/sec– 256 MB/sec readback from graphics to system• PCI-E: PCI Express – a faster interface between the computer core logic and the graphics processor– PCI-E 1.0: 4 GB/sec each way  8 GB/sec total– PCI-E 2.0: 8 GB/sec each way  16 GB/sec totalAGPhttp://www.cis.upenn.edu/~suvenkat/700/http://www.cis.uphttp://accelenation.com/?ac.id.123.2• One of the first true 3D game cards• Worked by supplementing standard 2D video card.• Did not do vertex transformations: these were done in the CPU• Did do texture mapping, z-buffering.PrimitiveAssemblyVertexTransformsFrame BufferRasterOperationsRasterizationandInterpolationCPU GPUPCIhttp://www.cis.upenn.edu/~suvenkat/700/http://www.cis.upVertexTransformshttp://accelenation.com/?ac.id.123.5• Main innovation: shifting the transformation and lighting calculations to the GPU• Allowed multi-texturing: giving bump maps, light maps, and others..• Faster AGP bus instead of PCIPrimitiveAssemblyFrame BufferRasterOperationsRasterizationandInterpolationGPUAGPhttp://www.cis.upenn.edu/~suvenkat/700/VertexTransformshttp://accelenation.com/?ac.id.123.7• For the first time, allowed limited amount of programmability in the vertex pipeline• Also allowed volume texturing and multi-sampling (for antialiasing)PrimitiveAssemblyFrame BufferRasterOperationsRasterizationandInterpolationGPUAGPSmall vertexshadershttp://www.cis.upenn.edu/~suvenkat/700/http://www.cis.upenn.edu/~suvenkat/700/VertexTransformshttp://accelenation.com/?ac.id.123.8• This generation is the first generation of fully-programmable graphics cards• Different versions have different resource limits on fragment/vertex programsPrimitiveAssemblyFrame BufferRasterOperationsRasterizationandInterpolationAGPProgrammableVertex shaderProgrammableFragmentProcessorNot exactly a quantum leap, but…• Simultaneous rendering to multiple buffers• True conditionals and loops • Higher precision throughput in the pipeline (64 bits end-to-end, compared to 32 bits earlier.)• PCIe bus• More memory/program length/texture accesseshttp://www.cis.upenn.edu/~suvenkat/700/VertexIndexStream3D APICommandsAssembledPrimitivesPixelUpdatesPixelLocationStreamProgrammableFragmentProcessorTransformedVerticesProgrammableVertexProcessorGPUFront EndPrimitiveAssemblyFrame BufferRasterOperationsRasterizationandInterpolation3D API:OpenGL orDirect3D3DApplicationOr GamePre-transformedVerticesPre-transformedFragmentsTransformedFragmentsGPUCommand &Data StreamCPU-GPU Boundary (AGP/PCIe)Fixed-function pipelinehttp://www.cis.upenn.edu/~suvenkat/700/16 highly threaded SM’s, >128 FPU’s, 367 GFLOPS, 768 MB DRAM, 86.4 GB/S Mem BW, 4GB/S BW to CPULoad/storeGlobal MemoryThread Execution ManagerInput AssemblerHostTextureTexture Texture Texture Texture Texture Texture TextureTextureParallel DataCacheParallel DataCacheParallel DataCacheParallel DataCacheParallel DataCacheParallel DataCacheParallel DataCacheParallel DataCacheLoad/storeLoad/store Load/store Load/storeLoad/store© David Kirk/NVIDIA and Wen-mei W. Hwu, 2007 ECE 498AL, UIUC• Xbox 360 : Unified shader (ATI/AMD)• Playstation 3: a modified version of GeForce 7800 (NVIDIA)• Cuda: unified shader (NVIDIA)Tomas Akenine-Mőller © 2002• The model transform• Originally, an object is in ”model space”• Move, orient, and transform geometrical objects into ”world space”• Example, a sphere is defined with origin at (0,0,0) with radius 1– Translate, rotate, scale to make it appear elsewhere• Done per vertex with a 4x4 matrix multiplication!• The user can apply different matrices over time to animate objectsTomas Akenine-Mőller © 2002• You can move the camera in the same manner• But apply inverse transform to objects, so that camera looks down negative z-axiszxTomas Akenine-Mőller © 2002• Compute ”lighting” at verticeslightGeometryblueredgreen Try to mimic how light in nature behaves– Empirical models and some real theoryRastrizer(interpolation)Tomas Akenine-Mőller © 2002• Two major ways to do it– Orthogonal (useful in few applications)– Perspective (most often used)• Mimics how humans perceive the world, i.e., objects’ apparent size decreases with distanceApplication Geometry RasterizerTomas Akenine-Mőller © 2002• Square (cube) after projection• Clip primitives to square Screen mapping, scales and translates square so that it ends up in a rendering window These ”screen space coordinates” together with Z (depth) are sent to the rasterizer stageTomas Akenine-Mőller © 2002model space world space world spacecompute lightingcamera spaceprojectionimage spaceclipmap to screenTomas Akenine-Mőller © 2002• Scan-conversion– Find out which pixels


View Full Document

GT CS 4803 - LECTURE NOTES

Download LECTURE NOTES
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view LECTURE NOTES and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view LECTURE NOTES 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?