DepthPicture¶
Namespace Nfty.Core.Editing in assembly Nfty.Core.
Turns an ordinary picture into a DepthMap: the way an author who draws depth in any pixel editor hands it to nfty. The red channel is the front depth, the green channel the back depth; blue and alpha are ignored, so a picture that happens to carry them (a preview, a screenshot of the map) reads the same as one that does not.
Methods¶
ToMap(Image<Rgba32>)¶
Reads front (red) and back (green) depth, pixel for pixel, from a picture.
Parameters
picture(Image<Rgba32>) - The depth picture; its size becomes the map's size.
Returns. A new DepthMap the size of the picture.