Microsoft DirectX 9.0 SDK Update (October 2004)

TextureLoader.ComputeNormalMap Method

Language:

Note: This documentation is preliminary and is subject to change.

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.


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center