diff --git a/Jusin154_Team3D/Client/Private/Accio.cpp b/Jusin154_Team3D/Client/Private/Accio.cpp index c26740f72..8622c012a 100644 --- a/Jusin154_Team3D/Client/Private/Accio.cpp +++ b/Jusin154_Team3D/Client/Private/Accio.cpp @@ -49,6 +49,10 @@ HRESULT CAccio::Initialize(void* pArg) m_pRope_Trail = Get_PartObject("Accio_Trail"); m_pWandLight = Get_PartObject("Wand_Light"); m_pRotate0 = Get_PartObject("Rotate0"); + m_pRotate1 = Get_PartObject("Rotate1"); + + m_pAccio_PT = Get_PartObject("Accio_PT"); + m_pAccio_Distortion = Get_PartObject("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()->Set_State(STATE::POSITION, m_pEnemyCCT->Get_FootPosition()); + _vector vPos = m_pEnemyCCT->Get_FootPosition(); + + m_pRotate0->Get_Component()->Set_State(STATE::POSITION, vPos); + m_pRotate1->Get_Component()->Set_State(STATE::POSITION, vPos); + m_pAccio_PT->Get_Component()->Set_State(STATE::POSITION, vPos); + m_pAccio_Distortion->Get_Component()->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("Accio_Circle"); - CEffectParts* pSpread_Circle = Get_PartObject("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()->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("Accio_Hit"); + CEffectParts* pHit0 = Get_PartObject("Accio_Hit0"); + pHit->Set_Visible(true); pHit->Get_Component()->Set_State(STATE::POSITION, vPos); + pHit0->Set_Visible(true); + pHit0->Get_Component()->Set_State(STATE::POSITION, vPos); + + m_pAccio_Distortion->Set_Visible(true); + + + CEffectParts* pCircle = Get_PartObject("Accio_Circle"); - CEffectParts* pWandLight = Get_PartObject("Wand_Light"); CEffectParts* pSpread_Circle = Get_PartObject("Spread_Circle"); - CEffectParts* pAccio_PT = Get_PartObject("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()->Set_State(STATE::POSITION, vPos); + m_pAccio_PT->Set_Visible(true); + m_pAccio_PT->Get_Component()->Set_State(STATE::POSITION, vPos); m_pRope_Trail->Get_Component()->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 diff --git a/Jusin154_Team3D/Client/Private/Broom.cpp b/Jusin154_Team3D/Client/Private/Broom.cpp index 18bc9ede1..0277db44f 100644 --- a/Jusin154_Team3D/Client/Private/Broom.cpp +++ b/Jusin154_Team3D/Client/Private/Broom.cpp @@ -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; } diff --git a/Jusin154_Team3D/Client/Private/EffectObject.cpp b/Jusin154_Team3D/Client/Private/EffectObject.cpp index d8f544600..93b9f9e1f 100644 --- a/Jusin154_Team3D/Client/Private/EffectObject.cpp +++ b/Jusin154_Team3D/Client/Private/EffectObject.cpp @@ -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) { diff --git a/Jusin154_Team3D/Client/Private/Goblin.cpp b/Jusin154_Team3D/Client/Private/Goblin.cpp index 6bb114dec..8d02ebacb 100644 --- a/Jusin154_Team3D/Client/Private/Goblin.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin.cpp @@ -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; } diff --git a/Jusin154_Team3D/Client/Private/Goblin_BattleAxe.cpp b/Jusin154_Team3D/Client/Private/Goblin_BattleAxe.cpp index 72349055c..df5fe578f 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_BattleAxe.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_BattleAxe.cpp @@ -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; } diff --git a/Jusin154_Team3D/Client/Private/Goblin_Dagger.cpp b/Jusin154_Team3D/Client/Private/Goblin_Dagger.cpp index bdf60e515..9873105ac 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_Dagger.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_Dagger.cpp @@ -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; } diff --git a/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp b/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp index d7a9ea4cb..6ce105aa7 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp @@ -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; } diff --git a/Jusin154_Team3D/Client/Private/Goblin_Spector.cpp b/Jusin154_Team3D/Client/Private/Goblin_Spector.cpp index 07b7261f5..e8217be39 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_Spector.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_Spector.cpp @@ -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; } diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index d7346d648..1cf832623 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -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; diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index d85d712e3..d94f13daf 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -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 diff --git a/Jusin154_Team3D/Client/Private/Monster.cpp b/Jusin154_Team3D/Client/Private/Monster.cpp index e7bd04418..87f1a465a 100644 --- a/Jusin154_Team3D/Client/Private/Monster.cpp +++ b/Jusin154_Team3D/Client/Private/Monster.cpp @@ -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); diff --git a/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp b/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp index 6c0f3e601..f250372c5 100644 --- a/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp +++ b/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp @@ -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; } diff --git a/Jusin154_Team3D/Client/Private/PhysXEffectHitBox.cpp b/Jusin154_Team3D/Client/Private/PhysXEffectHitBox.cpp index e1c42ef7a..4c61ffb1d 100644 --- a/Jusin154_Team3D/Client/Private/PhysXEffectHitBox.cpp +++ b/Jusin154_Team3D/Client/Private/PhysXEffectHitBox.cpp @@ -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; } diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index 59dece4c3..23d957a9b 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -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; } diff --git a/Jusin154_Team3D/Client/Private/RaceRing.cpp b/Jusin154_Team3D/Client/Private/RaceRing.cpp index daf1f633d..98e97da44 100644 --- a/Jusin154_Team3D/Client/Private/RaceRing.cpp +++ b/Jusin154_Team3D/Client/Private/RaceRing.cpp @@ -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; } diff --git a/Jusin154_Team3D/Client/Private/Troll.cpp b/Jusin154_Team3D/Client/Private/Troll.cpp index f2cd18d19..0bf500331 100644 --- a/Jusin154_Team3D/Client/Private/Troll.cpp +++ b/Jusin154_Team3D/Client/Private/Troll.cpp @@ -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; } diff --git a/Jusin154_Team3D/Client/Private/Troll_Rock.cpp b/Jusin154_Team3D/Client/Private/Troll_Rock.cpp index c84ec6d19..2347c36d3 100644 --- a/Jusin154_Team3D/Client/Private/Troll_Rock.cpp +++ b/Jusin154_Team3D/Client/Private/Troll_Rock.cpp @@ -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; } diff --git a/Jusin154_Team3D/Client/Private/Troll_Weapon.cpp b/Jusin154_Team3D/Client/Private/Troll_Weapon.cpp index d44555a3d..47357e346 100644 --- a/Jusin154_Team3D/Client/Private/Troll_Weapon.cpp +++ b/Jusin154_Team3D/Client/Private/Troll_Weapon.cpp @@ -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; } diff --git a/Jusin154_Team3D/Client/Private/Wand.cpp b/Jusin154_Team3D/Client/Private/Wand.cpp index a33f53216..f38c50543 100644 --- a/Jusin154_Team3D/Client/Private/Wand.cpp +++ b/Jusin154_Team3D/Client/Private/Wand.cpp @@ -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; } diff --git a/Jusin154_Team3D/Client/Public/Accio.h b/Jusin154_Team3D/Client/Public/Accio.h index 61e7532b1..3a5f839fd 100644 --- a/Jusin154_Team3D/Client/Public/Accio.h +++ b/Jusin154_Team3D/Client/Public/Accio.h @@ -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 }; diff --git a/Jusin154_Team3D/Client/Public/Client_Struct.h b/Jusin154_Team3D/Client/Public/Client_Struct.h index 2a5ce88be..45f49ce6a 100644 --- a/Jusin154_Team3D/Client/Public/Client_Struct.h +++ b/Jusin154_Team3D/Client/Public/Client_Struct.h @@ -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 diff --git a/Jusin154_Team3D/Client/Public/TrailObject.h b/Jusin154_Team3D/Client/Public/TrailObject.h index 1656eb144..36b48d0af 100644 --- a/Jusin154_Team3D/Client/Public/TrailObject.h +++ b/Jusin154_Team3D/Client/Public/TrailObject.h @@ -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; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_Distortion.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_Distortion.bin new file mode 100644 index 000000000..b744e564e --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_Distortion.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56dc8357e32966194699ae1b425da7eac004fd559e809b6776679f204940a6b7 +size 1124 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_Hit.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_Hit.bin index 056215f66..5d09c3c62 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_Hit.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_Hit.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bf8b603ee93f837188bc86a153fa1a1335a6d886c02fae6272e5ba3f9678f34f +oid sha256:2a203f75cae80f63edd2b8d3729201e293e39787fb78c919186d396b60640963 size 1131 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_Hit0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_Hit0.bin new file mode 100644 index 000000000..ee1c364f3 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_Hit0.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fcfe572b1b1b8fb127a90f01f91c7d504a3e1464ff25436e3173a5101f5b5474 +size 1066 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_PT.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_PT.bin index 5ec35a487..6e2ef72e9 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_PT.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Accio_PT.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7d21c5b267a0c5eb2e81da4de7532da60db2e17a370be5f8b5637cc591a156ca -size 1043 +oid sha256:175aac600d5c9f1b436a72b48b18c9f21b2acb5ebec96fb6b01708deaf9d7e42 +size 1029 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Rotate0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Rotate0.bin index b3cc574b6..9150c8d1f 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Rotate0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Rotate0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ffc29c344fa266c017fffc61d4f03a85e6a726f72b49f0bc8320a6cc444386bb +oid sha256:98d5b5bf23b92b43bb633967f25639f5034d18eb391b0a2b3892bbcd6ccd5d8f size 1078 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Rotate1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Rotate1.bin new file mode 100644 index 000000000..a1c091704 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Rotate1.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12f1ebb3fcea94bcbb0514b6fcf0c32be5e4dbd125cca5cf08a5b21c925db036 +size 1078 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Wand_Light.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Wand_Light.bin index 3f28d211d..b22fa2dd3 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Wand_Light.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Accio/Wand_Light.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0996f91f1b3519ca701b773606843cda569b5af665b707360a7d08bc9fee1bb3 +oid sha256:d536e658291fa736ba2d5ef6d103565f82dfb2284921e0511f87460a90f6544a size 1067 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Distortion.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Distortion.bin index 43a30e800..db1b65393 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Distortion.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Distortion.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3ea9f9d588814894473fe8a2e04ff2605d98bcaee9fd5f370da67ec73f3b0186 -size 990 +oid sha256:99f8d9554065b599806e0da2a329aa68b915c64c5bf0492b544ab787179791a9 +size 1124 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapHit1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapHit1.bin index 0be1dbb5c..fb8ba8bd4 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapHit1.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapHit1.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:738e598412c1387d50dc4e947ac610d31b6e85ac61dfd27653e24b7f4f7981ba +oid sha256:04c8d5c8823de3ebcf955719678d83412c90c4a34041def9f6c4616637bff491 size 1093 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapTrail.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapTrail.trail index 337154657..2699b3baf 100644 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapTrail.trail and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapTrail.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/Red_Trail.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/Red_Trail.trail index 44cd89c1f..aa5a37b88 100644 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/Red_Trail.trail and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/Red_Trail.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/WandParticle1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/WandParticle1.bin index 3c8637d44..129bd3234 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/WandParticle1.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/WandParticle1.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bc98c7cb2d207e45529ba528e760ea8ad0b606d10ae001a423e3fd68538ea713 -size 1059 +oid sha256:16513283c2d71d8edab2389f6fd696ad9e9d38e47829c7e270ade42fc0976bcc +size 1066 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/Wand_Light_R.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/Wand_Light_R.bin index 42e29c68e..cf4090d93 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/Wand_Light_R.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/Wand_Light_R.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:964879cf444c4b44ee740b040fcc8c7e514745ce589c0064554e2de2e59c95e0 +oid sha256:9516b26fc81ed9aa2b9b42585556f155444da046b422ed10b5bb45f3a9b8e5cc size 1080 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/Wand_Red_Long.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/Wand_Red_Long.bin index 7a26ab0b1..adee96dd7 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/Wand_Red_Long.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/JapSideEffect/Wand_Red_Long.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1f985636e0121a35e5a69f6b4ada7b35c4f49111065353ed6f7380c87d2765f8 +oid sha256:aa8a0b53f4c37433aea3f50093eb1e8969f6858895fc918d972232e8e0804cea size 1049 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/BottomLightning.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/BottomLightning.bin new file mode 100644 index 000000000..5d78c2328 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/BottomLightning.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d57f5a8319c45c4ac54d543043b68d0d90fe997461c1a7300373294e0be8de33 +size 1028 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Flare.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Flare.bin new file mode 100644 index 000000000..41f7473df --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Flare.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b28dac9689b712666e83801b8384a97d1eb11f704090406b7cfd9cbb87c6426 +size 1025 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/HitPT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/HitPT0.bin new file mode 100644 index 000000000..c0ad2cce1 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/HitPT0.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:459775272ece67a02d7cafb050cae568ff71dd6137f304ff024352a8beaf89f3 +size 1097 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Lightning0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Lightning0.bin new file mode 100644 index 000000000..26f94dc82 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Lightning0.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:750e826ebdd9f6d5325472e97044a4104954aa4f174d23050e748ff21cc135ba +size 1020 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/LightningTrail.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/LightningTrail.trail new file mode 100644 index 000000000..5e6684844 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/LightningTrail.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Straight_Lightning.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Straight_Lightning.bin new file mode 100644 index 000000000..f96bdd450 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Lightning/Straight_Lightning.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8af0d8240c4f84b3d42b0211011ffe34c60dd049a059e01152bd5a27742426f +size 1028 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Accio.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Accio.bin index 6baba5305..5042edfd6 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Accio.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Accio.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bb0b6c1aa14e857e5daf78cfe6b1db37817fea5d8b8f66c41b4565a18b519bd5 -size 412 +oid sha256:914ffc2f52aa592dc3570ca66aba615e6fd56a0e239bd630e4d0bebd6eb888c0 +size 589 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Spread_PT_Test.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Spread_PT_Test.bin new file mode 100644 index 000000000..fabb0197f --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Spread_PT_Test.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4280c1d51885b2ec950f763ea67b63d20441b198ecc1f245b21ce7f959c92df6 +size 1026 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test.bin deleted file mode 100644 index aa08faa24..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:20fce7f1c0b6e0948bc64ea0dbfd13008f2c4026531b8f040a08b411f48b03fc -size 1139 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test2.bin deleted file mode 100644 index ff6cc8352..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test2.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d47b5673a5741f934d5d133ad67b0bef148d92bc618b73a0f269a5f3a7bf0666 -size 1148 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/TestCircle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/TestCircle.bin new file mode 100644 index 000000000..a4ff75632 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/TestCircle.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1567bcb86d813959e8695633188cf33e06f803f6443460c5694fb92865a80244 +size 1071 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test_Lightning.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test_Lightning.bin new file mode 100644 index 000000000..323dcd953 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test_Lightning.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97a9eb25e2115d05fdf974a2d3e3364c35c81076bcf52103a354d2959db81333 +size 1032 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning03.001.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning03.001.bin new file mode 100644 index 000000000..bcd10866c --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning03.001.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4ddcb77f58b838d7c3f15541c874829a1cf8bbb03c643f48d9bdfb76447ec45 +size 115979 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning03.001.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning03.001.fbx new file mode 100644 index 000000000..18887d867 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning03.001.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:677ccb4f9f00fb2275cbfd4598ed5df77c2fa8a22b018efd0c6694d70bc10eb0 +size 44076 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning04.001.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning04.001.bin new file mode 100644 index 000000000..880e60d57 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning04.001.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a38dd7c42ed58825f33fccee4156fd70544d7210762e4425309690d9a8d927c +size 476091 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning04.001.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning04.001.fbx new file mode 100644 index 000000000..9402bf1d2 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning04.001.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20be2d24498578139eb30f723aa2e097ffeb95988a10ce0c13dcf1f85a947d20 +size 142236 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning05.001.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning05.001.bin new file mode 100644 index 000000000..c99e0793f --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning05.001.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:375c7aa106177798a734b2233ce8703428faef36fb493a97f94950c1124f6f8f +size 482299 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning05.001.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning05.001.fbx new file mode 100644 index 000000000..99ea9bec2 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning05.001.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f1497de050c48610dbdbcf677c1c5f04e6fe816d7dc902e141da4fd751a3d9bb +size 144972 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_Ball_01.001.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_Ball_01.001.bin new file mode 100644 index 000000000..813ab0ee4 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_Ball_01.001.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6028bf493e2e5299f18422e9c6df34dbe8abaaedbdc9e2a5bd7487ecb05e06f +size 956697 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_Ball_01.001.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_Ball_01.001.fbx new file mode 100644 index 000000000..61a6dfcfa --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_Ball_01.001.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:706254a3f5af58809669292c6c41d17c7b00ad8a9ded1ada0e91df887fbd16de +size 245836 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_Curved_01.001.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_Curved_01.001.bin new file mode 100644 index 000000000..fed33f98a --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_Curved_01.001.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0993c1870bcb9c6d6dfd6ea7ec512a7ba9ff4e457cbd4b8d0e8ed8b64f4f62a5 +size 184163 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_Curved_01.001.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_Curved_01.001.fbx new file mode 100644 index 000000000..688e8899a --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_Curved_01.001.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:29356beb3193477f0a23fb28d434560e9707aa225a3cbd548bb4db24e6a1661e +size 62332 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_Curved_02.001.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_Curved_02.001.bin new file mode 100644 index 000000000..d969ac90b --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_Curved_02.001.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45fd370cf7b1beb56cc622e8322d9227edba6b96ecd1e47e204ccfc98bedac13 +size 190119 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_Curved_02.001.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_Curved_02.001.fbx new file mode 100644 index 000000000..a1799246e --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_Curved_02.001.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fad438efd44523a1e6af8c6d6cd8c1788100e3daee6d3a8597e8e14615d38afe +size 61020 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_straight_01.001.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_straight_01.001.bin new file mode 100644 index 000000000..e30db0291 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_straight_01.001.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf0f5bd339191ca464b16513550c8132bdb50517a8bad0660fcf1d3f0991f17c +size 224009 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_straight_01.001.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_straight_01.001.fbx new file mode 100644 index 000000000..8ce158772 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/Lightning/SM_Lightning_straight_01.001.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d4704bf6832fa9780c7e66e2320fff42477d904832510f298f8929ebc3979596 +size 89052 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_X_Negative.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_X_Negative.bin new file mode 100644 index 000000000..95e3e0895 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_X_Negative.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17f5f2476ee2e549f654a60ae70bd05a4d6435378fae5faece47c2704727b67a +size 422 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_X_Negative.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_X_Negative.fbx new file mode 100644 index 000000000..b77bab3c7 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_X_Negative.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1de3cb7a2312b90b6c2395c040c575b8484d0cbea47f8e245c442077ca3b467c +size 26492 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_X_Positive.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_X_Positive.bin new file mode 100644 index 000000000..40f73d518 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_X_Positive.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8fc50944b46a9e5c6ab03981474659269a3bbb7ef1c25a84c312b4ae0fee0a41 +size 422 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_X_Positive.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_X_Positive.fbx new file mode 100644 index 000000000..b3df5885c --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_X_Positive.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:489897f13e76c14881548a586296e654e9a171f6030a8bcffa26afd8e2c261d5 +size 26492 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_Z_Negative.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_Z_Negative.bin new file mode 100644 index 000000000..23ed115e0 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_Z_Negative.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf3480f3592bffa42b596cc81de29300943e89b0bc568418f3c0e241999f6435 +size 422 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_Z_Negative.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_Z_Negative.fbx new file mode 100644 index 000000000..3a731fc7f --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_Z_Negative.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4172eeaf7194ab152bea295ebc6b74e6c76e3f945de250ec5abf6ef2431b3bb1 +size 26492 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_Z_Postive.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_Z_Postive.bin new file mode 100644 index 000000000..3dd14b666 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_Z_Postive.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49d75ab7e11e278972b621ce3362c4be0fa6fb11292b8616f9dec411c9dc61b6 +size 422 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_Z_Postive.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_Z_Postive.fbx new file mode 100644 index 000000000..400d1b0c5 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Effect/ParticleMesh/Mesh_Plane_Z_Postive.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1bb8627257c6b1c909a24fa2f5f4f7d86586a0343e6ba8d6f3f9398dbcf390c1 +size 26492 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Buffers.hlsli b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Buffers.hlsli index af772737d..ae4c75bea 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Buffers.hlsli +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Buffers.hlsli @@ -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 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli index 6d97ec250..5aa7aec84 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Functions.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 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl index 978da7734..9b578fa20 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl @@ -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(); + } + } diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl index 702b009c7..da220009a 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl @@ -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; } diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl index bc9f9e91d..e66a6f4e0 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl @@ -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; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl index 70679fcb3..10e96128b 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl @@ -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; } diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl index 6e15a07f0..b20900dc1 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl @@ -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; } diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl index 96ad09162..286d06e43 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl @@ -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(); diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxNorTex.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxNorTex.hlsl index bc15a9c4e..e21521de5 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxNorTex.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxNorTex.hlsl @@ -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; } diff --git a/Jusin154_Team3D/Editor/Private/Level_Logo.cpp b/Jusin154_Team3D/Editor/Private/Level_Logo.cpp index f5344a2c0..f3fedb3e7 100644 --- a/Jusin154_Team3D/Editor/Private/Level_Logo.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_Logo.cpp @@ -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() diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index 061ae69cc..bece6b8a7 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -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; diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli index 6d97ec250..5aa7aec84 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Functions.hlsli +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Functions.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 diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl index 978da7734..9b578fa20 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl @@ -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(); + } + } diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl index bc9f9e91d..e66a6f4e0 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl @@ -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; diff --git a/Jusin154_Team3D/Engine/Private/GameInstance.cpp b/Jusin154_Team3D/Engine/Private/GameInstance.cpp index 3089584af..2f8885c1f 100644 --- a/Jusin154_Team3D/Engine/Private/GameInstance.cpp +++ b/Jusin154_Team3D/Engine/Private/GameInstance.cpp @@ -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) diff --git a/Jusin154_Team3D/Engine/Private/Picking.cpp b/Jusin154_Team3D/Engine/Private/Picking.cpp index ae3bcda98..73ca9133c 100644 --- a/Jusin154_Team3D/Engine/Private/Picking.cpp +++ b/Jusin154_Team3D/Engine/Private/Picking.cpp @@ -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 diff --git a/Jusin154_Team3D/Engine/Private/RenderTarget.cpp b/Jusin154_Team3D/Engine/Private/RenderTarget.cpp index c310f06ed..499034c9e 100644 --- a/Jusin154_Team3D/Engine/Private/RenderTarget.cpp +++ b/Jusin154_Team3D/Engine/Private/RenderTarget.cpp @@ -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); } diff --git a/Jusin154_Team3D/Engine/Private/RenderTarget_Manager.cpp b/Jusin154_Team3D/Engine/Private/RenderTarget_Manager.cpp index f6325c93d..0c63df85f 100644 --- a/Jusin154_Team3D/Engine/Private/RenderTarget_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/RenderTarget_Manager.cpp @@ -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; diff --git a/Jusin154_Team3D/Engine/Private/Renderer.cpp b/Jusin154_Team3D/Engine/Private/Renderer.cpp index 18757d2c4..ff2bc6d32 100644 --- a/Jusin154_Team3D/Engine/Private/Renderer.cpp +++ b/Jusin154_Team3D/Engine/Private/Renderer.cpp @@ -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)))) { diff --git a/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp b/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp index f7b72b683..7e242f96a 100644 --- a/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp +++ b/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp @@ -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); diff --git a/Jusin154_Team3D/Engine/Private/Timer_Manager.cpp b/Jusin154_Team3D/Engine/Private/Timer_Manager.cpp index 135e69511..36254925f 100644 --- a/Jusin154_Team3D/Engine/Private/Timer_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/Timer_Manager.cpp @@ -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")))) { diff --git a/Jusin154_Team3D/Engine/Private/Transform.cpp b/Jusin154_Team3D/Engine/Private/Transform.cpp index 99514bf64..7d030efea 100644 --- a/Jusin154_Team3D/Engine/Private/Transform.cpp +++ b/Jusin154_Team3D/Engine/Private/Transform.cpp @@ -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) diff --git a/Jusin154_Team3D/Engine/Public/Engine_Enum.h b/Jusin154_Team3D/Engine/Public/Engine_Enum.h index e5ca0e1e5..90e014550 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Enum.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Enum.h @@ -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 }; diff --git a/Jusin154_Team3D/Engine/Public/Engine_Struct.h b/Jusin154_Team3D/Engine/Public/Engine_Struct.h index 2fcc09540..f7bf14f99 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Struct.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Struct.h @@ -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 diff --git a/Jusin154_Team3D/Engine/Public/GameInstance.h b/Jusin154_Team3D/Engine/Public/GameInstance.h index b93971b9c..ae8dec4f0 100644 --- a/Jusin154_Team3D/Engine/Public/GameInstance.h +++ b/Jusin154_Team3D/Engine/Public/GameInstance.h @@ -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 }; diff --git a/Jusin154_Team3D/Engine/Public/RenderTarget.h b/Jusin154_Team3D/Engine/Public/RenderTarget.h index d0e8e5635..bf8e5c77a 100644 --- a/Jusin154_Team3D/Engine/Public/RenderTarget.h +++ b/Jusin154_Team3D/Engine/Public/RenderTarget.h @@ -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; } diff --git a/Jusin154_Team3D/Engine/Public/RenderTarget_Manager.h b/Jusin154_Team3D/Engine/Public/RenderTarget_Manager.h index 683e633ce..2df798017 100644 --- a/Jusin154_Team3D/Engine/Public/RenderTarget_Manager.h +++ b/Jusin154_Team3D/Engine/Public/RenderTarget_Manager.h @@ -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로 다시 맞춤 diff --git a/Jusin154_Team3D/Engine/Public/Renderer.h b/Jusin154_Team3D/Engine/Public/Renderer.h index b55c5d050..ed3b04dfe 100644 --- a/Jusin154_Team3D/Engine/Public/Renderer.h +++ b/Jusin154_Team3D/Engine/Public/Renderer.h @@ -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: diff --git a/Jusin154_Team3D/Engine/Public/Transform.h b/Jusin154_Team3D/Engine/Public/Transform.h index 10ccd801d..362689031 100644 --- a/Jusin154_Team3D/Engine/Public/Transform.h +++ b/Jusin154_Team3D/Engine/Public/Transform.h @@ -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(&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 = {}; // 현재 프레임에 계산된 이동량