The Shader is a module for mixing and shading multiple textures with a height profile. It is an easy way to simulate shiny and reflective surfaces.
You can change the locations of two Light Sources at the preview image. These light sources are placed on a virtual sphere around the texture. The smaller the distance of a light source to the center of the preview image is, the higher it will be placed.
At the right side of the shader form, there are a number of maps that you can load and configure. Each map is selected by clicking on its image with the mouse:
The most important map is the Heightmap. It supplies the relief data, which is required to compute the shading, the reflection angles and the shadows. You can stretch the height values with the Amplification controller. Use the Smoothness parameter to blur the height map and avoid quantization artifacts that result from the limited height resolution of images.
The Surface Map defines the colors of the texture, which are shaded by the height map profile. With the Opacity Map along with the Opacity parameter, the transparency of the surface is adjusted. For materials like plastic, glass and water, the surface parameters Shininess and Shininess Strength control the intensity and sharpness of specular highlights.
The Floor Map will be visible at transparent areas of the surface and is drawn distorted by refraction. The strength of the refractive distortion can be regulated with the Refractivity controller.
Reflections are simulated by employing the Environment Map. Light rays are thrown back and deflected dependent on the height map profile. The distance of the environment to the viewer, i.e the strength of the distortion, is amplified by the Distortion parameter. The intensity of the reflection is regulated by the Reflectivity Map and the Reflectivity scrollbar. Set the Reflectivity controller to negative values to invert the Reflectivity Map, making previous opaque areas transparent and vice versa. Increasing the reflectivity of the surface makes the Floor Map less visible.
The basic level of light is defined by the Ambient Light color. Dependent on shadows and the height map normals, the illumination is determined by the two Light Source colors and their intensity. The length of the simulated shadows is defined by the Shadow Length parameter. Set this value to 0% to disable the time-expensive shadow calculation. Smooth shadows can be achieved by increasing the Smooth Shadows value.
The color controllers Scaling and Bias are utilized to adjust the brightness and contrast of the output image.
Tip: If you want to use the shader in your scripts, call it with the shade command.