skip to main content
10.1145/383259.383275acmconferencesArticle/Chapter ViewAbstractPublication PagessiggraphConference Proceedingsconference-collections
Article

A real-time procedural shading system for programmable graphics hardware

Published:01 August 2001Publication History

ABSTRACT

Real-time graphics hardware is becoming programmable, but this programmable hardware is complex and difficult to use given current APIs. Higher-level abstractions would both increase programmer productivity and make programs more portable. However, it is challenging to raise the abstraction level while still providing high performance. We have developed a real-time procedural shading language system designed to achieve this goal.

Our system is organized around multiple computation frequencies. For example, computations may be associated with vertices or with fragments/pixels. Our system's shading language provides a unified interface that allows a single procedure to include operations from more than one computation frequency.

Internally, our system virtualizes limited hardware resources to allow for arbitrarily-complex computations. We map operations to graphics hardware if possible, or to the host CPU as a last resort. This mapping is performed by compiler back-end modules associated with each computation frequency. Our system can map vertex operations to either programmable vertex hardware or to the host CPU, and can map fragment operations to either programmable fragment hardware or to multipass OpenGL. By carefully designing all the components of the system, we are able to generate highly-optimized code. We demonstrate our system running in real-time on a variety of hardware.

References

  1. 1.A. A. Apodaca and L. Gritz. Advanced RenderMan: Creating CGI for Motion Pictures. Morgan Kaufmann, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2.D. Banks. Illumination in Diverse Codimensions. In SIG- GRAPH 94 Conference Proceedings, pages 327-334, July 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3.R. L. Cook. Shade Trees. In Computer Graphics (SIGGRAPH 84 Conference Proceedings), pages 223-231, July 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4.C. Fraser and D. Hanson. A Retargetable C Compiler: Design and Implementation. Addison-Wesley, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5.P. Hanrahan and J. Lawson. A Language for Shading and Lighting Calculations. In Computer Graphics (SIGGRAPH 90 Conference Proceedings), pages 289-298, Aug. 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6.W. Heidrich and H.-P. Seidel. Realistic, Hardware-accelerated Shading and Lighting. In SIGGRAPH 99 Conference Proceedings, pages 171-178, Aug. 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7.P. Jaquays and B. Hook. Quake 3: Arena Shader Manual, Revision 10, Sept. 1999.Google ScholarGoogle Scholar
  8. 8.M. J. Kilgard. A Practical and Robust Bump-mapping Technique for Today's GPU's. Technical report, NVIDIA Corporation, July 2000. Available at http://www.nvidia.com/.Google ScholarGoogle Scholar
  9. 9.E. Lindholm. Vertex Programs for Fixed Function Pipeline. NVIDIA Technical Presentation (from www.nvidia.com), Nov. 2000.Google ScholarGoogle Scholar
  10. 10.E. Lindholm, M. J. Kilgard, and H. Moreton. A User- Programmable Vertex Engine. In SIGGRAPH 01 Conference Proceedings, Aug. 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 11.W. R. Mark and K. Proudfoot. Compiling To a VLIW Fragment Pipeline. In Eurographics/SIGGRAPH Workshop on Graphics Hardware, Aug. 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 12.W. R. Mark and K. Proudfoot. The F-Buffer: A Rasterization- Order FIFO Buffer for Multi-Pass Rendering. In Eurographics/SIGGRAPH Workshop on Graphics Hardware, Aug. 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.M. D. McCool. SMASH: A Next-Generation API for Programmable Graphics Accelerators. Technical Report CS- 2000-14, University of Waterloo, Aug. 2000.Google ScholarGoogle Scholar
  14. 14.Microsoft. DirectX 8.0 Programmer's Reference, Oct. 2000.Google ScholarGoogle Scholar
  15. 15.S. Molnar, J. Eyles, and J. Poulton. PixelFlow: High-Speed Rendering Using Image Composition. In Computer Graphics (SIGGRAPH 92 Conference Proceedings), pages 231-240, July 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16.NVIDIA Corporation. NVIDIA OpenGL Extension Specifications, May 2001. http://www.nvidia.com/developer/.Google ScholarGoogle Scholar
  17. 17.M. Olano. A Programmable Pipeline for Graphics Hardware. PhD thesis, University of North Carolina at Chapel Hill, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 18.M. Olano and A. Lastra. A Shading Language on Graphics Hardware: The PixelFlow Shading System. In SIGGRAPH 98 Conference Proceedings, pages 159-168, July 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 19.M. S. Peercy, M. Olano, J. Airey, and P. J. Ungar. Interactive Multi-Pass Programmable Shading. In SIGGRAPH 00 Con-ference Proceedings, pages 425-432, July 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 20.K. Perlin. An Image Synthesizer. In Computer Graphics (SIGGRAPH 85 Conference Proceedings), pages 287-296, July 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 21.M. Segal, K. Akeley, C. Frazier, and J. Leech. The OpenGL Graphics System: A Specification (Version 1.2), Mar. 1998.Google ScholarGoogle Scholar
  22. 22.X. Tu and D. Terzopoulos. Artificial Fishes: Physics, Locomotion, Perception, Behavior. In SIGGRAPH 94 Conference Proceedings, pages 43-50, July 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. 23.S. Upstill. The RenderMan Companion: A Programmer's Guide to Realistic Computer Graphics. Addison-Wesley, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A real-time procedural shading system for programmable graphics hardware

          Recommendations

          Reviews

          Howard E. Whitston

          The authors describe their shading system, which allows the user to control the underlying hardware for generating shading without having to directly manipulate OpenGL. OpenGL allows individuals absolute control over the rendered image, but also requires users to understand complex and unforgiving assembler language, where minor mistakes may have substantial consequences in the final image. RenderMan Shading Language is a popular way to avoid directly coding OpenGL, and the authors compare their system to this. The system consists of the following components: A shading language and compiler front end, which allows the user to describe the final image in terms of lights and textures in an HLL-like manner Programmable Pipeline abstraction, which hides the hardware component from the user A retargetable compiler back end, which allows the system to be extended as new hardware becomes available Shadow Object code, which provides a stage between the compiler front end and the rendering parts of the system A shadow execution engine, which controls rendering of primitives Graphics hardware, consisting of the graphics and host CPUs, which can each perform computations as determined by the system The pipeline abstraction description covers operations such as vertices or fragment rendering, built-in datatypes handled, and determination of which operators are permitted, which simplifies the compiler front end and allows for better definition of pipelined/parallel graphics hardware. The shading language section starts by discussing the main differences between RenderMan and the authors’ system, including the reasons why the authors selected (or didn’t select) certain features. The language analysis section points out the features of the authors’ system that aid in optimizing the resulting code: the underlying graph relationships, how surface/light shaders are combined in the system and when (programmable OpenGL APIs don’t directly support separate surfaces and lights), and inclusion of support for computation frequencies being able to infer rules (constant, primitive group, vertex, and fragment) in terms of lights and shaders. The retargetable compiler back end section discusses the modular compiler and the desired interactions in terms of number of allowable passes through the code; data flow; resource constraints; host-side compilers (two in C, and two in assembler with primitive and vertex computations); vertex programming architecture with proposed designs; fragment back end and its associated tree-matching and graphs problems/solutions (some of this is still in the research stage); and programmable fragment hardware and its register combiner architecture, mapping the graph operations to a single rendering pass (efficiency of more complex mappings requires additional research). The final section shows the results of the authors’ work. The authors demonstrate their system using a variety of standard images, and discuss where the system is better than RenderMan, and where it needs additional work. The shading language has a tradeoff between vertex and fragment (to be expected) and the effect of combining surface and light shaders. The comparison of vertex-program back end output and hand-written analysis showed that this computer-generated method could be as efficient, although more examples would be needed to prove this point. The fragment back end was compared to hand-generated output, and did not do as well as the authors would have liked (although the register architecture proved useful). The discussion concludes with the actual images and animations rendered. The last part discusses future work. Three things about this paper stand out. The overall enthusiasm of the authors for their system comes through clearly in their writing. The figures and diagrams included by the authors also clarify and enhance the content. However, some terms used by the authors are unfortunately not defined. This negative is the only downside of an otherwise excellent paper. Online Computing Reviews Service

          Access critical reviews of Computing literature here

          Become a reviewer for Computing Reviews.

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in
          • Published in

            cover image ACM Conferences
            SIGGRAPH '01: Proceedings of the 28th annual conference on Computer graphics and interactive techniques
            August 2001
            600 pages
            ISBN:158113374X
            DOI:10.1145/383259

            Copyright © 2001 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 1 August 2001

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • Article

            Acceptance Rates

            SIGGRAPH '01 Paper Acceptance Rate65of300submissions,22%Overall Acceptance Rate1,822of8,601submissions,21%

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader