[add] Cascade 일단 렌더링 되는거 확인

This commit is contained in:
kimnuri
2025-12-15 11:41:11 +09:00
parent 31842e1359
commit 63b39c4d75
81 changed files with 825 additions and 418 deletions
-35
View File
@@ -54,7 +54,6 @@ HRESULT CCamera::Bind_Matrices()
if (true == m_bActive) {
m_pGameInstance->Set_Transform(D3DTS::VIEW, XMMatrixInverse(nullptr, XMLoadFloat4x4(m_pTransformCom->Get_WorldMatrixPtr())));
m_pGameInstance->Set_Transform(D3DTS::PROJ, XMMatrixPerspectiveFovLH(m_fFovy, m_fAspect, m_fNear, m_fFar));
Ready_Shadow();
}
return S_OK;
}
@@ -143,40 +142,6 @@ const _float* CCamera::Get_CurrentFar()
return &m_fFar;
}
HRESULT CCamera::Ready_Shadow()
{
if (nullptr == m_pLookTarget) {
return S_OK;
}
ShadowDesc = *m_pGameInstance->Get_ShadowDesc();
ShadowDesc.fFar = 200.f;
ShadowDesc.fNear = 0.1f;
ShadowDesc.fWidth = 192.f;
ShadowDesc.fHeight = 168.f;
XMStoreFloat4(&ShadowDesc.vAt, m_pLookTarget->Get_WorldPostion());
_matrix matRotation = XMMatrixRotationRollPitchYaw(XMConvertToRadians(m_vRollPichYaw.x), XMConvertToRadians(m_vRollPichYaw.y), XMConvertToRadians(m_vRollPichYaw.z));
XMStoreFloat4(&ShadowDesc.vEye, XMLoadFloat4(&ShadowDesc.vAt) - matRotation.r[2] * (ShadowDesc.fFar * 0.25f));
#ifdef _DEBUG
GUI::Begin("SYSTEM", 0, IMGUI_GLOBAL_BEGIN_FLAG);
if (GUI::CollapsingHeader("Near_Camera_ShadowDesc")) {
//GUI::SliderFloat3("RPY", (_float*)&m_vRollPichYaw, -360.f, 360.f);
GUI::DragFloat("Far", &ShadowDesc.fFar, 1.f, 20, 300.f);
GUI::DragFloat("width", &ShadowDesc.fWidth, 1.f, 20.f, 100.f, "%.1f");
GUI::DragFloat("height", &ShadowDesc.fHeight, 1.f, 20.f, 100.f, "%.1f");
GUI::Text("%f %f %f %f", ShadowDesc.vAt.x, ShadowDesc.vAt.y, ShadowDesc.vAt.z, ShadowDesc.vAt.w);
}
GUI::End();
#endif // _DEBUG
if (FAILED(m_pGameInstance->Ready_Shadow_Light(ShadowDesc))) {
return E_FAIL;
}
return S_OK;
}
void CCamera::ZoomIn(_float fTimeDelta)
{
if (m_fFovy > XMConvertToRadians(40.f))