tltdef(3G)
tltdef - defines a texture look-up table
As shipped in IRIX 6.5.19. Unchanged since IRIX 6.5.
NAME tltdef - defines a texture look-up table FORTRAN SPECIFICATION subroutine tltdef(index, nc, len, table, np, props) integer*4 index, len, nc, np integer*4 table(*) real props(np) PARAMETERS index expects the name of the texture look-up table being defined. Index 0 is reserved as a null definition, and cannot be redefined. nc expects the number of components per table entry. len expects the length of table in table entries. table expects a long-word aligned array of packed nc, 8-bit, component table entries. np expects the number of symbols and floating point values in props, including the termination symbol TLNULL. If np is zero, it is ignored. Operation over network connections is more efficient when np is correctly specified, however. props expects the array of floating point symbols and values that define the texture look-up table. props must contain a sequence of symbols, each followed by the appropriate number of floating point values. The last symbol must be TLNULL. DESCRIPTION Texture coordinates, s,t,r may be specified at geometry vertices, similarly to color, depth, and vertex normals. The texture coordinates are interpolated from the values specified at the vertices for each screen pixel touched by the geometry. A texture function maps the texture coordinates s,t, or s,t,r, corresponding to a screen pixel into nc values, called texture function outputs, using an image and a set of properties. The texture function outputs may be translated with a texture look-up table. The texture lookup outputs are used by the texture environment function to modify the screen pixel color. The texture look-up table is defined by tlutdef and selected by tlutbind. texdef2d and texdef3d define a texture function and texbind selects which texture function definition to use. The texture environment function is defined by tevdef and selected by tevbind. The texture coordinates are specified with the t family of commands. The texture look-up table allows the texture function outputs to be translated via the texture look-up table. The interaction between texture look up tables and textures with differing number of components is as follows: tlut nc texture nc action ------- ---------- ------------- 2 1 I looks up I,A 2 I,A looks up I,A 3 R,G,B passes through unchanged 4 R,G,B,A passes through unchanged 3 1 I looks up R,G,B 2 I,A passes through unchanged 3 R,G,B looks up R,G,B 4 R,G,B,A passes through unchanged 4 1 I looks up R,G,B,A 2 I looks up R,G,B; A looks up A. 3 R,G,B,B looks up R,G,B,A 4 R,G,B,A looks up R,G,B,A If the tlutdef parameter nc is not equal to the texdef parameter nc, tlutdef's nc determines which texture environment equation is used. For example, if tlutdef's nc is 2 and a 1-component texture is used, texture environment TVMODU will scale red, green, and blue by lookup output I and alpha by lookup output A. There are no properties currently defined for this command. Different sized components may be supported in the future. SEE ALSO afunct, scrsub, t, tevbin, tevdef, texbin, texdef, texgen NOTES IRIS-4D G, GT, GTX, VGX, VGXT models, and the Personal Iris, Iris Indy, and Iris Indigo, do not support texture look up tables. tlutdef is ignored by these machines. Use getgde to determine whether texture mapping is supported. BUGS tltdef is not supported on Impact. On Infinite Reality one and three component texture images on Infinite reality always return the 255th entry in the alpha table for two and four component tluts.