Options
2009
Conference Paper
Title
A framework for object-oriented shader design
Abstract
Shaders offer a wide range of possibilities, but at the same time limit the flexibility of an application as combining shader components is difficult. We present a novel object model for writing shaders for mod- ern graphics hardware. These objects are defined and instantiated within an application. They are then propagated to the different programmable pipeline stages using a well-defined concept of copy-construction. Objects can reference each other and thus offer a flexible way to configure the shad- ing set-up at run-time. Our framework is built on top of the object model for the standard illumination situation of surfaces and light sources. We show that many modern shading models can be expressed in this framework in a uniform and integrated way. Both, the object model and the framework, make the reuse of components practical and allow object-oriented design to be applied to the development of shaders.