mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
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:
parent
ad04da31c3
commit
4d80b92c39
4 changed files with 76 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue