mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-12-29 15:23:02 +05:00
disable backface culling for detached car components
This commit is contained in:
parent
092a0deefd
commit
92952941f3
1 changed files with 11 additions and 0 deletions
|
@ -67,6 +67,14 @@ void CObject::Render()
|
|||
SetEditableMaterialsCB(reinterpret_cast<RpAtomic*>(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<void*>(rwCULLMODECULLNONE));
|
||||
|
||||
bCallRestore = true;
|
||||
}
|
||||
else
|
||||
|
@ -75,7 +83,10 @@ void CObject::Render()
|
|||
CEntity::Render();
|
||||
|
||||
if ( bCallRestore )
|
||||
{
|
||||
ResetEditableMaterials(materialRestoreData);
|
||||
RwRenderStateSet(rwRENDERSTATECULLMODE, reinterpret_cast<void*>(rwCULLMODECULLBACK));
|
||||
}
|
||||
}
|
||||
|
||||
RwCamera* CShadowCamera::Update(CEntity* pEntity)
|
||||
|
|
Loading…
Reference in a new issue