[add] Building ShadowBake

This commit is contained in:
kimnuri
2025-12-08 17:06:54 +09:00
parent 2d7a600d2e
commit 7104d0c6d6
13 changed files with 160 additions and 88 deletions
@@ -44,6 +44,35 @@ HRESULT CInstancedProp::Render()
return S_OK;
}
HRESULT CInstancedProp::Render_Shadow()
{
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Bind_Shadow_Resource(m_pShaderCom, "g_ViewMatrix", D3DTS::VIEW))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Bind_Shadow_Resource(m_pShaderCom, "g_ProjMatrix", D3DTS::PROJ))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", &m_pGameInstance->Get_ShadowDesc()->fFar, sizeof(_float)))) {
return E_FAIL;
}
for (_uint i = 0; i < m_iNumMesh; i++)
{
if (FAILED(m_pVIBufferInstanceCom->Bind_Matrial(m_pShaderCom, i)))
return E_FAIL;
if (FAILED(m_pShaderCom->Begin(0)))
return E_FAIL;
m_pVIBufferInstanceCom->Render(i);
}
return S_OK;
}
HRESULT CInstancedProp::Initialize_Prototype()
{
return S_OK;