Share via


TextureLoader.ComputeNormalMap Method ()

Converts a height map into a normal map.

Overload List

public static void ComputeNormalMap(Texture, Texture, NormalMap, Channel, float);
public static void ComputeNormalMap(Texture, Texture, out PaletteEntry, NormalMap, Channel, float);

Remarks

This method computes the normal by using the central difference with a kernel size of 3x3. The (x,y,z) components of each normal are mapped to the (r,g,b) channels of the output texture. RGB channels in the destination contain biased (x,y,z) components of the normal.

Exceptions

InvalidCallException

The method call is invalid. For example, a method's parameter might contain an invalid value.