| 3381 | } |
| 3382 | |
| 3383 | void TSBasicVertexFormat::getFormat(GFXVertexFormat &fmt) |
| 3384 | { |
| 3385 | // NOTE: previously the vertex data was padded to allow for verts to be skinned via SSE. |
| 3386 | // since we now prefer to skin on the GPU and use a basic non-SSE fallback for software |
| 3387 | // skinning, adding in padding via GFXSemantic::PADDING or dummy fields is no longer required. |
| 3388 | fmt.addElement(GFXSemantic::POSITION, GFXDeclType_Float3); |
| 3389 | fmt.addElement(GFXSemantic::TANGENTW, GFXDeclType_Float, 3); |
| 3390 | fmt.addElement(GFXSemantic::NORMAL, GFXDeclType_Float3); |
| 3391 | fmt.addElement(GFXSemantic::TANGENT, GFXDeclType_Float3); |
| 3392 | |
| 3393 | fmt.addElement(GFXSemantic::TEXCOORD, GFXDeclType_Float2, 0); |
| 3394 | |
| 3395 | if (texCoordOffset >= 0 || colorOffset >= 0) |
| 3396 | { |
| 3397 | fmt.addElement(GFXSemantic::TEXCOORD, GFXDeclType_Float2, 1); |
| 3398 | fmt.addElement(GFXSemantic::COLOR, GFXDeclType_Color); |
| 3399 | } |
| 3400 | |
| 3401 | for (U32 i=0; i<numBones; i++) |
| 3402 | { |
| 3403 | fmt.addElement(GFXSemantic::BLENDINDICES, GFXDeclType_UByte4, i); |
| 3404 | fmt.addElement(GFXSemantic::BLENDWEIGHT, GFXDeclType_Float4, i); |
| 3405 | } |
| 3406 | } |
| 3407 | |
| 3408 | void TSBasicVertexFormat::calculateSize() |
| 3409 | { |
no test coverage detected