I'm currently trying to retrieve a pixel from the terrains TN map (normal map) and create vertex normals from its value for my exporter.
Like so:
- Code: Select all
ZMAP nmMap = zproj_GetMap("TN");
float fPixel;
zmap_GetPixel(nmMap, i, j, &fPixel);
// Now, I would somehow need to convert fPixel value to a rgb value (preferably of ColourPixel type),
// so I could calculate my own normal vector from that.
Not really sure how to convert the fPixel variable.
Or - as it is 32bit (I reckon), just pass in an UINT and trim to 24bit (color value)?
You see, I'm a bit confused
