enum mrpt::viz::TAlphaMode
Overview
How the alpha channel of a texture is used, as glTF alphaMode. More…
#include <CVisualObject.h> enum TAlphaMode { Auto = 0, Opaque, Mask, Blend, };
Detailed Documentation
How the alpha channel of a texture is used, as glTF alphaMode.
See also:
VisualObjectParams_TexturedTriangles::setAlphaMode()
Enum Values
Auto
The default, detected from the texture by assignImage(): Opaque if all its alpha values are at least 248 (e.g.
RGB textures), or if there is no texture; Mask if the alpha is (nearly) binary: below 8, or at least 248 for all but 5% of the texels; Blend otherwise. Opaque ones are drawn as opaque objects (e.g. instanced, and before translucent ones) and their texture alpha is ignored, unless their vertex colors are translucent. After changing the alpha of an assigned image in place (e.g. a shared CImage), call assignImage() again to detect it again.
Opaque
Alpha is ignored.
Mask
Cutout: fragments with alpha below the cutoff are discarded, and the rest are fully opaque.
Correct in any drawing order, also in shadows and depth images. Best for foliage, fences, etc.
Blend
Alpha blending, for semi-transparent surfaces.