bmap_to_normals(BMAP* bmap,var factor)
Converts the given bmap into a normals map, needed for DOT3
bumpmapping. A normals map contains, at each pixel position, instead
of the RGB color values the XYZ components of the normal of a height
map calculated from the luminance of the original bmap.
Parameters:
bmap - bitmap to be converted to normals
factor - scale for the bitmap luminance
Returns:
0 if the conversion failed
bmap otherwise
Speed:
Slow
Edition:
C
P
See also:
bmap_to_uv, bmap_to_mipmap