ReliefSpecular

Author: Nils Daumann.

Description


This is a basic relief mapping shader with per pixel lighting based on a tangent space normalmap. It also adds specularity.

Works on shader model 3.0 capable cards. Supports fog and shadows.

Usage



 * Color is the general color of the material.
 * Height is a slider which adjusts how deep the heightmaps black pixels actually are (at least indirectly ;)).
 * Specular Color influences the color of the specularity.
 * Shininess influences the size of the specular highlights. The higher the value, the smaller the highlights.
 * Texture is mapped on the object using its uv set (put it into a textures RGB channels).
 * Specmap is a grayscale texture defining the specularity strength for each pixel of the texture (put it into the same textures alpha channel).
 * Normalmap is a tangent space normalmap used for the lighting (put it into a textures RGB channels).
 * Heightmap is a grayscale heightmap defining the shape of the surface (put it into the same textures alpha channel).
 * Tiling and Offset works for all textures.


 * You can adjust the speed and quality of the shader by adjusting the LINEAR_SEARCH and BINARY_SEARCH values in both passes. Higher values can slow it down a lot and also result in an error, but cause a higher quality (you should usually just stick to the default ones).

Download
[[Media:Relief_Specular.zip]]