“User-configurable automatic shader simplification” by Pellacini

  • ©Fabio Pellacini




    User-configurable automatic shader simplification



    Programmable shading is a fundamental technique for specifying appearance in 3d environments. While shading architectures provides fast execution of shaders, shader evaluation is today a major cost in the rendering process. In the same manner in which geometric simplification lets us deal with large models, it would be beneficial to have an automatic technique that trades off shader quality for speed.This paper presents such a technique by introducing a framework for the automatic simplification of complex procedural shaders, where a sequence of increasingly simplified shaders is generated starting from an original shader together with ranges for all of its input parameters. Our approach works by applying simplification rules to the code of a shader to generate a series of candidates, whose differences from the original one are measured and used to select the candidate with the smallest error. This procedure is repeated until the last shader is a constant. While this automatic procedure generates high quality simplified shaders, the artist might want to emphasize particular aspects of a shader during simplification. Our framework supports this desire by allowing the user to specify additional rules to be considered during simplification. The term user-configurable simplification comes from this feature of our system.We implemented our algorithm to support the simplification of fragment shaders running on graphics hardware. Our results show that automatic simplification of complex procedural shaders is possible with high quality.


    1. Apodaca, A. A., and Gritz, L. 2000. Advanced Renderman: Creating CGI fro Motion Pictures. Morgan Kuafmanm. Google ScholarDigital Library
    2. Barzel, R. 1997. Lighting controls for computer cinematography. Journal of Graphics Tools 2, 1, 1–20. Google ScholarDigital Library
    3. Cook, R. L. 1984. Shade trees. In Computer Graphics (Proceedings of SIGGRAPH 84), vol. 18, 223–231. Google ScholarDigital Library
    4. Ebert, D. S., Musgrave, F. K., Peachy, D., and Worley, S. 1998. Texture and Modeling: A Procedural Approach, second ed. Academic Press. Google ScholarDigital Library
    5. Goldman, D. B. 1997. Fake fur rendering. In Proceedings of SIGGRAPH 97, Computer Graphics Proceedings, 127–134. Google ScholarDigital Library
    6. Guenter, B., Knoblock, T. B., and Ruf, E. 1995. Specializing shaders. In Proceedings of SIGGRAPH 95, Computer Graphics Proceedings, 343–350. Google ScholarDigital Library
    7. Hanrahan, P., and Lawson, J. 1990. A language for shading and lighting calculations. In Computer Graphics (Proceedings of SIGGRAPH 90), vol. 24, 289–298. Google ScholarDigital Library
    8. Heidrich, W., Slusallek, P., and Seidel, H.-P. 1998. Sampling procedural shaders using affine arithmetic. ACM Transactions on Graphics 17, 3 (July), 158–176. Google ScholarDigital Library
    9. Hoppe, H. 1996. Progressive meshes. In Proceedings of SIGGRAPH 96, Computer Graphics Proceedings, 99-108. Google ScholarDigital Library
    10. Kessenich, J., Balwin, D., and Rost, R., 2003. The OpenGL shading language.Google Scholar
    11. Mark, W. R., Glanville, R. S., Akeley, K., and Kilgard, M. J. 2003. Cg: A system for programming graphics hardware in a c-like language. ACM Transactions on Graphics 22, 3 (July), 896–907. Google ScholarDigital Library
    12. Microsoft, 2002. Directx graphics programmers guide.Google Scholar
    13. Muchnick, S. S. 1997. Advanced Compiler Design & Implementation. Google ScholarDigital Library
    14. Nvidia, 2004. Cg toolkit user’s manual.Google Scholar
    15. Olano, M., Hart, J. C., Heidrich, W., and McCool, M. 2002. Real-time Shading. AK Peters. Google ScholarDigital Library
    16. Olano, M., Kuehne, B., and Simmons, M. 2003. Automatic shader level of detail. In Graphics Hardware 2003, 7–14. Google ScholarDigital Library
    17. Paulson, L. C. 1996. ML for the Working Programmer, second ed. Cambridge University Press. Google ScholarDigital Library
    18. Peercy, M. S., Olano, M., Airey, J., and Ungar, P. J. 2000. Interactive programmable shading. In Proceedings of ACM SIGGRAPH 2000, Computer Graphics Proceedings, 425–432. Google ScholarDigital Library
    19. Pellacini, F., and Vidimče, K. 2004. Cinematic lighting. In GPU Gems: Programming Techniques, Tips, and Tricks for Real-Time Graphics, R. Fernando, Ed. Addison-Wesley Professional.Google Scholar
    20. Perlin, K. 1985. An image synthesizer. In Computer Graphics (Proceedings of SIGGRAPH 85), vol. 19, 287–296. Google ScholarDigital Library
    21. Pixar, 2001. Slim documentation. https://renderman.pixar.com/products/tools/slim.html.Google Scholar
    22. Proudfoot, K., Mark, W. R., Tzvetkov, S., and Hanrahan, P. 2001. A real-time procedural shading system for programmable graphics hardware. In Proceedings of ACM SIGGRAPH 2001, Computer Graphics Proceedings, 159–170. Google ScholarDigital Library
    23. Rtzen, 2004. Rt/shader documentation. http://www.rtzen.com/product/detail,1-6.html.Google Scholar
    24. Wolfram, S. 2003. The Mathematica Book, fifth ed. Wolfram Media. Google ScholarDigital Library

ACM Digital Library Publication: