home | << prev | next >> | contents |
Lens shaders may not only be used to change the direction of eye rays. They may also be used to manipulate colors and even the apparent shape of the rendered images.
The stencil lens shader may be used to block out portions of an image by overlaying a stencil texture. Only if the returned value of the provided scalar texture is between the prescribed floor and ceiling value an eye ray will be cast. If the texture value is below the provided floor value, then the floor color will be used, if the texture value is above the ceiling value, then the ceiling color will be used. If the texture value is between the floor and the ceiling value, then the returned color will be blended with the floor color with the weight provided by the relative texture value with respect to the floor and ceiling values.
color "mib_lens_stencil" ( scalar "floor", scalar "ceiling", color "floor_color", color "ceiling_color", scalar texture "stencil")
This lens shader maps color components lying between a floor and a ceiling value to the unit interval. Values below and above those limits are clamped to 0 and 1, respectively. If the mode of the shader is set to luminance, then the sample colors with a luminance below the floor value are replaced by the floor color and sample colors with a luminance above the ceiling value are replaced by the ceiling color. Color values with luminance between those bounds are linearly scaled to luminances between 0 and 1.
color "mib_lens_clamp" ( scalar "floor", scalar "ceiling", boolean "luminance", color "floor_color", color "ceiling_color")
home | << prev | next >> | contents |
Copyright (©) 1986-2007 by mental images GmbH