13.07.2015 Views

Technical Report on the Shader Model 4.0 Architecture

Technical Report on the Shader Model 4.0 Architecture

Technical Report on the Shader Model 4.0 Architecture

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<str<strong>on</strong>g>Technical</str<strong>on</strong>g> <str<strong>on</strong>g>Report</str<strong>on</strong>g> <strong>on</strong> <strong>the</strong> <strong>Shader</strong> <strong>Model</strong> <strong>4.0</strong> <strong>Architecture</strong>Shiben Bhattacharjee ∗ Suryakant Patidar † Jag Mohan Singh ‡ P. J. Narayanan §Center for Visual Informati<strong>on</strong> Technology, IIIT HyderabadFigure 1: (a) Geometry generati<strong>on</strong> with Geometry <strong>Shader</strong>, (b) Physics interacti<strong>on</strong>s using Stream Output, (c) terrain rendering with ArrayTextures, (d) Multi Light Shadows with layered renderingAbstractThe Direct3D10/SM<strong>4.0</strong> system [?] is <strong>the</strong> 4 th generati<strong>on</strong> programmablegraphics processing units (GPUs) architecture. The newpipeline introduces significant additi<strong>on</strong>s and changes to prior generati<strong>on</strong>pipeline. We explore <strong>the</strong>se new features and experimentto judge <strong>the</strong>ir performance. The main facilities introduced thatwe p<strong>on</strong>der up<strong>on</strong> are, Unified <strong>Architecture</strong> providing comm<strong>on</strong> featuresset for all programmable stages, Goemetry <strong>Shader</strong> which isa new programmable stage capable of generating additi<strong>on</strong>al primitives,Stream output with which primitve data can be streamed tomemory, Array textures and primitive level redirecti<strong>on</strong> to differentframebuffers through layered rendering. We analyze our implementati<strong>on</strong>sand with experimentati<strong>on</strong>, we draw c<strong>on</strong>clusi<strong>on</strong>s <strong>on</strong> <strong>the</strong>ir efficientusage, some of <strong>the</strong>ir limitati<strong>on</strong>s and suggesti<strong>on</strong>s for futureversi<strong>on</strong>s.Keywords: <strong>Shader</strong> <strong>Model</strong> <strong>4.0</strong>, Direct3D 10 System, programmablegraphics hardware1 Introducti<strong>on</strong>In real-time 3D computer graphics, a rendering pipeline is meantto accept certain representati<strong>on</strong> of a 3D scene as input and producea 2D raster image as output which can be shown <strong>on</strong> a displaydevice. The various pipeline stages are menti<strong>on</strong>ed in Figure ??.Earlier, <strong>the</strong>se stages were implemented as fixed functi<strong>on</strong>s <strong>on</strong> hardwarefor graphics accelerati<strong>on</strong>. Later, some of <strong>the</strong>se stages weremade programmable instead of being fixed functi<strong>on</strong> namely processingof vertices and fragment. Since all vertices and fragmentscan be thought of as independent, <strong>the</strong>y can be processed parallely∗ e-mail:shiben@research.iiit.ac.in† e-mail:skp@research.iiit.ac.in‡ email:jagmohan@research.iiit.ac.in§ e-mail:pjn@iiit.ac.in<strong>on</strong> <strong>the</strong> graphics processing unit. Small programs could be writtenwhich processed all vertices (or fragments) parallely and werecalled shaders and <strong>the</strong> programming model was called <strong>the</strong> shadermodel. The history of graphics hardware and shader model is discussedin Secti<strong>on</strong> 2.The <strong>Shader</strong> <strong>Model</strong> <strong>4.0</strong> makes giant leaps c<strong>on</strong>sidering a versi<strong>on</strong>change, as it involves significant changes to <strong>the</strong> rendering pipeline.Earlier vertex shaders and fragment shader, being at differentstages, had different requirements. Fragments shaders had quickaccess to textures and vertex shaders ei<strong>the</strong>r didn’t have or had limitedaccess to textures. <strong>Shader</strong> <strong>Model</strong> <strong>4.0</strong> keeps all <strong>the</strong> shaders at<strong>the</strong> same level calling it a unified architecture, because of whicheven vertex shader (and geometry shader) have fast access to textures.This feature can be used to draw objects whose geometryinformati<strong>on</strong> is stored as images, a very good example being c<strong>on</strong>structingobjects with geoemtry images [?]. We discuss usage ofunified architecture in Secti<strong>on</strong> 3.<strong>Shader</strong> <strong>Model</strong> <strong>4.0</strong> introduces a new programmable stage called <strong>the</strong>geometry shader which gives <strong>the</strong> capability of generating more verticesand primitives. This saves <strong>the</strong> CPU to GPU bandwidth as less3D data can be sent using programming tricks to <strong>the</strong> pipeline and<strong>the</strong>y can be generated <strong>on</strong> <strong>the</strong> GPU itself. We stress test <strong>the</strong> capabilitiesand verify <strong>the</strong> importance of this new programmable stage(Secti<strong>on</strong> 4). We develope techniques and applicati<strong>on</strong>s involving geometryshader and our analysis will be helpful in clever usage ofgeometry shader.In past, game developers complained about slow state change becauseof which <strong>the</strong>y avoided using multiple textures. Instead <strong>the</strong>ymapped textures <strong>on</strong> various objects with <strong>the</strong> help of a single texture,texture atlas [?]. <strong>Shader</strong> <strong>Model</strong> <strong>4.0</strong> introduces array textures and 3Dtextures. Various images can be loaded as layers in array texture (oras a 3D texture) and <strong>the</strong> shader can choose between <strong>the</strong>se layers as<strong>the</strong> whole array texture is referenced by a single texture ID. Terrainrendering finds itself as a good applicati<strong>on</strong> of array textures whichwe explain in detail in Secti<strong>on</strong> 5.Al<strong>on</strong>g with <strong>the</strong> introducti<strong>on</strong> of array textures, ano<strong>the</strong>r new attractivefeature is layered rendering which seems an extensi<strong>on</strong> of oldermodel’s <strong>on</strong>e of <strong>the</strong> feature, MRT (Multiple Rendering Targets) [?].Where with MRT, fragments in <strong>the</strong> fragment shader can be redirectedto different color attachments of <strong>the</strong> framebuffer; with layeredrendering, it is possible in <strong>the</strong> geometry shader to redirectprimitives to different layers of an array texture which are attached


