 
 
 
 
 
   
One method to renormalize the vectors is to use a cube map texture. Cube map texturing is a form of texture mapping that uses a 3D direction vector built from the texture coordinates (s, t, r) to access a texture that consists of six square 2D images arranged like the faces of a cube [10].
In order to normalize a vector, the cube map can be thought as a way to store a look-up table indexed by a direction vector (Figure 5(a)). This means that vectors of varying length which point in the same direction do not change the lookup result. The normalization given in Formula 4 is precomputed for discrete values of and stored in the cube map.
 and stored in the cube map.
![$ [-1,1]$](img36.png) to
 to ![$ [0,1]$](img37.png) and stored
as colors (Figure 5(b)).
 and stored
as colors (Figure 5(b)).
 
 
 
 
