Spark

Tim Foley, Pat Hanrahan
2011 ACM Transactions on Graphics  
Animation Tessellation Render to Cube Vertex Colors Displacement Texture Mapping VS HS DS GS PS Figure 1: A complex shading effect decomposed into user-defined modules in Spark. The dashed boxes show the programmable stages of the Direct3D 11 pipeline; the colored boxes show different concerns in the program. Some logical concerns cross-cut multiple pipeline stages. Abstract In creating complex real-time shaders, programmers should be able to decompose code into independent, localized modules
more » ... their choosing. Current real-time shading languages, however, enforce a fixed decomposition into per-pipeline-stage procedures. Program concerns at other scales -including those that cross-cut multiple pipeline stages -cannot be expressed as reusable modules. We present a shading language, Spark, and its implementation for modern graphics hardware that improves support for separation of concerns into modules. A Spark shader class can encapsulate code that maps to more than one pipeline stage, and can be extended and composed using object-oriented inheritance. In our tests, shaders written in Spark achieve performance within 2% of HLSL.
doi:10.1145/2010324.1965002 fatcat:qvjym24sp5aapcbletvaigkequ