@@ -49,6 +49,10 @@ HRESULT CAccio::Initialize(void* pArg)
|
||||
m_pRope_Trail = Get_PartObject<CTrailObject>("Accio_Trail");
|
||||
m_pWandLight = Get_PartObject<CEffectParts>("Wand_Light");
|
||||
m_pRotate0 = Get_PartObject<CEffectParts>("Rotate0");
|
||||
m_pRotate1 = Get_PartObject<CEffectParts>("Rotate1");
|
||||
|
||||
m_pAccio_PT = Get_PartObject<CEffectParts>("Accio_PT");
|
||||
m_pAccio_Distortion = Get_PartObject<CEffectParts>("Accio_Distortion");
|
||||
|
||||
if (m_pRope_Trail == nullptr)
|
||||
return E_FAIL;
|
||||
@@ -56,10 +60,13 @@ HRESULT CAccio::Initialize(void* pArg)
|
||||
SAFE_ADDREF(m_pRope_Trail);
|
||||
SAFE_ADDREF(m_pWandLight);
|
||||
SAFE_ADDREF(m_pRotate0);
|
||||
SAFE_ADDREF(m_pRotate1);
|
||||
SAFE_ADDREF(m_pAccio_PT);
|
||||
SAFE_ADDREF(m_pAccio_Distortion);
|
||||
|
||||
XMStoreFloat4x4(&m_TrailWorld, XMMatrixIdentity());
|
||||
|
||||
m_fDuration = 5.f;
|
||||
m_fDuration = 6.f;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -97,14 +104,17 @@ void CAccio::Update(_float fTimeDelta)
|
||||
TrailPos.r[3] += XMLoadFloat3(&m_vCameraLook) * m_fLinearSpeed;
|
||||
|
||||
|
||||
|
||||
|
||||
if (m_bHit == true && m_pEnemyCCT != nullptr)
|
||||
{
|
||||
/* 특정 대상과 충돌 했다면*/
|
||||
TrailPos.r[3] = m_pEnemyCCT->Get_Position();
|
||||
|
||||
m_pRotate0->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pEnemyCCT->Get_FootPosition());
|
||||
_vector vPos = m_pEnemyCCT->Get_FootPosition();
|
||||
|
||||
m_pRotate0->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
m_pRotate1->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
m_pAccio_PT->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
m_pAccio_Distortion->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
}
|
||||
|
||||
XMStoreFloat4x4(&m_TrailWorld, TrailPos);
|
||||
@@ -164,12 +174,15 @@ HRESULT CAccio::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
_vector WandPos = pPlayer->Get_WandPos().r[3];
|
||||
|
||||
CEffectParts* pCircle = Get_PartObject<CEffectParts>("Accio_Circle");
|
||||
|
||||
CEffectParts* pSpread_Circle = Get_PartObject<CEffectParts>("Spread_Circle");
|
||||
|
||||
m_pRope_Trail->Set_Visible(true);
|
||||
pCircle->Set_Visible(true);
|
||||
|
||||
m_pWandLight->Set_Visible(true);
|
||||
m_pWandLight->Get_Effect_Info()->isDissolve = false;
|
||||
m_pWandLight->Get_Effect_Info()->isLightDissolve = false;
|
||||
|
||||
pSpread_Circle->Set_Visible(true);
|
||||
|
||||
m_pRope_Trail->Get_Component<CTrail>()->Reset_Trail();
|
||||
@@ -209,6 +222,8 @@ HRESULT CAccio::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
|
||||
m_fAccRotateTime = 0.f;
|
||||
|
||||
m_pRope_Trail->Get_TrailInfo()->fMass = 0.05f;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -269,31 +284,42 @@ void CAccio::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
|
||||
|
||||
CEffectParts* pHit = Get_PartObject<CEffectParts>("Accio_Hit");
|
||||
CEffectParts* pHit0 = Get_PartObject<CEffectParts>("Accio_Hit0");
|
||||
|
||||
|
||||
pHit->Set_Visible(true);
|
||||
pHit->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
|
||||
pHit0->Set_Visible(true);
|
||||
pHit0->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
|
||||
m_pAccio_Distortion->Set_Visible(true);
|
||||
|
||||
|
||||
|
||||
CEffectParts* pCircle = Get_PartObject<CEffectParts>("Accio_Circle");
|
||||
CEffectParts* pWandLight = Get_PartObject<CEffectParts>("Wand_Light");
|
||||
CEffectParts* pSpread_Circle = Get_PartObject<CEffectParts>("Spread_Circle");
|
||||
CEffectParts* pAccio_PT = Get_PartObject<CEffectParts>("Accio_PT");
|
||||
|
||||
|
||||
pCircle->Set_Visible(false);
|
||||
pWandLight->Set_Visible(false);
|
||||
pSpread_Circle->Set_Visible(false);
|
||||
|
||||
m_pWandLight->Get_Effect_Info()->isDissolve = true;
|
||||
m_pWandLight->Get_Effect_Info()->isLightDissolve = true;
|
||||
|
||||
m_pRotate0->Set_Visible(true);
|
||||
pAccio_PT->Set_Visible(true);
|
||||
m_pRotate1->Set_Visible(true);
|
||||
|
||||
pAccio_PT->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
m_pAccio_PT->Set_Visible(true);
|
||||
m_pAccio_PT->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
|
||||
m_pRope_Trail->Get_Component<CTrail>()->Rope_Fix(true);
|
||||
|
||||
if(m_isDissolve)
|
||||
m_pRope_Trail->SetDissolve(true);
|
||||
|
||||
m_pRope_Trail->Get_TrailInfo()->fMass = 0.1f;
|
||||
|
||||
}
|
||||
|
||||
void CAccio::Free()
|
||||
@@ -303,6 +329,9 @@ void CAccio::Free()
|
||||
SAFE_RELEASE(m_pRope_Trail);
|
||||
SAFE_RELEASE(m_pWandLight);
|
||||
SAFE_RELEASE(m_pRotate0);
|
||||
SAFE_RELEASE(m_pRotate1);
|
||||
SAFE_RELEASE(m_pAccio_PT);
|
||||
SAFE_RELEASE(m_pAccio_Distortion);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
|
||||
@@ -250,7 +250,15 @@ HRESULT CBroom::Bind_ShaderResources()
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -931,6 +931,11 @@ HRESULT CEffectObject::Bind_ShaderResources()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fModelDistortIntensity", &m_EffectInfo.fModelDistortIntensity, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (m_pDiffuse_TextureCom != nullptr)
|
||||
{
|
||||
|
||||
@@ -468,6 +468,15 @@ HRESULT CGoblin::Bind_ShaderResources()
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -190,7 +190,15 @@ HRESULT CGoblin_BattleAxe::Bind_ShaderResources()
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -139,7 +139,15 @@ HRESULT CGoblin_Dagger::Bind_ShaderResources()
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -415,6 +415,15 @@ HRESULT CGoblin_Mage::Bind_ShaderResources()
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -274,6 +274,15 @@ HRESULT CGoblin_Spector::Bind_ShaderResources()
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
isReady_Background = false;
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isReady_Background = true;
|
||||
isReady_Background = false;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
isReady_Background = true;
|
||||
|
||||
@@ -338,7 +338,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
isLoad_Background = true;
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isLoad_Background = true;
|
||||
isLoad_Background = false;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
isLoad_Background = true;
|
||||
@@ -1780,6 +1780,15 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
|
||||
});
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Models/Effect/Lightning", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) {
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, wstrFileName,
|
||||
CInstance_Model::Create(m_pDevice, m_pContext, pFilePath, MODEL::NONANIM, XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixIdentity(), 0))))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
});
|
||||
|
||||
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
|
||||
|
||||
#pragma region UI
|
||||
|
||||
@@ -92,6 +92,15 @@ HRESULT CMonster::Render_OutLine()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
Compute_Depth();
|
||||
_float fRatio = (m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar());
|
||||
m_fOutLineThickness = CMyTools::Lerp_f1D(2.f, 6.f, fRatio);
|
||||
|
||||
@@ -124,6 +124,15 @@ HRESULT CNPC_Ollivander::Bind_ShaderResources()
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -139,6 +139,15 @@ HRESULT CPhysXEffectHitBox::Bind_ShaderResources()
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -528,6 +528,15 @@ HRESULT CPlayer::Bind_ShaderResources()
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -122,7 +122,15 @@ HRESULT CRaceRing::Bind_ShaderResources()
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -587,6 +587,15 @@ HRESULT CTroll::Bind_ShaderResources()
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -215,7 +215,15 @@ HRESULT CTroll_Rock::Bind_ShaderResources()
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -156,7 +156,15 @@ HRESULT CTroll_Weapon::Bind_ShaderResources()
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -138,7 +138,15 @@ HRESULT CWand::Bind_ShaderResources()
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -40,6 +40,9 @@ class CAccio final : public CEffect_Container
|
||||
class CTrailObject* m_pRope_Trail = { nullptr };
|
||||
class CEffectParts* m_pWandLight = { nullptr };
|
||||
class CEffectParts* m_pRotate0 = { nullptr };
|
||||
class CEffectParts* m_pRotate1 = { nullptr };
|
||||
class CEffectParts* m_pAccio_PT = { nullptr };
|
||||
class CEffectParts* m_pAccio_Distortion = { nullptr };
|
||||
|
||||
_float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f }; // 현재 발사 된 위치
|
||||
_float4 m_vTargetPos = { 0.f, 0.f, 0.f, 1.f }; // 현재 타게팅 된 위치
|
||||
@@ -50,9 +53,9 @@ class CAccio final : public CEffect_Container
|
||||
CCharacter_Controller* m_pEnemyCCT = { nullptr };
|
||||
|
||||
_float m_fAccRotateTime = {};
|
||||
_float m_fTurnSpeed = { 65.f };
|
||||
_float m_fRange = { 1.f };
|
||||
_float m_fAttenuation = { 65.f };
|
||||
_float m_fTurnSpeed = { 55.f };
|
||||
_float m_fRange = { 0.7f };
|
||||
_float m_fAttenuation = { 85.f };
|
||||
_bool m_isDissolve = { true };
|
||||
_bool m_isReverse = { false };
|
||||
_int m_iLoopTime = { 5 };
|
||||
|
||||
@@ -181,8 +181,8 @@ namespace Client
|
||||
|
||||
_float3 vDissolveValue = {};
|
||||
|
||||
|
||||
_float2 vPadding0 = {};
|
||||
_float fModelDistortIntensity = {};
|
||||
_float vPadding0 = {};
|
||||
|
||||
_float fLightDeley = {};
|
||||
_float fLightIntensity = {};
|
||||
@@ -209,6 +209,7 @@ namespace Client
|
||||
_bool isPadding2 = {};
|
||||
_bool isPadding3 = {};
|
||||
_bool isPadding4 = {};
|
||||
|
||||
}EFFECT_INFO;
|
||||
|
||||
typedef struct tagTrailInfo
|
||||
|
||||
@@ -34,6 +34,7 @@ class CTrailObject final : public CPartObject
|
||||
HRESULT Load_Trail(const _char* pPath, LEVEL eLevel);
|
||||
|
||||
void SetDissolve(_bool isDissolve) { m_TrailInfo.isDissolve = true; }
|
||||
TRAIL_INFO* Get_TrailInfo() { return &m_TrailInfo; }
|
||||
|
||||
private:
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -1,8 +1,10 @@
|
||||
#ifndef ENGINE_SHADER_BUFFERS_HLSLI
|
||||
#define ENGINE_SHADER_BUFFERS_HLSLI
|
||||
|
||||
cbuffer GLOBAL_SSAO_DATA : register(b10)
|
||||
cbuffer ConstantsMotionMatrices : register(b0)
|
||||
{
|
||||
};
|
||||
row_major matrix PrevViewMatrix;
|
||||
row_major matrix PrevProjMatrix;
|
||||
}
|
||||
|
||||
#endif // ENGINE_SHADER_BUFFERS_HLSLI
|
||||
|
||||
@@ -228,6 +228,24 @@ float3 DecodeNormalFromRG(Texture2D NormalMap, SamplerState Samp, float2 uv)
|
||||
return normalize(n);
|
||||
}
|
||||
|
||||
// BackGround ForeGround 합은 1
|
||||
float2 DepthCompare(float fCenterDepth, float fSampleDepth, float fDepthScale)
|
||||
{
|
||||
return saturate(0.5f + float2(fDepthScale, -fDepthScale) * (fSampleDepth - fCenterDepth));
|
||||
}
|
||||
|
||||
float2 SpreadCompare(float fOffsetLength, float2 fSpreadLength, float fPixelToSampleUnitsScale)
|
||||
{
|
||||
return saturate(fPixelToSampleUnitsScale * fSpreadLength - fOffsetLength + 1.f);
|
||||
}
|
||||
|
||||
float SampleWeight(float fCenterDepth, float fSampleDepth, float fOffsetLength, float fCenterSpreadLength, float fSampleSpreadLength, float fPixelToSampleUnitsScale, float fDepthScale)
|
||||
{
|
||||
float2 vDepthCompare = DepthCompare(fCenterDepth, fSampleDepth, fDepthScale);
|
||||
float2 vSpreadCompare = SpreadCompare(fOffsetLength, float2(fCenterSpreadLength, fSampleSpreadLength), fPixelToSampleUnitsScale);
|
||||
return dot(vDepthCompare, vSpreadCompare);
|
||||
}
|
||||
|
||||
float4x4 RotateX(float fAngle)
|
||||
{
|
||||
float fCos = cos(radians(fAngle));
|
||||
@@ -451,5 +469,43 @@ float4 BlendDiffuse(float4 vDiffuseA, Texture2D DiffuseBlendTexture, float2 vTex
|
||||
|
||||
}
|
||||
|
||||
float2 CalcVelocityUV(float4 vCurrentProjPos, float4 vPreviousProjPos)
|
||||
{
|
||||
if (vCurrentProjPos.w <= FLT_EPSILON5 || vPreviousProjPos.w <= FLT_EPSILON5) {
|
||||
return float2(0.0f, 0.0f);
|
||||
}
|
||||
|
||||
float2 currentUV = (vCurrentProjPos.xy/vCurrentProjPos.w);
|
||||
float2 previousUV = (vPreviousProjPos.xy / vCurrentProjPos.w);
|
||||
|
||||
currentUV.y *= -1.f;
|
||||
previousUV.y *= -1.f;
|
||||
|
||||
return currentUV - previousUV;
|
||||
}
|
||||
|
||||
float3 DownSampleFast(Texture2D SrcTexture2D, float2 vCenterTexcoord, float2 vSrcTexelSize, float2 vResolution)
|
||||
{
|
||||
float2 uv = float2(0.f, 0.f);
|
||||
float3 vCenterColor = SrcTexture2D.SampleLevel(BorderZeroSampler, uv, 0);
|
||||
uv = vCenterTexcoord + vSrcTexelSize * float2(-1.0, -1.0);
|
||||
float3 fLTColor = BilinearFetches(vResolution, SrcTexture2D, uv, BorderZeroLinearSampler);
|
||||
uv = vCenterTexcoord + vSrcTexelSize * float2(0.0, -1.0);
|
||||
float3 fTColor = SrcTexture2D.SampleLevel(BorderZeroSampler, uv, 0);
|
||||
uv = vCenterTexcoord + vSrcTexelSize * float2(+1.0, -1.0);
|
||||
float3 fRTColor = BilinearFetches(vResolution, SrcTexture2D, uv, BorderZeroLinearSampler);
|
||||
uv = vCenterTexcoord + vSrcTexelSize * float2(-1.0, 0.0);
|
||||
float3 fLColor = SrcTexture2D.SampleLevel(BorderZeroSampler, uv, 0);
|
||||
uv = vCenterTexcoord + vSrcTexelSize * float2(1.0, 0.0);
|
||||
float3 fRColor = SrcTexture2D.SampleLevel(BorderZeroSampler, uv, 0);
|
||||
uv = vCenterTexcoord + vSrcTexelSize * float2(-1.0, +1.0);
|
||||
float3 fLBColor = BilinearFetches(vResolution, SrcTexture2D, uv, BorderZeroLinearSampler);
|
||||
uv = vCenterTexcoord + vSrcTexelSize * float2(0.0, 1.0);
|
||||
float3 fBColor = SrcTexture2D.SampleLevel(BorderZeroSampler, uv, 0);
|
||||
uv = vCenterTexcoord + vSrcTexelSize * float2(+1.0, +1.0);
|
||||
float3 fRBColor = BilinearFetches(vResolution, SrcTexture2D, uv, BorderZeroLinearSampler);
|
||||
|
||||
return vCenterColor * 0.25f + (fLTColor + fRTColor + fLBColor + fRBColor) * 0.0625f + (fTColor + fLColor + fRColor + fBColor) * 0.125f;
|
||||
}
|
||||
|
||||
#endif // ENGINE_SHADER_FUNCTIONS_HLSLI
|
||||
|
||||
@@ -6,6 +6,7 @@ matrix g_LightViewMatrix_MIDDLE, g_LightProjMatrix_MIDDLE;
|
||||
matrix g_LightViewMatrix_FAR, g_LightProjMatrix_FAR;
|
||||
matrix g_PreShadowLightViewMatrix, g_PreShadowLightProjMatrix;
|
||||
|
||||
|
||||
float4 g_SamplePos[64];
|
||||
float g_fFar;
|
||||
float g_fShadowFar_NEAR;
|
||||
@@ -70,6 +71,12 @@ Texture2D g_BlurWeightXTexture;
|
||||
Texture2D g_SurfaceTexture;
|
||||
Texture2D g_OriginalTexture;
|
||||
|
||||
Texture2D g_ColorTexture;
|
||||
Texture2D g_VelocityTexture;
|
||||
|
||||
int g_iMBSampleCount;
|
||||
int g_fMBBlurRadius;
|
||||
float g_iMBType;
|
||||
|
||||
vector g_vLightDiffuse;
|
||||
vector g_vLightAmbient;
|
||||
@@ -137,6 +144,10 @@ struct VS_OUT
|
||||
float4 vPosition : SV_POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
struct PS_OUT_VELOCITYBLUR
|
||||
{
|
||||
float4 vColor : SV_TARGET0;
|
||||
};
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
@@ -213,6 +224,30 @@ struct PS_OUT_SSAO_BLUR
|
||||
{
|
||||
float fBlur : SV_TARGET0;
|
||||
};
|
||||
// g_ColorTexture;
|
||||
// g_DepthTexture;
|
||||
// g_VelocityTexture;
|
||||
// g_fFar
|
||||
// g_fMBBlurRadius
|
||||
// g_iMBType
|
||||
// g_iMBSampleCount
|
||||
PS_OUT_VELOCITYBLUR PS_MOTIONBLUR_X(PS_IN In)
|
||||
{
|
||||
PS_OUT_VELOCITYBLUR Out = (PS_OUT_VELOCITYBLUR)0;
|
||||
//float2 uv = In.vTexcoord;
|
||||
//float2 vSrcTexelSize = float2(1.f / g_vResolution.x, 1.f / g_vResolution.y);
|
||||
//float3 vColor = (0.f, 0.f, 0.f);
|
||||
|
||||
//for (int i = -g_iMBSampleCount; i < g_iMBSampleCount; ++i)
|
||||
//{
|
||||
// vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x;
|
||||
// vTexcoord.y = In.vTexcoord.y;
|
||||
|
||||
// vColor += g_fWeights_32[i + 15] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
||||
//}
|
||||
|
||||
return Out;
|
||||
}
|
||||
PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
|
||||
{
|
||||
PS_OUT_LIGHT Out;
|
||||
@@ -759,48 +794,34 @@ PS_OUT_FLT4_SINGLE PS_MAIN_EMBOSS(PS_IN In)
|
||||
{
|
||||
PS_OUT_FLT4_SINGLE Out;
|
||||
float2 uv = In.vTexcoord;
|
||||
float fMask = g_DiffuseTexture.SampleLevel(BorderZeroSampler, uv, 0).a;
|
||||
float4 fSrcAlpha = g_DiffuseTexture.Sample(PointSampler, uv);
|
||||
float2 vSrcTexelSize = float2(1.f / g_vResolution.x, 1.f / g_vResolution.y);
|
||||
float3 vColor = (0.f, 0.f, 0.f);
|
||||
|
||||
uint iMask = (uint) round(fMask * 255.f); // int a = 1 -> // vBloom.a = (enum / 255);
|
||||
//if (0 != iMask) {
|
||||
// 주변 4개 셀(LT RT LB RB)및 중앙을 이중선형샘플링, 이후 자체적으로 이중선형샘플링
|
||||
|
||||
float3 vCenterColor = g_DiffuseTexture.SampleLevel(BorderZeroSampler, uv, 0);
|
||||
uv = In.vTexcoord + vSrcTexelSize * float2(-1.0, -1.0);
|
||||
float3 fLTColor = BilinearFetches(g_vResolution, g_DiffuseTexture, uv, BorderZeroLinearSampler);
|
||||
uv = In.vTexcoord + vSrcTexelSize * float2(0.0, -1.0);
|
||||
float3 fTColor = g_DiffuseTexture.SampleLevel(BorderZeroSampler, uv, 0);
|
||||
uv = In.vTexcoord + vSrcTexelSize * float2(+1.0, -1.0);
|
||||
float3 fRTColor = BilinearFetches(g_vResolution, g_DiffuseTexture, uv, BorderZeroLinearSampler);
|
||||
uv = In.vTexcoord + vSrcTexelSize * float2(-1.0, 0.0);
|
||||
float3 fLColor = g_DiffuseTexture.SampleLevel(BorderZeroSampler, uv, 0);
|
||||
uv = In.vTexcoord + vSrcTexelSize * float2(1.0, 0.0);
|
||||
float3 fRColor = g_DiffuseTexture.SampleLevel(BorderZeroSampler, uv, 0);
|
||||
uv = In.vTexcoord + vSrcTexelSize * float2(-1.0, +1.0);
|
||||
float3 fLBColor = BilinearFetches(g_vResolution, g_DiffuseTexture, uv, BorderZeroLinearSampler);
|
||||
uv = In.vTexcoord + vSrcTexelSize * float2(0.0, 1.0);
|
||||
float3 fBColor = g_DiffuseTexture.SampleLevel(BorderZeroSampler, uv, 0);
|
||||
uv = In.vTexcoord + vSrcTexelSize * float2(+1.0, +1.0);
|
||||
float3 fRBColor = BilinearFetches(g_vResolution, g_DiffuseTexture, uv, BorderZeroLinearSampler);
|
||||
vColor = DownSampleFast(g_DiffuseTexture, In.vTexcoord, vSrcTexelSize, g_vResolution);
|
||||
|
||||
|
||||
|
||||
// vSample /= fWeight 이중선형샘플러가 자체적으로 웨이츠 계싼해주기 때문에 안해도 상관없을듯
|
||||
vColor = vCenterColor * 0.25f + (fLTColor + fRTColor + fLBColor + fRBColor) * 0.0625f + (fTColor + fLColor + fRColor + fBColor) * 0.125f;
|
||||
//if (iMask == 2)
|
||||
//{
|
||||
// vColor *= 3.f;
|
||||
//}
|
||||
//}
|
||||
float fIntensity = dot(vColor, float3(0.2126f, 0.7152f, 0.0722f));
|
||||
fIntensity = max(FLT_EPSILON3, fIntensity);
|
||||
|
||||
|
||||
float fBloomIntensity = GetBloomCurve(fIntensity, g_fBloomThreshold, g_iBloomEmbossingPass);
|
||||
float3 bloomColor = (vColor * fBloomIntensity) / fIntensity;
|
||||
Out.vFirstTarget = float4(bloomColor, 1.f);
|
||||
Out.vFirstTarget = fSrcAlpha;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT_FLT4_SINGLE PS_MAIN_DOWNSAMPLE(PS_IN In)
|
||||
{
|
||||
PS_OUT_FLT4_SINGLE Out;
|
||||
float2 uv = In.vTexcoord;
|
||||
float fMask = g_DiffuseTexture.SampleLevel(BorderZeroSampler, uv, 0).a;
|
||||
float2 vSrcTexelSize = float2(1.f / g_vResolution.x, 1.f / g_vResolution.y);
|
||||
float3 vColor = (0.f, 0.f, 0.f);
|
||||
|
||||
vColor = DownSampleFast(g_DiffuseTexture, In.vTexcoord, vSrcTexelSize, g_vResolution);
|
||||
|
||||
Out.vFirstTarget = float4(vColor, 1.f);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -809,10 +830,10 @@ PS_OUT_FLT4_SINGLE PS_MAIN_BLOOM_ACCUM(PS_IN In)
|
||||
{
|
||||
PS_OUT_FLT4_SINGLE Out;
|
||||
|
||||
float3 vColorSrcA = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord).xyz;
|
||||
float3 vColorSrcB = g_BlurTexture.Sample(BorderZeroSampler, In.vTexcoord).xyz;
|
||||
float4 vColorSrcA = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord);
|
||||
float4 vColorSrcB = g_BlurTexture.Sample(BorderZeroSampler, In.vTexcoord);
|
||||
|
||||
Out.vFirstTarget = float4(saturate(vColorSrcA + vColorSrcB), 1.f);
|
||||
Out.vFirstTarget = saturate(vColorSrcA + vColorSrcB);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -821,9 +842,9 @@ PS_OUT_FLT4_SINGLE PS_MAIN_BLOOM_FINISH(PS_IN In)
|
||||
PS_OUT_FLT4_SINGLE Out;
|
||||
|
||||
vector vColor = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord);
|
||||
float3 vBloom = g_BlurTexture.Sample(BorderZeroSampler, In.vTexcoord).xyz;
|
||||
float4 vBloom = g_BlurTexture.Sample(BorderZeroSampler, In.vTexcoord);
|
||||
Out.vFirstTarget = vColor;
|
||||
Out.vFirstTarget += float4(vBloom, 1.f);
|
||||
Out.vFirstTarget += vBloom;
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -1278,7 +1299,7 @@ technique11 DefaultTechnique
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_Blend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_CAPTURE();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN_EMBOSS();
|
||||
@@ -1361,4 +1382,24 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_SSAO_BLUR();
|
||||
}
|
||||
|
||||
pass MotionBlurPass // 18
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MOTIONBLUR_X();
|
||||
}
|
||||
pass DownSamplePass // 19
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_CAPTURE();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN_DOWNSAMPLE();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ struct BoneOut
|
||||
|
||||
};
|
||||
float4x4 g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
float4x4 g_PrevWorldMatrix, g_PrevViewMatrix, g_PrevProjMatrix;
|
||||
matrix g_OffsetMatrix[256];
|
||||
|
||||
|
||||
@@ -90,6 +91,7 @@ struct VS_OUT
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
float4 vWorldPos : TEXCOORD1;
|
||||
float4 vProjPos : TEXCOORD2;
|
||||
float4 vPrevProjPos : TEXCOORD3;
|
||||
};
|
||||
VS_OUT VS_MAIN_MESH(VS_IN_MESH In)
|
||||
{
|
||||
@@ -99,6 +101,10 @@ VS_OUT VS_MAIN_MESH(VS_IN_MESH In)
|
||||
matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
matrix matPrevWV, matPrevWVP;
|
||||
matPrevWV = mul(g_PrevWorldMatrix, g_PrevViewMatrix);
|
||||
matPrevWVP = mul(matPrevWV, g_PrevProjMatrix);
|
||||
|
||||
Out.vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
Out.vNormal = normalize(mul(vector(In.vNormal, 0.f), g_WorldMatrix)).xyz;
|
||||
Out.vTangent = normalize(mul(vector(In.vTangent, 0.f), g_WorldMatrix)).xyz;
|
||||
@@ -106,6 +112,7 @@ VS_OUT VS_MAIN_MESH(VS_IN_MESH In)
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vWorldPos = mul(vector(In.vPosition, 1.f), g_WorldMatrix);
|
||||
Out.vProjPos = Out.vPosition;
|
||||
Out.vPrevProjPos = mul(vector(In.vPosition, 1.f), matPrevWVP);
|
||||
return Out;
|
||||
}
|
||||
|
||||
@@ -137,6 +144,10 @@ VS_OUT VS_MAIN(VS_IN In)
|
||||
matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
matrix matPrevWV, matPrevWVP;
|
||||
matPrevWV = mul(g_PrevWorldMatrix, g_PrevViewMatrix);
|
||||
matPrevWVP = mul(matPrevWV, g_PrevProjMatrix);
|
||||
|
||||
Out.vPosition = mul(vPosition, matWVP);
|
||||
Out.vNormal = normalize(mul(vNormal, g_WorldMatrix)).xyz;
|
||||
Out.vBinormal = normalize(mul(vBinormal, g_WorldMatrix)).xyz;
|
||||
@@ -144,6 +155,7 @@ VS_OUT VS_MAIN(VS_IN In)
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vWorldPos = mul(vPosition, g_WorldMatrix);
|
||||
Out.vProjPos = Out.vPosition;
|
||||
Out.vPrevProjPos = mul(vector(In.vPosition, 1.f), matPrevWVP);
|
||||
return Out;
|
||||
}
|
||||
|
||||
@@ -176,6 +188,10 @@ VS_OUT VS_MAIN_OUTLINE_READ(VS_IN In)
|
||||
matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
matrix matPrevWV, matPrevWVP;
|
||||
matPrevWV = mul(g_PrevWorldMatrix, g_PrevViewMatrix);
|
||||
matPrevWVP = mul(matPrevWV, g_PrevProjMatrix);
|
||||
|
||||
Out.vPosition = mul(vPosition, matWVP);
|
||||
Out.vNormal = normalize(mul(vNormal, g_WorldMatrix)).xyz;
|
||||
Out.vBinormal = normalize(mul(vBinormal, g_WorldMatrix)).xyz;
|
||||
@@ -183,6 +199,8 @@ VS_OUT VS_MAIN_OUTLINE_READ(VS_IN In)
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vWorldPos = mul(vPosition, g_WorldMatrix);
|
||||
Out.vProjPos = Out.vPosition;
|
||||
Out.vPrevProjPos = mul(vPosition, matPrevWVP);
|
||||
|
||||
return Out;
|
||||
}
|
||||
struct VS_OUT_SHADOW
|
||||
@@ -230,6 +248,7 @@ struct PS_IN
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
float4 vWorldPos : TEXCOORD1;
|
||||
float4 vProjPos : TEXCOORD2;
|
||||
float4 vPrevProjPos : TEXCOORD3;
|
||||
};
|
||||
|
||||
struct PS_OUT
|
||||
@@ -239,12 +258,14 @@ struct PS_OUT
|
||||
float4 vDepth : SV_TARGET2;
|
||||
float4 vColor : SV_Target3;
|
||||
float4 vSurface : SV_Target4;
|
||||
float2 vVelocityUV : SV_TARGET5;
|
||||
};
|
||||
struct PS_OUT_OUTLINE
|
||||
{
|
||||
float4 vOutLine : SV_TARGET0;
|
||||
float4 vNormal : SV_TARGET1;
|
||||
float4 vDepth : SV_TARGET2;
|
||||
float2 vVelocityUV : SV_TARGET3;
|
||||
};
|
||||
|
||||
PS_OUT_OUTLINE PS_MAIN_OUTLINE_READ(PS_IN In)
|
||||
@@ -268,7 +289,8 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE_READ(PS_IN In)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
|
||||
1.f);
|
||||
|
||||
Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
@@ -209,6 +209,9 @@ void CS_MAIN(
|
||||
|
||||
float fDrag = particleValue.fDrag;
|
||||
|
||||
if (fMoveLerpOption != 0.f)
|
||||
fDrag = SelectLerpUV(float2(particleValue.fDrag, 0.f), fTime, fMoveLerpOption).x;
|
||||
|
||||
if (particleValue.fDrag < FLT_EPSILON5)
|
||||
fDrag = 1;
|
||||
|
||||
@@ -230,6 +233,9 @@ void CS_MAIN(
|
||||
|
||||
float fDrag = particleValue.fDrag;
|
||||
|
||||
if (fMoveLerpOption != 0.f)
|
||||
fDrag = SelectLerpUV(float2(particleValue.fDrag, 0.f), fTime, fMoveLerpOption).x;
|
||||
|
||||
if (particleValue.fDrag < FLT_EPSILON5)
|
||||
fDrag = 1;
|
||||
|
||||
@@ -251,6 +257,9 @@ void CS_MAIN(
|
||||
|
||||
float fDrag = particleValue.fDrag;
|
||||
|
||||
if (fMoveLerpOption != 0.f)
|
||||
fDrag = SelectLerpUV(float2(particleValue.fDrag, 0.f), fTime, fMoveLerpOption).x;
|
||||
|
||||
if (particleValue.fDrag < FLT_EPSILON5)
|
||||
fDrag = 1;
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
float4x4 g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
float4x4 g_PrevWorldMatrix, g_PrevViewMatrix, g_PrevProjMatrix;
|
||||
struct BoneOut
|
||||
{
|
||||
row_major float4x4 Local;
|
||||
@@ -8,7 +10,6 @@ struct BoneOut
|
||||
row_major float4x4 LocalCombined;
|
||||
};
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
matrix g_OffsetMatrix[256];
|
||||
|
||||
int g_bRimLight;
|
||||
@@ -110,6 +111,7 @@ struct VS_OUT
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
float4 vWorldPos : TEXCOORD1;
|
||||
float4 vProjPos : TEXCOORD2;
|
||||
float4 vPrevProjPos : TEXCOORD3;
|
||||
};
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
@@ -136,19 +138,27 @@ VS_OUT VS_MAIN(VS_IN In)
|
||||
float3 skinnedNormal = mul(float4(In.vNormal, 0.f), BoneMatrix).xyz;
|
||||
float3 skinnedTangent = mul(float4(In.vTangent, 0.f), BoneMatrix).xyz;
|
||||
float3 skinnedBinormal = mul(float4(In.vBinormal, 0.f), BoneMatrix).xyz;
|
||||
|
||||
matrix matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
||||
matrix matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
|
||||
matrix matWV, matWVP;
|
||||
matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
matrix matPrevWV, matPrevWVP;
|
||||
matPrevWV = mul(g_PrevWorldMatrix, g_PrevViewMatrix);
|
||||
matPrevWVP = mul(matPrevWV, g_PrevProjMatrix);
|
||||
|
||||
Out.vPosition = mul(skinnedPos, matWVP);
|
||||
Out.vNormal = normalize(mul(float4(skinnedNormal, 0.f), g_WorldMatrix)).xyz;
|
||||
Out.vBinormal = normalize(mul(float4(skinnedBinormal, 0.f), g_WorldMatrix)).xyz;
|
||||
Out.vTangent = normalize(mul(float4(skinnedTangent, 0.f), g_WorldMatrix)).xyz;
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vWorldPos = mul(skinnedPos, g_WorldMatrix);
|
||||
|
||||
Out.vNormal = normalize(mul(float4(skinnedNormal, 0.f), g_WorldMatrix).xyz);
|
||||
Out.vTangent = normalize(mul(float4(skinnedTangent, 0.f), g_WorldMatrix).xyz);
|
||||
Out.vBinormal = normalize(mul(float4(skinnedBinormal, 0.f), g_WorldMatrix).xyz);
|
||||
Out.vProjPos = Out.vPosition;
|
||||
Out.vPrevProjPos = mul(skinnedPos, matPrevWVP);
|
||||
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vProjPos = Out.vPosition;
|
||||
Out.vPrevProjPos = mul(skinnedPos, matPrevWVP);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -163,6 +173,7 @@ struct VS_OUT_OUTLINE
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
float4 vWorldPos : TEXCOORD1;
|
||||
float4 vProjPos : TEXCOORD2;
|
||||
float4 vPrevProjPos : TEXCOORD3;
|
||||
};
|
||||
|
||||
VS_OUT_OUTLINE VS_MAIN_OUTLINE(VS_IN In)
|
||||
@@ -194,6 +205,10 @@ VS_OUT_OUTLINE VS_MAIN_OUTLINE(VS_IN In)
|
||||
matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
matrix matPrevWV, matPrevWVP;
|
||||
matPrevWV = mul(g_PrevWorldMatrix, g_PrevViewMatrix);
|
||||
matPrevWVP = mul(matPrevWV, g_PrevProjMatrix);
|
||||
|
||||
Out.vPosition = mul(vPosition, matWVP);
|
||||
Out.vNormal = normalize(mul(vNormal, g_WorldMatrix)).xyz;
|
||||
Out.vBinormal = normalize(mul(vBinormal, g_WorldMatrix)).xyz;
|
||||
@@ -201,6 +216,7 @@ VS_OUT_OUTLINE VS_MAIN_OUTLINE(VS_IN In)
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vWorldPos = mul(vPosition, g_WorldMatrix);
|
||||
Out.vProjPos = Out.vPosition;
|
||||
Out.vPrevProjPos = mul(vPosition, matPrevWVP);
|
||||
return Out;
|
||||
}
|
||||
struct VS_OUT_CAPTUREDMODEL
|
||||
@@ -314,6 +330,7 @@ struct PS_IN
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
float4 vWorldPos : TEXCOORD1;
|
||||
float4 vProjPos : TEXCOORD2;
|
||||
float4 vPrevProjPos : TEXCOORD3;
|
||||
};
|
||||
|
||||
struct PS_OUT
|
||||
@@ -323,6 +340,7 @@ struct PS_OUT
|
||||
float4 vDepth : SV_TARGET2;
|
||||
float4 vColor : SV_Target3;
|
||||
float4 vSurface : SV_Target4;
|
||||
float2 vVelocityUV : SV_TARGET5;
|
||||
};
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
@@ -376,6 +394,7 @@ PS_OUT PS_MAIN(PS_IN In)
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = vSurface;
|
||||
Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -408,12 +427,14 @@ struct PS_IN_OUTLINE
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
float4 vWorldPos : TEXCOORD1;
|
||||
float4 vProjPos : TEXCOORD2;
|
||||
float4 vPrevProjPos : TEXCOORD3;
|
||||
};
|
||||
struct PS_OUT_OUTLINE
|
||||
{
|
||||
float4 vOutLine : SV_TARGET0;
|
||||
float4 vNormal : SV_TARGET1;
|
||||
float4 vDepth : SV_TARGET2;
|
||||
float2 vVelocityUV : SV_TARGET3;
|
||||
};
|
||||
|
||||
PS_OUT_OUTLINE PS_MAIN_OUTLINE(PS_IN_OUTLINE In)
|
||||
@@ -437,6 +458,7 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE(PS_IN_OUTLINE In)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
|
||||
1.f);
|
||||
Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
float4x4 g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
float4x4 g_PrevWorldMatrix, g_PrevViewMatrix, g_PrevProjMatrix;
|
||||
|
||||
int g_bUVTargetDiffuse;
|
||||
int g_bAdditiveDisolve;
|
||||
@@ -118,6 +119,7 @@ struct VS_OUT
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
float4 vWorldPos : TEXCOORD1;
|
||||
float4 vProjPos : TEXCOORD2;
|
||||
float4 vPrevProjPos : TEXCOORD3;
|
||||
};
|
||||
|
||||
struct VS_OUT_BLUR
|
||||
@@ -168,6 +170,10 @@ VS_OUT VS_MAIN(VS_IN In)
|
||||
matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
matrix matPrevWV, matPrevWVP;
|
||||
matPrevWV = mul(g_PrevWorldMatrix, g_PrevViewMatrix);
|
||||
matPrevWVP = mul(matPrevWV, g_PrevProjMatrix);
|
||||
|
||||
Out.vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
Out.vNormal = normalize(mul(vector(In.vNormal, 0.f), g_WorldMatrix)).xyz;
|
||||
Out.vTangent = normalize(mul(vector(In.vTangent, 0.f), g_WorldMatrix)).xyz;
|
||||
@@ -175,6 +181,7 @@ VS_OUT VS_MAIN(VS_IN In)
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vWorldPos = mul(vector(In.vPosition, 1.f), g_WorldMatrix);
|
||||
Out.vProjPos = Out.vPosition;
|
||||
Out.vPrevProjPos = mul(float4(In.vPosition, 1.f), matPrevWVP);
|
||||
return Out;
|
||||
}
|
||||
|
||||
@@ -201,6 +208,7 @@ struct VS_OUT_OUTLINE
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
float4 vWorldPos : TEXCOORD1;
|
||||
float4 vProjPos : TEXCOORD2;
|
||||
float4 vPrevProjPos : TEXCOORD3;
|
||||
};
|
||||
|
||||
VS_OUT_OUTLINE VS_MAIN_OUTLINE(VS_IN In)
|
||||
@@ -216,6 +224,10 @@ VS_OUT_OUTLINE VS_MAIN_OUTLINE(VS_IN In)
|
||||
matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
matrix matPrevWV, matPrevWVP;
|
||||
matPrevWV = mul(g_PrevWorldMatrix, g_PrevViewMatrix);
|
||||
matPrevWVP = mul(matPrevWV, g_PrevProjMatrix);
|
||||
|
||||
Out.vPosition = mul(vPosition, matWVP);
|
||||
Out.vNormal = normalize(mul(vNormal, g_WorldMatrix)).xyz;
|
||||
Out.vTangent = normalize(mul(vector(In.vTangent, 0.f), g_WorldMatrix)).xyz;
|
||||
@@ -223,6 +235,7 @@ VS_OUT_OUTLINE VS_MAIN_OUTLINE(VS_IN In)
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vWorldPos = mul(vPosition, g_WorldMatrix);
|
||||
Out.vProjPos = Out.vPosition;
|
||||
Out.vPrevProjPos = mul(vPosition, matPrevWVP);
|
||||
return Out;
|
||||
}
|
||||
|
||||
@@ -272,6 +285,7 @@ struct PS_IN
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
float4 vWorldPos : TEXCOORD1;
|
||||
float4 vProjPos : TEXCOORD2;
|
||||
float4 vPrevProjPos : TEXCOORD3;
|
||||
};
|
||||
|
||||
struct PS_OUT
|
||||
@@ -281,6 +295,7 @@ struct PS_OUT
|
||||
float4 vDepth : SV_TARGET2;
|
||||
float4 vColor : SV_Target3;
|
||||
float4 vSurface : SV_Target4;
|
||||
float2 vVelocityUV : SV_TARGET5;
|
||||
};
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
@@ -339,7 +354,6 @@ PS_OUT PS_MAIN(PS_IN In)
|
||||
|
||||
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
|
||||
|
||||
|
||||
Out.vAlbedo = vMtrlDiffuse;
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
float fSurfaceParam = g_fUsingSurfaceParams;
|
||||
@@ -353,6 +367,7 @@ PS_OUT PS_MAIN(PS_IN In)
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = vSurface;
|
||||
Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -391,6 +406,7 @@ PS_OUT PS_GLASS(PS_IN In)
|
||||
Out.vNormal = float4(In.vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4(In.vProjPos.z / In.vProjPos.w, In.vProjPos.w / g_fFar, 15.f / 27.f, 1.f);
|
||||
Out.vSurface = vSurface;
|
||||
Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -418,6 +434,7 @@ PS_OUT PS_GLASS_CUBE(PS_IN In)
|
||||
Out.vNormal = float4(In.vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4(In.vProjPos.z / In.vProjPos.w, In.vProjPos.w / g_fFar, 15.f / 27.f, 1.f);
|
||||
Out.vSurface = vSurface;
|
||||
Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -554,12 +571,14 @@ struct PS_IN_OUTLINE
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
float4 vWorldPos : TEXCOORD1;
|
||||
float4 vProjPos : TEXCOORD2;
|
||||
float4 vPrevProjPos : TEXCOORD3;
|
||||
};
|
||||
struct PS_OUT_OUTLINE
|
||||
{
|
||||
float4 vOutLine : SV_TARGET0;
|
||||
float4 vNormal : SV_TARGET1;
|
||||
float4 vDepth : SV_TARGET2;
|
||||
float2 vVelocityUV : SV_TARGET3;
|
||||
};
|
||||
|
||||
PS_OUT_OUTLINE PS_MAIN_OUTLINE(PS_IN_OUTLINE In)
|
||||
@@ -582,6 +601,7 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE(PS_IN_OUTLINE In)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
AI_TEXTURE_TYPE_METALNESS, // 서페이스 파라미터
|
||||
1.f);
|
||||
Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -646,7 +666,8 @@ PS_OUT PS_LAKE(PS_IN In)
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = vSurface;
|
||||
|
||||
Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
@@ -681,7 +702,8 @@ PS_OUT PS_LAND(PS_IN In)
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = vSurface;
|
||||
|
||||
Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
@@ -708,7 +730,8 @@ PS_OUT PS_NONMRO(PS_IN In)
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = g_vSurfaceColor;
|
||||
|
||||
Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
@@ -749,7 +772,8 @@ PS_OUT PS_SPECTOR_WEAPON_MAIN(PS_IN In)
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = vSurface;
|
||||
|
||||
Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
|
||||
|
||||
return Out;
|
||||
}
|
||||
PS_OUT PS_LEVIOSO(PS_IN In)
|
||||
@@ -800,7 +824,8 @@ PS_OUT PS_LEVIOSO(PS_IN In)
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = vSurface;
|
||||
|
||||
Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
@@ -872,10 +872,8 @@ PS_BLOOM_OUT PS_BLOOM(PS_IN In)
|
||||
fBloomStrength = g_fBloomStrength * ((In.vLifeTime.x / In.vLifeTime.y));
|
||||
}
|
||||
|
||||
if (vMtrlDiffuse.a <= 0.1f)
|
||||
discard;
|
||||
|
||||
Out.vDiffuse = vector(vMtrlDiffuse.rgb * fBloomStrength, (float) g_iBloomType / 255.f);
|
||||
|
||||
Out.vDiffuse = vMtrlDiffuse * fBloomStrength;
|
||||
|
||||
return Out;
|
||||
|
||||
@@ -944,15 +942,18 @@ PS_BLOOM_OUT PS_DISTORTION(PS_IN In)
|
||||
vector vMtrlDiffuse;
|
||||
|
||||
|
||||
Out.vDiffuse = DrawEffect(In);
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
if (Out.vDiffuse.a == 0.f)
|
||||
vMtrlDiffuse = SoftEffect(In, vMtrlDiffuse);
|
||||
|
||||
if (vMtrlDiffuse.a == 0.f)
|
||||
discard;
|
||||
|
||||
|
||||
Out.vDiffuse = vMtrlDiffuse;
|
||||
|
||||
/* b,a 성분은 0으로 밀어준다. */
|
||||
|
||||
|
||||
|
||||
/* 거리 기반으로 디스토션 할 객체 중점으로부터의 거리 구해냄. */
|
||||
/* 중점이라면 r은 1, 중점에서의 거리가 멀수록 1에서 r 성분의 크기가 줄어드는 형태. */
|
||||
Out.vDiffuse.r = 1 - length(In.vTexcoord - float2(0.5f, 0.5f));
|
||||
@@ -1054,7 +1055,7 @@ technique11 DefaultTechnique
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_Blend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_BLOOM();
|
||||
@@ -1064,7 +1065,7 @@ technique11 DefaultTechnique
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_Blend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_NOWORLD();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_BLOOM();
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
float4x4 g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
float4x4 g_PrevWorldMatrix, g_PrevViewMatrix, g_PrevProjMatrix;
|
||||
|
||||
float g_fFar;
|
||||
float g_fUsingSurfaceParams;
|
||||
@@ -31,6 +32,7 @@ struct VS_OUT
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
float4 vWorldPos : TEXCOORD1;
|
||||
float4 vProjPos : TEXCOORD2;
|
||||
float4 vPrevProjPos : TEXCOORD3;
|
||||
};
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
@@ -42,11 +44,16 @@ VS_OUT VS_MAIN(VS_IN In)
|
||||
matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
matrix matPrevWV, matPrevWVP;
|
||||
matPrevWV = mul(g_PrevWorldMatrix, g_PrevViewMatrix);
|
||||
matPrevWVP = mul(matPrevWV, g_PrevProjMatrix);
|
||||
|
||||
Out.vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vNormal = normalize(mul(vector(In.vNormal, 0.f), g_WorldMatrix));
|
||||
Out.vWorldPos = mul(vector(In.vPosition, 1.f), g_WorldMatrix);
|
||||
Out.vProjPos = Out.vPosition;
|
||||
Out.vPrevProjPos = mul(vector(In.vPosition, 1.f), matPrevWVP);
|
||||
return Out;
|
||||
}
|
||||
|
||||
@@ -57,15 +64,17 @@ struct PS_IN
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
float4 vWorldPos : TEXCOORD1;
|
||||
float4 vProjPos : TEXCOORD2;
|
||||
float4 vPrevProjPos : TEXCOORD3;
|
||||
};
|
||||
|
||||
struct PS_OUT
|
||||
{
|
||||
float4 vAlbedo : SV_TARGET0;
|
||||
float4 vNormal : SV_TARGET1;
|
||||
float4 vDepth : SV_TARGET2;
|
||||
float4 vColor : SV_Target3;
|
||||
float4 vSurface : SV_Target4;
|
||||
float4 vAlbedo : SV_TARGET0;
|
||||
float4 vNormal : SV_TARGET1;
|
||||
float4 vDepth : SV_TARGET2;
|
||||
float4 vColor : SV_Target3;
|
||||
float4 vSurface : SV_Target4;
|
||||
float2 vVelocityUV : SV_TARGET5;
|
||||
};
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
@@ -122,6 +131,7 @@ PS_OUT PS_MAIN(PS_IN In)
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = vSurface;
|
||||
Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -180,6 +190,7 @@ PS_OUT PS_MAIN_TERRAIN_ANISO(PS_IN In)
|
||||
(1.f / 255.f)); // 지형은 1
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = vSurface;
|
||||
Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
@@ -54,6 +54,15 @@ void CLevel_Logo::Update(_float fTimeDelta)
|
||||
return;
|
||||
}
|
||||
GUI::End();
|
||||
#ifdef gimch
|
||||
if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::MAP))))
|
||||
return;
|
||||
#endif // gimch
|
||||
#ifdef 진우
|
||||
if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::EFFECT))))
|
||||
return;
|
||||
#endif // 진우
|
||||
|
||||
}
|
||||
|
||||
HRESULT CLevel_Logo::Render()
|
||||
|
||||
@@ -1408,6 +1408,17 @@ HRESULT CLoader::Loading_For_Effect()
|
||||
|
||||
});
|
||||
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Models/Effect/Lightning", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) {
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::EFFECT), wstrFileName,
|
||||
CInstance_Model::Create(m_pDevice, m_pContext, pFilePath, MODEL::NONANIM, XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixIdentity(), 0))))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
|
||||
});
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Desc_Box"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Box/Box.bin", XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
@@ -228,6 +228,24 @@ float3 DecodeNormalFromRG(Texture2D NormalMap, SamplerState Samp, float2 uv)
|
||||
return normalize(n);
|
||||
}
|
||||
|
||||
// BackGround ForeGround 합은 1
|
||||
float2 DepthCompare(float fCenterDepth, float fSampleDepth, float fDepthScale)
|
||||
{
|
||||
return saturate(0.5f + float2(fDepthScale, -fDepthScale) * (fSampleDepth - fCenterDepth));
|
||||
}
|
||||
|
||||
float2 SpreadCompare(float fOffsetLength, float2 fSpreadLength, float fPixelToSampleUnitsScale)
|
||||
{
|
||||
return saturate(fPixelToSampleUnitsScale * fSpreadLength - fOffsetLength + 1.f);
|
||||
}
|
||||
|
||||
float SampleWeight(float fCenterDepth, float fSampleDepth, float fOffsetLength, float fCenterSpreadLength, float fSampleSpreadLength, float fPixelToSampleUnitsScale, float fDepthScale)
|
||||
{
|
||||
float2 vDepthCompare = DepthCompare(fCenterDepth, fSampleDepth, fDepthScale);
|
||||
float2 vSpreadCompare = SpreadCompare(fOffsetLength, float2(fCenterSpreadLength, fSampleSpreadLength), fPixelToSampleUnitsScale);
|
||||
return dot(vDepthCompare, vSpreadCompare);
|
||||
}
|
||||
|
||||
float4x4 RotateX(float fAngle)
|
||||
{
|
||||
float fCos = cos(radians(fAngle));
|
||||
@@ -451,5 +469,43 @@ float4 BlendDiffuse(float4 vDiffuseA, Texture2D DiffuseBlendTexture, float2 vTex
|
||||
|
||||
}
|
||||
|
||||
float2 CalcVelocityUV(float4 vCurrentProjPos, float4 vPreviousProjPos)
|
||||
{
|
||||
if (vCurrentProjPos.w <= FLT_EPSILON5 || vPreviousProjPos.w <= FLT_EPSILON5) {
|
||||
return float2(0.0f, 0.0f);
|
||||
}
|
||||
|
||||
float2 currentUV = (vCurrentProjPos.xy/vCurrentProjPos.w);
|
||||
float2 previousUV = (vPreviousProjPos.xy / vCurrentProjPos.w);
|
||||
|
||||
currentUV.y *= -1.f;
|
||||
previousUV.y *= -1.f;
|
||||
|
||||
return currentUV - previousUV;
|
||||
}
|
||||
|
||||
float3 DownSampleFast(Texture2D SrcTexture2D, float2 vCenterTexcoord, float2 vSrcTexelSize, float2 vResolution)
|
||||
{
|
||||
float2 uv = float2(0.f, 0.f);
|
||||
float3 vCenterColor = SrcTexture2D.SampleLevel(BorderZeroSampler, uv, 0);
|
||||
uv = vCenterTexcoord + vSrcTexelSize * float2(-1.0, -1.0);
|
||||
float3 fLTColor = BilinearFetches(vResolution, SrcTexture2D, uv, BorderZeroLinearSampler);
|
||||
uv = vCenterTexcoord + vSrcTexelSize * float2(0.0, -1.0);
|
||||
float3 fTColor = SrcTexture2D.SampleLevel(BorderZeroSampler, uv, 0);
|
||||
uv = vCenterTexcoord + vSrcTexelSize * float2(+1.0, -1.0);
|
||||
float3 fRTColor = BilinearFetches(vResolution, SrcTexture2D, uv, BorderZeroLinearSampler);
|
||||
uv = vCenterTexcoord + vSrcTexelSize * float2(-1.0, 0.0);
|
||||
float3 fLColor = SrcTexture2D.SampleLevel(BorderZeroSampler, uv, 0);
|
||||
uv = vCenterTexcoord + vSrcTexelSize * float2(1.0, 0.0);
|
||||
float3 fRColor = SrcTexture2D.SampleLevel(BorderZeroSampler, uv, 0);
|
||||
uv = vCenterTexcoord + vSrcTexelSize * float2(-1.0, +1.0);
|
||||
float3 fLBColor = BilinearFetches(vResolution, SrcTexture2D, uv, BorderZeroLinearSampler);
|
||||
uv = vCenterTexcoord + vSrcTexelSize * float2(0.0, 1.0);
|
||||
float3 fBColor = SrcTexture2D.SampleLevel(BorderZeroSampler, uv, 0);
|
||||
uv = vCenterTexcoord + vSrcTexelSize * float2(+1.0, +1.0);
|
||||
float3 fRBColor = BilinearFetches(vResolution, SrcTexture2D, uv, BorderZeroLinearSampler);
|
||||
|
||||
return vCenterColor * 0.25f + (fLTColor + fRTColor + fLBColor + fRBColor) * 0.0625f + (fTColor + fLColor + fRColor + fBColor) * 0.125f;
|
||||
}
|
||||
|
||||
#endif // ENGINE_SHADER_FUNCTIONS_HLSLI
|
||||
|
||||
@@ -6,6 +6,7 @@ matrix g_LightViewMatrix_MIDDLE, g_LightProjMatrix_MIDDLE;
|
||||
matrix g_LightViewMatrix_FAR, g_LightProjMatrix_FAR;
|
||||
matrix g_PreShadowLightViewMatrix, g_PreShadowLightProjMatrix;
|
||||
|
||||
|
||||
float4 g_SamplePos[64];
|
||||
float g_fFar;
|
||||
float g_fShadowFar_NEAR;
|
||||
@@ -70,6 +71,12 @@ Texture2D g_BlurWeightXTexture;
|
||||
Texture2D g_SurfaceTexture;
|
||||
Texture2D g_OriginalTexture;
|
||||
|
||||
Texture2D g_ColorTexture;
|
||||
Texture2D g_VelocityTexture;
|
||||
|
||||
int g_iMBSampleCount;
|
||||
int g_fMBBlurRadius;
|
||||
float g_iMBType;
|
||||
|
||||
vector g_vLightDiffuse;
|
||||
vector g_vLightAmbient;
|
||||
@@ -137,6 +144,10 @@ struct VS_OUT
|
||||
float4 vPosition : SV_POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
struct PS_OUT_VELOCITYBLUR
|
||||
{
|
||||
float4 vColor : SV_TARGET0;
|
||||
};
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
@@ -213,6 +224,30 @@ struct PS_OUT_SSAO_BLUR
|
||||
{
|
||||
float fBlur : SV_TARGET0;
|
||||
};
|
||||
// g_ColorTexture;
|
||||
// g_DepthTexture;
|
||||
// g_VelocityTexture;
|
||||
// g_fFar
|
||||
// g_fMBBlurRadius
|
||||
// g_iMBType
|
||||
// g_iMBSampleCount
|
||||
PS_OUT_VELOCITYBLUR PS_MOTIONBLUR_X(PS_IN In)
|
||||
{
|
||||
PS_OUT_VELOCITYBLUR Out = (PS_OUT_VELOCITYBLUR)0;
|
||||
//float2 uv = In.vTexcoord;
|
||||
//float2 vSrcTexelSize = float2(1.f / g_vResolution.x, 1.f / g_vResolution.y);
|
||||
//float3 vColor = (0.f, 0.f, 0.f);
|
||||
|
||||
//for (int i = -g_iMBSampleCount; i < g_iMBSampleCount; ++i)
|
||||
//{
|
||||
// vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x;
|
||||
// vTexcoord.y = In.vTexcoord.y;
|
||||
|
||||
// vColor += g_fWeights_32[i + 15] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
||||
//}
|
||||
|
||||
return Out;
|
||||
}
|
||||
PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
|
||||
{
|
||||
PS_OUT_LIGHT Out;
|
||||
@@ -759,48 +794,34 @@ PS_OUT_FLT4_SINGLE PS_MAIN_EMBOSS(PS_IN In)
|
||||
{
|
||||
PS_OUT_FLT4_SINGLE Out;
|
||||
float2 uv = In.vTexcoord;
|
||||
float fMask = g_DiffuseTexture.SampleLevel(BorderZeroSampler, uv, 0).a;
|
||||
float4 fSrcAlpha = g_DiffuseTexture.Sample(PointSampler, uv);
|
||||
float2 vSrcTexelSize = float2(1.f / g_vResolution.x, 1.f / g_vResolution.y);
|
||||
float3 vColor = (0.f, 0.f, 0.f);
|
||||
|
||||
uint iMask = (uint) round(fMask * 255.f); // int a = 1 -> // vBloom.a = (enum / 255);
|
||||
//if (0 != iMask) {
|
||||
// 주변 4개 셀(LT RT LB RB)및 중앙을 이중선형샘플링, 이후 자체적으로 이중선형샘플링
|
||||
|
||||
float3 vCenterColor = g_DiffuseTexture.SampleLevel(BorderZeroSampler, uv, 0);
|
||||
uv = In.vTexcoord + vSrcTexelSize * float2(-1.0, -1.0);
|
||||
float3 fLTColor = BilinearFetches(g_vResolution, g_DiffuseTexture, uv, BorderZeroLinearSampler);
|
||||
uv = In.vTexcoord + vSrcTexelSize * float2(0.0, -1.0);
|
||||
float3 fTColor = g_DiffuseTexture.SampleLevel(BorderZeroSampler, uv, 0);
|
||||
uv = In.vTexcoord + vSrcTexelSize * float2(+1.0, -1.0);
|
||||
float3 fRTColor = BilinearFetches(g_vResolution, g_DiffuseTexture, uv, BorderZeroLinearSampler);
|
||||
uv = In.vTexcoord + vSrcTexelSize * float2(-1.0, 0.0);
|
||||
float3 fLColor = g_DiffuseTexture.SampleLevel(BorderZeroSampler, uv, 0);
|
||||
uv = In.vTexcoord + vSrcTexelSize * float2(1.0, 0.0);
|
||||
float3 fRColor = g_DiffuseTexture.SampleLevel(BorderZeroSampler, uv, 0);
|
||||
uv = In.vTexcoord + vSrcTexelSize * float2(-1.0, +1.0);
|
||||
float3 fLBColor = BilinearFetches(g_vResolution, g_DiffuseTexture, uv, BorderZeroLinearSampler);
|
||||
uv = In.vTexcoord + vSrcTexelSize * float2(0.0, 1.0);
|
||||
float3 fBColor = g_DiffuseTexture.SampleLevel(BorderZeroSampler, uv, 0);
|
||||
uv = In.vTexcoord + vSrcTexelSize * float2(+1.0, +1.0);
|
||||
float3 fRBColor = BilinearFetches(g_vResolution, g_DiffuseTexture, uv, BorderZeroLinearSampler);
|
||||
vColor = DownSampleFast(g_DiffuseTexture, In.vTexcoord, vSrcTexelSize, g_vResolution);
|
||||
|
||||
|
||||
|
||||
// vSample /= fWeight 이중선형샘플러가 자체적으로 웨이츠 계싼해주기 때문에 안해도 상관없을듯
|
||||
vColor = vCenterColor * 0.25f + (fLTColor + fRTColor + fLBColor + fRBColor) * 0.0625f + (fTColor + fLColor + fRColor + fBColor) * 0.125f;
|
||||
//if (iMask == 2)
|
||||
//{
|
||||
// vColor *= 3.f;
|
||||
//}
|
||||
//}
|
||||
float fIntensity = dot(vColor, float3(0.2126f, 0.7152f, 0.0722f));
|
||||
fIntensity = max(FLT_EPSILON3, fIntensity);
|
||||
|
||||
|
||||
float fBloomIntensity = GetBloomCurve(fIntensity, g_fBloomThreshold, g_iBloomEmbossingPass);
|
||||
float3 bloomColor = (vColor * fBloomIntensity) / fIntensity;
|
||||
Out.vFirstTarget = float4(bloomColor, 1.f);
|
||||
Out.vFirstTarget = fSrcAlpha;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT_FLT4_SINGLE PS_MAIN_DOWNSAMPLE(PS_IN In)
|
||||
{
|
||||
PS_OUT_FLT4_SINGLE Out;
|
||||
float2 uv = In.vTexcoord;
|
||||
float fMask = g_DiffuseTexture.SampleLevel(BorderZeroSampler, uv, 0).a;
|
||||
float2 vSrcTexelSize = float2(1.f / g_vResolution.x, 1.f / g_vResolution.y);
|
||||
float3 vColor = (0.f, 0.f, 0.f);
|
||||
|
||||
vColor = DownSampleFast(g_DiffuseTexture, In.vTexcoord, vSrcTexelSize, g_vResolution);
|
||||
|
||||
Out.vFirstTarget = float4(vColor, 1.f);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -809,10 +830,10 @@ PS_OUT_FLT4_SINGLE PS_MAIN_BLOOM_ACCUM(PS_IN In)
|
||||
{
|
||||
PS_OUT_FLT4_SINGLE Out;
|
||||
|
||||
float3 vColorSrcA = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord).xyz;
|
||||
float3 vColorSrcB = g_BlurTexture.Sample(BorderZeroSampler, In.vTexcoord).xyz;
|
||||
float4 vColorSrcA = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord);
|
||||
float4 vColorSrcB = g_BlurTexture.Sample(BorderZeroSampler, In.vTexcoord);
|
||||
|
||||
Out.vFirstTarget = float4(saturate(vColorSrcA + vColorSrcB), 1.f);
|
||||
Out.vFirstTarget = saturate(vColorSrcA + vColorSrcB);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -821,9 +842,9 @@ PS_OUT_FLT4_SINGLE PS_MAIN_BLOOM_FINISH(PS_IN In)
|
||||
PS_OUT_FLT4_SINGLE Out;
|
||||
|
||||
vector vColor = g_DiffuseTexture.Sample(PointSampler, In.vTexcoord);
|
||||
float3 vBloom = g_BlurTexture.Sample(BorderZeroSampler, In.vTexcoord).xyz;
|
||||
float4 vBloom = g_BlurTexture.Sample(BorderZeroSampler, In.vTexcoord);
|
||||
Out.vFirstTarget = vColor;
|
||||
Out.vFirstTarget += float4(vBloom, 1.f);
|
||||
Out.vFirstTarget += vBloom;
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -1278,7 +1299,7 @@ technique11 DefaultTechnique
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_Blend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_CAPTURE();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN_EMBOSS();
|
||||
@@ -1361,4 +1382,24 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_SSAO_BLUR();
|
||||
}
|
||||
|
||||
pass MotionBlurPass // 18
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MOTIONBLUR_X();
|
||||
}
|
||||
pass DownSamplePass // 19
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_CAPTURE();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN_DOWNSAMPLE();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -209,6 +209,9 @@ void CS_MAIN(
|
||||
|
||||
float fDrag = particleValue.fDrag;
|
||||
|
||||
if (fMoveLerpOption != 0.f)
|
||||
fDrag = SelectLerpUV(float2(particleValue.fDrag, 0.f), fTime, fMoveLerpOption).x;
|
||||
|
||||
if (particleValue.fDrag < FLT_EPSILON5)
|
||||
fDrag = 1;
|
||||
|
||||
@@ -230,6 +233,9 @@ void CS_MAIN(
|
||||
|
||||
float fDrag = particleValue.fDrag;
|
||||
|
||||
if (fMoveLerpOption != 0.f)
|
||||
fDrag = SelectLerpUV(float2(particleValue.fDrag, 0.f), fTime, fMoveLerpOption).x;
|
||||
|
||||
if (particleValue.fDrag < FLT_EPSILON5)
|
||||
fDrag = 1;
|
||||
|
||||
@@ -251,6 +257,9 @@ void CS_MAIN(
|
||||
|
||||
float fDrag = particleValue.fDrag;
|
||||
|
||||
if (fMoveLerpOption != 0.f)
|
||||
fDrag = SelectLerpUV(float2(particleValue.fDrag, 0.f), fTime, fMoveLerpOption).x;
|
||||
|
||||
if (particleValue.fDrag < FLT_EPSILON5)
|
||||
fDrag = 1;
|
||||
|
||||
|
||||
@@ -369,7 +369,7 @@ void CGameInstance::Compute_FrameCount()
|
||||
m_fTimer_Render_NonLight = Get_TimeDelta(TEXT("Timer_Render_NonLight"));
|
||||
m_fTimer_Render_Blend = Get_TimeDelta(TEXT("Timer_Render_Blend"));
|
||||
m_fTimer_Render_WeightBlend = Get_TimeDelta(TEXT("Timer_Render_WeightBlend"));
|
||||
m_fTimer_Render_Bloom = Get_TimeDelta(TEXT("Timer_Render_Bloom"));
|
||||
m_fTimer_Render_PostProcessing = Get_TimeDelta(TEXT("Timer_Render_PostProcessing"));
|
||||
m_fTimer_Render_LastColor = Get_TimeDelta(TEXT("Timer_Render_LastColor"));
|
||||
m_fTimer_Render_Tone_Mapping = Get_TimeDelta(TEXT("Timer_Render_Tone_Mapping"));
|
||||
m_fTimer_Render_UI = Get_TimeDelta(TEXT("Timer_Render_UI"));
|
||||
@@ -443,7 +443,7 @@ void CGameInstance::Present_TimeCost() const
|
||||
+ m_fTimer_Render_NonLight
|
||||
+ m_fTimer_Render_Blend
|
||||
+ m_fTimer_Render_WeightBlend
|
||||
+ m_fTimer_Render_Bloom
|
||||
+ m_fTimer_Render_PostProcessing
|
||||
+ m_fTimer_Render_LastColor
|
||||
+ m_fTimer_Render_Tone_Mapping
|
||||
+ m_fTimer_Render_UI
|
||||
@@ -524,9 +524,9 @@ void CGameInstance::Present_TimeCost() const
|
||||
GUI::Text("Render_WeightBlend %d", int(m_fTimer_Render_WeightBlend / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Bloom / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::ProgressBar(m_fTimer_Render_PostProcessing / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Bloom %d", int(m_fTimer_Render_Bloom / fRenderer_Total * 100.f));
|
||||
GUI::Text("Render_PostProcessing %d", int(m_fTimer_Render_PostProcessing / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_LastColor / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
@@ -689,6 +689,11 @@ HRESULT CGameInstance::Bind_PreShadowMatrix(CShader* pShader, const _char* pCons
|
||||
return m_pRenderer->Bind_PreShadowMatrix(pShader, pConstants, eType);
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Bind_PrevMatrix(CShader* pShader, const _char* pConstants, D3DTS eType)
|
||||
{
|
||||
return m_pRenderer->Bind_PrevMatrix(pShader, pConstants, eType);
|
||||
}
|
||||
|
||||
void CGameInstance::Set_Transform(D3DTS eState, _fmatrix TransformStateMatrix)
|
||||
{
|
||||
m_pPipeLine->Set_Transform(eState, TransformStateMatrix);
|
||||
@@ -854,13 +859,13 @@ HRESULT CGameInstance::Bind_RenderTarget(const _wstring& strTargetTag, CShader*
|
||||
return m_pRenderTarget_Manager->Bind_RenderTarget(strTargetTag, pShader, pConstantName);
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Copy_RenderTarget(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D)
|
||||
HRESULT CGameInstance::Copy_RenderTargetTo(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D)
|
||||
{
|
||||
return m_pRenderTarget_Manager->Copy_RenderTarget(strTargetTag, pTexture2D);
|
||||
return m_pRenderTarget_Manager->Copy_RenderTargetTo(strTargetTag, pTexture2D);
|
||||
}
|
||||
HRESULT CGameInstance::Paste_RenderTarget(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D)
|
||||
HRESULT CGameInstance::Copy_RenderTargetFrom(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D)
|
||||
{
|
||||
return m_pRenderTarget_Manager->Paste_RenderTarget(strTargetTag, pTexture2D);
|
||||
return m_pRenderTarget_Manager->Copy_RenderTargetFrom(strTargetTag, pTexture2D);
|
||||
}
|
||||
HRESULT CGameInstance::Accumulate_RenderTarget(CVIBuffer_Rect* pVIBuffer, CShader* pShader, const _wstring& wstrRenderTarget_SrcA, const _wstring& wstrRenderTarget_SrcB, const _wstring& wstrRenderTarget_Target, SHADER_PASS_DEFERRED ePass)
|
||||
{
|
||||
@@ -940,8 +945,6 @@ void CGameInstance::Add_ModelToMap(const _char* filePath, CModel* pModel)
|
||||
{
|
||||
m_ModelMap[filePath] = pModel;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
void CGameInstance::Add_SaveModel(const _char* filePath, SaveModel sModel)
|
||||
|
||||
@@ -48,7 +48,7 @@ void CPicking::Update()
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_Picking"));
|
||||
#endif // _DEBUG
|
||||
m_pGameInstance->Copy_RenderTarget(TEXT("Target_Depth"), m_pTexture2D);
|
||||
m_pGameInstance->Copy_RenderTargetTo(TEXT("Target_Depth"), m_pTexture2D);
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_Picking"));
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -69,11 +69,11 @@ void CRenderTarget::Clear()
|
||||
m_pContext->ClearRenderTargetView(m_pRTV, reinterpret_cast<_float*>(&m_vClearColor));
|
||||
}
|
||||
|
||||
void CRenderTarget::Copy_Resource(ID3D11Texture2D* pTexture2D)
|
||||
void CRenderTarget::Copy_ResourceTo(ID3D11Texture2D* pTexture2D)
|
||||
{
|
||||
m_pContext->CopyResource(pTexture2D, m_pTexture2D);
|
||||
}
|
||||
void CRenderTarget::Paste_Resource(ID3D11Texture2D* pTexture2D)
|
||||
void CRenderTarget::Copy_ResourceFrom(ID3D11Texture2D* pTexture2D)
|
||||
{
|
||||
m_pContext->CopyResource(m_pTexture2D, pTexture2D);
|
||||
}
|
||||
|
||||
@@ -175,26 +175,26 @@ HRESULT CRenderTarget_Manager::Begin_MRT_NO_DepthStencil(const _wstring& strMRTT
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CRenderTarget_Manager::Copy_RenderTarget(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D)
|
||||
HRESULT CRenderTarget_Manager::Copy_RenderTargetTo(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D)
|
||||
{
|
||||
CRenderTarget* pRenderTarget = Find_RenderTarget(strTargetTag);
|
||||
if (nullptr == pRenderTarget) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
pRenderTarget->Copy_Resource(pTexture2D);
|
||||
pRenderTarget->Copy_ResourceTo(pTexture2D);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRenderTarget_Manager::Paste_RenderTarget(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D)
|
||||
HRESULT CRenderTarget_Manager::Copy_RenderTargetFrom(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D)
|
||||
{
|
||||
CRenderTarget* pRenderTarget = Find_RenderTarget(strTargetTag);
|
||||
if (nullptr == pRenderTarget) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
pRenderTarget->Paste_Resource(pTexture2D);
|
||||
pRenderTarget->Copy_ResourceFrom(pTexture2D);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -367,6 +367,9 @@ HRESULT CRenderTarget_Manager::Refit_RenderTarget(CVIBuffer_Rect* pVIBuffer, CSh
|
||||
case Engine::SHADER_PASS_DEFERRED::BLOOM_BLURX:
|
||||
pConstantName = "g_DiffuseTexture";
|
||||
break;
|
||||
case Engine::SHADER_PASS_DEFERRED::DOWNSAMPLE:
|
||||
pConstantName = "g_DiffuseTexture";
|
||||
break;
|
||||
case Engine::SHADER_PASS_DEFERRED::BLOOM_BLURY:
|
||||
pConstantName = "g_BlurXTexture";
|
||||
break;
|
||||
|
||||
@@ -11,10 +11,6 @@ void CRenderer::Render()
|
||||
m_pContext->RSGetViewports(&iNumViewPort, &vp);
|
||||
_float2 vResolution = { vp.Width, vp.Height };
|
||||
|
||||
if (FAILED(m_pShader->Bind_RawValue("g_vResolution", &vResolution, sizeof(_float2)))) {
|
||||
assert(false);
|
||||
}
|
||||
|
||||
Render_Priority();
|
||||
Render_Shadow();
|
||||
Render_NonBlend();
|
||||
@@ -32,12 +28,15 @@ void CRenderer::Render()
|
||||
Render_NonLight();
|
||||
Render_Blend();
|
||||
Render_WeightBlend();
|
||||
Render_Bloom();
|
||||
Render_PostProcessing();
|
||||
Render_LastColor();
|
||||
Render_Tone_Mapping();
|
||||
Render_UI();
|
||||
Render_UI_Overley();
|
||||
|
||||
memcpy_s(&m_MotionBlurPreViewMatrix, sizeof(_float4x4), m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW), sizeof(_float4x4));
|
||||
memcpy_s(&m_MotionBlurPreProjMatrix, sizeof(_float4x4), m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ), sizeof(_float4x4));
|
||||
|
||||
#ifdef _DEBUG
|
||||
static _bool m_bToggleDebug = false;
|
||||
Describe_Entitiy();
|
||||
@@ -116,6 +115,21 @@ HRESULT CRenderer::Bind_PreShadowMatrix(class CShader* pShader, const _char* pCo
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRenderer::Bind_PrevMatrix(class CShader* pShader, const _char* pConstants, D3DTS eType)
|
||||
{
|
||||
if (D3DTS::VIEW == eType) {
|
||||
if (FAILED(pShader->Bind_Matrix(pConstants, &m_MotionBlurPreViewMatrix))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
else if (D3DTS::PROJ == eType) {
|
||||
if (FAILED(pShader->Bind_Matrix(pConstants, &m_MotionBlurPreProjMatrix))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRenderer::Render_Occlusion()
|
||||
{
|
||||
COMPUTE_TIMEDELTA("Timer_Render_Occlusion");
|
||||
@@ -320,9 +334,9 @@ void CRenderer::Render_LightAcc()
|
||||
return;
|
||||
}
|
||||
|
||||
m_pShader->Bind_Matrix("g_WorldMatrix", &m_WorldMatrix);
|
||||
m_pShader->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix);
|
||||
m_pShader->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix);
|
||||
m_pShader->Bind_Matrix("g_WorldMatrix", &m_ScreenWorldMatrix);
|
||||
m_pShader->Bind_Matrix("g_ViewMatrix", &m_ScreenViewMatrix);
|
||||
m_pShader->Bind_Matrix("g_ProjMatrix", &m_ScreenProjMatrix);
|
||||
m_pShader->Bind_Matrix("g_invMatView", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW_INV));
|
||||
m_pShader->Bind_Matrix("g_invmatProj", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ_INV));
|
||||
m_pShader->Bind_RawValue("g_vCamPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float4));
|
||||
@@ -365,9 +379,9 @@ void CRenderer::Render_Combined()
|
||||
{
|
||||
// Bind_Resorces
|
||||
|
||||
m_pShader->Bind_Matrix("g_WorldMatrix", &m_WorldMatrix);
|
||||
m_pShader->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix);
|
||||
m_pShader->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix);
|
||||
m_pShader->Bind_Matrix("g_WorldMatrix", &m_ScreenWorldMatrix);
|
||||
m_pShader->Bind_Matrix("g_ViewMatrix", &m_ScreenViewMatrix);
|
||||
m_pShader->Bind_Matrix("g_ProjMatrix", &m_ScreenProjMatrix);
|
||||
m_pShader->Bind_Matrix("g_invMatView", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW_INV));
|
||||
m_pShader->Bind_Matrix("g_invmatProj", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ_INV));
|
||||
|
||||
@@ -459,9 +473,9 @@ void CRenderer::Render_EnvironmentPostProcess()
|
||||
return;
|
||||
}
|
||||
|
||||
m_pShader->Bind_Matrix("g_WorldMatrix", &m_WorldMatrix);
|
||||
m_pShader->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix);
|
||||
m_pShader->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix);
|
||||
m_pShader->Bind_Matrix("g_WorldMatrix", &m_ScreenWorldMatrix);
|
||||
m_pShader->Bind_Matrix("g_ViewMatrix", &m_ScreenViewMatrix);
|
||||
m_pShader->Bind_Matrix("g_ProjMatrix", &m_ScreenProjMatrix);
|
||||
m_pShader->Bind_Matrix("g_invMatView", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW_INV));
|
||||
m_pShader->Bind_Matrix("g_invmatProj", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ_INV));
|
||||
m_pShader->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float));
|
||||
@@ -490,9 +504,9 @@ void CRenderer::Render_EnvironmentPostProcess()
|
||||
return;
|
||||
}
|
||||
|
||||
m_pShader->Bind_Matrix("g_WorldMatrix", &m_WorldMatrix);
|
||||
m_pShader->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix);
|
||||
m_pShader->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix);
|
||||
m_pShader->Bind_Matrix("g_WorldMatrix", &m_ScreenWorldMatrix);
|
||||
m_pShader->Bind_Matrix("g_ViewMatrix", &m_ScreenViewMatrix);
|
||||
m_pShader->Bind_Matrix("g_ProjMatrix", &m_ScreenProjMatrix);
|
||||
m_pShader->Bind_Matrix("g_invMatView", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW_INV));
|
||||
m_pShader->Bind_Matrix("g_invmatProj", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ_INV));
|
||||
m_pShader->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float));
|
||||
@@ -575,9 +589,9 @@ void CRenderer::Render_WeightBlend()
|
||||
COMPUTE_TIMEDELTA("Timer_Render_WeightBlend");
|
||||
// Bind_Resorces
|
||||
|
||||
m_pWeightBlendShader->Bind_Matrix("g_WorldMatrix", &m_WorldMatrix);
|
||||
m_pWeightBlendShader->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix);
|
||||
m_pWeightBlendShader->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix);
|
||||
m_pWeightBlendShader->Bind_Matrix("g_WorldMatrix", &m_ScreenWorldMatrix);
|
||||
m_pWeightBlendShader->Bind_Matrix("g_ViewMatrix", &m_ScreenViewMatrix);
|
||||
m_pWeightBlendShader->Bind_Matrix("g_ProjMatrix", &m_ScreenProjMatrix);
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_WB_Color"), m_pWeightBlendShader, "g_MixedDiffuseTexture"))) {
|
||||
@@ -637,9 +651,9 @@ void CRenderer::Render_Blur()
|
||||
return;
|
||||
}
|
||||
|
||||
m_pShader->Bind_Matrix("g_WorldMatrix", &m_WorldMatrix);
|
||||
m_pShader->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix);
|
||||
m_pShader->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix);
|
||||
m_pShader->Bind_Matrix("g_WorldMatrix", &m_ScreenWorldMatrix);
|
||||
m_pShader->Bind_Matrix("g_ViewMatrix", &m_ScreenViewMatrix);
|
||||
m_pShader->Bind_Matrix("g_ProjMatrix", &m_ScreenProjMatrix);
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Blur"), m_pShader, "g_BlurTexture"))) {
|
||||
return;
|
||||
@@ -763,9 +777,9 @@ void CRenderer::Render_SSAO_BLUR()
|
||||
}
|
||||
{
|
||||
// Bind_Resorces
|
||||
m_pShader->Bind_Matrix("g_WorldMatrix", &m_WorldMatrix);
|
||||
m_pShader->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix);
|
||||
m_pShader->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix);
|
||||
m_pShader->Bind_Matrix("g_WorldMatrix", &m_ScreenWorldMatrix);
|
||||
m_pShader->Bind_Matrix("g_ViewMatrix", &m_ScreenViewMatrix);
|
||||
m_pShader->Bind_Matrix("g_ProjMatrix", &m_ScreenProjMatrix);
|
||||
if (FAILED(m_pShader->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return;
|
||||
}
|
||||
@@ -806,20 +820,48 @@ void CRenderer::Render_Blend()
|
||||
COMPUTE_TIMEDELTA("Timer_Render_Blend");
|
||||
}
|
||||
|
||||
void CRenderer::Render_Bloom()
|
||||
void CRenderer::Render_PostProcessing()
|
||||
{
|
||||
COMPUTE_TIMEDELTA("Timer_Render_Bloom");
|
||||
// "Target_Bloom_Input"
|
||||
// "Target_Bloom"
|
||||
// "Target_Bloom_2x2"
|
||||
// "Target_Bloom_4x4"
|
||||
// "Target_Bloom_8x8"
|
||||
// "Target_Bloom_2x2_1"
|
||||
// "Target_Bloom_4x4_1"
|
||||
// "Target_Bloom_8x8_1"
|
||||
// "Target_Bloom_8x8_X"
|
||||
// "Target_Bloom_4x4_2"
|
||||
// "Target_Bloom_2x2_2"
|
||||
/* POSTPROCESSING */
|
||||
COMPUTE_TIMEDELTA("Timer_Render_PostProcessing");
|
||||
//{
|
||||
// ID3D11Texture2D* pBackBuffer = { nullptr };
|
||||
// m_pGameInstance->Get_BackBufferPTR(&pBackBuffer);
|
||||
// if (FAILED(m_pGameInstance->Copy_RenderTargetTo(TEXT("Target_AfterBlend"), pBackBuffer))) {
|
||||
// assert(false);
|
||||
// }
|
||||
// m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_AfterBlend"), TEXT("Target_AfterBlend2x2"), SHADER_PASS_DEFERRED::DOWNSAMPLE);
|
||||
//}
|
||||
///* MotionBlur */
|
||||
//
|
||||
//{ // Bind_Resorces
|
||||
// m_pShader->Bind_Matrix("g_WorldMatrix", &m_ScreenWorldMatrix);
|
||||
// m_pShader->Bind_Matrix("g_ViewMatrix", &m_ScreenViewMatrix);
|
||||
// m_pShader->Bind_Matrix("g_ProjMatrix", &m_ScreenProjMatrix);
|
||||
// m_pShader->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float));
|
||||
// m_pShader->Bind_RawValue("g_fMBBlurRadius", &m_fMBBlurRadius, sizeof(_float));
|
||||
// m_pShader->Bind_RawValue("g_iMBSampleCount", &m_iMBSampleCount, sizeof(_int));
|
||||
// m_pShader->Bind_RawValue("g_iMBType", &m_iMBType, sizeof(_int));
|
||||
//}
|
||||
//{
|
||||
// // Bind_Targets
|
||||
// if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_AfterBlend2x2"), m_pShader, "g_ColorTexture"))) {
|
||||
// assert(false);
|
||||
// return;
|
||||
// }
|
||||
// if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Depth"), m_pShader, "g_DepthTexture"))) {
|
||||
// assert(false);
|
||||
// return;
|
||||
// }
|
||||
// if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_VelocityMap"), m_pShader, "g_VelocityTexture"))) {
|
||||
// assert(false);
|
||||
// return;
|
||||
// }
|
||||
//}
|
||||
//m_pShader->Begin(ENUM_CLASS(SHADER_PASS_DEFERRED::MOTIONBLUR));
|
||||
|
||||
//m_pVIBuffer->Bind_Resources();
|
||||
//m_pVIBuffer->Render();
|
||||
|
||||
if (FAILED(m_pGameInstance->Begin_MRT(TEXT("MRT_Bloom")))) {
|
||||
return;
|
||||
@@ -840,6 +882,19 @@ void CRenderer::Render_Bloom()
|
||||
return;
|
||||
}
|
||||
|
||||
// "Target_Bloom_Input"
|
||||
// "Target_Bloom"
|
||||
// "Target_Bloom_2x2"
|
||||
// "Target_Bloom_4x4"
|
||||
// "Target_Bloom_8x8"
|
||||
// "Target_Bloom_2x2_1"
|
||||
// "Target_Bloom_4x4_1"
|
||||
// "Target_Bloom_8x8_1"
|
||||
// "Target_Bloom_8x8_X"
|
||||
// "Target_Bloom_4x4_2"
|
||||
// "Target_Bloom_2x2_2"
|
||||
|
||||
|
||||
m_pShader->Bind_RawValue("g_fBloomThreshold", &m_fBloomThreshold, sizeof(_float));
|
||||
m_pShader->Bind_RawValue("g_iBloomEmbossingPass", &m_iBloomEmbossingPass, sizeof(_int));
|
||||
|
||||
@@ -867,7 +922,7 @@ void CRenderer::Render_Bloom()
|
||||
m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_2x2_2"), TEXT("Target_Bloom"), SHADER_PASS_DEFERRED::UPSAMPLE);
|
||||
m_pGameInstance->Finish_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_Bloom_Input"), TEXT("Target_Bloom"), SHADER_PASS_DEFERRED::BLOOM_FINISH); // 9
|
||||
|
||||
COMPUTE_TIMEDELTA("Timer_Render_Bloom");
|
||||
COMPUTE_TIMEDELTA("Timer_Render_PostProcessing");
|
||||
}
|
||||
|
||||
void CRenderer::Render_Distortion()
|
||||
@@ -904,13 +959,13 @@ void CRenderer::Render_DistortionAcc()
|
||||
|
||||
m_pGameInstance->Get_BackBufferPTR(&pBackBufferTexture2D);
|
||||
|
||||
if (FAILED(m_pGameInstance->Paste_RenderTarget(TEXT("Target_PreEffect"), pBackBufferTexture2D))) {
|
||||
if (FAILED(m_pGameInstance->Copy_RenderTargetFrom(TEXT("Target_PreEffect"), pBackBufferTexture2D))) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_pDistortionShader->Bind_Matrix("g_WorldMatrix", &m_WorldMatrix);
|
||||
m_pDistortionShader->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix);
|
||||
m_pDistortionShader->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix);
|
||||
m_pDistortionShader->Bind_Matrix("g_WorldMatrix", &m_ScreenWorldMatrix);
|
||||
m_pDistortionShader->Bind_Matrix("g_ViewMatrix", &m_ScreenViewMatrix);
|
||||
m_pDistortionShader->Bind_Matrix("g_ProjMatrix", &m_ScreenProjMatrix);
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Distortion"), m_pDistortionShader, "g_DistortionTexture"))) {
|
||||
return;
|
||||
@@ -981,9 +1036,9 @@ void CRenderer::Render_LastColor()
|
||||
COMPUTE_TIMEDELTA("Timer_Render_LastColor");
|
||||
// Bind_Resorces
|
||||
|
||||
m_pLastColorShader->Bind_Matrix("g_WorldMatrix", &m_WorldMatrix);
|
||||
m_pLastColorShader->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix);
|
||||
m_pLastColorShader->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix);
|
||||
m_pLastColorShader->Bind_Matrix("g_WorldMatrix", &m_ScreenWorldMatrix);
|
||||
m_pLastColorShader->Bind_Matrix("g_ViewMatrix", &m_ScreenViewMatrix);
|
||||
m_pLastColorShader->Bind_Matrix("g_ProjMatrix", &m_ScreenProjMatrix);
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Color"), m_pLastColorShader, "g_ColorTexture"))) {
|
||||
return;
|
||||
@@ -1002,13 +1057,13 @@ void CRenderer::Render_Tone_Mapping()
|
||||
{ // BackBuffer
|
||||
ID3D11Texture2D* pBackBuffer = nullptr;
|
||||
m_pGameInstance->Get_BackBufferPTR(&pBackBuffer);
|
||||
m_pGameInstance->Paste_RenderTarget(TEXT("Target_ToneMapping"), pBackBuffer);
|
||||
m_pGameInstance->Copy_RenderTargetFrom(TEXT("Target_ToneMapping"), pBackBuffer);
|
||||
SAFE_RELEASE(pBackBuffer);
|
||||
}
|
||||
|
||||
m_pLastColorShader->Bind_Matrix("g_WorldMatrix", &m_WorldMatrix);
|
||||
m_pLastColorShader->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix);
|
||||
m_pLastColorShader->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix);
|
||||
m_pLastColorShader->Bind_Matrix("g_WorldMatrix", &m_ScreenWorldMatrix);
|
||||
m_pLastColorShader->Bind_Matrix("g_ViewMatrix", &m_ScreenViewMatrix);
|
||||
m_pLastColorShader->Bind_Matrix("g_ProjMatrix", &m_ScreenProjMatrix);
|
||||
|
||||
if (FAILED(m_pShader->Bind_RawValue("g_iToneMappingType", &m_iToneMappingType, sizeof(_uint)))) {
|
||||
assert(false);
|
||||
@@ -1046,10 +1101,10 @@ void CRenderer::Render_Debug()
|
||||
SAFE_RELEASE(pDebugCom);
|
||||
} m_DebugComponents.clear();
|
||||
|
||||
if (FAILED(m_pShader->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix))) {
|
||||
if (FAILED(m_pShader->Bind_Matrix("g_ViewMatrix", &m_ScreenViewMatrix))) {
|
||||
return;
|
||||
}
|
||||
if (FAILED(m_pShader->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))) {
|
||||
if (FAILED(m_pShader->Bind_Matrix("g_ProjMatrix", &m_ScreenProjMatrix))) {
|
||||
return;
|
||||
}
|
||||
if (FAILED(m_pShader->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
|
||||
@@ -267,6 +267,16 @@ HRESULT CRenderer::Initialize()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* Target_AfterBlend */
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_AfterBlend"), (_uint)Viewport.Width, (_uint)Viewport.Height,
|
||||
DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0, 1.0f)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_AfterBlend_2x2"), (_uint)(Viewport.Width * 0.5f), (_uint)(Viewport.Height * 0.5f),
|
||||
DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0, 1.0f)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* Target_Color*/
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Color"), (_uint)Viewport.Width, (_uint)Viewport.Height,
|
||||
DXGI_FORMAT_R32G32B32A32_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) {
|
||||
@@ -338,6 +348,19 @@ HRESULT CRenderer::Initialize()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* Target_VelocityMap */
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_VelocityMap"), (_uint)Viewport.Width, (_uint)Viewport.Height,
|
||||
DXGI_FORMAT_R32G32_FLOAT, _float4(0.0f, 0.f, 0.f, 0.f)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_BeforeNormal"), (_uint)Viewport.Width, (_uint)Viewport.Height,
|
||||
DXGI_FORMAT_R16G16B16A16_UNORM, _float4(0.0f, 0.f, 0.f, 0.f)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_BeforeDepth"), (_uint)Viewport.Width, (_uint)Viewport.Height,
|
||||
DXGI_FORMAT_R32G32B32A32_FLOAT, _float4(0.0f, 1.f, 0.f, 0.f)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Distortion"), (_uint)(Viewport.Width), (_uint)(Viewport.Height),
|
||||
DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) {
|
||||
return E_FAIL;
|
||||
@@ -372,6 +395,10 @@ HRESULT CRenderer::Initialize()
|
||||
if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_GameObjects"), TEXT("Target_Surface")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_GameObjects"), TEXT("Target_VelocityMap")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* MRT_SSAO */
|
||||
if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_SSAO_OCCLUSION"), TEXT("Target_SSAO_AmbientOcclusion")))) {
|
||||
return E_FAIL;
|
||||
@@ -457,10 +484,6 @@ HRESULT CRenderer::Initialize()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
//if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_WB"), TEXT("Target_Color")))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
/* MRT_Fog */
|
||||
if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Fog"), TEXT("Target_Fog")))) {
|
||||
return E_FAIL;
|
||||
@@ -510,12 +533,14 @@ HRESULT CRenderer::Initialize()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
XMStoreFloat4x4(&m_WorldMatrix, XMMatrixScaling(Viewport.Width, Viewport.Height, 1.f));
|
||||
XMStoreFloat4x4(&m_ViewMatrix, XMMatrixIdentity());
|
||||
XMStoreFloat4x4(&m_ProjMatrix, XMMatrixOrthographicLH(Viewport.Width, Viewport.Height, 0.f, 1.f));
|
||||
XMStoreFloat4x4(&m_ScreenWorldMatrix, XMMatrixScaling(Viewport.Width, Viewport.Height, 1.f));
|
||||
XMStoreFloat4x4(&m_ScreenViewMatrix, XMMatrixIdentity());
|
||||
XMStoreFloat4x4(&m_ScreenProjMatrix, XMMatrixOrthographicLH(Viewport.Width, Viewport.Height, 0.f, 1.f));
|
||||
|
||||
Fill_Geometry(SSAO_SAMPLE_NUMBER);
|
||||
|
||||
XMStoreFloat4x4(&m_MotionBlurPreViewMatrix, XMMatrixIdentity());
|
||||
XMStoreFloat4x4(&m_MotionBlurPreProjMatrix, XMMatrixIdentity());
|
||||
return S_OK;
|
||||
}
|
||||
CRenderer* CRenderer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -551,7 +576,6 @@ void CRenderer::Free()
|
||||
RenderObjects.clear();
|
||||
}
|
||||
|
||||
SAFE_RELEASE(m_pGlobalStaticCB);
|
||||
SAFE_RELEASE(m_pSSAO_NoiseTexture);
|
||||
SAFE_RELEASE(m_pSSAO_NoiseSRV);
|
||||
SAFE_RELEASE(m_pPreShadowDSV);
|
||||
|
||||
@@ -92,7 +92,7 @@ HRESULT CTimer_Manager::Initialize()
|
||||
if (FAILED(Add_Timer(TEXT("Timer_Render_WeightBlend")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Timer(TEXT("Timer_Render_Bloom")))) {
|
||||
if (FAILED(Add_Timer(TEXT("Timer_Render_PostProcessing")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Timer(TEXT("Timer_Render_LastColor")))) {
|
||||
|
||||
@@ -262,6 +262,7 @@ void CTransform::RewindMomentum()
|
||||
{
|
||||
m_vMomentum = m_vBackMomentum;
|
||||
m_vBackMomentum = { 0.f, 0.f, 0.f };
|
||||
m_PrevMatrix = m_WorldMatrix;
|
||||
}
|
||||
|
||||
void CTransform::BookMomentum(_fvector vMomentum)
|
||||
|
||||
@@ -48,7 +48,7 @@ enum class SHADER_PASS_CELL { DEBUG, END };
|
||||
|
||||
enum class SHADER_PASS_DEFERRED { DEBUG, DIRECTIONAL, POINT, COMBINED, BLUR, SPOT,
|
||||
UPSAMPLE, BLOOM_BLURX, BLOOM_BLURY, EMBOSSING, BLOOM_ACCUM, BLOOM_FINISH, BLURX_ENVIRONMENT,
|
||||
POSTCOMBINED, FOG, TONE_MAPPING, SSAO_OCCLUSION, SSAO_BLUR,
|
||||
POSTCOMBINED, FOG, TONE_MAPPING, SSAO_OCCLUSION, SSAO_BLUR, MOTIONBLUR, DOWNSAMPLE,
|
||||
END };
|
||||
|
||||
enum class TEXTURE_MOUNT_SLOT0 { NOT_DEFINED, METALLIC, SPECULAR, HEIGHT, END };
|
||||
|
||||
@@ -431,4 +431,9 @@ typedef struct tagSSAO_GeometryDirections_RANDOM_REAL {
|
||||
_float4 vDir[16];
|
||||
}SSAO_GEOMETRYDIRECTIONS_RANDOM_REAL;
|
||||
|
||||
typedef struct tagPrevVPMatrices {
|
||||
_float4x4 PrevViewMatrix;
|
||||
_float4x4 PrevProjMatrix;
|
||||
}PREVVPMATRICES;
|
||||
|
||||
NS_END
|
||||
|
||||
@@ -103,9 +103,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
HRESULT Add_RenderGroup(RENDER eRenderGroup, class CGameObject* pRenderObject);
|
||||
void Render_PreShadow(const _float4x4& ViewMatrix, const _float4x4& ProjMatrix);
|
||||
HRESULT Bind_PreShadowMatrix(class CShader* pShader, const _char* pConstants, D3DTS eType);
|
||||
#pragma endregion
|
||||
|
||||
#pragma region ASSET_MANAGER
|
||||
HRESULT Bind_PrevMatrix(class CShader* pShader, const _char* pConstants, D3DTS eType);
|
||||
#pragma endregion
|
||||
|
||||
#pragma region KEY_MANAGER
|
||||
@@ -174,8 +172,8 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
HRESULT Begin_MRT_NO_DepthStencil(const _wstring& strMRTTag);
|
||||
HRESULT End_MRT();
|
||||
HRESULT Bind_RenderTarget(const _wstring& strTargetTag, class CShader* pShader, const _char* pConstantName);
|
||||
HRESULT Copy_RenderTarget(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D);
|
||||
HRESULT Paste_RenderTarget(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D);
|
||||
HRESULT Copy_RenderTargetTo(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D);
|
||||
HRESULT Copy_RenderTargetFrom(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D);
|
||||
HRESULT Accumulate_RenderTarget(class CVIBuffer_Rect* pVIBuffer, class CShader* pShader, const _wstring& wstrRenderTarget_SrcA, const _wstring& wstrRenderTarget_SrcB, const _wstring& wstrRenderTarget_Target, SHADER_PASS_DEFERRED ePass);
|
||||
HRESULT Refit_RenderTarget(class CVIBuffer_Rect* pVIBuffer, class CShader* pShader, const _wstring& wstrRenderTargetInput, const _wstring& wstrRenderTargetOutput, SHADER_PASS_DEFERRED ePass);
|
||||
HRESULT Finish_RenderTarget(class CVIBuffer_Rect* pVIBuffer, class CShader* pShader, const _wstring& wstrRenderTargetOriginal, const _wstring& wstrRenderTargetBloomed, SHADER_PASS_DEFERRED ePass);
|
||||
@@ -335,7 +333,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
_float m_fTimer_Render_NonLight = { 0.f };
|
||||
_float m_fTimer_Render_Blend = { 0.f };
|
||||
_float m_fTimer_Render_WeightBlend = { 0.f };
|
||||
_float m_fTimer_Render_Bloom = { 0.f };
|
||||
_float m_fTimer_Render_PostProcessing = { 0.f };
|
||||
_float m_fTimer_Render_LastColor = { 0.f };
|
||||
_float m_fTimer_Render_Tone_Mapping = { 0.f };
|
||||
_float m_fTimer_Render_UI = { 0.f };
|
||||
|
||||
@@ -17,8 +17,8 @@ class CRenderTarget final : public CBase
|
||||
HRESULT Initialize(_uint iSizeX, _uint iSizeY, DXGI_FORMAT ePixelFormat, const _float4& vClearColor);
|
||||
HRESULT Bind_ShaderResource(class CShader* pShader, const _char* pConstantName);
|
||||
void Clear();
|
||||
void Copy_Resource(ID3D11Texture2D* pTexture2D);
|
||||
void Paste_Resource(ID3D11Texture2D* pTexture2D);
|
||||
void Copy_ResourceTo(ID3D11Texture2D* pTexture2D);
|
||||
void Copy_ResourceFrom(ID3D11Texture2D* pTexture2D);
|
||||
void Get_TextureDesc(D3D11_TEXTURE2D_DESC& Desc);
|
||||
ID3D11ShaderResourceView* Get_SRV() const { return m_pSRV; }
|
||||
|
||||
|
||||
@@ -18,10 +18,11 @@ class CRenderTarget_Manager final : public CBase
|
||||
HRESULT Begin_MRT_NO_DepthStencil(const _wstring& strMRTTag);
|
||||
HRESULT End_MRT();
|
||||
HRESULT Bind_RenderTarget(const _wstring& strTargetTag, class CShader* pShader, const _char* pConstantName);
|
||||
HRESULT Copy_RenderTarget(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D);
|
||||
HRESULT Paste_RenderTarget(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D);
|
||||
HRESULT Copy_RenderTargetTo(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D);
|
||||
HRESULT Copy_RenderTargetFrom(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D);
|
||||
HRESULT Bind_CS_RenderTarget(_uint iIndex, const _wstring& strTargetTag);
|
||||
|
||||
|
||||
// 두 랜더타겟을 하나로 모음
|
||||
HRESULT Accumulate_RenderTarget(class CVIBuffer_Rect* pVIBuffer, class CShader* pShader, const _wstring& wstrRenderTarget_SrcA, const _wstring& wstrRenderTarget_SrcB, const _wstring& wstrRenderTarget_Target, SHADER_PASS_DEFERRED ePass);
|
||||
// 랜더 타겟의 크기를 dest로 다시 맞춤
|
||||
|
||||
@@ -13,8 +13,9 @@ class CRenderer final : public CBase
|
||||
public:
|
||||
void Render();
|
||||
HRESULT Add_RenderGroup(RENDER eRenderGroup, class CGameObject* pRenderObject);
|
||||
void Render_PreShadow(const _float4x4& ViewMatrix, const _float4x4& ProjMatrix);
|
||||
void Render_PreShadow(const _float4x4& ViewMatrix, const _float4x4& ProjMatrix);
|
||||
HRESULT Bind_PreShadowMatrix(class CShader* pShader, const _char* pConstants, D3DTS eType);
|
||||
HRESULT Bind_PrevMatrix(class CShader* pShader, const _char* pConstants, D3DTS eType);
|
||||
|
||||
#ifdef _DEBUG
|
||||
private:
|
||||
@@ -38,9 +39,9 @@ class CRenderer final : public CBase
|
||||
class CVIBuffer_Rect* m_pVIBuffer = { nullptr };
|
||||
|
||||
private:
|
||||
_float4x4 m_WorldMatrix = {};
|
||||
_float4x4 m_ViewMatrix = {};
|
||||
_float4x4 m_ProjMatrix = {};
|
||||
_float4x4 m_ScreenWorldMatrix = {};
|
||||
_float4x4 m_ScreenViewMatrix = {};
|
||||
_float4x4 m_ScreenProjMatrix = {};
|
||||
|
||||
ID3D11DepthStencilView* m_pShadowDSV_NEAR = { nullptr };
|
||||
ID3D11DepthStencilView* m_pShadowDSV_MIDDLE = { nullptr };
|
||||
@@ -48,12 +49,24 @@ class CRenderer final : public CBase
|
||||
ID3D11DepthStencilView* m_pPreShadowDSV = { nullptr };
|
||||
ID3D11ShaderResourceView* m_pSSAO_NoiseSRV = { nullptr };
|
||||
ID3D11Texture2D* m_pSSAO_NoiseTexture = { nullptr };
|
||||
ID3D11Buffer* m_pGlobalStaticCB = { nullptr };
|
||||
|
||||
_float4x4 m_MotionBlurPreViewMatrix = {};
|
||||
_float4x4 m_MotionBlurPreProjMatrix = {};
|
||||
|
||||
_float4x4 m_PreShadowView = {};
|
||||
_float4x4 m_PreShadowProj = {};
|
||||
|
||||
|
||||
|
||||
#pragma region TunningParameters
|
||||
/* TunningParam */
|
||||
|
||||
// MotionBlur
|
||||
_float m_fMBBlurRadius = { 1.f };
|
||||
_int m_iMBSampleCount = { 3 };
|
||||
_int m_iMBType = { 0 };
|
||||
|
||||
// ToneMapping
|
||||
_int m_iToneMappingType = { 2 };
|
||||
_float m_fExposure = { 0.7f };
|
||||
|
||||
@@ -75,6 +88,8 @@ class CRenderer final : public CBase
|
||||
|
||||
SSAO_GEOMETRY_HEMISPHERE m_tagSSAOGeometry = {};
|
||||
SSAO_GEOMETRYDIRECTIONS_RANDOM_REAL m_tagSSAOGeometryDirections = {};
|
||||
#pragma endregion
|
||||
|
||||
private:
|
||||
void Render_Occlusion();
|
||||
void Render_Priority();
|
||||
@@ -91,7 +106,7 @@ class CRenderer final : public CBase
|
||||
void Render_WeightBlend();
|
||||
void Render_NonLight();
|
||||
void Render_Blend();
|
||||
void Render_Bloom();
|
||||
void Render_PostProcessing();
|
||||
void Render_Distortion();
|
||||
void Render_DistortionAcc();
|
||||
void Render_LastColor();
|
||||
@@ -106,7 +121,7 @@ class CRenderer final : public CBase
|
||||
#endif
|
||||
|
||||
private:
|
||||
void Fill_Geometry(_uint iNumSample);
|
||||
void Fill_Geometry(_uint iNumSample);
|
||||
HRESULT Ready_ShadowDepthStencilView(_uint iSizeX, _uint iSizeY);
|
||||
|
||||
private:
|
||||
|
||||
@@ -33,11 +33,12 @@ class ENGINE_DLL CTransform final :
|
||||
_float3 Get_Scale() const;
|
||||
_vector Get_QuarternionVector() const; // 현재 회전정보를 담고 있는 쿼터니언 벡터를 out
|
||||
_vector Get_RollPitchYawVector() const;
|
||||
_vector Get_State(STATE eState) const {
|
||||
_vector Get_State(STATE eState) const {
|
||||
return XMLoadFloat4(reinterpret_cast<const _float4*>(&m_WorldMatrix.m[ENUM_CLASS(eState)]));
|
||||
}
|
||||
const _float4* Get_StatePtr(STATE eState) { return reinterpret_cast<_float4*>(&m_WorldMatrix.m[ENUM_CLASS(eState)]); }
|
||||
const _float4x4* Get_WorldMatrixPtr() const { return &m_WorldMatrix; }
|
||||
const _float4x4* Get_PrevWorldMatrixPtr() const { return &m_PrevMatrix; }
|
||||
const _matrix Get_XMWorldMatrix() const { return XMLoadFloat4x4(&m_WorldMatrix); }
|
||||
const _matrix Get_WorldMatrixInv() const { return XMMatrixInverse(nullptr, XMLoadFloat4x4(&m_WorldMatrix)); }
|
||||
public:
|
||||
@@ -83,6 +84,7 @@ class ENGINE_DLL CTransform final :
|
||||
_float m_fSpeedPerSec = {};
|
||||
_float m_fRotationPerSec = {};
|
||||
_float4x4 m_WorldMatrix = {};
|
||||
_float4x4 m_PrevMatrix = {};
|
||||
_float m_fRadius = { 20.f };
|
||||
|
||||
_float3 m_vMomentum = {}; // 현재 프레임에 계산된 이동량
|
||||
|
||||
Reference in New Issue
Block a user