Lens shaders are not only used to change the direction of eye rays: they can also be used to manipulate colors (see mib_lens_clamp) and even the apparent shape of the rendered images.
This lens shader may be used to block out portions of an image by overlaying a stencil texture. An eye ray is cast only if the returned value of the provided scalar texture is between the prescribed floor and ceiling values. If the texture value is below the floor value, then the floor color is used; if the texture value is above the ceiling value, then the ceiling color is used. If the texture value is between the floor and the ceiling value, then the returned color is blended with the floor color and the weight provided by the relative texture value, with respect to the floor and ceiling values.
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License