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]  Brian A. Barsky,et al.  Advanced Renderman: Creating CGI for Motion Pictures , 1999 .

[2]  Pat Hanrahan,et al.  A real-time procedural shading system for programmable graphics hardware , 2001, SIGGRAPH.

[3]  Marc Olano,et al.  Interactive multi-pass programmable shading , 2000, SIGGRAPH.

[4]  Stephen Wolfram,et al.  The Mathematica Book , 1996 .

[5]  Marc Olano,et al.  Automatic shader level of detail , 2003, HWWS '03.

[6]  William R. Mark,et al.  Cg: a system for programming graphics hardware in a C-like language , 2003, ACM Trans. Graph..

[7]  Steven S. Muchnick,et al.  Advanced Compiler Design and Implementation , 1997 .

[8]  David S. Ebert,et al.  Texturing and Modeling: A Procedural Approach , 1994 .

[9]  Ken Perlin,et al.  [Computer Graphics]: Three-Dimensional Graphics and Realism , 2022 .

[10]  Hans-Peter Seidel,et al.  Sampling procedural shaders using affine arithmetic , 1998, TOGS.

[11]  Erik Ruf,et al.  Specializing shaders , 1995, SIGGRAPH.

[12]  Michael D. McCool,et al.  Real-time shading , 2002, SIGGRAPH '04.

[13]  Randi J. Rost OpenGL shading language , 2004 .

[14]  Robert L. Cook,et al.  Shade trees , 1984, SIGGRAPH.

[15]  Dan B. Goldman Fake fur rendering , 1997, SIGGRAPH.

[16]  Lawrence C. Paulson,et al.  ML for the working programmer (2. ed.) , 1996 .

[17]  Ronen Barzel,et al.  Lighting Controls for Computer Cinematography , 1997, J. Graphics, GPU, & Game Tools.

[18]  Pat Hanrahan,et al.  A language for shading and lighting calculations , 1990, SIGGRAPH.

[19]  Hugues Hoppe,et al.  Progressive meshes , 1996, SIGGRAPH.