Carnegie Mellon University
Browse
CMU-CS-18-115.pdf (37.43 MB)

Slang —A Shader Compilation System for Extensible, Real-Time Shading

Download (37.43 MB)
thesis
posted on 2021-10-20, 17:41 authored by Yong HeYong He
A modern production renderer may contain tens of thousands of code that define a diverse palette of shading effects. These effects model visual phenomena such as
the light-scattering properties of materials, the animation of surfaces, or complex lighting environments. To support productive maintenance of the renderer codebase
and the frequent addition of new shading features, it is desirable to implement these shading effects in a flexible and extensible framework that intuitively models the key rendering concepts. Unfortunately, shading system designs that offer high development productivity have historically not met the extreme performance requirements of real-time graphics systems. This thesis consists of a series of contributions that together form a blueprint for architecting modular, extensible real-time shading systems that also achieve state-of-the-art performance on modern CPU/GPU platforms. First, we established a set of shading system design principles, called shader components, which serve as a design pattern for realizing both intuitive decompositions
of the rendering concepts and performance-critical global optimizations such as static GPU code specialization and efficient CPU–GPU communication. Next, we designed the Slang shading language and compilation system to facilitate implementation of shader components without the need for engine-specific or heavily preprocessor-based code generation techniques. Slang extends HLSL with general purpose programming language mechanisms: generics with interface constraints, associated types, and interface/structure extensions, that we identify as necessary and sufficient language features for implementing modern shading systems. Last, we demonstrated how to rearchitect a large open source renderer using Slang’s compiler
services to adopt the shader components pattern. In this case study, we highlight the benefits of Slang’s design by observing that the resulting shading system is substantially
easier to extend with new features and achieves higher rendering performance than the original HLSL-based implementation.

History

Date

2018-09-14

Degree Type

  • Dissertation

Department

  • Computer Science

Degree Name

  • Doctor of Philosophy (PhD)

Advisor(s)

Kayvon Fatahalian

Usage metrics

    Exports

    RefWorks
    BibTeX
    Ref. manager
    Endnote
    DataCite
    NLM
    DC