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