Shader algebra

被引:42
作者
McCool, M [1 ]
Du Toit, S [1 ]
Popa, T [1 ]
Chan, B [1 ]
Moule, K [1 ]
机构
[1] Univ Waterloo, Sch Comp Sci, Comp Graph Lab, Waterloo, ON N2L 3G1, Canada
来源
ACM TRANSACTIONS ON GRAPHICS | 2004年 / 23卷 / 03期
关键词
real-time rendering; shader programming; graphics hardware;
D O I
10.1145/1015706.1015801
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
An algebra consists of a set of objects and a set of operators that act on those objects. We treat shader programs as first-class objects and define two operators: connection and combination. Connection is functional composition: the outputs of one shader are fed into the inputs of another. Combination concatenates the input channels, output channels, and computations of two shaders. Similar operators can be used to manipulate streams and apply computational kernels expressed as shaders to streams. Connecting a shader program to a stream applies that program to all elements of the stream; combining streams concatenates the record definitions of those streams. In conjunction with an optimizing compiler, these operators can manipulate shader programs in many useful ways, including specialization, without modifying the original source code. We demonstrate these operators in Sh, a metaprogramming shading language embedded in C++.
引用
收藏
页码:787 / 795
页数:9
相关论文
共 37 条
[1]   MOLECULAR MODELING OF POLY(ARYL ETHER KETONES) .1. ARYL..ARYL INTERACTIONS IN CRYSTAL-STRUCTURES [J].
ABRAHAM, RJ ;
HAWORTH, IS .
JOURNAL OF COMPUTER-AIDED MOLECULAR DESIGN, 1990, 4 (03) :283-294
[2]  
APODACA AA, 2000, ADV RENDER MAN CREAT
[3]  
BLINN J, 1977, COMPUTER GRAPHICS, P192
[4]   Sparse matrix solvers on the GPU:: Conjugate gradients and multigrid [J].
Bolz, J ;
Farmer, I ;
Grinspun, E ;
Schröder, P .
ACM TRANSACTIONS ON GRAPHICS, 2003, 22 (03) :917-924
[5]  
BUCK I, 2004, ACM T GRAPHICS P SIG, V23
[6]  
Cook R. L., 1984, Computers & Graphics, V18, P223
[7]  
DAWES B, 2003, BOOST WEB SITE
[8]  
DRAVES S, 1996, DAGST SEM PART EV, P95
[9]  
Elliott C, 2000, LECT NOTES COMPUT SC, V1924, P9
[10]  
GUENTER B, 1995, P 22 ANN C COMP GRAP, P343