sceGuDrawArray()
int vtype: bits from 14-15 seems to be a number of weights per vertex. Must be combined with GU_WEIGHT_xxx.
should be something like:
Code: Select all
#define GU_WEIGHTS_SHIFT(n) ((n)<<14)
#define GU_WEIGHTS_1 GU_WEIGHTS_SHIFT(0)
#define GU_WEIGHTS_2 GU_WEIGHTS_SHIFT(1)
#define GU_WEIGHTS_3 GU_WEIGHTS_SHIFT(2)
#define GU_WEIGHTS_4 GU_WEIGHTS_SHIFT(3)
Code: Select all
struct Vertex {
float weight; // GU_WEIGHT_32BITF | GU_WEIGHTS_1
float u, v;
float x, y, z;
};
struct Vertex2 {
float weight[4]; // GU_WEIGHT_32BITF | GU_WEIGHTS_4
float u, v;
float x, y, z;
};
sum( Vertex.weight * BoneMatrix ) * ModelMatrix.
Still trying to figure out how to use bone indices (matrix palette). Higher bits (16-23) in vertex type (sceGuDrawArray) definetly affect the size of the expected vertex - however not sure if they mean bone indices or something else.