A filter shader returns a spectrum as a function of shading parameters (UV coordinates, world-space position and normal, etc...). For instance, it may describe the spectral color of a diffuse material, and this color may vary across the object's surface.
Filter shader types
This filter shader returns a constant value, it does not depend on any parameter (wavelength or shading parameters)
- The constant filter shader value
This filter shader returns spectrum and does not depend on shading parameters
- Spectrum : The uniform spectrum value
This filter shader gets a RGB value from a texture at shading UV coordinates, and convert it to spectral values using the same algorithm as the RGB spectrum
An optional correction curve is applied to the raw RGB values, similar to a brightness/contrast/gamma adjustment:
- The value is first applied a gamma curve, controlled by the greypt parameter. The grey value (0.5) is mapped to greypt, hence setting greypt to 0.5 disables this correction
- Then, the value is scaled by the scale parameter
- And finally, offset is added to the value
In other words:
- Black(0) is mapped to the offset parameter
- White(1) is mapped to offset+scale
- Grey(0.5) is mapped to offset+scale*greypt
- Image : The image to use as a texture
- The non-linear grey point adjustment, between 0.25 and 0.9
- RGB value scaling, or contrast adjustment
- RGB value offset, or brightness adjustment
- The UV coordinates scaling factor. Scales the texture spatially over the geometry
Environment ground matte
This advanced filter shader computes the diffuse albedo of a horizontal lambertian surface, so that it has the same radiance as a ground point in the environment map. It assumes that envmap pixels below the horizon correspond to an horizontal, flat and diffuse ground.
This filter shader is very useful for rendering shadows cast over an envmap ground.
- Image : The envmap image
- The direction where the top of the envmap (zenith) is oriented in space. Should be orthogonal to front
- The direction where the center of the envmap is oriented in space. Should be orthogonal to up
- The camera position for projecting the environment on the geometry.
- Clamps the calculated RGB albedo values by this setting