to <strong>the</strong> frame buffer object. Independent rasterizati<strong>on</strong> for all <strong>the</strong> differentlayers will be carried out. We find that multi-perspectiverendering and multiple light shadows are good applicati<strong>on</strong>s of layeredrendering and are discussed in Secti<strong>on</strong> 6. Real-time Cube-maprendering is <strong>on</strong>e more good applicati<strong>on</strong> which has been discussedin ??.The new rendering pipeline also features streaming data out in <strong>the</strong>middle of <strong>the</strong> pipeline to <strong>the</strong> memory. This is termed as streamoutput by <strong>the</strong> Direct3D 10 system and transform feedback by <strong>the</strong>OpenGL 2.1 system. This gives <strong>the</strong> facility of not going through<strong>the</strong> whole pipeline to process stream data which is not to be rendered.Objects can be rendered as well as some informati<strong>on</strong> canbe recorded in <strong>the</strong> same pipeline. We implemented simple physicstransformati<strong>on</strong>s and deformable models which harnesses <strong>the</strong> transformfeedback’s facilities; <strong>the</strong>y are described in Secti<strong>on</strong> 7.We c<strong>on</strong>clude <strong>the</strong> technical report with results and screenshots. Wealso some future work and some suggesti<strong>on</strong>s of improvement <strong>on</strong><strong>the</strong> new shader model in Secti<strong>on</strong> 8.2 History1. Menti<strong>on</strong> of voodoo cards, 3dfx api 2. menti<strong>on</strong> of nvidia and atiemergence 3. directx and opengl 4. introducti<strong>on</strong> of shader model 5.evoluti<strong>on</strong> of shader model untill <strong>4.0</strong>3 Unified <strong>Architecture</strong>4 Geometry <strong>Shader</strong>4.1 Geometry generati<strong>on</strong> and deleti<strong>on</strong>KARTCH, D. 2000. Efficient Rendering and Compressi<strong>on</strong> for Full-Parallax Computer-Generated Holographic Stereograms. PhD<strong>the</strong>sis, Cornell University.LANDIS, H., 2002. Global illuminati<strong>on</strong> in producti<strong>on</strong>. ACM SIG-GRAPH 2002 Course #16 Notes, July.LEVOY, M., PULLI, K., CURLESS, B., RUSINKIEWICZ, S.,KOLLER, D., PEREIRA, L., GINZTON, M., ANDERSON, S.,DAVIS, J., GINSBERG, J., SHADE, J., AND FULK, D. 2000.The digital michelangelo project. In Proceedings of SIGGRAPH2000, ACM Press / ACM SIGGRAPH, New York, K. Akeley,Ed., Computer Graphics Proceedings, Annual C<strong>on</strong>ference Series,ACM, 131–144.PARK, S. W., LINSEN, L., KREYLOS, O., OWENS, J. D., ANDHAMANN, B. 2006. Discrete sibs<strong>on</strong> interpolati<strong>on</strong>. IEEE Transacti<strong>on</strong>s<strong>on</strong> Visualizati<strong>on</strong> and Computer Graphics 12, 2 (Mar./Apr.), 243–253.PARKE, F. I., AND WATERS, K. 1996. Computer Facial Animati<strong>on</strong>.A. K. Peters.PELLACINI, F., VIDIMČE, K., LEFOHN, A., MOHR, A., LEONE,M., AND WARREN, J. 2005. Lpics: a hybrid hardwareacceleratedrelighting engine for computer cinematography.ACM Transacti<strong>on</strong>s <strong>on</strong> Graphics 24, 3 (Aug.), 464–470.SAKO, Y., AND FUJIMURA, K. 2000. Shape similarity by homotropicdeformati<strong>on</strong>. The Visual Computer 16, 1, 47–61.YEE, Y. L. H. 2000. Spatiotemporal sensistivity and visual attenti<strong>on</strong>for efficient rendering of dynamic envir<strong>on</strong>ments. Master’s<strong>the</strong>sis, Cornell University.4.2 Subdivisi<strong>on</strong> <strong>on</strong> <strong>the</strong> Geometry <strong>Shader</strong>5 Array Textures6 Layered Rendering7 Transform Feedback7.1 Physics7.2 Deformati<strong>on</strong>8 C<strong>on</strong>clusi<strong>on</strong>AcknowledgementsReferencesEXLUNA, INC. 2002. Entropy 3.1 <str<strong>on</strong>g>Technical</str<strong>on</strong>g> Reference, January.FEDKIW, R., STAM, J., AND JENSEN, H. W. 2001. Visual simulati<strong>on</strong>of smoke. In Proceedings of SIGGRAPH 2001, ACMPress / ACM SIGGRAPH, E. Fiume, Ed., Computer GraphicsProceedings, Annual C<strong>on</strong>ference Series, ACM, 15–22.JOBSON, D. J., RAHMAN, Z., AND WOODELL, G. A. 1995.Retinex image processing: Improved fidelity to direct visual observati<strong>on</strong>.In Proceedings of <strong>the</strong> IS&T Fourth Color ImagingC<strong>on</strong>ference: Color Science, Systems, and Applicati<strong>on</strong>s, vol. 4,124–125.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!