|
| ||||||||||||||||||||||||||||||||||||
| Shader | Displacement
| |||||||||||||||||||||||||||||||||||
| Synopsis |
A bump map displacement derived from an image file with enhanced tiling capabilities.
| |||||||||||||||||||||||||||||||||||
| Location | lishlite | |||||||||||||||||||||||||||||||||||
| Description |
A wrapped displacement shader providing a bump map from
an image file in a supported format.
This shader works much like the "wrapped bump map",
however its
functionality is adapted to use with Session Manager.
The file name for the image file is supplied as the "file name" parameter. Alternatively a pointer to a valid LtImage data structure may be given via parameter "image". If the value NULL is given then the image will be extracted from the file represented by "file name", otherwise the "image" parameter takes precedence. The LtImage is not modified by this shader. It is the responsibility of the developer to ensure that the LtImage remains valid until the bump map has been created. This will occur at the time of the next render or may be forced by calling LiShaderReset. After the bump map has been created it is safe to modify or destroy the LtImage. The parameter "softness" controls the degree of blurring on the image texture. The maximum amplitude for displacements is specified by parameter "amplitude". Larger values will accentuate the differences between peaks and troughs of the bump map. Values less than 0.0 will reverse its direction (peaks will become troughs, and vice versa). Additional control of amplitude is provided by the parameter "depth scale". It is simply multiplier of parameter "amplitude". It accepts values in the range [0.0, 1.5. Parameter "scale" controls the overall scale of bump map. Larger values will produce larger images. Most bump maps tile without any offsets, but this shader can be used to tile bump maps with relative offset on one edge. There are two parameters that control this behaviour. Parameter "shift axis" specifies the axis on which the offset occurs. It can have one of three values:
Parameter "shift" determines the amount of offset. It is expressed as fraction of length of the edge specified in "shift axis". For example, setting value of "shift" to 0.5 and value of "shift axis" to LI_TILE_SHIFT_S will force the relative offset of every row of tiled bump maps. Every next row will be relatively shifted half of length of the edge.
| |||||||||||||||||||||||||||||||||||
| See Also |
"wrapped bump map "
Previous page alphabetically (wrappedgridtransparency) | |||||||||||||||||||||||||||||||||||
Copyright © 1990-2004, 2005 LightWork Design Limited. All rights reserved | ||||||||||||||||||||||||||||||||||||