Creating normal maps for use with hardware shaders

The normal maps created using the Transfer Maps editor can easily be displayed using your own custom hardware shaders. As there is no fixed way of implementing normal mapping in a hardware shader (for example, the shader may just be normal mapping with a single directional light, or it may be normal mapping with a color texture and two point lights, or it may be normal mapping with three lights and a reflection map, and so forth), the specific parameters and parameter names controlling the normal map on your hardware shader may vary. However, you can follow these general steps to configure the normal map for your shader:

  1. Generate the normal map.
  2. Create a hardware shader and assign it to your geometry as described in Work with CgFX shaders.
  3. Find the file texture input on the shader corresponding to the normal map and select the file you generated in step 1.
  4. If the map was generated using a non-default UV set, find the shader's surface data input specifying the UV set, tangent set and binormal inputs for the normal map and configure them to use the appropriate UV set.