【24h】

Shader algebra

机译:着色器代数

获取原文
获取原文并翻译 | 示例
获取外文期刊封面目录资料

摘要

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++.
机译:代数由一组对象和一组作用于这些对象的运算符组成。我们将着色器程序视为一流的对象,并定义了两个运算符:连接和组合。连接是功能组成:一个着色器的输出被馈送到另一个着色器的输入。组合将输入通道,输出通道和两个着色器的计算连接起来。可以使用类似的运算符来操纵流并将表示为着色器的计算内核应用于流。将着色器程序连接到流会将该程序应用于流的所有元素。合并流将这些流的记录定义串联起来。与优化编译器一起,这些运算符可以以许多有用的方式(包括特殊化)来操纵着色器程序,而无需修改原始源代码。我们在Sh(一种嵌入在C ++中的元编程着色语言)中演示了这些运算符。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号