Bit 0-1: Texture Coordinate

 0x00: None
 0x01: 8 bit
 0x02: 16 bit
 0x03: 32 bit float

Bit 2-4: Color Coordinate

 0x00: None
 0x01: Res1?
 0x02: Res2?
 0x03: Res3?
 0x04: 5650
 0x05: 5551
 0x06: 4444
 0x07: 8888

Bit 5-6: Normal Type

 0x00: None
 0x01: 8 bit
 0x02: 16 bit
 0x03: 32 bit float

Bit 7-8: Vertex Type

 0x00: None?
 0x01: 8 bit
 0x02: 16 bit
 0x03: 32 bit float

Bit 9-10: Weight type

 0x00: None
 0x01: 8 bit
 0x02: 16 bit
 0x03: 32 bit float

Bit 11-12: Index Type

 0x00: None
 0x01: 8 bit
 0x02: 16 bit
 0x03: ???

Bit 14-16: Number of weights (1-8 % 8)

Bit 23: Transform

 0x00: Transform coordinate
 0x01: Do not transform coordinate

Vertex components are always in the order:

  1. weights
  2. texture
  3. color
  4. normal
  5. vertex

but can otherwise be mixed and matched as necessary. Padding and alignment appears to follow C rules, so just declare your structs. For example:

 struct MyVertex
 {
    u16 u,v;     //16-bit texture coordinates, in texels (can be scaled)
    u32 color;   //RGBA8888
    float x,y,z; //position
 };
 
psp/ge_vertex_format.txt · Last modified: 2008/05/15 00:07
 
Recent changes RSS feed Creative Commons License Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki