Advanced

An Optimizing Compiler for Automatic Shader Bounding

Clarberg, Petrik; Toth, Robert; Hasselgren, Jon and Akenine-Möller, Tomas LU (2010) In Computer Graphics Forum 29(4). p.1259-1268
Abstract
Programmable shading provides artistic control over materials and geometry, but the black box nature of shaders makes some rendering optimizations difficult to apply. In many cases, it is desirable to compute bounds of shaders in order to speed up rendering. A bounding shader can be automatically derived from the original shader by a compiler using interval analysis, but creating optimized interval arithmetic code is non-trivial. A key insight in this paper is that shaders contain metadata that can be automatically extracted by the compiler using data flow analysis. We present a number of domain-specific optimizations that make the generated code faster, while computing the same bounds as before. This enables a wider use and opens up... (More)
Programmable shading provides artistic control over materials and geometry, but the black box nature of shaders makes some rendering optimizations difficult to apply. In many cases, it is desirable to compute bounds of shaders in order to speed up rendering. A bounding shader can be automatically derived from the original shader by a compiler using interval analysis, but creating optimized interval arithmetic code is non-trivial. A key insight in this paper is that shaders contain metadata that can be automatically extracted by the compiler using data flow analysis. We present a number of domain-specific optimizations that make the generated code faster, while computing the same bounds as before. This enables a wider use and opens up possibilities for more efficient rendering. Our results show that on average 42-44% of the shader instructions can be eliminated for a common use case: single-sided bounding shaders used in lightcuts and importance sampling. (Less)
Please use this url to cite or link to this publication:
author
organization
publishing date
type
Contribution to journal
publication status
published
subject
in
Computer Graphics Forum
volume
29
issue
4
pages
1259 - 1268
publisher
Wiley-Blackwell
external identifiers
  • wos:000281286100002
  • scopus:77955959575
ISSN
1467-8659
DOI
10.1111/j.1467-8659.2010.01721.x
language
English
LU publication?
yes
id
be83c296-3c86-44e7-b57a-75f6b8f76c8c (old id 1673303)
date added to LUP
2010-09-23 11:56:40
date last changed
2018-05-29 12:09:51
@article{be83c296-3c86-44e7-b57a-75f6b8f76c8c,
  abstract     = {Programmable shading provides artistic control over materials and geometry, but the black box nature of shaders makes some rendering optimizations difficult to apply. In many cases, it is desirable to compute bounds of shaders in order to speed up rendering. A bounding shader can be automatically derived from the original shader by a compiler using interval analysis, but creating optimized interval arithmetic code is non-trivial. A key insight in this paper is that shaders contain metadata that can be automatically extracted by the compiler using data flow analysis. We present a number of domain-specific optimizations that make the generated code faster, while computing the same bounds as before. This enables a wider use and opens up possibilities for more efficient rendering. Our results show that on average 42-44% of the shader instructions can be eliminated for a common use case: single-sided bounding shaders used in lightcuts and importance sampling.},
  author       = {Clarberg, Petrik and Toth, Robert and Hasselgren, Jon and Akenine-Möller, Tomas},
  issn         = {1467-8659},
  language     = {eng},
  number       = {4},
  pages        = {1259--1268},
  publisher    = {Wiley-Blackwell},
  series       = {Computer Graphics Forum},
  title        = {An Optimizing Compiler for Automatic Shader Bounding},
  url          = {http://dx.doi.org/10.1111/j.1467-8659.2010.01721.x},
  volume       = {29},
  year         = {2010},
}