Space-free Shader Programming: Automatic Space Inference and Optimization for Real-time Shaders
Abstract
The graphics processing units (GPUs) used in todays personal computers can be programmed to compute the visual appearance of three-dimensional objects in real time. Such programs are called shaders and are written in high-level domain-specific languages that can produce very efficient programs. However, to exploit this efficiency, the programmer must explicitly express space transformations necessary to implement a computation. Unfortunately, this makes programming GPUs more error prone and reduces portability of the shader programs. In this paper we show that these explicit transformations can be removed without sacrificing performance. Instead we can automatically infer the set of transformations necessary to implement the shader in the same way as an experienced programmer would. This enables shaders to be written in a cleaner, more portable, manner and to be more readily reused. Furthermore, errors resulting from incorrect transformation usage or space assumptions are eliminated. In the paper we present an inferencing algorithm as well as a prototype space-free shading language implemented as an embedded language in Python.
BibTeX
@inproceedings {10.2312:LocalChapterEvents:TPCG:TPCG08:145-150,
booktitle = {Theory and Practice of Computer Graphics},
editor = {Ik Soo Lim and Wen Tang},
title = {{Space-free Shader Programming: Automatic Space Inference and Optimization for Real-time Shaders}},
author = {Lejdfors, Calle and Ohlsson, Lennart},
year = {2008},
publisher = {The Eurographics Association},
ISBN = {978-3-905673-67-8},
DOI = {10.2312/LocalChapterEvents/TPCG/TPCG08/145-150}
}
booktitle = {Theory and Practice of Computer Graphics},
editor = {Ik Soo Lim and Wen Tang},
title = {{Space-free Shader Programming: Automatic Space Inference and Optimization for Real-time Shaders}},
author = {Lejdfors, Calle and Ohlsson, Lennart},
year = {2008},
publisher = {The Eurographics Association},
ISBN = {978-3-905673-67-8},
DOI = {10.2312/LocalChapterEvents/TPCG/TPCG08/145-150}
}