fix for own regression [#34096] ocean sim vertex color bug
Caused by my assumption that alpha wasn't used for vertex colors. Infact it is used by blender-internal rendering, but typically only for blending strand particles. Updated comments to note this.
This commit is contained in:
@@ -118,9 +118,14 @@ typedef struct MLoopUV {
|
||||
#define MLOOPUV_VERTSEL 2
|
||||
#define MLOOPUV_PINNED 4
|
||||
|
||||
/* at the moment alpha is abused for vertex painting
|
||||
* and not used for transparency,
|
||||
* note that red and blue are _not_ swapped, as they are with #MCol */
|
||||
/**
|
||||
* at the moment alpha is abused for vertex painting,
|
||||
* otherwise it should _always_ be initialized to 255
|
||||
* Mostly its not used for transparency...
|
||||
* (except for blender-internal rendering, see [#34096]).
|
||||
*
|
||||
* \note red and blue are _not_ swapped, as they are with #MCol
|
||||
*/
|
||||
typedef struct MLoopCol {
|
||||
char r, g, b, a;
|
||||
} MLoopCol;
|
||||
|
||||
@@ -486,7 +486,8 @@ static DerivedMesh *doOcean(ModifierData *md, Object *ob,
|
||||
|
||||
mlcol = &mloopcols[mp->loopstart + j];
|
||||
mlcol->r = mlcol->g = mlcol->b = (char)(foam * 255);
|
||||
/* mc->a = 255; */ /* no need to set */
|
||||
/* This needs to be set (render engine uses) */
|
||||
mlcol->a = 255;
|
||||
} while (j--);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user