Controlling the Appearance of Texture Mapping
Using Texture Modes
Mode |
P'rgb |
P'a |
REPLACE |
Trgb |
Ta |
DECAL |
Prgb*(1-Ta)+Trgb*Ta |
Pa |
MODULATE |
Prgb*Trgb |
Pa*Ta |
BLEND |
Prgb*(1-Trgb)+Brgb*Trgb |
Pa*Ta |
- Where:
- Prgb is the color of the pixel being texture mapped,
as if no texture-mapping was to take place
- Pa is the alpha of the pixel being texture mapped,
as if no texture-mapping was to take place
- Trgb is the texture color
- Ta is the texture alpha
- Brgb is the blend color
- Ba is the blend alpha
- Non-primed quantities denote before
- Primed quantities denote after