ABSTRACT

In the original fixed-function graphics accelerator pipeline, textures were intended to hold images that would be used to replace or modulate the diffuse component of the Blinn-Phong lighting model. The texture support in shading (Sh) is designed to enable strong data abstraction so that the kinds of advanced applications can be better supported and combined with one another. Textures in Sh are treated semantically like arrays of parameters, and can be accessed like arrays both by the host application and by shader programs running on the graphics processing unit. A texture type declaration consists of an access type chosen from Array, Table, and Texture and a format type. The chapter examines both the vertex shader and the fragment shader. Textures can be used to hold representations of reflectance models, displacement maps, light fields, volume data, and tabulated functions. Data structures have been invented that can use textures for holding sparse data, photon maps, and accelerator structures for ray tracers.