Parse M2 render flags and apply per-batch blend modes

Water/lava batches in fountain and Ironforge M2 models use non-opaque
blend modes (alpha, additive) defined in the M2 material table. Without
parsing these, they rendered as solid surfaces extending visibly beyond
their containers. Now each batch looks up its blend mode from the
material array and sets the appropriate GL blend function.
This commit is contained in:
Kelsi 2026-02-06 01:54:25 -08:00
parent b83ec336b6
commit ce4299fe51
4 changed files with 76 additions and 1 deletions

View file

@ -32,6 +32,7 @@ struct M2ModelGPU {
uint32_t indexCount = 0;
bool hasAlpha = false;
uint16_t textureAnimIndex = 0xFFFF; // 0xFFFF = no texture animation
uint16_t blendMode = 0; // 0=Opaque, 1=AlphaKey, 2=Alpha, 3=Add, etc.
};
GLuint vao = 0;