diff --git a/SAFix/GeneralSA.cpp b/SAFix/GeneralSA.cpp index cb4bcd0..5b90e31 100644 --- a/SAFix/GeneralSA.cpp +++ b/SAFix/GeneralSA.cpp @@ -67,6 +67,14 @@ void CObject::Render() SetEditableMaterialsCB(reinterpret_cast(m_pRwObject), &pData); pData->first = nullptr; + // Disable backface culling for the part +#ifdef _DEBUG + RwCullMode oldCullMode; + RwRenderStateGet(rwRENDERSTATECULLMODE, &oldCullMode); + assert(oldCullMode == rwCULLMODECULLBACK); +#endif + RwRenderStateSet(rwRENDERSTATECULLMODE, reinterpret_cast(rwCULLMODECULLNONE)); + bCallRestore = true; } else @@ -75,7 +83,10 @@ void CObject::Render() CEntity::Render(); if ( bCallRestore ) + { ResetEditableMaterials(materialRestoreData); + RwRenderStateSet(rwRENDERSTATECULLMODE, reinterpret_cast(rwCULLMODECULLBACK)); + } } RwCamera* CShadowCamera::Update(CEntity* pEntity)