[fix] 디버그 타이머 정리 및 SSAO/시스템 UI 개선
디버그 타이머 측정 코드를 정리하여 대부분의 타이머가 항상 동작하도록 변경하였고, SSAO 반경 최소값을 15.f로 낮췄습니다. SSAO 블러 렌더링 함수와 관련 멤버 변수를 추가했으며, ImGui 기반 시스템 정보 및 타임 멀티플라이어 UI를 도입했습니다. 디버그 전용 타이머 등록 구조를 완화하여 디버그/릴리즈 모드 간 타이머 동작 차이를 줄였습니다.
This commit is contained in:
@@ -71,7 +71,6 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_PriorityUpdate")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -99,7 +98,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_FrameCount")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
|
||||
_float fTimeAcc = { };
|
||||
@@ -124,9 +123,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
|
||||
|
||||
if (fTimeAcc >= 1.f / 60.f)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
pGameInstance->Compute_TimeDelta(TEXT("Timer_FrameCount"));
|
||||
#endif // _DEBUG
|
||||
|
||||
pGameInstance->Compute_TimeDelta(TEXT("Timer_60"));
|
||||
|
||||
@@ -141,10 +138,8 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
|
||||
pMainApp->Render();
|
||||
|
||||
fTimeAcc = 0.f;
|
||||
#ifdef _DEBUG
|
||||
pGameInstance->Compute_TimeDelta(TEXT("Timer_FrameCount"));
|
||||
pMainApp->Compute_FrameCount();
|
||||
#endif // _DEBUG
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -68,8 +68,8 @@ void CMainApp::Update(_float fTimeDelta)
|
||||
ImGui_ImplDX11_NewFrame();
|
||||
ImGui_ImplWin32_NewFrame();
|
||||
GUI::NewFrame();
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Present_TimeCost();
|
||||
#ifdef _DEBUG
|
||||
GUI::Begin("SYSTEM", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
GUI::SliderFloat("fTimeMult", &g_fTimeMult, 0.01f, 4.f);
|
||||
|
||||
@@ -170,15 +170,11 @@ void CGameInstance::Update_Engine(_float fTimeDelta)
|
||||
|
||||
HRESULT CGameInstance::Draw()
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
Compute_TimeDelta(TEXT("Timer_DrawCall"));
|
||||
#endif // _DEBUG
|
||||
m_pRenderer->Render();
|
||||
|
||||
m_pLevel_Manager->Render();
|
||||
#ifdef _DEBUG
|
||||
Compute_TimeDelta(TEXT("Timer_DrawCall"));
|
||||
#endif // _DEBUG
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -321,13 +317,9 @@ void CGameInstance::Render_Begin(const _float4* pClearColor)
|
||||
|
||||
void CGameInstance::Render_End()
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
Compute_TimeDelta(TEXT("Timer_Present"));
|
||||
#endif // _DEBUG
|
||||
m_pGraphic_Device->Present();
|
||||
#ifdef _DEBUG
|
||||
Compute_TimeDelta(TEXT("Timer_Present"));
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Bind_DepthStencil(CShader* pShader, const _char* pContantName)
|
||||
@@ -360,7 +352,6 @@ void CGameInstance::Compute_TimeDelta(const _wstring& strTimerTag)
|
||||
|
||||
void CGameInstance::Compute_FrameCount()
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
m_fTimer_PriorityUpdate = Get_TimeDelta(TEXT("Timer_PriorityUpdate"));
|
||||
m_fTimer_Update = Get_TimeDelta(TEXT("Timer_Update"));
|
||||
m_fTimer_LateUpdate = Get_TimeDelta(TEXT("Timer_LateUpdate"));
|
||||
@@ -391,13 +382,11 @@ void CGameInstance::Compute_FrameCount()
|
||||
m_fTimer_Render_Tone_Mapping = Get_TimeDelta(TEXT("Timer_Render_Tone_Mapping"));
|
||||
m_fTimer_Render_UI = Get_TimeDelta(TEXT("Timer_Render_UI"));
|
||||
m_fTimer_Render_UI_Overley = Get_TimeDelta(TEXT("Timer_Render_UI_Overley"));
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
void CGameInstance::Present_TimeCost()
|
||||
{
|
||||
#pragma region TimeCost
|
||||
#ifdef _DEBUG
|
||||
_float fTotal = m_fTimer_PriorityUpdate
|
||||
+ m_fTimer_Update
|
||||
+ m_fTimer_LateUpdate
|
||||
@@ -649,7 +638,6 @@ void CGameInstance::Present_TimeCost()
|
||||
GUI::Text("%f\t%f", GUI::GetIO().Framerate, GUI::GetIO().DeltaTime);
|
||||
}
|
||||
GUI::End();
|
||||
#endif // _DEBUG
|
||||
#pragma endregion
|
||||
}
|
||||
|
||||
|
||||
@@ -43,46 +43,36 @@ void CGameObject_Manager::Priority_Update(_float fTimeDelta)
|
||||
#ifndef gimch
|
||||
Describe_Entity();
|
||||
#endif // !gimch
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_PriorityUpdate"));
|
||||
#endif // _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_PriorityUpdate"));
|
||||
for (size_t i = 0; i < m_iNumLevels; i++)
|
||||
{
|
||||
for (auto& Pair : m_pLayers[i])
|
||||
Pair.second->Priority_Update(fTimeDelta);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_PriorityUpdate"));
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
void CGameObject_Manager::Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_Update"));
|
||||
#endif // _DEBUG
|
||||
for (size_t i = 0; i < m_iNumLevels; i++)
|
||||
{
|
||||
for (auto& Pair : m_pLayers[i])
|
||||
Pair.second->Update(fTimeDelta);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_Update"));
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
void CGameObject_Manager::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_LateUpdate"));
|
||||
#endif // _DEBUG
|
||||
for (size_t i = 0; i < m_iNumLevels; i++)
|
||||
{
|
||||
for (auto& Pair : m_pLayers[i])
|
||||
Pair.second->Late_Update(fTimeDelta);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_LateUpdate"));
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
void CGameObject_Manager::Clear(_uint iLevelIndex)
|
||||
|
||||
@@ -57,18 +57,14 @@ _uint CLevel_Manager::Get_NextLevelID()
|
||||
|
||||
void CLevel_Manager::Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_Level"));
|
||||
#endif // _DEBUG
|
||||
if (nullptr == m_pCurrentLevel){
|
||||
return;
|
||||
}
|
||||
|
||||
m_pCurrentLevel->Update(fTimeDelta);
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_Level"));
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
HRESULT CLevel_Manager::Render()
|
||||
|
||||
@@ -507,9 +507,7 @@ void CPhysX_Manager::Update_Kinematic()
|
||||
|
||||
void CPhysX_Manager::Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_PhysX"));
|
||||
#endif // _DEBUG
|
||||
if (nullptr == m_pScene) {
|
||||
return;
|
||||
}
|
||||
@@ -525,9 +523,7 @@ void CPhysX_Manager::Update(_float fTimeDelta)
|
||||
Update_Dynamic_ActiveActors();
|
||||
//Update_Dynamic_AllActors();
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_PhysX"));
|
||||
#endif // _DEBUG
|
||||
}
|
||||
void CPhysX_Manager::Update_Dynamic_ActiveActors()
|
||||
{
|
||||
|
||||
@@ -45,13 +45,9 @@ HRESULT CPicking::Initialize(HWND hWnd, _uint iSizeX, _uint iSizeY)
|
||||
|
||||
void CPicking::Update()
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_Picking"));
|
||||
#endif // _DEBUG
|
||||
m_pGameInstance->Copy_RenderTargetTo(TEXT("Target_Depth"), m_pTexture2D);
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_Picking"));
|
||||
#endif // _DEBUG
|
||||
}
|
||||
_bool CPicking::isPicking(_float3* pOut)
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ void CRenderer::Render()
|
||||
Render_NonBlend();
|
||||
Render_Decal();
|
||||
Render_EffectNonBlend();
|
||||
Render_SSAO();\
|
||||
Render_SSAO();
|
||||
Render_SSAO_BLUR();
|
||||
Render_LightAcc();
|
||||
Render_Combined();
|
||||
|
||||
@@ -723,7 +723,7 @@ void CRenderer::Describe_Entitiy()
|
||||
GUI::DragFloat("fMinShadowBrightness", &m_fMinShadowBrightness, 0.01f, 0.0f, 1.f, "%.3f");
|
||||
GUI::Checkbox("UsePhongShader", &m_bUsePhongShader);
|
||||
_float fDepthOcclusionThreshold = m_pGameInstance->Get_DepthOcclusionThreshold();
|
||||
if (GUI::SliderFloat("DepthOcclusionThreshold", &fDepthOcclusionThreshold, 50.f, 150.f, "%.1f")) {
|
||||
if (GUI::SliderFloat("DepthOcclusionThreshold", &fDepthOcclusionThreshold, 15.f, 150.f, "%.1f")) {
|
||||
m_pGameInstance->Set_DepthOcclusionThreshold(fDepthOcclusionThreshold);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,6 @@ HRESULT CTimer_Manager::Add_Timer(const _wstring& strTimerTag)
|
||||
|
||||
HRESULT CTimer_Manager::Initialize()
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
if (FAILED(Add_Timer(TEXT("Timer_Render_Priority")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -107,7 +106,6 @@ HRESULT CTimer_Manager::Initialize()
|
||||
if (FAILED(Add_Timer(TEXT("Timer_Render_UI_Overley")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
#endif // _DEBUG
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
void Toggle_RenderCollider() { m_bRenderCollider = !m_bRenderCollider; }
|
||||
#endif RELEASE_DEBUGGER
|
||||
_float Get_DepthOcclusionThreshold() const { return m_fDepthOcclusionThreshold; }
|
||||
void Set_DepthOcclusionThreshold(_float fThreshold) { m_fDepthOcclusionThreshold = max(50.f, min(150.f, fThreshold)); }
|
||||
void Set_DepthOcclusionThreshold(_float fThreshold) { m_fDepthOcclusionThreshold = max(15.f, min(150.f, fThreshold)); }
|
||||
#pragma region GRAPHIC_DEVICE
|
||||
public:
|
||||
void Render_Begin(const _float4* pClearColor);
|
||||
@@ -352,7 +352,6 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
_bool m_isSlowMotion = {};
|
||||
_float2 m_vSlowTime = {};
|
||||
_float m_fSlowIntense = {};
|
||||
#ifdef _DEBUG
|
||||
private:
|
||||
_bool m_bRendererTimerOpen = false;
|
||||
|
||||
@@ -391,7 +390,6 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
vector<const _char*> m_FilePaths = {};
|
||||
map<const _char*, CModel*> m_ModelMap;
|
||||
|
||||
#endif // _DEBUG
|
||||
_bool m_bRenderCollider = false;
|
||||
_bool m_bRenderSystem = false;
|
||||
_float m_fDepthOcclusionThreshold = 50.f;
|
||||
|
||||
@@ -130,6 +130,7 @@ class CRenderer final : public CBase
|
||||
_float m_fSSAO_Radius = { 0.543f };
|
||||
_float m_fSSAO_BIAS = { 0.401f };
|
||||
_float m_fSSAOStrength = { 4.f };
|
||||
_bool m_bSSAORangeCheck = { true };
|
||||
|
||||
SSAO_GEOMETRY_HEMISPHERE m_tagSSAOGeometry = {};
|
||||
SSAO_GEOMETRYDIRECTIONS_RANDOM_REAL m_tagSSAOGeometryDirections = {};
|
||||
|
||||
Reference in New Issue
Block a user