[add] 키입력 매크로
[fix] 그림자 뎁스 오류 수정 [add] 그림자 범위 확장
This commit is contained in:
@@ -149,11 +149,6 @@ _matrix CLight_Main::Get_OffCenterProjMatrix(_fmatrix ViewMatrix, vector<_float3
|
||||
fMinY = min(fMinY, y); fMaxY = max(fMaxY, y);
|
||||
fMinZ = min(fMinZ, z); fMaxZ = max(fMaxZ, z);
|
||||
}
|
||||
if (fMinZ > fMaxZ)
|
||||
{
|
||||
swap(fMinZ, fMaxZ);
|
||||
}
|
||||
|
||||
_float fShadowDepthMArgin = 10.f; // 캐릭터 이동 보정
|
||||
fMinZ -= fShadowDepthMArgin;
|
||||
fMaxZ += fShadowDepthMArgin;
|
||||
@@ -199,7 +194,7 @@ void CLight_Main::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("LIGHT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
if (GUI::CollapsingHeader("Main_Light")) {
|
||||
if (GUI::Button("Capture_PreShadow") || m_pGameInstance->Key_Down(DIK_F12)) {
|
||||
if (GUI::Button("Capture_PreShadow")) {
|
||||
if (FAILED(Capture_PreShadow())) {
|
||||
assert(false);
|
||||
}
|
||||
|
||||
@@ -1079,65 +1079,110 @@ ID3D11ShaderResourceView* CGameInstance::Add_Resource(const _char* pFilePath)
|
||||
|
||||
bool CGameInstance::Key_Pressing(int _iKey)
|
||||
{
|
||||
//if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow))) {
|
||||
#ifndef _DEBUG
|
||||
return m_pKey_Manager->Key_Pressing(_iKey);
|
||||
#endif // !_DEBUG
|
||||
#ifdef _DEBUG
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow)OPTIONAL_TRUE_KEYINPUTGUICHECK)) {
|
||||
return m_pKey_Manager->Key_Pressing(_iKey);
|
||||
//}
|
||||
}
|
||||
#endif // _DEBUG
|
||||
return false;
|
||||
}
|
||||
bool CGameInstance::Key_Up(int _iKey)
|
||||
{
|
||||
//if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow))) {
|
||||
#ifndef _DEBUG
|
||||
return m_pKey_Manager->Key_Up(_iKey);
|
||||
#endif // !_DEBUG
|
||||
#ifdef _DEBUG
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow)OPTIONAL_TRUE_KEYINPUTGUICHECK)) {
|
||||
return m_pKey_Manager->Key_Up(_iKey);
|
||||
//}
|
||||
}
|
||||
#endif // _DEBUG
|
||||
return false;
|
||||
}
|
||||
bool CGameInstance::Key_Down(int _iKey)
|
||||
{
|
||||
//if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow))) {
|
||||
#ifndef _DEBUG
|
||||
return m_pKey_Manager->Key_Down(_iKey);
|
||||
#endif // !_DEBUG
|
||||
#ifdef _DEBUG
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow)OPTIONAL_TRUE_KEYINPUTGUICHECK)) {
|
||||
return m_pKey_Manager->Key_Down(_iKey);
|
||||
//}
|
||||
}
|
||||
#endif // _DEBUG
|
||||
return false;
|
||||
}
|
||||
_bool CGameInstance::Mouse_Pressing(int _iKey)
|
||||
{
|
||||
//if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow))) {
|
||||
#ifndef _DEBUG
|
||||
return m_pKey_Manager->Mouse_Pressing(_iKey);
|
||||
#endif // !_DEBUG
|
||||
#ifdef _DEBUG
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow)OPTIONAL_TRUE_KEYINPUTGUICHECK)) {
|
||||
return m_pKey_Manager->Mouse_Pressing(_iKey);
|
||||
//}
|
||||
}
|
||||
#endif // _DEBUG
|
||||
return false;
|
||||
}
|
||||
_bool CGameInstance::Mouse_Up(int _iKey)
|
||||
{
|
||||
//if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow))) {
|
||||
#ifndef _DEBUG
|
||||
return m_pKey_Manager->Mouse_Up(_iKey);
|
||||
#endif // !_DEBUG
|
||||
#ifdef _DEBUG
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow)OPTIONAL_TRUE_KEYINPUTGUICHECK)) {
|
||||
return m_pKey_Manager->Mouse_Up(_iKey);
|
||||
//}
|
||||
}
|
||||
#endif // _DEBUG
|
||||
return false;
|
||||
}
|
||||
_bool CGameInstance::Mouse_Down(int _iKey)
|
||||
{
|
||||
//if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow))) {
|
||||
#ifndef _DEBUG
|
||||
return m_pKey_Manager->Mouse_Down(_iKey);
|
||||
#endif // !_DEBUG
|
||||
#ifdef _DEBUG
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow)OPTIONAL_TRUE_KEYINPUTGUICHECK)) {
|
||||
return m_pKey_Manager->Mouse_Down(_iKey);
|
||||
//}
|
||||
}
|
||||
#endif // _DEBUG
|
||||
return false;
|
||||
}
|
||||
_bool CGameInstance::Mouse_StartMove()
|
||||
{
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow))) {
|
||||
#ifndef _DEBUG
|
||||
return m_pKey_Manager->Mouse_StartMove();
|
||||
#endif // !_DEBUG
|
||||
#ifdef _DEBUG
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow)OPTIONAL_TRUE_KEYINPUTGUICHECK)) {
|
||||
return m_pKey_Manager->Mouse_StartMove();
|
||||
}
|
||||
#endif // _DEBUG
|
||||
return false;
|
||||
}
|
||||
_bool CGameInstance::Mouse_Moving()
|
||||
{
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow))) {
|
||||
#ifndef _DEBUG
|
||||
return m_pKey_Manager->Mouse_Moving();
|
||||
#endif // !_DEBUG
|
||||
#ifdef _DEBUG
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow)OPTIONAL_TRUE_KEYINPUTGUICHECK)) {
|
||||
return m_pKey_Manager->Mouse_Moving();
|
||||
}
|
||||
#endif // _DEBUG
|
||||
return false;
|
||||
}
|
||||
_bool CGameInstance::Mouse_StopMove()
|
||||
{
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow))) {
|
||||
#ifndef _DEBUG
|
||||
return m_pKey_Manager->Mouse_StopMove();
|
||||
#endif // !_DEBUG
|
||||
#ifdef _DEBUG
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow)OPTIONAL_TRUE_KEYINPUTGUICHECK)) {
|
||||
return m_pKey_Manager->Mouse_StopMove();
|
||||
}
|
||||
#endif // _DEBUG
|
||||
return false;
|
||||
}
|
||||
_float3 CGameInstance::Get_MouseMove()
|
||||
|
||||
@@ -305,10 +305,12 @@ void CPipeLine::Make_LightBoxes()
|
||||
if (iIndex == 1) targetPlanes = m_vMiddleShadowViewBoxPlane;
|
||||
if (iIndex == 2) targetPlanes = m_vFarShadowViewBoxPlane;
|
||||
|
||||
if (fMinZ > fMaxZ)
|
||||
{
|
||||
swap(fMinZ, fMaxZ);
|
||||
}
|
||||
fMinX += m_vShadowBoxMarginMin.x;
|
||||
fMaxX += m_vShadowBoxMarginMax.x;
|
||||
fMinY += m_vShadowBoxMarginMin.y;
|
||||
fMaxY += m_vShadowBoxMarginMax.y;
|
||||
fMinZ += m_vShadowBoxMarginMin.z;
|
||||
fMaxZ += m_vShadowBoxMarginMax.z;
|
||||
|
||||
targetPlanes[0] = _float4(-1.f, 0.f, 0.f, fMinX); // Left
|
||||
targetPlanes[1] = _float4(1.f, 0.f, 0.f, -fMaxX); // Right
|
||||
@@ -317,7 +319,6 @@ void CPipeLine::Make_LightBoxes()
|
||||
targetPlanes[4] = _float4(0.f, 0.f, -1.f, fMinZ); // Near
|
||||
targetPlanes[5] = _float4(0.f, 0.f, 1.f, -fMaxZ); // Far
|
||||
|
||||
|
||||
XMStoreFloat4x4(&m_ShadowTransformStateMatrices[iIndex][ENUM_CLASS(D3DTS::VIEW)], ViewMatrix);
|
||||
XMStoreFloat4x4(&m_ShadowTransformStateMatrices[iIndex][ENUM_CLASS(D3DTS::VIEW_INV)], ViewInvMatrix);
|
||||
|
||||
@@ -425,6 +426,8 @@ void CPipeLine::Describe_Entity()
|
||||
_float fSafe_RadiusMultiplier = m_fSafe_RadiusMultiplier;
|
||||
_float fSafe_RadiusMargin = m_fSafe_RadiusMargin;
|
||||
_float4 vShadowBias = m_vShadowBias;
|
||||
_float3 vShadowBoxMarginMin = m_vShadowBoxMarginMin;
|
||||
_float3 vShadowBoxMarginMax = m_vShadowBoxMarginMax;
|
||||
if (GUI::DragFloat("m_fShadowNearBoxRatio", &fNear, 0.01f, 0.01f, 0.999f, "%.2f")) {
|
||||
bModified = true;
|
||||
}
|
||||
@@ -441,6 +444,12 @@ void CPipeLine::Describe_Entity()
|
||||
if (GUI::DragFloat4("ShadowBiasNMFS", (_float*)&vShadowBias, 0.0001f, 0.0001f, 1.f, "%.4f")) {
|
||||
bModified = true;
|
||||
}
|
||||
if (GUI::SliderFloat3("fShadowBoxMarginMin", (_float*)&vShadowBoxMarginMin, -100.F, 100.f, "%.1f")) {
|
||||
bModified = true;
|
||||
}
|
||||
if (GUI::SliderFloat3("fShadowBoxMarginMax", (_float*)&vShadowBoxMarginMax, -100.F, 100.f, "%.1f")) {
|
||||
bModified = true;
|
||||
}
|
||||
GUI::PushItemWidth(80.f);
|
||||
if (true == bModified) {
|
||||
m_fShadowNearBoxRatio = fNear;
|
||||
@@ -448,6 +457,8 @@ void CPipeLine::Describe_Entity()
|
||||
m_vShadowBias = vShadowBias;
|
||||
m_fSafe_RadiusMultiplier = fSafe_RadiusMultiplier;
|
||||
m_fSafe_RadiusMargin = fSafe_RadiusMargin;
|
||||
m_vShadowBoxMarginMin = vShadowBoxMarginMin;
|
||||
m_vShadowBoxMarginMax = vShadowBoxMarginMax;
|
||||
}
|
||||
}
|
||||
GUI::End();
|
||||
|
||||
@@ -21,24 +21,31 @@
|
||||
#define ASSERT_JINHO(expression)
|
||||
#define ASSERT_HYUNBIN(expression)
|
||||
#define ASSERT_INHYUK(expression)
|
||||
#define OPTIONAL_TRUE_KEYINPUTGUICHECK
|
||||
|
||||
#ifdef 기무리
|
||||
#undef ASSERT_NURI
|
||||
#define ASSERT_NURI(expression) assert(expression)
|
||||
//#define OPTIONAL_TRUE_KEYINPUTGUICHECK ||true
|
||||
#elif 진우
|
||||
#undef ASSERT_JINWOO
|
||||
#define ASSERT_JINWOO(expression) assert(expression)
|
||||
#define OPTIONAL_TRUE_KEYINPUTGUICHECK ||true
|
||||
#elif gimch
|
||||
#undef ASSERT_JINHO
|
||||
#define ASSERT_JINHO(expression) assert(expression)
|
||||
#define OPTIONAL_TRUE_KEYINPUTGUICHECK ||true
|
||||
#elif Bin
|
||||
#undef ASSERT_HYUNBIN
|
||||
#define ASSERT_HYUNBIN(expression) assert(expression)
|
||||
#define OPTIONAL_TRUE_KEYINPUTGUICHECK ||true
|
||||
#elif 인혁
|
||||
#undef ASSERT_INHYUK
|
||||
#define ASSERT_INHYUK(expression) assert(expression)
|
||||
#define OPTIONAL_TRUE_KEYINPUTGUICHECK ||true
|
||||
#endif
|
||||
|
||||
|
||||
#pragma endregion
|
||||
|
||||
|
||||
|
||||
@@ -60,6 +60,9 @@ class CPipeLine final : public CBase
|
||||
_float m_fShadowFarBoxRatio = { 0.15f };
|
||||
_float m_fSafe_RadiusMultiplier = { 2.3f };
|
||||
_float m_fSafe_RadiusMargin = { 10.f };
|
||||
_float3 m_vShadowBoxMarginMin = { 0.f, 0.f, -25.f };
|
||||
_float3 m_vShadowBoxMarginMax = { 0.f, 0.f, 25.f };
|
||||
|
||||
_float4 m_vShadowBias = { 0.0018f, 0.0018f, 0.0018f, 0.0018f };
|
||||
|
||||
_float4 m_vOriginalRenderFrustumPoints[8] = {};
|
||||
|
||||
@@ -53,7 +53,7 @@ class CRenderer final : public CBase
|
||||
_float4x4 m_PreShadowProj = {};
|
||||
|
||||
/* TunningParam */
|
||||
_int m_iToneMappingType = { 0 };
|
||||
_int m_iToneMappingType = { 2 };
|
||||
_float m_fExposure = { 0.7f };
|
||||
|
||||
// Bloom
|
||||
|
||||
Reference in New Issue
Block a user