[add] RENDERER 톤매핑, pbr 옵션 추가

This commit is contained in:
kimnuri
2026-02-10 17:28:45 +09:00
parent e5e3f2ddcd
commit 6b79c126ee
7 changed files with 24 additions and 1 deletions
@@ -224,6 +224,7 @@ HRESULT CCamPosition_Shoulder::Render()
{
RENDER eType = m_pGameInstance->Get_CurrentRenderPass();
if (RENDER::NONLIGHT == eType) {
#ifdef DEBUG_CAMERAS
m_Batch->Begin();
_matrix ViewMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW);
_matrix ProjMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ);
@@ -238,6 +239,8 @@ HRESULT CCamPosition_Shoulder::Render()
m_pSubShape->Draw(XMMatrixTranslationFromVector(vHeadPos), ViewMatrix, ProjMatrix, vColor, nullptr, true);
}
m_Batch->End();
#endif // DEBUG_CAMERAS
}
return S_OK;
}
@@ -551,8 +554,11 @@ void CCamPosition_Shoulder::Describe_Entity()
GUI::SliderFloat("FocalRatio", &m_vFocalRatio.x, 0.f, 1.f);
GUI::SliderFloat("CameraFowardDistance", &m_fCameraFowardDistance, 0.f, 4.f);
GUI::Text("FOV %.2f", XMConvertToDegrees(m_pBinded_Camera->Get_Fov()));
#ifdef DEBUG_CAMERAS
GUI::Checkbox("RenderLookPos", &m_bRenderLookPos);
GUI::Checkbox("RenderHeadPos", &m_bRenderHeadPos);
#endif // DEBUG_CAMERAS
#ifdef _DEBUG
GUI::Text("%d", m_bSpellFovLerp);
GUI::SliderFloat3("m_vSpellFovLerpTimer", (_float*)&m_vSpellFovLerpTimer, 0.f, 5.f);
@@ -50,6 +50,7 @@ float g_fSpotOuterAngle;
float g_fToneMappingExposure;
uint g_iToneMappingType;
bool g_bUsePowerLightAttenuation;
bool g_bUsePhongShader;
float g_fLightAttenuationPower;
vector g_vLightDir;
@@ -482,6 +483,11 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
float3 vToView = normalize(g_vCamPosition.xyz - vWorldPosition.xyz); // 픽셀에서 카메라로
float3 vToLight = normalize(-g_vLightDir.xyz); // 픽셀에서 라이트로
if (g_bUsePhongShader)
{
vDepth.b = 0.f;
}
if (false == CalcLighting(g_SurfaceTexture, vDepth.b, uv, vAlbedo, vF0, fMetallic, fRoughness, fOcclusion, fAttenuation))
{
Out.vShade = g_vLightDiffuse * saturate(max(dot(normalize(g_vLightDir.xyz) * -1.f, vNormal), 0.f) + (fSSAO_AmbientOcclusion * g_vLightAmbient * g_vMtrlAmbient));
@@ -50,6 +50,7 @@ float g_fSpotOuterAngle;
float g_fToneMappingExposure;
uint g_iToneMappingType;
bool g_bUsePowerLightAttenuation;
bool g_bUsePhongShader;
float g_fLightAttenuationPower;
vector g_vLightDir;
@@ -482,6 +483,11 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
float3 vToView = normalize(g_vCamPosition.xyz - vWorldPosition.xyz); // 픽셀에서 카메라로
float3 vToLight = normalize(-g_vLightDir.xyz); // 픽셀에서 라이트로
if (g_bUsePhongShader)
{
vDepth.b = 0.f;
}
if (false == CalcLighting(g_SurfaceTexture, vDepth.b, uv, vAlbedo, vF0, fMetallic, fRoughness, fOcclusion, fAttenuation))
{
Out.vShade = g_vLightDiffuse * saturate(max(dot(normalize(g_vLightDir.xyz) * -1.f, vNormal), 0.f) + (fSSAO_AmbientOcclusion * g_vLightAmbient * g_vMtrlAmbient));
@@ -186,6 +186,9 @@ void CRenderer::Bind_RawValue()
if (FAILED(m_pShader->Bind_RawValue("g_vPreShadowResolution", &m_vPreShadowResoltion, sizeof(_float2)))) {
return;
}
if (FAILED(m_pShader->Bind_RawValue("g_bUsePhongShader", &m_bUsePhongShader, sizeof(_bool)))) {
return;
}
}
void CRenderer::Render_Occlusion()
@@ -720,6 +720,7 @@ void CRenderer::Describe_Entitiy()
if (GUI::CollapsingHeader("Variable")) {
GUI::DragFloat("SpecularMaximum", &m_fLightSpecularMaximum, 0.01f, 0.0f, 2.f, "%.3f");
GUI::DragFloat("fMinShadowBrightness", &m_fMinShadowBrightness, 0.01f, 0.0f, 1.f, "%.3f");
GUI::Checkbox("UsePhongShader", &m_bUsePhongShader);
}
if (GUI::CollapsingHeader("PostProcessing_Bloom"))
{
+1 -1
View File
@@ -26,7 +26,7 @@
//#define DEBUG_MOTIONBLUR
//#define DEBUG_SSAO
//#define DEBUG_SHADOW
#define DEBUG_CAMERAS
//#define DEBUG_CAMERAS
#endif // 기무리
+1
View File
@@ -79,6 +79,7 @@ class CRenderer final : public CBase
_float m_fNearShadowBias = { 0.05f };
_float m_fFarShadowBias = { 1.f };
_float m_fMinShadowBrightness = { 0.47f };
_bool m_bUsePhongShader = { false };
// MotionBlur
_float m_fMBMaxBlurRadius = { 28.f };