2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-16 10:57:02 +00:00

hsh pipelines for ThermalCold, ThermalHot, ElemenGen

Plus various fixes
This commit is contained in:
2020-10-02 18:58:57 -04:00
parent 485e0afb43
commit 6c56f6452e
16 changed files with 277 additions and 402 deletions

View File

@@ -32,20 +32,20 @@ void CSkinnedModel::Calculate(const CPoseAsTransforms& pose, const CModelFlags&
const std::optional<CVertexMorphEffect>& morphEffect,
const float* morphMagnitudes) {
if (morphEffect || g_PointGenFunc) {
if (auto vertBuf = m_modelInst->UpdateUniformData(drawFlags, nullptr, nullptr)) {
if (auto* vertBuf = m_modelInst->UpdateUniformData(drawFlags, nullptr, nullptr)) {
x10_skinRules->TransformVerticesCPU(m_vertWorkspace, pose, *x4_model);
if (morphEffect)
morphEffect->MorphVertices(m_vertWorkspace, morphMagnitudes, x10_skinRules, pose);
if (g_PointGenFunc)
g_PointGenFunc(g_PointGenCtx, m_vertWorkspace);
x4_model->ApplyVerticesCPU(vertBuf, m_vertWorkspace);
x4_model->ApplyVerticesCPU(*vertBuf, m_vertWorkspace);
m_modifiedVBO = true;
}
} else {
if (auto vertBuf =
if (auto* vertBuf =
m_modelInst->UpdateUniformData(drawFlags, x10_skinRules.GetObj(), &pose)) {
if (m_modifiedVBO) {
x4_model->RestoreVerticesCPU(vertBuf);
x4_model->RestoreVerticesCPU(*vertBuf);
m_modifiedVBO = false;
}
}