diff --git a/Editor/ViewManager.cpp b/Editor/ViewManager.cpp index 5c7a56d22..a64a701f1 100644 --- a/Editor/ViewManager.cpp +++ b/Editor/ViewManager.cpp @@ -20,6 +20,8 @@ namespace urde void ViewManager::BuildTestPART(urde::IObjectStore& objStore) { + //m_modelTest = objStore.GetObj("CMDL_GameCube"); + //m_partGenDesc = objStore.GetObj({hecl::FOURCC('PART'), 0x972A5CD2}); m_partGenDesc = objStore.GetObj("BusterSparks"); m_partGen.reset(new urde::CElementGen(m_partGenDesc, @@ -56,6 +58,11 @@ void ViewManager::ParticleView::resized(const boo::SWindowRect& root, const boo: void ViewManager::ParticleView::draw(boo::IGraphicsCommandQueue *gfxQ) { + if (m_vm.m_modelTest) + { + CModelFlags flags; + m_vm.m_modelTest->Draw(flags); + } if (m_vm.m_partGen) { m_vm.m_partGen->Update(1.0 / 60.0); diff --git a/Editor/ViewManager.hpp b/Editor/ViewManager.hpp index be366cb5c..ab2e45628 100644 --- a/Editor/ViewManager.hpp +++ b/Editor/ViewManager.hpp @@ -9,6 +9,7 @@ #include "Runtime/Particle/CElementGen.hpp" #include "Runtime/Graphics/CLineRenderer.hpp" #include "Runtime/Graphics/CMoviePlayer.hpp" +#include "Runtime/Graphics/CModel.hpp" namespace urde { @@ -47,6 +48,7 @@ class ViewManager : public specter::IViewManager void draw(boo::IGraphicsCommandQueue* gfxQ); }; std::unique_ptr m_particleView; + urde::TLockedToken m_modelTest; urde::TLockedToken m_partGenDesc; std::unique_ptr m_partGen; std::unique_ptr m_lineRenderer; diff --git a/Runtime/CTimeProvider.cpp b/Runtime/CTimeProvider.cpp index 6f2af6bac..bc7e37c8c 100644 --- a/Runtime/CTimeProvider.cpp +++ b/Runtime/CTimeProvider.cpp @@ -1,7 +1,5 @@ #include "CTimeProvider.hpp" -#if 0 #include "Graphics/CGraphics.hpp" -#endif namespace urde { @@ -14,9 +12,7 @@ CTimeProvider::CTimeProvider(const float& time) g_currentTimeProvider = this; -#if 0 CGraphics::SetExternalTimeProvider(this); -#endif } CTimeProvider::~CTimeProvider() @@ -24,9 +20,7 @@ CTimeProvider::~CTimeProvider() g_currentTimeProvider = x8_lastProvider; if (g_currentTimeProvider) g_currentTimeProvider->x4_first = true; -#if 0 - CGraphics::SetExternalTimeProvider(g_TimeProvider); -#endif + CGraphics::SetExternalTimeProvider(g_currentTimeProvider); } } diff --git a/Runtime/Graphics/CGraphics.cpp b/Runtime/Graphics/CGraphics.cpp index b9eb095fb..d317dd725 100644 --- a/Runtime/Graphics/CGraphics.cpp +++ b/Runtime/Graphics/CGraphics.cpp @@ -1,6 +1,7 @@ #include "Graphics/CGraphics.hpp" #include "Graphics/CLight.hpp" #include "zeus/Math.hpp" +#include "CTimeProvider.hpp" #undef near #undef far @@ -18,6 +19,7 @@ bool CGraphics::g_InterruptLastFrameUsedAbove = false; ERglLightBits CGraphics::g_LightActive = ERglLightBits::None; ERglLightBits CGraphics::g_LightsWereOn = ERglLightBits::None; zeus::CTransform CGraphics::g_GXModelView; +zeus::CTransform CGraphics::g_GXModelViewInvXpose; zeus::CTransform CGraphics::g_GXModelMatrix; zeus::CTransform CGraphics::g_ViewMatrix; zeus::CVector3f CGraphics::g_ViewPoint; @@ -116,6 +118,8 @@ void CGraphics::SetViewMatrix() g_GXModelView = g_CameraMatrix * g_GXModelMatrix; /* Load position matrix */ /* Inverse-transpose */ + g_GXModelViewInvXpose = g_GXModelView.inverse(); + g_GXModelViewInvXpose.m_basis.transpose(); /* Load normal matrix */ } @@ -297,6 +301,16 @@ void CGraphics::SetViewportResolution(const zeus::CVector2i& res) g_ViewportResolutionHalf = {res.x / 2, res.y / 2}; } +CTimeProvider* CGraphics::g_ExternalTimeProvider = nullptr; +float CGraphics::g_DefaultSeconds; + +float CGraphics::GetSecondsMod900() +{ + if (!g_ExternalTimeProvider) + return g_DefaultSeconds; + return g_ExternalTimeProvider->x0_currentTime; +} + boo::IGraphicsDataFactory* CGraphics::g_BooFactory = nullptr; boo::IGraphicsCommandQueue* CGraphics::g_BooMainCommandQueue = nullptr; boo::ITextureR* CGraphics::g_SpareTexture = nullptr; diff --git a/Runtime/Graphics/CGraphics.hpp b/Runtime/Graphics/CGraphics.hpp index 152d44493..f4a2d838d 100644 --- a/Runtime/Graphics/CGraphics.hpp +++ b/Runtime/Graphics/CGraphics.hpp @@ -13,6 +13,7 @@ namespace urde { class CLight; +class CTimeProvider; enum class ERglLight : u8 { @@ -172,6 +173,7 @@ public: static ERglLightBits g_LightActive; static ERglLightBits g_LightsWereOn; static zeus::CTransform g_GXModelView; + static zeus::CTransform g_GXModelViewInvXpose; static zeus::CTransform g_GXModelMatrix; static zeus::CTransform g_ViewMatrix; static zeus::CVector3f g_ViewPoint; @@ -211,6 +213,12 @@ public: static zeus::CVector3f ProjectModelPointToViewportSpace(const zeus::CVector3f& point); static void SetViewportResolution(const zeus::CVector2i& res); + static CTimeProvider* g_ExternalTimeProvider; + static float g_DefaultSeconds; + static void SetExternalTimeProvider(CTimeProvider* provider) + {g_ExternalTimeProvider = provider;} + static float GetSecondsMod900(); + static boo::IGraphicsDataFactory* g_BooFactory; static boo::IGraphicsCommandQueue* g_BooMainCommandQueue; static boo::ITextureR* g_SpareTexture; diff --git a/Runtime/Graphics/CModel.hpp b/Runtime/Graphics/CModel.hpp index 00b0ad271..56af7efff 100644 --- a/Runtime/Graphics/CModel.hpp +++ b/Runtime/Graphics/CModel.hpp @@ -18,15 +18,15 @@ class CTexture; struct CModelFlags { - u8 f1; /* Blend state 3/5 enable additive */ - u8 f2; - u16 f3; /* Depth state */ + u8 m_blendMode = 0; /* Blend state 3/5 enable additive */ + u8 m_matSetIdx = 0; + u16 m_flags = 0; /* Flags */ zeus::CColor color; /* Set into kcolor slot specified by material */ - /* depth flags + /* Flags 0x4: render without texture lock - 0x8: greater - 0x10: non-inclusive + 0x8: depth greater + 0x10: depth non-inclusive */ }; @@ -39,20 +39,30 @@ struct CBooSurface CBooSurface* m_next = nullptr; }; +struct SUnskinnedXf +{ + zeus::CMatrix4f mv; + zeus::CMatrix4f mvinv; + zeus::CMatrix4f proj; +}; + class CBooModel { + friend class CModel; public: + using MaterialSet = DataSpec::DNAMP1::HMDLMaterialSet; + using UVAnimation = DataSpec::DNAMP1::MaterialSet::Material::UVAnimation; struct SShader { std::vector> x0_textures; std::vector m_shaders; - DataSpec::DNAMP1::HMDLMaterialSet m_matSet; + MaterialSet m_matSet; void UnlockTextures(); }; private: std::vector* x0_surfaces; - const DataSpec::DNAMP1::HMDLMaterialSet* x4_matSet; + const MaterialSet* x4_matSet; const std::vector* m_pipelines; boo::IVertexFormat* m_vtxFmt; boo::IGraphicsBufferS* x8_vbo; @@ -65,25 +75,35 @@ private: bool x40_25_ : 1; u8 x41_shortNormals; + struct UVAnimationBuffer + { + std::vector m_buffer; + std::vector> m_ranges; + void ProcessAnimation(const UVAnimation& anim); + void PadOutBuffer(); + void Update(const MaterialSet* matSet); + } m_uvAnimBuffer; + /* urde addition: boo! */ boo::GraphicsDataToken m_gfxToken; - boo::IGraphicsBufferD* m_uniformBuffer; + boo::IGraphicsBufferD* m_unskinnedXfBuffer; + boo::IGraphicsBufferD* m_uvMtxBuffer; std::vector m_shaderDataBindings; + void BuildGfxToken(); + void UpdateUniformData() const; void DrawAlphaSurfaces(const CModelFlags& flags) const; void DrawNormalSurfaces(const CModelFlags& flags) const; void DrawSurfaces(const CModelFlags& flags) const; void DrawSurface(const CBooSurface& surf, const CModelFlags& flags) const; - void BuildGfxToken(); - public: CBooModel(std::vector* surfaces, SShader& shader, boo::IVertexFormat* vtxFmt, boo::IGraphicsBufferS* vbo, boo::IGraphicsBufferS* ibo, const zeus::CAABox& aabb, u8 shortNormals, bool texturesLoaded); - static void MakeTexuresFromMats(const DataSpec::DNAMP1::HMDLMaterialSet& matSet, + static void MakeTexuresFromMats(const MaterialSet& matSet, std::vector>& toksOut, IObjectStore& store); @@ -94,7 +114,7 @@ public: void DrawNormal(const CModelFlags& flags) const; void Draw(const CModelFlags& flags) const; - const DataSpec::DNAMP1::HMDLMaterialSet::Material& GetMaterialByIndex(int idx) const + const MaterialSet::Material& GetMaterialByIndex(int idx) const { return x4_matSet->materials.at(idx); } @@ -122,6 +142,8 @@ class CModel void VerifyCurrentShader(int shaderIdx) const; public: + using MaterialSet = DataSpec::DNAMP1::HMDLMaterialSet; + CModel(std::unique_ptr&& in, u32 dataLen, IObjectStore* store); void DrawSortedParts(const CModelFlags& flags) const; void DrawUnsortedParts(const CModelFlags& flags) const; diff --git a/Runtime/Graphics/CModelBoo.cpp b/Runtime/Graphics/CModelBoo.cpp index 39125e9cc..7d43ff461 100644 --- a/Runtime/Graphics/CModelBoo.cpp +++ b/Runtime/Graphics/CModelBoo.cpp @@ -9,14 +9,6 @@ namespace urde static logvisor::Module Log("urde::CModelBoo"); bool CBooModel::g_DrawingOccluders = false; -struct SUnskinnedUniforms -{ - zeus::CMatrix4f mv; - zeus::CMatrix4f mvinv; - zeus::CMatrix4f proj; - zeus::CMatrix4f tex[8]; -}; - CBooModel::CBooModel(std::vector* surfaces, SShader& shader, boo::IVertexFormat* vtxFmt, boo::IGraphicsBufferS* vbo, boo::IGraphicsBufferS* ibo, const zeus::CAABox& aabb, u8 shortNormals, bool texturesLoaded) @@ -30,7 +22,7 @@ CBooModel::CBooModel(std::vector* surfaces, SShader& shader, for (auto it=x0_surfaces->rbegin() ; it != x0_surfaces->rend() ; ++it) { u32 matId = it->m_data.matIdx; - const DataSpec::DNAMP1::HMDLMaterialSet::Material& matData = GetMaterialByIndex(matId); + const MaterialSet::Material& matData = GetMaterialByIndex(matId); if (matData.flags.depthSorting()) { it->m_next = x3c_firstSortedSurface; @@ -49,14 +41,16 @@ CBooModel::CBooModel(std::vector* surfaces, SShader& shader, void CBooModel::BuildGfxToken() { - m_gfxToken = CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool + m_gfxToken = CGraphics::CommitResources( + [&](boo::IGraphicsDataFactory::Context& ctx) -> bool { - m_uniformBuffer = ctx.newDynamicBuffer(boo::BufferUse::Vertex, sizeof(SUnskinnedUniforms), 1); - boo::IGraphicsBuffer* bufs[] = {m_uniformBuffer}; + m_unskinnedXfBuffer = ctx.newDynamicBuffer(boo::BufferUse::Vertex, + sizeof(SUnskinnedXf), 1); + boo::IGraphicsBuffer* bufs[] = {m_unskinnedXfBuffer}; m_shaderDataBindings.reserve(x4_matSet->materials.size()); auto pipelineIt = m_pipelines->begin(); std::vector texs; - for (const DataSpec::DNAMP1::HMDLMaterialSet::Material& mat : x4_matSet->materials) + for (const MaterialSet::Material& mat : x4_matSet->materials) { texs.clear(); texs.reserve(mat.textureIdxs.size()); @@ -65,15 +59,17 @@ void CBooModel::BuildGfxToken() TCachedToken& tex = (*x1c_textures)[idx]; texs.push_back(tex.GetObj()->GetBooTexture()); } - m_shaderDataBindings.push_back(ctx.newShaderDataBinding(*pipelineIt, m_vtxFmt, x8_vbo, nullptr, xc_ibo, 1, bufs, - mat.textureIdxs.size(), texs.data())); + m_shaderDataBindings.push_back( + ctx.newShaderDataBinding(*pipelineIt, m_vtxFmt, + x8_vbo, nullptr, xc_ibo, 1, bufs, + mat.textureIdxs.size(), texs.data())); ++pipelineIt; } return true; }); } -void CBooModel::MakeTexuresFromMats(const DataSpec::DNAMP1::HMDLMaterialSet& matSet, +void CBooModel::MakeTexuresFromMats(const MaterialSet& matSet, std::vector>& toksOut, IObjectStore& store) { @@ -146,7 +142,7 @@ void CBooModel::DrawNormalSurfaces(const CModelFlags& flags) const void CBooModel::DrawSurfaces(const CModelFlags& flags) const { - if (!(flags.f3 & 0x4)) + if (!(flags.m_flags & 0x4)) if (!TryLockTextures()) return; @@ -167,7 +163,7 @@ void CBooModel::DrawSurfaces(const CModelFlags& flags) const void CBooModel::DrawSurface(const CBooSurface& surf, const CModelFlags& flags) const { - const DataSpec::DNAMP1::HMDLMaterialSet::Material& data = GetMaterialByIndex(surf.m_data.matIdx); + const MaterialSet::Material& data = GetMaterialByIndex(surf.m_data.matIdx); if (data.flags.shadowOccluderMesh() && !g_DrawingOccluders) return; @@ -175,18 +171,144 @@ void CBooModel::DrawSurface(const CBooSurface& surf, const CModelFlags& flags) c CGraphics::DrawArrayIndexed(surf.m_data.idxStart, surf.m_data.idxCount); } +void CBooModel::UVAnimationBuffer::ProcessAnimation(const UVAnimation& anim) +{ + m_buffer.emplace_back(); + zeus::CMatrix4f& matrixOut = m_buffer.back(); + switch (anim.mode) + { + case UVAnimation::Mode::MvInvNoTranslation: + { + + matrixOut = CGraphics::g_ViewMatrix.inverse().multiplyIgnoreTranslation( + CGraphics::g_GXModelMatrix).toMatrix4f(); + matrixOut.vec[3].zeroOut(); + break; + } + case UVAnimation::Mode::MvInv: + { + matrixOut = (CGraphics::g_ViewMatrix.inverse() * CGraphics::g_GXModelMatrix).toMatrix4f(); + break; + } + case UVAnimation::Mode::Scroll: + { + matrixOut.vec[3].x = CGraphics::GetSecondsMod900() * anim.vals[2] + anim.vals[0]; + matrixOut.vec[3].y = CGraphics::GetSecondsMod900() * anim.vals[3] + anim.vals[1]; + break; + } + case UVAnimation::Mode::Rotation: + { + float angle = CGraphics::GetSecondsMod900() * anim.vals[1] + anim.vals[0]; + float acos = std::cos(angle); + float asin = std::sin(angle); + matrixOut.vec[0].x = acos; + matrixOut.vec[0].y = asin; + matrixOut.vec[1].x = -asin; + matrixOut.vec[1].y = acos; + matrixOut.vec[3].x = (1.0 - (acos - asin)) * 0.5; + matrixOut.vec[3].y = (1.0 - (asin + acos)) * 0.5; + break; + } + case UVAnimation::Mode::HStrip: + { + float value = anim.vals[2] * anim.vals[0] * (anim.vals[3] + CGraphics::GetSecondsMod900()); + matrixOut.vec[3].x = anim.vals[1] * fmod(value, 1.0f) * anim.vals[2]; + break; + } + case UVAnimation::Mode::VStrip: + { + float value = anim.vals[2] * anim.vals[0] * (anim.vals[3] + CGraphics::GetSecondsMod900()); + matrixOut.vec[3].y = anim.vals[1] * fmod(value, 1.0f) * anim.vals[2]; + break; + } + case UVAnimation::Mode::Model: + { + matrixOut.vec[0].x = 0.5f; + matrixOut.vec[1].y = 0.0f; + matrixOut.vec[2].y = 0.5f; + matrixOut.vec[3].x = CGraphics::g_GXModelMatrix.m_origin.x * 0.5f; + matrixOut.vec[3].y = CGraphics::g_GXModelMatrix.m_origin.y * 0.5f; + break; + } + case UVAnimation::Mode::WhoMustNotBeNamed: + { + zeus::CTransform texmtx = CGraphics::g_ViewMatrix.inverse() * CGraphics::g_GXModelMatrix; + texmtx.m_origin.zeroOut(); + /* TODO: Finish */ + matrixOut = texmtx.toMatrix4f(); + break; + } + default: break; + } +} + +void CBooModel::UVAnimationBuffer::PadOutBuffer() +{ + size_t curEnd = 0; + if (m_ranges.size()) + curEnd = m_ranges.back().first + m_ranges.back().second; + + size_t bufRem = m_buffer.size() % 4; + if (bufRem) + for (int i=0 ; i<(4-bufRem) ; ++i) + m_buffer.emplace_back(); + size_t newEnd = m_buffer.size() * 64; + + m_ranges.emplace_back(curEnd, newEnd - curEnd); +} + +void CBooModel::UVAnimationBuffer::Update(const MaterialSet* matSet) +{ + m_buffer.clear(); + m_ranges.clear(); + + size_t bufCount = 0; + size_t count = 0; + for (const MaterialSet::Material& mat : matSet->materials) + { + count += mat.uvAnims.size(); + bufCount += mat.uvAnims.size(); + bufCount = ROUND_UP_4(bufCount); + } + m_buffer.reserve(bufCount); + m_ranges.reserve(count); + + for (const MaterialSet::Material& mat : matSet->materials) + { + for (const UVAnimation& anim : mat.uvAnims) + ProcessAnimation(anim); + PadOutBuffer(); + } +} + +void CBooModel::UpdateUniformData() const +{ + SUnskinnedXf unskinnedXf; + unskinnedXf.mv = CGraphics::g_GXModelView.toMatrix4f(); + unskinnedXf.mvinv = CGraphics::g_GXModelViewInvXpose.toMatrix4f(); + unskinnedXf.proj = CGraphics::GetPerspectiveProjectionMatrix(); + m_unskinnedXfBuffer->load(&unskinnedXf, sizeof(unskinnedXf)); + + ((CBooModel*)this)->m_uvAnimBuffer.Update(x4_matSet); + m_uvMtxBuffer->load(m_uvAnimBuffer.m_buffer.data(), + m_uvAnimBuffer.m_buffer.size() * 64); +} + void CBooModel::DrawAlpha(const CModelFlags& flags) const { + UpdateUniformData(); DrawAlphaSurfaces(flags); } void CBooModel::DrawNormal(const CModelFlags& flags) const { + UpdateUniformData(); DrawNormalSurfaces(flags); } void CBooModel::Draw(const CModelFlags& flags) const { + UpdateUniformData(); DrawSurfaces(flags); } @@ -248,7 +370,7 @@ CModel::CModel(std::unique_ptr&& in, u32 dataLen, IObjectStore* store) for (CBooModel::SShader& matSet : x18_matSets) { matSet.m_shaders.reserve(matSet.m_matSet.materials.size()); - for (const DataSpec::DNAMP1::HMDLMaterialSet::Material& mat : matSet.m_matSet.materials) + for (const MaterialSet::Material& mat : matSet.m_matSet.materials) { hecl::Runtime::ShaderTag tag(mat.heclIr, hmdlMeta.colorCount, hmdlMeta.uvCount, hmdlMeta.weightCount, @@ -296,24 +418,42 @@ void CModel::VerifyCurrentShader(int shaderIdx) const void CModel::DrawSortedParts(const CModelFlags& flags) const { + VerifyCurrentShader(flags.m_matSetIdx); + x28_modelInst->DrawAlpha(flags); } void CModel::DrawUnsortedParts(const CModelFlags& flags) const { + VerifyCurrentShader(flags.m_matSetIdx); + x28_modelInst->DrawNormal(flags); } void CModel::Draw(const CModelFlags& flags) const { + VerifyCurrentShader(flags.m_matSetIdx); + x28_modelInst->Draw(flags); } void CModel::Touch(int shaderIdx) const { + VerifyCurrentShader(shaderIdx); + x28_modelInst->TryLockTextures(); } bool CModel::IsLoaded(int shaderIdx) const { VerifyCurrentShader(shaderIdx); - return false; + std::vector>* texs = x28_modelInst->x1c_textures; + bool loaded = true; + for (TCachedToken& tex : *texs) + { + if (!tex.IsLoaded()) + { + loaded = false; + break; + } + } + return loaded; } CFactoryFnReturn FModelFactory(const urde::SObjectTag& tag, diff --git a/Runtime/GuiSys/CGuiModel.cpp b/Runtime/GuiSys/CGuiModel.cpp index eb5b49b34..206d6c245 100644 --- a/Runtime/GuiSys/CGuiModel.cpp +++ b/Runtime/GuiSys/CGuiModel.cpp @@ -66,9 +66,9 @@ void CGuiModel::Draw(const CGuiWidgetDrawParms& parms) const case EGuiModelDrawFlags::Shadeless: { CModelFlags flags; - flags.f1 = 0; - flags.f2 = 0; - flags.f3 = 3; + flags.m_blendMode = 0; + flags.m_matSetIdx = 0; + flags.m_flags = 3; flags.color = zeus::CColor::skWhite; model->Draw(flags); break; @@ -76,9 +76,9 @@ void CGuiModel::Draw(const CGuiWidgetDrawParms& parms) const case EGuiModelDrawFlags::Opaque: { CModelFlags flags; - flags.f1 = 1; - flags.f2 = 0; - flags.f3 = 3; + flags.m_blendMode = 1; + flags.m_matSetIdx = 0; + flags.m_flags = 3; flags.color = moduCol; model->Draw(flags); break; @@ -86,9 +86,9 @@ void CGuiModel::Draw(const CGuiWidgetDrawParms& parms) const case EGuiModelDrawFlags::Alpha: { CModelFlags flags; - flags.f1 = 4; - flags.f2 = 0; - flags.f3 = (xf7_24_depthWrite << 1) | xf6_31_depthTest; + flags.m_blendMode = 4; + flags.m_matSetIdx = 0; + flags.m_flags = (xf7_24_depthWrite << 1) | xf6_31_depthTest; flags.color = moduCol; model->Draw(flags); break; @@ -96,9 +96,9 @@ void CGuiModel::Draw(const CGuiWidgetDrawParms& parms) const case EGuiModelDrawFlags::Additive: { CModelFlags flags; - flags.f1 = 3; - flags.f2 = 0; - flags.f3 = (xf7_24_depthWrite << 1) | xf6_31_depthTest; + flags.m_blendMode = 3; + flags.m_matSetIdx = 0; + flags.m_flags = (xf7_24_depthWrite << 1) | xf6_31_depthTest; flags.color = moduCol; model->Draw(flags); break; @@ -106,15 +106,15 @@ void CGuiModel::Draw(const CGuiWidgetDrawParms& parms) const case EGuiModelDrawFlags::AlphaAdditiveOverdraw: { CModelFlags flags; - flags.f1 = 4; - flags.f2 = 0; - flags.f3 = xf6_31_depthTest; + flags.m_blendMode = 4; + flags.m_matSetIdx = 0; + flags.m_flags = xf6_31_depthTest; flags.color = moduCol; model->Draw(flags); - flags.f1 = 5; - flags.f2 = 0; - flags.f3 = (xf7_24_depthWrite << 1) | xf6_31_depthTest; + flags.m_blendMode = 5; + flags.m_matSetIdx = 0; + flags.m_flags = (xf7_24_depthWrite << 1) | xf6_31_depthTest; flags.color = moduCol; model->Draw(flags); break; diff --git a/hecl b/hecl index c6feb6438..c5faedae3 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit c6feb64383aa84fee18afa423e741bfa3dca4a74 +Subproject commit c5faedae338e1573ee2c97ef606623775df59936 diff --git a/specter b/specter index 66a07ccca..33ce8bc20 160000 --- a/specter +++ b/specter @@ -1 +1 @@ -Subproject commit 66a07ccca4b244a29e2cc82d728cbb0641c6daec +Subproject commit 33ce8bc20ba776e5868230aec459cd31c7e6554b