|
static shared_ptr< PixelTransferBuffer > | computeBumpMap (const shared_ptr< PixelTransferBuffer > &normalMap, float signConvention=-1.0f) |
|
More...
|
|
static shared_ptr< PixelTransferBuffer > | computeNormalMap (int width, int height, int channels, const unorm8 *src, const BumpMapPreprocess &preprocess=BumpMapPreprocess()) |
|
Given a monochrome, tangent-space bump map, computes a new image where the RGB channels are a tangent space normal map and the alpha channel is the original bump map. More...
|
|
static shared_ptr< BumpMap > | create (const shared_ptr< MapComponent< Image4 > > &normalBump, const Settings &settings) |
|
static shared_ptr< BumpMap > | create (const Specification &spec) |
|
static void | detectNormalBumpFormat (const unorm8 *bytes, int numComponents, int numPixels, bool &hasBump, bool &hasNormal, bool &bumpInRed) |
|
Normal + bump map for use with G3D::UniversalMaterial.
Supports Blinn normal mapping, Kaneko-Welsh parallax mapping, and Tatarchuk style parallax occlusion mapping.
static shared_ptr<PixelTransferBuffer> G3D::BumpMap::computeNormalMap |
( |
int |
width, |
|
|
int |
height, |
|
|
int |
channels, |
|
|
const unorm8 * |
src, |
|
|
const BumpMapPreprocess & |
preprocess = BumpMapPreprocess() |
|
) |
| |
|
static |
Given a monochrome, tangent-space bump map, computes a new image where the RGB channels are a tangent space normal map and the alpha channel is the original bump map.
Assumes the input image is tileable.
In the resulting image, x = red = tangent, y = green = binormal, and z = blue = normal.