From 4ad14e28666096fbe98714aac2ece7810efd0686 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Wed, 31 Dec 2025 15:20:28 +0900 Subject: [PATCH] [fix] OutLine EMISSIVE --- .../Client/Private/BroomRacerAI.cpp | 2 - Jusin154_Team3D/Client/Private/Loader.cpp | 4 +- .../Private/MapElement_Interactable.cpp | 12 ------ .../ShaderFiles/Shader_NPC_PBR_Anim.hlsl | 2 +- .../ShaderFiles/Shader_VtxAnimMesh.hlsl | 2 +- .../Resources/ShaderFiles/Shader_VtxMesh.hlsl | 4 +- Jusin154_Team3D/Engine/Public/Engine_Macro.h | 13 +++--- Jusin154_Team3D/Engine/Public/GameInstance.h | 40 +++++++++---------- 8 files changed, 34 insertions(+), 45 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/BroomRacerAI.cpp b/Jusin154_Team3D/Client/Private/BroomRacerAI.cpp index 8bc737ef4..b8637e861 100644 --- a/Jusin154_Team3D/Client/Private/BroomRacerAI.cpp +++ b/Jusin154_Team3D/Client/Private/BroomRacerAI.cpp @@ -116,8 +116,6 @@ HRESULT CBroomRacerAI::Initialize(void* pArg) void CBroomRacerAI::Priority_Update(_float fTimeDelta) { __super::Priority_Update(fTimeDelta); - - } void CBroomRacerAI::Update(_float fTimeDelta) diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index c7377a354..12b545966 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -1,4 +1,5 @@ -#include "pch.h" +#pragma region HEADER +#include "pch.h" #include "Camera_Debug.h" #include "Client_Struct.h" #include "GameInstance.h" @@ -231,6 +232,7 @@ #pragma endregion +#pragma endregion CLoader::CLoader(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : m_pDevice{ pDevice } diff --git a/Jusin154_Team3D/Client/Private/MapElement_Interactable.cpp b/Jusin154_Team3D/Client/Private/MapElement_Interactable.cpp index 6999d09c0..ac6a3296c 100644 --- a/Jusin154_Team3D/Client/Private/MapElement_Interactable.cpp +++ b/Jusin154_Team3D/Client/Private/MapElement_Interactable.cpp @@ -272,18 +272,6 @@ HRESULT CMapElement_Interactable::Render_OutLine() return E_FAIL; } -#ifdef _DEBUG - GUI::Begin("Unit", 0, IMGUI_GLOBAL_BEGIN_FLAG); - if (GUI::CollapsingHeader("OutLine")) { - GUI::SetNextItemWidth(80.f); - GUI::ColorPicker3("vOutLineColor", (_float*)&m_vOutLineColor); - GUI::SliderFloat("Thickness", &m_fOutLineThickness, 0.1f, 2.f, "%.1f"); - GUI::SliderFloat("Scale", &m_fOutLineScale, 0.1f, 2.f, "%.1f"); - GUI::SliderFloat("Power", &m_fOutLinePower, 0.1f, 2.f, "%.1f"); - } - GUI::End(); -#endif // _DEBUG - Compute_Depth(); _float fCamFar = *m_pGameInstance->Get_CurrentCameraFar(); _float fRatio = CMyTools::Saturate((m_fCamDepth / (fCamFar * fCamFar))); diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl index 2b2f6e03c..73801a573 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl @@ -384,7 +384,7 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE_READ(PS_IN In) float fRim = saturate((1.0f - fNdotV) * g_fOutLineScale); fRim = pow(fRim, g_fOutLinePower); - Out.vAlbedo = float4(g_vOutLineColor.rgb, fRim); + Out.vAlbedo = float4(g_vOutLineColor.rgb * 5.f, fRim); Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f); Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), (In.vProjPos.w / g_fFar), diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl index 4878c28f7..0078b8a84 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl @@ -473,7 +473,7 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE(PS_IN_OUTLINE In) float fRim = saturate((1.0f - fNdotV) * g_fOutLineScale); fRim = pow(fRim, g_fOutLinePower); - Out.vAlbedo = float4(g_vOutLineColor.rgb, fRim); + Out.vAlbedo = float4(g_vOutLineColor.rgb * 5.f, fRim); Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f); Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1) (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl index 204be5929..1bb9ad1ec 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl @@ -694,8 +694,8 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE(PS_IN_OUTLINE In) float fNdotV = saturate(dot(vNormal, vToView)); float fRim = saturate((1.0f - fNdotV) * g_fOutLineScale); fRim = pow(fRim, g_fOutLinePower); - - Out.vAlbedo = float4(g_vOutLineColor.rgb, fRim); + + Out.vAlbedo = float4(g_vOutLineColor.rgb * 5.f, fRim); Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f); Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1) (In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z diff --git a/Jusin154_Team3D/Engine/Public/Engine_Macro.h b/Jusin154_Team3D/Engine/Public/Engine_Macro.h index 0d03a94a3..e3e5d6d21 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Macro.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Macro.h @@ -23,8 +23,9 @@ #define ASSERT_INHYUK(expression) #define OPTIONAL_TRUE_KEYINPUTGUICHECK + #define USE_LOWTEXTURE -#ifndef _DEBUG +#ifndef _DEBUG // 릴리즈 모드일 때는 고해상도 유지 #undef USE_LOWTEXTURE #endif // !_DEBUG @@ -33,31 +34,31 @@ #undef ASSERT_NURI #define ASSERT_NURI(expression) assert(expression) #define MSG_BOX(_message) MessageBox(NULL, TEXT(_message), L"System Message", MB_OK); assert(false); -//#undef USE_LOWTEXTURE +//#undef USE_LOWTEXTURE // 매크로 옵션으로 해상도 조절, 주석 걸면 디버그모드에서 저해상도 유지 //#undef OPTIONAL_TRUE_KEYINPUTGUICHECK //#define OPTIONAL_TRUE_KEYINPUTGUICHECK true|| #elif 진우 #undef ASSERT_JINWOO #define ASSERT_JINWOO(expression) assert(expression) -#undef USE_LOWTEXTURE +#undef USE_LOWTEXTURE // 매크로 옵션으로 해상도 조절, 주석 걸면 디버그모드에서 저해상도 유지 //#undef OPTIONAL_TRUE_KEYINPUTGUICHECK //#define OPTIONAL_TRUE_KEYINPUTGUICHECK true|| #elif gimch #undef ASSERT_JINHO #define ASSERT_JINHO(expression) assert(expression) -#undef USE_LOWTEXTURE +#undef USE_LOWTEXTURE // 매크로 옵션으로 해상도 조절, 주석 걸면 디버그모드에서 저해상도 유지 #undef OPTIONAL_TRUE_KEYINPUTGUICHECK #define OPTIONAL_TRUE_KEYINPUTGUICHECK true|| #elif Bin #undef ASSERT_HYUNBIN #define ASSERT_HYUNBIN(expression) assert(expression) -#undef USE_LOWTEXTURE +#undef USE_LOWTEXTURE // 매크로 옵션으로 해상도 조절, 주석 걸면 디버그모드에서 저해상도 유지 //#undef OPTIONAL_TRUE_KEYINPUTGUICHECK //#define OPTIONAL_TRUE_KEYINPUTGUICHECK ||true #elif 인혁 #undef ASSERT_INHYUK #define ASSERT_INHYUK(expression) assert(expression) -#undef USE_LOWTEXTURE +#undef USE_LOWTEXTURE // 매크로 옵션으로 해상도 조절, 주석 걸면 디버그모드에서 저해상도 유지 //#undef OPTIONAL_TRUE_KEYINPUTGUICHECK //#define OPTIONAL_TRUE_KEYINPUTGUICHECK || true #endif diff --git a/Jusin154_Team3D/Engine/Public/GameInstance.h b/Jusin154_Team3D/Engine/Public/GameInstance.h index ca2940a6a..c0960e7be 100644 --- a/Jusin154_Team3D/Engine/Public/GameInstance.h +++ b/Jusin154_Team3D/Engine/Public/GameInstance.h @@ -133,27 +133,27 @@ class ENGINE_DLL CGameInstance final : public CBase #pragma endregion #pragma region PIPELINE - void Set_Transform(D3DTS eState, _fmatrix TransformStateMatrix); - const _float4x4* Get_Transform_Float4x4(D3DTS eState); - _matrix Get_Transform_Matrix(D3DTS eState); - _matrix Get_ShadowTransform_Matrix(D3DTS eState, SHADOW eShadowType); - const _float4* Get_CamPosition(); - const _vector Get_CamXMPosition(); - void Transform_Frustum_ToLocalSpace(_fmatrix WorldMatrixInverse); - _bool IsIn_WorldFrustum(_fvector vWorldPos, _float fRadius); - _bool IsIn_LocalFrustum(_fvector vLocalPos, _float fRadius); - pair<_bool, _ubyte> IsIn_ShadowViewFrustum(_fvector vWorldCenter, _float fRadius); - HRESULT Bind_CascadeSplitRatio(class CShader* pShader, const _char* pConstantName, _bool bNear); - HRESULT Bind_CascadeBias(class CShader* pShader, const _char* pConstantName); - HRESULT Bind_GlobalSRV(class CShader* pShader, const _tchar* wszKeyGlobalSRV, const _char* pConstantName); - HRESULT Load_GlobalSRV(const _tchar* wszKeyGlobalSRV, filesystem::path pathSRVFolder); + void Set_Transform(D3DTS eState, _fmatrix TransformStateMatrix); + const _float4x4* Get_Transform_Float4x4(D3DTS eState); + _matrix Get_Transform_Matrix(D3DTS eState); + _matrix Get_ShadowTransform_Matrix(D3DTS eState, SHADOW eShadowType); + const _float4* Get_CamPosition(); + const _vector Get_CamXMPosition(); + void Transform_Frustum_ToLocalSpace(_fmatrix WorldMatrixInverse); + _bool IsIn_WorldFrustum(_fvector vWorldPos, _float fRadius); + _bool IsIn_LocalFrustum(_fvector vLocalPos, _float fRadius); + pair<_bool, _ubyte> IsIn_ShadowViewFrustum(_fvector vWorldCenter, _float fRadius); + HRESULT Bind_CascadeSplitRatio(class CShader* pShader, const _char* pConstantName, _bool bNear); + HRESULT Bind_CascadeBias(class CShader* pShader, const _char* pConstantName); + HRESULT Bind_GlobalSRV(class CShader* pShader, const _tchar* wszKeyGlobalSRV, const _char* pConstantName); + HRESULT Load_GlobalSRV(const _tchar* wszKeyGlobalSRV, filesystem::path pathSRVFolder); - HRESULT Ready_Shadow_Light(const _float4& vShadowDirRPYQuat); - HRESULT Bind_Shadow_Resource(class CShader* pShader, const _char* pConstantName, D3DTS eType, SHADOW eShadowType) const; - const _float4x4* Get_ShadowMatricesPtr(_uint iShadowBoxIndex); - _float Get_ShadowBoxFar(_uint iShadowBoxIndex); - HRESULT Begin_OutLine_Write(_uint iDSSMask); - HRESULT End_OutLine_Write(); + HRESULT Ready_Shadow_Light(const _float4& vShadowDirRPYQuat); + HRESULT Bind_Shadow_Resource(class CShader* pShader, const _char* pConstantName, D3DTS eType, SHADOW eShadowType) const; + const _float4x4* Get_ShadowMatricesPtr(_uint iShadowBoxIndex); + _float Get_ShadowBoxFar(_uint iShadowBoxIndex); + HRESULT Begin_OutLine_Write(_uint iDSSMask); + HRESULT End_OutLine_Write(); #pragma endregion #pragma region LIGHT_MANAGER void Add_Light(_uint _iCurrentLevel, class CLight* _pLight);