mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-21 15:43:45 +00:00
Hardware Skinning Support
- Supports GL, D3D9 & D3D11 - Extends vertex formats & shadergen to support blend indices and weights - Adds basic support for using 4x3 matrices for shader constants - Supports software fallback
This commit is contained in:
parent
507c239a87
commit
3496c549b5
72 changed files with 2533 additions and 1327 deletions
|
|
@ -245,6 +245,12 @@ void RenderGlowMgr::render( SceneRenderState *state )
|
|||
matrixSet.setProjection(*passRI->projection);
|
||||
glowMat->setTransforms(matrixSet, state);
|
||||
|
||||
// Setup HW skinning transforms if applicable
|
||||
if (glowMat->usesHardwareSkinning())
|
||||
{
|
||||
glowMat->setNodeTransforms(passRI->mNodeTransforms, passRI->mNodeTransformCount);
|
||||
}
|
||||
|
||||
glowMat->setSceneInfo(state, sgData);
|
||||
glowMat->setBuffers(passRI->vertBuff, passRI->primBuff);
|
||||
|
||||
|
|
|
|||
|
|
@ -176,6 +176,12 @@ void RenderMeshMgr::render(SceneRenderState * state)
|
|||
matrixSet.setProjection(*passRI->projection);
|
||||
mat->setTransforms(matrixSet, state);
|
||||
|
||||
// Setup HW skinning transforms if applicable
|
||||
if (mat->usesHardwareSkinning())
|
||||
{
|
||||
mat->setNodeTransforms(passRI->mNodeTransforms, passRI->mNodeTransformCount);
|
||||
}
|
||||
|
||||
setupSGData( passRI, sgData );
|
||||
mat->setSceneInfo( state, sgData );
|
||||
|
||||
|
|
|
|||
|
|
@ -371,6 +371,17 @@ struct MeshRenderInst : public RenderInst
|
|||
GFXTextureObject *accuTex;
|
||||
GFXCubemap *cubemap;
|
||||
|
||||
/// @name Hardware Skinning
|
||||
/// {
|
||||
MatrixF *mNodeTransforms;
|
||||
U32 mNodeTransformCount;
|
||||
/// }
|
||||
|
||||
#ifdef TORQUE_ENABLE_GFXDEBUGEVENTS
|
||||
const char *meshName;
|
||||
const char *objectName;
|
||||
#endif
|
||||
|
||||
void clear();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -430,6 +430,12 @@ void RenderPrePassMgr::render( SceneRenderState *state )
|
|||
matrixSet.setProjection(*passRI->projection);
|
||||
mat->setTransforms(matrixSet, state);
|
||||
|
||||
// Setup HW skinning transforms if applicable
|
||||
if (mat->usesHardwareSkinning())
|
||||
{
|
||||
mat->setNodeTransforms(passRI->mNodeTransforms, passRI->mNodeTransformCount);
|
||||
}
|
||||
|
||||
// If we're instanced then don't render yet.
|
||||
if ( mat->isInstanced() )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -243,6 +243,12 @@ void RenderTranslucentMgr::render( SceneRenderState *state )
|
|||
matrixSet.setProjection(*passRI->projection);
|
||||
mat->setTransforms(matrixSet, state);
|
||||
|
||||
// Setup HW skinning transforms if applicable
|
||||
if (mat->usesHardwareSkinning())
|
||||
{
|
||||
mat->setNodeTransforms(passRI->mNodeTransforms, passRI->mNodeTransformCount);
|
||||
}
|
||||
|
||||
// If we're instanced then don't render yet.
|
||||
if ( mat->isInstanced() )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue