From 8096ffc29af89df4f52e106015316952b9694f96 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Thu, 10 Mar 2022 03:27:50 -0500 Subject: [PATCH] CCubeMaterial: Fix kcolor set in HandleTransparency --- Runtime/Graphics/CCubeMaterial.cpp | 2 +- Runtime/GuiSys/CGuiFrame.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Runtime/Graphics/CCubeMaterial.cpp b/Runtime/Graphics/CCubeMaterial.cpp index f00422196..27d7ede8e 100644 --- a/Runtime/Graphics/CCubeMaterial.cpp +++ b/Runtime/Graphics/CCubeMaterial.cpp @@ -469,7 +469,7 @@ void CCubeMaterial::HandleTransparency(u32& finalTevCount, u32& finalKColorCount // GXSetTevOrder(finalTevCount, 255, 255, 255); aurora::gfx::set_tev_k_color(static_cast(finalKColorCount), modelFlags.x4_color); // GXSetTevKColor(finalKColorCount, modelFlags.x4_color); - aurora::gfx::set_tev_k_color_sel(static_cast(finalKColorCount), + aurora::gfx::set_tev_k_color_sel(static_cast(finalTevCount), static_cast(finalKColorCount + GX::TEV_KCSEL_K0)); // GXSetTevKColorSel(finalTevCount, finalKColorCount+12); aurora::gfx::set_tev_k_alpha_sel(static_cast(finalTevCount), diff --git a/Runtime/GuiSys/CGuiFrame.cpp b/Runtime/GuiSys/CGuiFrame.cpp index 2898ae5a6..bf56b984a 100644 --- a/Runtime/GuiSys/CGuiFrame.cpp +++ b/Runtime/GuiSys/CGuiFrame.cpp @@ -124,10 +124,11 @@ void CGuiFrame::Update(float dt) { xc_headWidget->Update(dt); } void CGuiFrame::Draw(const CGuiWidgetDrawParms& parms) const { SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(FMT_STRING("CGuiFrame::Draw FRME_{}"), x0_id).c_str(), zeus::skMagenta); CGraphics::SetCullMode(ERglCullMode::None); + // CGraphics::ResetGfxStates(); CGraphics::SetAmbientColor(zeus::skWhite); DisableLights(); x14_camera->Draw(parms); - // Set one-stage modulate + CGraphics::SetTevOp(ERglTevStage::Stage0, CTevCombiners::sTevPass805a5ebc); CGraphics::SetBlendMode(ERglBlendMode::Blend, ERglBlendFactor::SrcAlpha, ERglBlendFactor::InvSrcAlpha, ERglLogicOp::Clear);