Xors3d Engine
Textures blending types

Defines

#define TEXBLEND_ADD   3
#define TEXBLEND_ALPHA   1
#define TEXBLEND_DOT3   4
#define TEXBLEND_LIGHTMAP   5
#define TEXBLEND_MULTIPLY   2
#define TEXBLEND_NONE   0
#define TEXBLEND_SEPARATEALPHA   6

Define Documentation

#define TEXBLEND_NONE   0

Texture will not be blended with other layers.

#define TEXBLEND_ALPHA   1

Texture will be blended with other layers in respect to its alpha value.

#define TEXBLEND_MULTIPLY   2

Texture pixel colors will be multiplied.

#define TEXBLEND_ADD   3

Texture pixel colors will be added.

#define TEXBLEND_DOT3   4

Emulates DOT3 bump-mapping. Modulates the components of each argument as signed components, adds their products; then replicates the sum to all color channels, including alpha. This operation is supported for color and alpha operations.

#define TEXBLEND_LIGHTMAP   5

Texture pixel colors will be multiplied and shifted the products to the left 1 bit (effectively multiplying them by 2) for brightening. Used for lightmaps.

#define TEXBLEND_SEPARATEALPHA   6

Texture will be blended with another one in respect to alpha value of previous layer. E.g. you may set diffuse maps on layers #0 and #2 and separate them with alpha-map (set texture with alpha channel on layer #1). It is useful if you need to blend tiled textures, but you do not need an alpha channel to be tiled.