combined and provide a framework for rapid devel-
opment of rendering applications that minimises the
necessity of writing shader modules.
However, our current treatment of tessellation
modules does not cover all possible composition sce-
narios and only provides for a single tessellation
stage. Thus we cannot handle the sequential com-
position of tessellation modules. We are currently
working on more flexible techniques for specifying
and composing tessellation modules, in order to lift
this restriction on our semantically specified shaders.
In a number of use cases such as volume rendering
and global illumination, we found that using a pure
expression based language—although possible—can
be somewhat inconvenient, since it requires a com-
plete reformulation of some algorithms that can be
easily expressed in procedural languages. We there-
fore plan to add support for imperative shader frag-
ments while maintaining composability.
ACKNOWLEDGEMENTS
We would like to thank Manuel Wieser for providing
3D models, especially Eigi, The Dinosaur. The com-
petence center VRVis is funded by BMVIT, BMWFJ,
and City of Vienna (ZIT) within the scope of COMET
Competence Centers for Excellent Technologies. The
program COMET is managed by FFG.
REFERENCES
Austin, C. A. (2005). Renaissance: A Functional Shad-
ing Language. Master’s thesis, Iowa State University,
Ames, Iowa, USA.
Cook, R. L. (1984). Shade Trees. SIGGRAPH Comp.
Graph., 18(3):223–231.
Elliott, C. (2004). Programming Graphics Processors Func-
tionally. In Proc. of the 2004 ACM SIGPLAN work-
shop on Haskell, Haskell ’04, pages 45–56, New York,
NY, USA. ACM.
Foley, T. and Hanrahan, P. (2011). Spark: Modular, Com-
posable Shaders for Graphics Hardware. ACM Trans-
actions on Graphics, 30(4):107:1–107:12.
Fraser, C. W., Henry, R. R., and Proebsting, T. A. (1992).
BURG: fast optimal instruction selection and tree
parsing. SIGPLAN Not., 27(4):68–76.
Hanrahan, P. and Lawson, J. (1990). A Language for Shad-
ing and Lighting Calculations. SIGGRAPH Comput.
Graph., 24(4):289–298.
Kessenich, J., Baldwin, D., and Rost, R. (2012). OpenGL
Shading Language, version 4.3. Available from:
http://www.opengl.org/documentation/glsl/ (accessed
23 October 2012).
Knoop, J., R
¨
uthing, O., and Steffen, B. (1992). Lazy code
motion. SIGPLAN Not., 27(7):224–234.
Kuck, R. and Wesche, G. (2009). A Framework for Object-
Oriented Shader Design. In Proc. of the 5th Interna-
tional Symposium on Advances in Visual Computing:
Part I, ISVC ’09, pages 1019–1030, Berlin, Heidel-
berg. Springer-Verlag.
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 Trans. Graph.,
22(3):896–907.
McCool, M., Du Toit, S., Popa, T., Chan, B., and Moule, K.
(2004). Shader Algebra. In ACM SIGGRAPH 2004
Papers, SIGGRAPH ’04, pages 787–795, New York,
NY, USA. ACM.
McCool, M. D., Qin, Z., and Popa, T. S. (2002). Shader
Metaprogramming. In Proc. of the ACM SIG-
GRAPH/EUROGRAPHICS conf. on Graph. Hard-
ware, HWWS ’02, pages 57–68, Aire-la-Ville,
Switzerland. Eurograph. Assoc.
McCool, M. D. and Toit, S. D. (2004). Metaprogramming
GPUs with Sh. A K Peters.
McGuire, M. (2005). The SuperShader. Shader X4: Ad-
vanced Rendering Techniques, chapter 8.1, pages
485–498. Cengage Learning Emea.
McGuire, M., Stathis, G., Pfister, H., and Krishnamurthi, S.
(2006). Abstract Shade Trees. In Proc. of the 2006
symposium on Interactive 3D graphics and games,
I3D ’06, pages 79–86, New York, NY, USA. ACM.
Microsoft (2010). Shader model 5 DirectX HLSL.
from: http://msdn. microsoft.com/en-us/library/ win-
dows/desktop/ff471356 %28v=vs.85 %29.aspx (ac-
cessed Oct. 23, 2012).
Microsoft (2012). Programming Guide for HLSL.
from: http://msdn. microsoft. com/en-us/library
/bb509635(v=VS.85).aspx (accessed Oct. 23, 2012).
Perlin, K. (1985). An Image Synthesizer. In Proc. of the
12th annual conference on Comp. graph. and inter-
active techniques, SIGGRAPH ’85, pages 287–296,
New York, USA. ACM.
Proudfoot, K., Mark, W. R., Tzvetkov, S., and Hanrahan,
P. (2001). A Real-time Procedural Shading System
for Programmable Graphics Hardware. In Proc. of
the 28th annual conf. on Comp. graph. and inter-
active techniques, SIGGRAPH ’01, pages 159–170,
New York, NY, USA. ACM.
Sitthi-Amorn, P., Lawrence, J., Yang, L., Sander, P. V., Ne-
hab, D., and Xi, J. (2008). Automated Reprojection-
Based Pixel Shader Optimization. ACM Trans.
Graph., 27(5):127:1–127:11.
Sitthi-Amorn, P., Modly, N., Weimer, W., and Lawrence, J.
(2011). Genetic Programming for Shader Simplifica-
tion. ACM Trans. Graph., 30(6):152:1–152:12.
Trapp, M. and D
¨
ollner, J. (2007). Automated Combina-
tion of Real-Time Shader Programs. In Cignoni, P.
and Sochor, J., editors, Eurographics 2007 Shortpa-
per, pages 53–56. Eurograph. Assoc.
CoSMo:Intent-basedCompositionofShaderModules
199