@@ -1745,6 +1745,27 @@ PS_OUT PS_Broomstick(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_SpellLearn(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
float4 tex = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float tex1 = g_Texture1.Sample(DefaultSampler, In.vTexcoord).r;
|
||||
Color = tex;
|
||||
|
||||
tex1 *= 0.95f;
|
||||
|
||||
Color.a = tex1;
|
||||
|
||||
Color.a *= Alpha;
|
||||
|
||||
Out.vColor = Color;
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct VS_IN3D
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
@@ -2305,6 +2326,16 @@ technique11 PosTexTechnique11
|
||||
PixelShader = compile ps_5_0 PS_Broomstick();
|
||||
}
|
||||
|
||||
pass SpellLearn
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
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_SpellLearn();
|
||||
}
|
||||
|
||||
pass Enemy_Detection
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
|
||||
@@ -221,7 +221,12 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\Public\State_Broom_TurboFly.h" />
|
||||
<ClInclude Include="..\Public\State_FireBall.h" />
|
||||
<ClInclude Include="..\Public\State_FireBreath.h" />
|
||||
<ClInclude Include="..\Public\State_FireSweep.h" />
|
||||
<ClInclude Include="..\Public\State_Ground.h" />
|
||||
<ClInclude Include="..\Public\State_Pulse.h" />
|
||||
<ClInclude Include="..\Public\State_Skill.h" />
|
||||
<ClInclude Include="..\Public\State_Slide.h" />
|
||||
<ClInclude Include="..\Public\State_Swipe.h" />
|
||||
<ClInclude Include="..\Public\State_Tucked.h" />
|
||||
<ClInclude Include="..\Public\StunEffect.h" />
|
||||
<ClInclude Include="..\public\MapElement_Door.h" />
|
||||
@@ -426,19 +431,24 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\Private\State_Broom_Dismount.cpp" />
|
||||
<ClCompile Include="..\Private\State_FireBall.cpp" />
|
||||
<ClCompile Include="..\Private\State_FireBreath.cpp" />
|
||||
<ClCompile Include="..\Private\State_FireSweep.cpp" />
|
||||
<ClCompile Include="..\Private\State_Fly.cpp" />
|
||||
<ClCompile Include="..\Private\State_Ground.cpp" />
|
||||
<ClCompile Include="..\Private\State_Hover.cpp" />
|
||||
<ClCompile Include="..\Private\State_Broom_Ride_Move.cpp" />
|
||||
<ClCompile Include="..\private\MiniMap_Camera.cpp" />
|
||||
<ClCompile Include="..\Private\State_Broom_TurboFly.cpp" />
|
||||
<ClCompile Include="..\Private\State_Pulse.cpp" />
|
||||
<ClCompile Include="..\Private\State_Shield.cpp" />
|
||||
<ClCompile Include="..\Private\State_Skill.cpp" />
|
||||
<ClCompile Include="..\Private\State_Slide.cpp" />
|
||||
<ClCompile Include="..\Private\State_Sustain.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Attack.cpp" />
|
||||
<ClCompile Include="..\Private\Mage_Nomal_Attack.cpp" />
|
||||
<ClCompile Include="..\Private\MageSide.cpp" />
|
||||
<ClCompile Include="..\Private\Mage_Down_Attack.cpp" />
|
||||
<ClCompile Include="..\Private\Box_Splesh.cpp" />
|
||||
<ClCompile Include="..\Private\State_Swipe.cpp" />
|
||||
<ClCompile Include="..\Private\State_Tucked.cpp" />
|
||||
<ClCompile Include="..\Private\StunEffect.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Teleport.cpp" />
|
||||
|
||||
@@ -632,10 +632,24 @@
|
||||
<ClInclude Include="..\Public\Stupefy.h">
|
||||
<Filter>02.GameObjects\Effect\Effects\Stupefy</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\BroomRaceManager.h" />
|
||||
<ClInclude Include="..\public\MapElement_Static.h">
|
||||
<Filter>02.GameObjects\Environment\03.MapElement\Static</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_FireSweep.h">
|
||||
<Filter>04.Mechanic\State\State_Combat\State_FireSweep</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Ground.h">
|
||||
<Filter>04.Mechanic\State\Movement\Ground</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Swipe.h">
|
||||
<Filter>04.Mechanic\State\State_Combat\State_Swipe</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Slide.h">
|
||||
<Filter>04.Mechanic\State\Focus\Slide</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Skill.h">
|
||||
<Filter>04.Mechanic\State\State_Combat\State_Skill</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Client.ico">
|
||||
@@ -1327,6 +1341,21 @@
|
||||
<Filter Include="04.Mechanic\State\State_Combat\State_AncientSpell">
|
||||
<UniqueIdentifier>{c69a2485-7f6e-4e22-81b4-1410fdae9d57}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\State_Combat\State_FireSweep">
|
||||
<UniqueIdentifier>{2c39ba68-2f23-4bc9-a277-b6e9295c11a0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\Movement\Ground">
|
||||
<UniqueIdentifier>{9e2863cd-1a30-4a27-a076-5e1baff3dee8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\State_Combat\State_Swipe">
|
||||
<UniqueIdentifier>{2fd96fb0-dbc3-4486-afda-82b3b1b63060}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\Focus\Slide">
|
||||
<UniqueIdentifier>{ee880571-e18c-4206-80ea-448cadd04d9a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\State\State_Combat\State_Skill">
|
||||
<UniqueIdentifier>{cef80506-72c7-4bb9-a691-760f0a576eb7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Environment\03.MapElement\Static">
|
||||
<UniqueIdentifier>{c3b86f00-da19-47ad-a26e-7ff641e2c4d4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -1909,7 +1938,21 @@
|
||||
<ClCompile Include="..\Private\State_AncientSpell.cpp">
|
||||
<Filter>04.Mechanic\State\State_Combat\State_AncientSpell</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\BroomRaceManager.cpp" />
|
||||
<ClCompile Include="..\Private\State_FireSweep.cpp">
|
||||
<Filter>04.Mechanic\State\State_Combat\State_FireSweep</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Ground.cpp">
|
||||
<Filter>04.Mechanic\State\Movement\Ground</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Swipe.cpp">
|
||||
<Filter>04.Mechanic\State\State_Combat\State_Swipe</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Slide.cpp">
|
||||
<Filter>04.Mechanic\State\Focus\Slide</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Skill.cpp">
|
||||
<Filter>04.Mechanic\State\State_Combat\State_Skill</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\MapElement_Static.cpp">
|
||||
<Filter>02.GameObjects\Environment\03.MapElement\Static</Filter>
|
||||
</ClCompile>
|
||||
|
||||
@@ -326,6 +326,8 @@ void CGoblin_Mage::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo);
|
||||
if (0 == damagePair.second) {
|
||||
m_pFSM->Change_State(FSMSTATE::DEAD);
|
||||
_int ID = m_pStat->Get_Stat().iObjectID;
|
||||
m_pInfoInstance->Event_CallBack(TEXT("MonsterDead"), &ID);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -262,9 +262,9 @@ void CInfoInstance::Event_CallBack(_wstring EventName, void* pArg)
|
||||
}
|
||||
}
|
||||
|
||||
QUESTINFO CInfoInstance::Get_Quest(_int QuestID)
|
||||
QUESTINFO CInfoInstance::Get_Quest(_int QuestType, _int QuestID)
|
||||
{
|
||||
return m_pQuestInfo->Get_Quest(QuestID);
|
||||
return m_pQuestInfo->Get_Quest(QuestType, QuestID);
|
||||
}
|
||||
|
||||
_int CInfoInstance::Get_Quest_Count(_int Index)
|
||||
|
||||
@@ -258,7 +258,7 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
isReady_Background = false;
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isReady_Background = false;
|
||||
isReady_Background = true;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
isReady_Background = true;
|
||||
@@ -565,14 +565,14 @@ HRESULT CLevel_GamePlay::Ready_Layer_SkyBox(const _wstring& strLayerTag)
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_Monster()
|
||||
{
|
||||
for (_uint i = 0; i < 0; ++i)
|
||||
for (_uint i = 0; i <1; ++i)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
for (_uint i = 0; i <3; ++i)
|
||||
for (_uint i = 0; i <1; ++i)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin_Mage>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
return E_FAIL;
|
||||
|
||||
@@ -38,6 +38,11 @@ void CLevel_Loading::Update(_float fTimeDelta)
|
||||
{
|
||||
if (true == m_pLoader->isFinished())
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
#ifdef 기무리
|
||||
m_bNextLevel = true;
|
||||
#endif // 기무리
|
||||
#endif // _DEBUG
|
||||
if (m_eNextLevelID != LEVEL::LOGO)
|
||||
m_bNextLevel = true;
|
||||
else
|
||||
|
||||
@@ -26,9 +26,11 @@ HRESULT CLevel_Logo::Initialize()
|
||||
|
||||
void CLevel_Logo::Update(_float fTimeDelta)
|
||||
{
|
||||
//#ifdef 기무리
|
||||
// m_pGameInstance->Set_LevelToChange();
|
||||
//#endif // 기무리
|
||||
#ifdef _DEBUG
|
||||
#ifdef 기무리
|
||||
m_pGameInstance->Set_LevelToChange();
|
||||
#endif // 기무리
|
||||
#endif // _DEBUG
|
||||
|
||||
if (m_pGameInstance->Key_Down(DIK_F1))
|
||||
{
|
||||
|
||||
@@ -335,7 +335,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
isLoad_Background = false;
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isLoad_Background = false;
|
||||
isLoad_Background = true;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
isLoad_Background = true;
|
||||
@@ -911,6 +911,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
#pragma endregion
|
||||
#if 진우
|
||||
#elif 기무리
|
||||
#elif Bin
|
||||
#elif gimch
|
||||
#else
|
||||
#pragma region UI_ANI
|
||||
@@ -1467,7 +1468,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
|
||||
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc1{};
|
||||
{
|
||||
Desc1.eType = ACTOR::BOX;
|
||||
Desc1.eType = ACTOR::SPHERE;
|
||||
Desc1.ePxRigidBodyFlags = { PSX::PxRigidBodyFlag::eKINEMATIC };
|
||||
Desc1.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE };
|
||||
Desc1.ePxMaterialTypes = { PXMATERIAL::DEFAULT };
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "State_Dodge.h"
|
||||
#include "State_Jump.h"
|
||||
#include "State_Land.h"
|
||||
#include "State_Slide.h"
|
||||
#include "State_Move.h"
|
||||
#include "State_Combat.h"
|
||||
#include "State_LightAttack.h"
|
||||
@@ -497,6 +498,10 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
return S_OK;
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_E))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::SLIDE);
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -841,6 +846,46 @@ void CPlayer::Behavior_DodgeExit()
|
||||
m_pFSM->Disable_State(FSMSTATE::DODGE);
|
||||
}
|
||||
|
||||
void CPlayer::Behavior_SlideEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
m_pFSM->Enable_State(FSMSTATE::SLIDE);
|
||||
pairAnimInfo = m_Animation[STATEANIM::SLIDE_START_R];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[&]() { pairAnimInfo = m_Animation[STATEANIM::SLIDE_LOOP_R];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); },
|
||||
0.95f);
|
||||
}
|
||||
|
||||
HRESULT CPlayer::Behavior_SlideExitCheck(_float fTimeDelta)
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
_int iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
_float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
|
||||
if (m_pGameInstance->Key_Up(DIK_E))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::SLIDE_STOP_R];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
return S_OK;
|
||||
}
|
||||
if (iCurrAnimIndex == m_Animation[STATEANIM::SLIDE_STOP_R].first)
|
||||
{
|
||||
if (fRatio >=0.38f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CPlayer::Behavior_SlideExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::SLIDE);
|
||||
}
|
||||
|
||||
void CPlayer::Behavior_CombatEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
@@ -883,11 +928,12 @@ void CPlayer::Behavior_CombatEnter()
|
||||
pairAnimInfo = m_Animation[STATEANIM::ANCIENT_THROW];
|
||||
}
|
||||
else if (nullptr != m_LockOnInfo.pInteractive) {
|
||||
m_pFSM->Enable_State(FSMSTATE::ANCIENT_THROW);
|
||||
pairAnimInfo = m_Animation[STATEANIM::ANCIENT_THROW];
|
||||
m_pGrapInteractive = m_LockOnInfo.pInteractive;
|
||||
SAFE_ADDREF(m_pGrapInteractive);
|
||||
m_pGrapInteractive->Set_KinematicFlag(true);
|
||||
m_vGrapInteratableLerp.x = 0.f;
|
||||
return;
|
||||
}
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
@@ -938,29 +984,29 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
|
||||
m_pFSM->Enable_State(FSMSTATE::ANCIENT_THROW);
|
||||
pairAnimInfo = m_Animation[STATEANIM::ANCIENT_THROW];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() { m_bLookAt = true; },
|
||||
0.1f);
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {
|
||||
Throwing_Interactive();
|
||||
},
|
||||
0.2f);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {
|
||||
m_pGameInstance->SlowMotion(0.1f, 0.35f);
|
||||
},
|
||||
0.1f);
|
||||
|
||||
|
||||
}
|
||||
else if (nullptr != m_LockOnInfo.pInteractive) {
|
||||
m_pFSM->Enable_State(FSMSTATE::ANCIENT_THROW);
|
||||
pairAnimInfo = m_Animation[STATEANIM::ANCIENT_THROW];
|
||||
m_pGrapInteractive = m_LockOnInfo.pInteractive;
|
||||
SAFE_ADDREF(m_pGrapInteractive);
|
||||
m_pGrapInteractive->Set_KinematicFlag(true);
|
||||
m_vGrapInteratableLerp.x = 0.f;
|
||||
}
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() { m_bLookAt = true; },
|
||||
0.1f);
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {
|
||||
Throwing_Interactive();
|
||||
},
|
||||
0.2f);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {
|
||||
m_pGameInstance->SlowMotion(0.1f, 0.35f);
|
||||
},
|
||||
0.1f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2309,7 +2355,7 @@ void CPlayer::Throwing_Interactive()
|
||||
{
|
||||
if (nullptr == m_pGrapInteractive) {
|
||||
return;
|
||||
} _vector vDir = {}; _float vDistance = 45.f;
|
||||
} _vector vDir = {}; _float vDistance = 60.f;
|
||||
CRigidBody_Dynamic* pBody = m_pGrapInteractive->Get_Component<CRigidBody_Dynamic>();
|
||||
if (nullptr != m_LockOnInfo.pUnit) {
|
||||
vDir = XMVector3Normalize(m_LockOnInfo.pUnit->Get_LockOnPos() - m_pGrapInteractive->Get_LockOnPos());
|
||||
@@ -2457,6 +2503,17 @@ void CPlayer::Add_FSM()
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::DODGE, CState_Dodge::Create(&Desc));
|
||||
}
|
||||
|
||||
{
|
||||
CState_Slide::STATE_SLIDE_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_SlideEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_SlideExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_SlideExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::SLIDE, CState_Slide::Create(&Desc));
|
||||
}
|
||||
#pragma endregion
|
||||
#pragma region Behavior_Combat_NotFocus
|
||||
{
|
||||
@@ -2688,6 +2745,10 @@ void CPlayer::Set_Anim()
|
||||
|
||||
m_Animation[STATEANIM::LAND] = { 259,false };
|
||||
|
||||
m_Animation[STATEANIM::SLIDE_STOP_R] = { 568,false };
|
||||
m_Animation[STATEANIM::SLIDE_START_R] = { 566,false };
|
||||
m_Animation[STATEANIM::SLIDE_LOOP_R] = { 564,true };
|
||||
|
||||
m_Animation[STATEANIM::DODGE] = { 878,false };
|
||||
m_Animation[STATEANIM::DODGE_BLINK] = { 876,true };
|
||||
|
||||
@@ -2797,6 +2858,7 @@ void CPlayer::Set_Anim()
|
||||
// 947
|
||||
|
||||
// 755 기모으기 859
|
||||
//568 566 564 슬라이드 스탑/스타트/루프
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -57,7 +57,6 @@ HRESULT CProtego::Initialize(void* pArg)
|
||||
void CProtego::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
}
|
||||
|
||||
void CProtego::Update(_float fTimeDelta)
|
||||
@@ -72,6 +71,9 @@ void CProtego::Update(_float fTimeDelta)
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
if (m_bVisible == false){
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f));
|
||||
}
|
||||
|
||||
|
||||
/* 시작 사이즈 러프 */
|
||||
@@ -89,9 +91,10 @@ void CProtego::Update(_float fTimeDelta)
|
||||
|
||||
void CProtego::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
if (m_bVisible == false){
|
||||
return;
|
||||
|
||||
}
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pOwner->Get_Component<CCharacter_Controller>()->Get_Position());
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
|
||||
@@ -126,14 +129,14 @@ HRESULT CProtego::Ready_Components(void* pArg)
|
||||
}
|
||||
|
||||
|
||||
//{ // DO
|
||||
// CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
// Desc.iSubKind = ENUM_CLASS(PXOBJECT::SKILL_PROTEGO);
|
||||
// if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_SHIELD"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
// m_pGameInstance->Attach_Actor(*m_pRigidBody->Get_Actor());
|
||||
//}
|
||||
{ // DO
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::SKILL_PROTEGO);
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_SHIELD"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pGameInstance->Attach_Actor(*m_pRigidBody->Get_Actor());
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@ HRESULT CQuest_Canvas::Initialize(void* pArg)
|
||||
}
|
||||
Visible(false);
|
||||
m_pInfoInstance->Set_AcceptQuest(0);
|
||||
m_pInfoInstance->Set_AcceptQuest(1);
|
||||
m_pInfoInstance->Set_AcceptQuest(2);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -95,9 +95,20 @@ HRESULT CQuest_Data::Load_QuestInfo(const _char* pFilePath)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
QUESTINFO CQuest_Data::Get_Quest(_int QuestID)
|
||||
QUESTINFO CQuest_Data::Get_Quest(_int QuestType, _int QuestID)
|
||||
{
|
||||
return QuestInfos[QuestID];
|
||||
switch (QuestType)
|
||||
{
|
||||
case 0:
|
||||
return QuestInfos[QuestID];
|
||||
case 1:
|
||||
return m_QuestAcceptedInfos[QuestID];
|
||||
case 2:
|
||||
return m_QuestEndInfos[QuestID];
|
||||
default:
|
||||
return QuestInfos[QuestID];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const vector<QUESTINFO>& CQuest_Data::Get_AllQuest() const
|
||||
@@ -164,18 +175,24 @@ void CQuest_Data::Set_ClearQuest(_int Index)
|
||||
|
||||
void CQuest_Data::Update_AcceptQuest(_int MonsterID)
|
||||
{
|
||||
m_QuestAcceptedInfoObject.erase(remove_if(m_QuestAcceptedInfoObject.begin(), m_QuestAcceptedInfoObject.end(),
|
||||
[MonsterID, this](auto& it) {
|
||||
CQuestInstance* instance = static_cast<CQuestInstance*>(it);
|
||||
if (static_cast<CQuestInstance*>(it)->Update_Objective(MonsterID) == true)
|
||||
{
|
||||
Set_ClearQuest(static_cast<CQuestInstance*>(it)->Get_QuestID());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}),
|
||||
m_QuestAcceptedInfoObject.end()
|
||||
);
|
||||
vector<_int> toRemoveIndex;
|
||||
|
||||
_int index = 0;
|
||||
for (auto* instance : m_QuestAcceptedInfoObject)
|
||||
{
|
||||
if (static_cast<CQuestInstance*>(instance)->Update_Objective(MonsterID))
|
||||
{
|
||||
Set_ClearQuest(static_cast<CQuestInstance*>(instance)->Get_QuestID());
|
||||
toRemoveIndex.push_back(index);
|
||||
}
|
||||
index++;
|
||||
}
|
||||
|
||||
for (auto it = toRemoveIndex.rbegin(); it != toRemoveIndex.rend(); ++it)
|
||||
{
|
||||
m_QuestAcceptedInfoObject.erase(m_QuestAcceptedInfoObject.begin() + *it);
|
||||
m_QuestAcceptedInfos.erase(m_QuestAcceptedInfos.begin() + *it);
|
||||
}
|
||||
}
|
||||
|
||||
CQuest_Data* CQuest_Data::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
|
||||
@@ -40,11 +40,11 @@ HRESULT CQuest_Entry_Line::Initialize(void* pArg)
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 5.f;
|
||||
m_vNine_Slice = _float4(0.f, 256.f, 0.f, 64.f);
|
||||
m_fFontX = 928.f;
|
||||
m_fFontX = 948.f;
|
||||
m_fFontY = 520.f;
|
||||
SizeUpX(800.f);
|
||||
SizeUpY(15.f);
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(*reinterpret_cast<_int*>(p)); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(p); });
|
||||
Visible(false);
|
||||
return S_OK;
|
||||
}
|
||||
@@ -120,7 +120,7 @@ HRESULT CQuest_Entry_Line::Render()
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
_float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), TEXT("보 상")) - 22) * 0.5f;
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("조 건"), _float2((m_fFontX + m_fX) - OffSet, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
|
||||
|
||||
@@ -208,9 +208,12 @@ HRESULT CQuest_Entry_Line::Ready_Components(void* pArg)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CQuest_Entry_Line::Set_Hover(_int Index)
|
||||
void CQuest_Entry_Line::Set_Hover(void* pArg)
|
||||
{
|
||||
m_iQuest_Index = Index;
|
||||
CURRENTQUESTSECETINFO* Desc = static_cast<CURRENTQUESTSECETINFO*>(pArg);
|
||||
|
||||
m_iCurrentQuest = Desc->iQuestCategory;
|
||||
m_iQuest_Index = Desc->iQuestIndex;
|
||||
if (m_iQuest_Index == -1)
|
||||
{
|
||||
Visible(false);
|
||||
|
||||
@@ -51,7 +51,7 @@ HRESULT CQuest_Info::Initialize(void* pArg)
|
||||
m_fFontY = 500.f;
|
||||
m_iPerQuestIndex = -1;
|
||||
Visible(false);
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(*reinterpret_cast<_int*>(p)); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(p); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ HRESULT CQuest_Info::Render()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iQuest_Index).pQuestInfo.c_str(), _float2(m_fFontX + m_fX, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iCurrentQuest ,m_iQuest_Index).pQuestInfo.c_str(), _float2(m_fFontX + m_fX, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -217,9 +217,12 @@ HRESULT CQuest_Info::Ready_Components(void* pArg)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CQuest_Info::Set_Hover(_int Index)
|
||||
void CQuest_Info::Set_Hover(void* pArg)
|
||||
{
|
||||
m_iQuest_Index = Index;
|
||||
CURRENTQUESTSECETINFO* Desc = static_cast<CURRENTQUESTSECETINFO*>(pArg);
|
||||
|
||||
m_iCurrentQuest = Desc->iQuestCategory;
|
||||
m_iQuest_Index = Desc->iQuestIndex;
|
||||
if (m_iQuest_Index == -1)
|
||||
{
|
||||
Visible(false);
|
||||
|
||||
@@ -48,7 +48,7 @@ HRESULT CQuest_Info_Header::Initialize(void* pArg)
|
||||
m_iColor = 2;
|
||||
SizeUpX(1105.f);
|
||||
SizeUpY(60.f);
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(*reinterpret_cast<_int*>(p)); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(p); });
|
||||
Visible(false);
|
||||
return S_OK;
|
||||
}
|
||||
@@ -129,8 +129,8 @@ HRESULT CQuest_Info_Header::Render()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iQuest_Index).pQuestName.c_str()) - 30) * 0.5f;
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iQuest_Index).pQuestName.c_str(), _float2((m_fFontX + m_fX) - OffSet, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
|
||||
_float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iCurrentQuest, m_iQuest_Index).pQuestName.c_str()) - 30) * 0.5f;
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iCurrentQuest, m_iQuest_Index).pQuestName.c_str(), _float2((m_fFontX + m_fX) - OffSet, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -214,9 +214,12 @@ HRESULT CQuest_Info_Header::Ready_Components(void* pArg)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CQuest_Info_Header::Set_Hover(_int Index)
|
||||
void CQuest_Info_Header::Set_Hover(void* pArg)
|
||||
{
|
||||
m_iQuest_Index = Index;
|
||||
CURRENTQUESTSECETINFO* Desc = static_cast<CURRENTQUESTSECETINFO*>(pArg);
|
||||
|
||||
m_iCurrentQuest = Desc->iQuestCategory;
|
||||
m_iQuest_Index = Desc->iQuestIndex;
|
||||
if (m_iQuest_Index == -1)
|
||||
{
|
||||
Visible(false);
|
||||
|
||||
@@ -42,7 +42,7 @@ HRESULT CQuest_Info_Line::Initialize(void* pArg)
|
||||
m_vNine_Slice = _float4(11.f, 245.f, 0.f, 64.f);
|
||||
SizeUpX(934.f);
|
||||
SizeUpY(15.f);
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(*reinterpret_cast<_int*>(p)); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(p); });
|
||||
Visible(false);
|
||||
return S_OK;
|
||||
}
|
||||
@@ -202,9 +202,12 @@ HRESULT CQuest_Info_Line::Ready_Components(void* pArg)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CQuest_Info_Line::Set_Hover(_int Index)
|
||||
void CQuest_Info_Line::Set_Hover(void* pArg)
|
||||
{
|
||||
m_iQuest_Index = Index;
|
||||
CURRENTQUESTSECETINFO* Desc = static_cast<CURRENTQUESTSECETINFO*>(pArg);
|
||||
|
||||
m_iCurrentQuest = Desc->iQuestCategory;
|
||||
m_iQuest_Index = Desc->iQuestIndex;
|
||||
if (m_iQuest_Index == -1)
|
||||
{
|
||||
Visible(false);
|
||||
|
||||
@@ -49,12 +49,15 @@ HRESULT CQuest_Slot::Initialize(void* pArg)
|
||||
m_fOffSetX = 0.f;
|
||||
m_fOffSetY = 85;
|
||||
m_iCols = 1;
|
||||
m_fPositionX = -475.f;
|
||||
m_fPositionY = 330.f;
|
||||
SizeUpX(495.f);
|
||||
SizeUpY(80.f);
|
||||
m_pVIBufferCom->Set_Cloned(true);
|
||||
m_pVIBufferCom->Set_Pos(-475.f, 330.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Pos(m_fPositionX, m_fPositionY, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
m_iQuestCount = m_pInfoInstance->Get_Quest_Count(ENUM_CLASS(QUESTSTATE::NONE));
|
||||
Set_QuestType(ENUM_CLASS(QUESTSTATE::NONE));
|
||||
Visible(true);
|
||||
return S_OK;
|
||||
}
|
||||
@@ -99,8 +102,7 @@ void CQuest_Slot::Update(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
Hover();
|
||||
|
||||
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("QuestListHover"), &m_iQuestIndex);
|
||||
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("QuestListHover"), &m_Info);
|
||||
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
@@ -139,19 +141,73 @@ HRESULT CQuest_Slot::Render()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
for (_int i = 0; i < m_iQuestCount; ++i)
|
||||
{
|
||||
m_pGameInstance->Render_Text(m_Fonts[i].pFontSizeName.c_str(), m_Fonts[i].pQuestName.c_str(), m_Fonts[i].m_fFontSize);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CQuest_Slot::Font_Size()
|
||||
{
|
||||
for (_int i = 0; i < m_iQuestCount; ++i)
|
||||
{
|
||||
m_fFontY = 190 + i * 85.f;
|
||||
if (i == m_iQuestIndex)
|
||||
if (m_Index == -1)
|
||||
{
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size30"), m_pInfoInstance->Get_Quest(i).pQuestName.c_str(), _float2(m_fFontX - 10.f + m_fX, m_fFontY - 10.F - m_fY));
|
||||
m_Fonts[i].pFontSizeName = TEXT("Font_size20");
|
||||
m_Fonts[i].m_fFontSize = _float2(m_fFontX + m_fX, m_fFontY - m_fY);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(i).pQuestName.c_str(), _float2(m_fFontX + m_fX, m_fFontY - m_fY));
|
||||
if (i == m_Index)
|
||||
{
|
||||
m_Fonts[i].pFontSizeName = TEXT("Font_size30");
|
||||
m_Fonts[i].m_fFontSize = _float2(m_fFontX - 10.f + m_fX, m_fFontY - 10.f - m_fY);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Fonts[i].pFontSizeName = TEXT("Font_size20");
|
||||
m_Fonts[i].m_fFontSize = _float2(m_fFontX + m_fX, m_fFontY - m_fY);
|
||||
}
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CQuest_Slot::Font_Setting(_int Index)
|
||||
{
|
||||
m_Fonts.clear();
|
||||
FontInfo Fonts;
|
||||
|
||||
for (_int i = 0; i < Index; ++i)
|
||||
{
|
||||
m_fFontY = 190 + i * 85.f;
|
||||
Fonts.pFontSizeName = TEXT("Font_size20");
|
||||
Fonts.pQuestName = m_pInfoInstance->Get_Quest(m_Info.iQuestCategory, i).pQuestName.c_str();
|
||||
Fonts.m_fFontSize = _float2(m_fFontX + m_fX, m_fFontY - m_fY);
|
||||
|
||||
m_Fonts.push_back(Fonts);
|
||||
}
|
||||
}
|
||||
|
||||
_int CQuest_Slot::Mousechack(POINT Mouse)
|
||||
{
|
||||
for (_int i = 0; i < m_iQuestCount; ++i)
|
||||
{
|
||||
RECT Box = {
|
||||
long(m_fPositionX - m_fSizeX * 0.5f),
|
||||
long((m_fPositionY - (i * m_fOffSetY)) - m_fSizeY * 0.5f),
|
||||
long(m_fPositionX + m_fSizeX * 0.5f),
|
||||
long((m_fPositionY + (i * m_fOffSetY)) + m_fSizeY * 0.5f) };
|
||||
|
||||
if (PtInRect(&Box, Mouse))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
_vector CQuest_Slot::Get_WorldPostion()
|
||||
@@ -258,9 +314,14 @@ void CQuest_Slot::Hover()
|
||||
fMouse.x = ptMouse.x - (g_iWinSizeX * 0.5f);
|
||||
fMouse.y = -(ptMouse.y - (g_iWinSizeY * 0.5f));
|
||||
|
||||
m_iQuestIndex = m_pVIBufferCom->Set_Mouse_Hover(fMouse);
|
||||
POINT Mouse{};
|
||||
Mouse.x = _long(fMouse.x);
|
||||
Mouse.y = _long(fMouse.y);
|
||||
|
||||
m_Index = Mousechack(Mouse);
|
||||
|
||||
if (m_iQuestIndex != -1)
|
||||
m_pVIBufferCom->Set_Hover(m_Index);
|
||||
if (m_Index != -1)
|
||||
{
|
||||
m_bHover = true;
|
||||
}
|
||||
@@ -268,23 +329,28 @@ void CQuest_Slot::Hover()
|
||||
{
|
||||
m_bHover = false;
|
||||
}
|
||||
Font_Size();
|
||||
}
|
||||
|
||||
|
||||
void CQuest_Slot::Set_QuestType(_int Index)
|
||||
{
|
||||
switch (Index)
|
||||
{
|
||||
case 0:
|
||||
m_Info.iQuestCategory = ENUM_CLASS(QUESTSTATE::NONE);
|
||||
m_iQuestCount = m_pInfoInstance->Get_Quest_Count(ENUM_CLASS(QUESTSTATE::NONE));
|
||||
m_pVIBufferCom->Set_Draw(-1);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
m_Info.iQuestCategory = ENUM_CLASS(QUESTSTATE::ACCEPTED);
|
||||
m_iQuestCount = m_pInfoInstance->Get_Quest_Count(ENUM_CLASS(QUESTSTATE::ACCEPTED));
|
||||
m_pVIBufferCom->Set_Draw(m_iQuestCount);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
m_Info.iQuestCategory = ENUM_CLASS(QUESTSTATE::CLEARED);
|
||||
m_iQuestCount = m_pInfoInstance->Get_Quest_Count(ENUM_CLASS(QUESTSTATE::CLEARED));
|
||||
m_pVIBufferCom->Set_Draw(m_iQuestCount);
|
||||
break;
|
||||
@@ -292,6 +358,7 @@ void CQuest_Slot::Set_QuestType(_int Index)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Font_Setting(m_iQuestCount);
|
||||
}
|
||||
|
||||
CQuest_Slot* CQuest_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
|
||||
@@ -58,11 +58,10 @@ HRESULT CRanrak::Initialize(void* pArg)
|
||||
m_pFSM->Bind_States(FSMDesc);
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
}
|
||||
|
||||
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
|
||||
|
||||
|
||||
m_pCharacter_Controller->Set_Position(XMVectorSet(-52.f, 0.f, 4.f, 1.f));
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(-52.f, 0.f, 4.f, 1.f));
|
||||
|
||||
@@ -76,6 +75,21 @@ void CRanrak::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CRanrak::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pGameInstance->Key_Up(DIK_H))
|
||||
{
|
||||
m_ePhase = ENUM_CLASS(RANRAK_PHASE::PHASE_GROUND);
|
||||
m_pFSM->Change_State(FSMSTATE::LAND);
|
||||
}
|
||||
if (m_pGameInstance->Key_Up(DIK_Y))
|
||||
{
|
||||
m_ePhase = ENUM_CLASS(RANRAK_PHASE::PHASE_AIR);
|
||||
m_pFSM->Change_State(FSMSTATE::HOVER);
|
||||
}
|
||||
if (m_pGameInstance->Key_Up(DIK_I))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::SKILL);
|
||||
}
|
||||
|
||||
m_pFSM->Update_State(fTimeDelta);
|
||||
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
@@ -397,6 +411,15 @@ HRESULT CRanrak::Bind_ShaderResources()
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
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_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
|
||||
@@ -9,11 +9,15 @@
|
||||
#include "State_IdleBreak.h"
|
||||
#include "State_Land.h"
|
||||
#include "State_Move.h"
|
||||
#include "State_Ground.h"
|
||||
#include "State_Combat.h"
|
||||
#include "State_Hover.h"
|
||||
#include "State_Fly.h"
|
||||
#include "State_FireBreath.h"
|
||||
#include "State_FireSweep.h"
|
||||
#include "State_FireBall.h"
|
||||
#include "State_Swipe.h"
|
||||
#include "State_Skill.h"
|
||||
#include "State_Pulse.h"
|
||||
#include "State_Tucked.h"
|
||||
#include "State_Hit.h"
|
||||
@@ -26,12 +30,12 @@ void CRanrak::Behavior_IdleEnter()
|
||||
m_pFSM->Enable_State(FSMSTATE::IDLE);
|
||||
pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::HOVER_LOOP];
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,true);
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_IdleExitCheck()
|
||||
{
|
||||
if (m_fTargetDistance <= 20.f && m_fTargetDistance !=0.f)
|
||||
if (m_fTargetDistance <= 30.f && m_fTargetDistance !=0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
return E_FAIL;
|
||||
@@ -48,7 +52,6 @@ void CRanrak::Behavior_IdleBreakEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::IDLEBREAK);
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_IdleBreakExitCheck()
|
||||
@@ -77,6 +80,13 @@ HRESULT CRanrak::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
|
||||
if (m_fTargetDistance <= 30.f && m_fTargetDistance != 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -90,45 +100,68 @@ void CRanrak::Behavior_CombatEnter()
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::COMBAT);
|
||||
m_bLookAt = true;
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::HOVER_LOOP];
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_CombatExitCheck(_float fTimeDelta)
|
||||
{
|
||||
if (m_fTargetDistance > 30.f && m_fTargetDistance != 0.f)
|
||||
if (m_fTargetDistance > 40.f && m_fTargetDistance != 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
return E_FAIL;
|
||||
}
|
||||
else if (m_fTargetDistance > 25.f && m_fTargetDistance != 0.f)
|
||||
else if (m_fTargetDistance > 35.f && m_fTargetDistance != 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (m_fTargetDistance <= 20.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBREATH)] <= 0.f)
|
||||
if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBREATH)] <= 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::FIREBREATH);
|
||||
return E_FAIL;
|
||||
}
|
||||
else if (m_fTargetDistance <= 20.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBALL)] <= 0.f)
|
||||
else if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBALL)] <= 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::FIREBALL);
|
||||
return E_FAIL;
|
||||
}
|
||||
else if (m_fTargetDistance <= 20.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::PULSE)] <= 0.f)
|
||||
else if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIRESWEEP)] <= 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::FIRESWEEP);
|
||||
return E_FAIL;
|
||||
}
|
||||
else if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::SWIPE)] <= 0.f && m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_GROUND))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::SWIPE);
|
||||
return E_FAIL;
|
||||
}
|
||||
else if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::PULSE)] <= 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::PULSE);
|
||||
return E_FAIL;
|
||||
}
|
||||
else {
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
else if (m_fTargetDistance <= 30.f && m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::TUCKED)] <= 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::TUCKED);
|
||||
return E_FAIL;
|
||||
}
|
||||
else {
|
||||
if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_AIR)) {
|
||||
m_pFSM->Change_State(FSMSTATE::HOVER);
|
||||
return E_FAIL;
|
||||
}
|
||||
else if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_GROUND)) {
|
||||
if (m_pFSM->IsEnable_Previous(FSMSTATE::TUCKED| FSMSTATE::PULSE))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::LAND);
|
||||
}
|
||||
else {
|
||||
m_pFSM->Change_State(FSMSTATE::GROUND);
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -138,13 +171,56 @@ void CRanrak::Behavior_CombatExit()
|
||||
m_pFSM->Disable_State(FSMSTATE::COMBAT);
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_GroundEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::GROUND);
|
||||
m_bLookAt = true;
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE_G];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_GroundExitCheck(_float fTimeDelta)
|
||||
{
|
||||
if (m_fTargetDistance <= 30.f && m_fTargetDistance != 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_GroundExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::GROUND);
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_HoverEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::HOVER);
|
||||
_int iRand = m_pGameInstance->Real_Random_Int(0, 1);
|
||||
switch (iRand)
|
||||
{
|
||||
case 0:
|
||||
pairAnimInfo = m_Animation[STATEANIM::HOVER_DASH_LEFT];
|
||||
break;
|
||||
case 1:
|
||||
pairAnimInfo = m_Animation[STATEANIM::HOVER_DASH_RIGHT];
|
||||
break;
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_HoverExitCheck(_float fTimeDelta)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::IDLE);
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_HoverExit()
|
||||
@@ -170,20 +246,27 @@ void CRanrak::Behavior_FireBreathEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::FIREBREATH);
|
||||
if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_AIR))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_WINDUP_A];
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_WINDUP];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[&]() { pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_A];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBREATH)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBREATH)]; },
|
||||
0.9f);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[&]() { pairAnimInfo = m_Animation[STATEANIM::FIREBREATH];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBREATH)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBREATH)]; },
|
||||
0.95f);
|
||||
|
||||
Add_Event(m_Animation[STATEANIM::FIREBREATH].first,
|
||||
[&]() { pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_COOLDOWN];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); },
|
||||
0.95f);
|
||||
Add_Event(m_Animation[STATEANIM::FIREBREATH_A].first,
|
||||
[&]() { pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_COOLDOWN_A];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); },
|
||||
0.9f);
|
||||
}
|
||||
else if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_GROUND))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_G];
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBREATH)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBREATH)];
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_FireBreathExitCheck(_float fTimeDelta)
|
||||
@@ -191,7 +274,7 @@ HRESULT CRanrak::Behavior_FireBreathExitCheck(_float fTimeDelta)
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
_int iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
|
||||
if (m_pModelCom->IsFinishedAnim() && iCurrAnimIndex == m_Animation[STATEANIM::FIREBREATH_COOLDOWN].first)
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
return E_FAIL;
|
||||
@@ -205,24 +288,87 @@ void CRanrak::Behavior_FireBreathExit()
|
||||
m_pFSM->Disable_State(FSMSTATE::FIREBREATH);
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_FireSweepEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::FIRESWEEP);
|
||||
if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_AIR))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIRESWEEP_WINDUP_A];
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[&]() { pairAnimInfo = m_Animation[STATEANIM::FIRESWEEP_A];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIRESWEEP)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIRESWEEP)]; },
|
||||
0.95f);
|
||||
|
||||
Add_Event(m_Animation[STATEANIM::FIRESWEEP_A].first,
|
||||
[&]() { pairAnimInfo = m_Animation[STATEANIM::FIRESWEEP_COOLDOWN_A];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); },
|
||||
0.95f);
|
||||
}
|
||||
else if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_GROUND))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIRESWEEP_G];
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIRESWEEP)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIRESWEEP)];
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_FireSweepExitCheck(_float fTimeDelta)
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
_int iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_FireSweepExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::FIRESWEEP);
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_FireBallEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::FIREBALL);
|
||||
|
||||
_int iRand = m_pGameInstance->Real_Random_Int(0, 1);
|
||||
|
||||
switch (iRand)
|
||||
if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_AIR))
|
||||
{
|
||||
case 0 :
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIREBALL1];
|
||||
break;
|
||||
case 1:
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIREBALL2];
|
||||
break;
|
||||
_int iRand = m_pGameInstance->Real_Random_Int(0, 1);
|
||||
|
||||
switch (iRand)
|
||||
{
|
||||
case 0:
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIREBALL1_A];
|
||||
break;
|
||||
case 1:
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIREBALL2_A];
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_GROUND))
|
||||
{
|
||||
_int iRand = m_pGameInstance->Real_Random_Int(0, 1);
|
||||
|
||||
switch (iRand)
|
||||
{
|
||||
case 0:
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIREBALL1_G];
|
||||
break;
|
||||
case 1:
|
||||
pairAnimInfo = m_Animation[STATEANIM::FIREBALL2_G];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBALL)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::FIREBALL)];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_FireBallExitCheck(_float fTimeDelta)
|
||||
@@ -244,15 +390,79 @@ void CRanrak::Behavior_FireBallExit()
|
||||
m_pFSM->Disable_State(FSMSTATE::FIREBALL);
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_SwipeEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::SWIPE);
|
||||
if (m_ePhase == ENUM_CLASS(RANRAK_PHASE::PHASE_GROUND))
|
||||
{
|
||||
_int iRand = m_pGameInstance->Real_Random_Int(0, 1);
|
||||
|
||||
switch (iRand)
|
||||
{
|
||||
case 0:
|
||||
pairAnimInfo = m_Animation[STATEANIM::GROUND_SWIPE_L];
|
||||
break;
|
||||
case 1:
|
||||
pairAnimInfo = m_Animation[STATEANIM::GROUND_SWIPE_R];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::SWIPE)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::SWIPE)];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_SwipeExitCheck(_float fTimeDelta)
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
_int iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_SwipeExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::SWIPE);
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_SkillEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::SKILL);
|
||||
pairAnimInfo = m_Animation[STATEANIM::SKILL];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_SkillExitCheck(_float fTimeDelta)
|
||||
{
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::HOVER);
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_SkillExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::SKILL);
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_PulseEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::PULSE);
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::PULSE];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::PULSE)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::PULSE)];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_PulseExitCheck(_float fTimeDelta)
|
||||
@@ -277,9 +487,10 @@ void CRanrak::Behavior_TuckedEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::TUCKED);
|
||||
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::TUCKED];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::TUCKED)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::TUCKED)];
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_TuckedExitCheck(_float fTimeDelta)
|
||||
@@ -287,6 +498,15 @@ HRESULT CRanrak::Behavior_TuckedExitCheck(_float fTimeDelta)
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
_int iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
|
||||
m_fTuckedTime += fTimeDelta;
|
||||
if (m_fTuckedTime >= 5.f && iCurrAnimIndex == m_Animation[STATEANIM::TUCKED].first)
|
||||
{
|
||||
m_fTuckedTime = 0.f;
|
||||
pairAnimInfo = m_Animation[STATEANIM::FLY_TO_HOVER];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
@@ -300,6 +520,30 @@ void CRanrak::Behavior_TuckedExit()
|
||||
m_pFSM->Disable_State(FSMSTATE::TUCKED);
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_LandEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::LAND);
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::LAND];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
}
|
||||
|
||||
HRESULT CRanrak::Behavior_LandExitCheck(_float fTimeDelta)
|
||||
{
|
||||
if (m_pModelCom->IsFinishedAnim())
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::GROUND);
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_LandExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::LAND);
|
||||
}
|
||||
|
||||
void CRanrak::Behavior_HitEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
@@ -476,6 +720,17 @@ void CRanrak::Add_FSM()
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc));
|
||||
}
|
||||
|
||||
{
|
||||
CState_Ground::STATE_GROUND_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_GroundEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_GroundExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_GroundExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::GROUND, CState_Ground::Create(&Desc));
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma region Hover
|
||||
@@ -531,6 +786,17 @@ void CRanrak::Add_FSM()
|
||||
m_States.emplace(FSMSTATE::FIREBREATH, CState_FireBreath::Create(&Desc));
|
||||
}
|
||||
|
||||
{
|
||||
CState_FireSweep::STATE_FIRESWEEP_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_FireSweepEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_FireSweepExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_FireSweepExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::FIRESWEEP, CState_FireSweep::Create(&Desc));
|
||||
}
|
||||
|
||||
{
|
||||
CState_FireBall::STATE_FIREBALL_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
@@ -542,6 +808,28 @@ void CRanrak::Add_FSM()
|
||||
m_States.emplace(FSMSTATE::FIREBALL, CState_FireBall::Create(&Desc));
|
||||
}
|
||||
|
||||
{
|
||||
CState_Swipe::STATE_SWIPE_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_SwipeEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_SwipeExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_SwipeExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::SWIPE, CState_Swipe::Create(&Desc));
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
CState_Skill::STATE_SKILL_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_SkillEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_SkillExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_SkillExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::SKILL, CState_Skill::Create(&Desc));
|
||||
}
|
||||
{
|
||||
CState_Pulse::STATE_PULSE_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
@@ -565,6 +853,18 @@ void CRanrak::Add_FSM()
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma region Land
|
||||
{
|
||||
CState_Land::STATE_LAND_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_LandEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_LandExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_LandExit(); };
|
||||
m_States.emplace(FSMSTATE::LAND, CState_Land::Create(&Desc));
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
|
||||
|
||||
#pragma region Hit
|
||||
{
|
||||
@@ -599,12 +899,11 @@ void CRanrak::Add_FSM()
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CRanrak::Set_Anim()
|
||||
{
|
||||
m_Animation[STATEANIM::IDLE_G] = { 52,true };
|
||||
m_Animation[STATEANIM::IDLE_BREAK1] = { 27,false };
|
||||
m_Animation[STATEANIM::IDLE_BREAK2] = { 28,false };
|
||||
|
||||
@@ -614,14 +913,36 @@ void CRanrak::Set_Anim()
|
||||
m_Animation[STATEANIM::HOVER_DASH_LEFT] = { 25,false };
|
||||
m_Animation[STATEANIM::HOVER_DASH_RIGHT] = { 26,false };
|
||||
|
||||
m_Animation[STATEANIM::FIREBREATH] = { 9,false };
|
||||
m_Animation[STATEANIM::FIREBREATH_COOLDOWN] = { 10,false };
|
||||
m_Animation[STATEANIM::FIREBREATH_WINDUP] = { 11,false };
|
||||
m_Animation[STATEANIM::FIREBREATH_A] = { 9,false };
|
||||
m_Animation[STATEANIM::FIREBREATH_COOLDOWN_A] = { 10,false };
|
||||
m_Animation[STATEANIM::FIREBREATH_WINDUP_A] = { 11,false };
|
||||
|
||||
m_Animation[STATEANIM::FIRESWEEP_A] = { 15,false };
|
||||
m_Animation[STATEANIM::FIRESWEEP_COOLDOWN_A] = { 16,false };
|
||||
m_Animation[STATEANIM::FIRESWEEP_WINDUP_A] = { 17,false };
|
||||
|
||||
m_Animation[STATEANIM::FIREBALL1_A] = { 0,false };
|
||||
m_Animation[STATEANIM::FIREBALL2_A] = { 1,false };
|
||||
|
||||
m_Animation[STATEANIM::GROUND_SWIPE_L] = { 3,false };
|
||||
m_Animation[STATEANIM::GROUND_SWIPE_R] = { 4,false };
|
||||
|
||||
m_Animation[STATEANIM::FIREBREATH_G] = { 6,false };
|
||||
|
||||
m_Animation[STATEANIM::FIRESWEEP_G] = { 7,false };
|
||||
|
||||
m_Animation[STATEANIM::FIREBALL1_G] = { 2,false };
|
||||
m_Animation[STATEANIM::FIREBALL2_G] = { 5,false };
|
||||
|
||||
m_Animation[STATEANIM::FIREBALL1] = { 0,false };
|
||||
m_Animation[STATEANIM::FIREBALL2] = { 1,false };
|
||||
m_Animation[STATEANIM::PULSE] = { 33,false };
|
||||
|
||||
m_Animation[STATEANIM::TUCKED] = { 21,true };
|
||||
m_Animation[STATEANIM::FLY_TO_HOVER] = { 22,false };
|
||||
|
||||
m_Animation[STATEANIM::LAND] = { 32,false };
|
||||
|
||||
m_Animation[STATEANIM::SKILL] = { 12,false };
|
||||
|
||||
//12
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
#include "pch.h"
|
||||
#include "State_FireSweep.h"
|
||||
#include "Unit.h"
|
||||
|
||||
|
||||
CState_FireSweep::CState_FireSweep()
|
||||
:CState_Root()
|
||||
{
|
||||
}
|
||||
|
||||
void CState_FireSweep::Enter()
|
||||
{
|
||||
__super::Enter();
|
||||
}
|
||||
|
||||
HRESULT CState_FireSweep::Update(_float fTimeDelta)
|
||||
{
|
||||
if (nullptr != m_funcPriorityUpdate) {
|
||||
m_funcPriorityUpdate(fTimeDelta);
|
||||
}
|
||||
if (E_FAIL == (__super::Update(fTimeDelta))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (nullptr != m_funcLateUpdate) {
|
||||
m_funcLateUpdate(fTimeDelta);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CState_FireSweep::Exit()
|
||||
{
|
||||
__super::Exit();
|
||||
}
|
||||
|
||||
HRESULT CState_FireSweep::Initialize(STATE_FIRESWEEP_DESC* pDesc)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
|
||||
m_funcLateUpdate = pDesc->funcLateUpdate;
|
||||
m_pModel = m_pOwner->Get_Component<CModel>();
|
||||
m_pFSM = m_pOwner->Get_Component<CFSM>();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CState_FireSweep* CState_FireSweep::Create(STATE_FIRESWEEP_DESC* pDesc)
|
||||
{
|
||||
CState_FireSweep* pInstance = new CState_FireSweep;
|
||||
if (FAILED(pInstance->Initialize(pDesc))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CState_FireSweep::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CState_FireSweep::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
#include "pch.h"
|
||||
#include "State_Ground.h"
|
||||
#include "Unit.h"
|
||||
|
||||
|
||||
CState_Ground::CState_Ground()
|
||||
:CState_Root()
|
||||
{
|
||||
}
|
||||
|
||||
void CState_Ground::Enter()
|
||||
{
|
||||
__super::Enter();
|
||||
}
|
||||
|
||||
HRESULT CState_Ground::Update(_float fTimeDelta)
|
||||
{
|
||||
if (nullptr != m_funcPriorityUpdate) {
|
||||
m_funcPriorityUpdate(fTimeDelta);
|
||||
}
|
||||
if (E_FAIL == (__super::Update(fTimeDelta))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (nullptr != m_funcLateUpdate) {
|
||||
m_funcLateUpdate(fTimeDelta);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CState_Ground::Exit()
|
||||
{
|
||||
__super::Exit();
|
||||
}
|
||||
|
||||
HRESULT CState_Ground::Initialize(STATE_GROUND_DESC* pDesc)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
|
||||
m_funcLateUpdate = pDesc->funcLateUpdate;
|
||||
|
||||
m_pModel = m_pOwner->Get_Component<CModel>();
|
||||
m_pFSM = m_pOwner->Get_Component<CFSM>();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CState_Ground* CState_Ground::Create(STATE_GROUND_DESC* pDesc)
|
||||
{
|
||||
CState_Ground* pInstance = new CState_Ground;
|
||||
if (FAILED(pInstance->Initialize(pDesc))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CState_Ground::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CState_Ground::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
#include "pch.h"
|
||||
#include "State_Skill.h"
|
||||
#include "Unit.h"
|
||||
|
||||
|
||||
CState_Skill::CState_Skill()
|
||||
:CState_Root()
|
||||
{
|
||||
}
|
||||
|
||||
void CState_Skill::Enter()
|
||||
{
|
||||
__super::Enter();
|
||||
}
|
||||
|
||||
HRESULT CState_Skill::Update(_float fTimeDelta)
|
||||
{
|
||||
if (nullptr != m_funcPriorityUpdate) {
|
||||
m_funcPriorityUpdate(fTimeDelta);
|
||||
}
|
||||
if (E_FAIL == (__super::Update(fTimeDelta))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (nullptr != m_funcLateUpdate) {
|
||||
m_funcLateUpdate(fTimeDelta);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CState_Skill::Exit()
|
||||
{
|
||||
__super::Exit();
|
||||
}
|
||||
|
||||
HRESULT CState_Skill::Initialize(STATE_SKILL_DESC* pDesc)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
|
||||
m_funcLateUpdate = pDesc->funcLateUpdate;
|
||||
m_pModel = m_pOwner->Get_Component<CModel>();
|
||||
m_pFSM = m_pOwner->Get_Component<CFSM>();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CState_Skill* CState_Skill::Create(STATE_SKILL_DESC* pDesc)
|
||||
{
|
||||
CState_Skill* pInstance = new CState_Skill;
|
||||
if (FAILED(pInstance->Initialize(pDesc))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CState_Skill::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CState_Skill::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
#include "pch.h"
|
||||
#include "State_Slide.h"
|
||||
#include "Unit.h"
|
||||
|
||||
|
||||
CState_Slide::CState_Slide()
|
||||
:CState_Root()
|
||||
{
|
||||
}
|
||||
|
||||
void CState_Slide::Enter()
|
||||
{
|
||||
__super::Enter();
|
||||
}
|
||||
|
||||
HRESULT CState_Slide::Update(_float fTimeDelta)
|
||||
{
|
||||
if (nullptr != m_funcPriorityUpdate) {
|
||||
m_funcPriorityUpdate(fTimeDelta);
|
||||
}
|
||||
if (FAILED(__super::Update(fTimeDelta))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (nullptr != m_funcLateUpdate) {
|
||||
m_funcLateUpdate(fTimeDelta);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CState_Slide::Exit()
|
||||
{
|
||||
__super::Exit();
|
||||
}
|
||||
|
||||
HRESULT CState_Slide::Initialize(STATE_SLIDE_DESC* pDesc)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
|
||||
m_funcLateUpdate = pDesc->funcLateUpdate;
|
||||
m_pModel = m_pOwner->Get_Component<CModel>();
|
||||
m_pFSM = m_pOwner->Get_Component<CFSM>();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CState_Slide* CState_Slide::Create(STATE_SLIDE_DESC* pDesc)
|
||||
{
|
||||
CState_Slide* pInstance = new CState_Slide;
|
||||
if (FAILED(pInstance->Initialize(pDesc))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CState_Slide::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CState_Slide::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
#include "pch.h"
|
||||
#include "State_Swipe.h"
|
||||
#include "Unit.h"
|
||||
|
||||
|
||||
CState_Swipe::CState_Swipe()
|
||||
:CState_Root()
|
||||
{
|
||||
}
|
||||
|
||||
void CState_Swipe::Enter()
|
||||
{
|
||||
__super::Enter();
|
||||
}
|
||||
|
||||
HRESULT CState_Swipe::Update(_float fTimeDelta)
|
||||
{
|
||||
if (nullptr != m_funcPriorityUpdate) {
|
||||
m_funcPriorityUpdate(fTimeDelta);
|
||||
}
|
||||
if (E_FAIL == (__super::Update(fTimeDelta))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (nullptr != m_funcLateUpdate) {
|
||||
m_funcLateUpdate(fTimeDelta);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CState_Swipe::Exit()
|
||||
{
|
||||
__super::Exit();
|
||||
}
|
||||
|
||||
HRESULT CState_Swipe::Initialize(STATE_SWIPE_DESC* pDesc)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_funcPriorityUpdate = pDesc->funcPriorityUpdate;
|
||||
m_funcLateUpdate = pDesc->funcLateUpdate;
|
||||
m_pModel = m_pOwner->Get_Component<CModel>();
|
||||
m_pFSM = m_pOwner->Get_Component<CFSM>();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CState_Swipe* CState_Swipe::Create(STATE_SWIPE_DESC* pDesc)
|
||||
{
|
||||
CState_Swipe* pInstance = new CState_Swipe;
|
||||
if (FAILED(pInstance->Initialize(pDesc))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CState_Swipe::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CState_Swipe::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -51,6 +51,7 @@ HRESULT CTerrain::Initialize(void* pArg)
|
||||
|
||||
void CTerrain::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pTransformCom->RewindMomentum();
|
||||
}
|
||||
|
||||
void CTerrain::Update(_float fTimeDelta)
|
||||
@@ -169,6 +170,15 @@ HRESULT CTerrain::Bind_ShaderResources()
|
||||
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_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -402,6 +402,8 @@ void CTroll::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo);
|
||||
if (0 == damagePair.second) {
|
||||
m_pFSM->Change_State(FSMSTATE::DEAD);
|
||||
_int ID = m_pStat->Get_Stat().iObjectID;
|
||||
m_pInfoInstance->Event_CallBack(TEXT("MonsterDead"), &ID);
|
||||
return;
|
||||
}
|
||||
m_pFSM->Change_State(FSMSTATE::HIT);
|
||||
|
||||
@@ -106,9 +106,10 @@ HRESULT CTroll::Behavior_IdleBreakExitCheck()
|
||||
{
|
||||
if (m_pModelCom->IsFinishedAnim()){
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CTroll::Behavior_IdleBreakExit()
|
||||
@@ -201,9 +202,12 @@ HRESULT CTroll::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
|
||||
|
||||
if (m_fTargetDistance <= 6.f && m_fTargetDistance != 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CTroll::Behavior_MoveExit()
|
||||
@@ -237,29 +241,35 @@ HRESULT CTroll::Behavior_CombatExitCheck(_float fTimeDelta)
|
||||
if (m_fTargetDistance <= 6.f && (m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SLAM)] <= 0.f))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::SLAM);
|
||||
return E_FAIL;
|
||||
}
|
||||
else if (m_fTargetDistance <= 6.f && (m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::BACKHAND_SWING)] <= 0.f))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::BACKHAND_SWING);
|
||||
return E_FAIL;
|
||||
}
|
||||
else if (m_fTargetDistance <= 6.f && (m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::SWING)] <= 0.f))
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::SWING);
|
||||
return E_FAIL;
|
||||
}
|
||||
else if (m_fTargetDistance <= 15.f && m_fTargetDistance>=8.f &&m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::THROWROCK)] <= 0.f)
|
||||
else if (m_fTargetDistance <= 15.f &&m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::THROWROCK)] <= 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::THROW_ROCK);
|
||||
return E_FAIL;
|
||||
}
|
||||
else if (m_fTargetDistance <= 18.f && m_fSkillCoolTime[ENUM_CLASS(TROLL_SKILL::RUSH)] <= 0.f)
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::RUSH);
|
||||
return E_FAIL;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pFSM->Change_State(FSMSTATE::IDLEBREAK);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CTroll::Behavior_CombatExit()
|
||||
@@ -326,8 +336,9 @@ HRESULT CTroll::Behavior_RushExitCheck(_float fTimeDelta)
|
||||
{
|
||||
m_bLookAt = true;
|
||||
m_pFSM->Change_State(FSMSTATE::IDLEBREAK);
|
||||
return E_FAIL;
|
||||
}
|
||||
return E_FAIL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CTroll::Behavior_RushExit()
|
||||
@@ -391,8 +402,9 @@ HRESULT CTroll::Behavior_ThrowExitCheck(_float fTimeDelta)
|
||||
{
|
||||
m_bLookAt = true;
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
return E_FAIL;
|
||||
}
|
||||
return E_FAIL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CTroll::Behavior_ThrowExit()
|
||||
|
||||
@@ -67,7 +67,7 @@ DECLARE_SINGLETON(CInfoInstance)
|
||||
void Event_CallBack(_wstring EventName, void* pArg = nullptr);
|
||||
#pragma endregion
|
||||
#pragma region QuestINFO
|
||||
QUESTINFO Get_Quest(_int QuestID);
|
||||
QUESTINFO Get_Quest(_int QuestType, _int QuestID);
|
||||
_int Get_Quest_Count(_int Index);
|
||||
const vector<QUESTINFO>& Get_AllQuest() const;
|
||||
const vector<QUESTINFO>& Get_ClearQuest() const;
|
||||
|
||||
@@ -160,6 +160,10 @@ class CPlayer final : public CUnit
|
||||
HRESULT Behavior_DodgeExitCheck(_float fTimeDelta);
|
||||
void Behavior_DodgeExit();
|
||||
|
||||
void Behavior_SlideEnter();
|
||||
HRESULT Behavior_SlideExitCheck(_float fTimeDelta);
|
||||
void Behavior_SlideExit();
|
||||
|
||||
void Behavior_CombatEnter();
|
||||
HRESULT Behavior_CombatExitCheck();
|
||||
void Behavior_CombatExit();
|
||||
|
||||
@@ -25,7 +25,7 @@ class CQuest_Data final : public CBase
|
||||
void Update_AcceptQuest(_int MonsterIndex = -1);
|
||||
|
||||
public:
|
||||
QUESTINFO Get_Quest(_int QuestID);
|
||||
QUESTINFO Get_Quest(_int QuestType, _int QuestID);
|
||||
_int Get_Count(_int Index);
|
||||
const vector<QUESTINFO>& Get_AllQuest() const;
|
||||
const vector<QUESTINFO>& Get_ClearQuest() const;
|
||||
|
||||
@@ -32,7 +32,7 @@ class CQuest_Entry_Line final : public CElementObject
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
public:
|
||||
void Set_Hover(_int Index);
|
||||
void Set_Hover(void* pArg);
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
@@ -41,6 +41,7 @@ class CQuest_Entry_Line final : public CElementObject
|
||||
|
||||
_int m_iColor = { false };
|
||||
_int m_iQuest_Index{};
|
||||
_int m_iCurrentQuest{};
|
||||
|
||||
public:
|
||||
static CQuest_Entry_Line* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -32,7 +32,7 @@ class CQuest_Info final : public CElementObject
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
public:
|
||||
void Set_Hover(_int Index);
|
||||
void Set_Hover(void* pArg);
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
@@ -46,7 +46,9 @@ class CQuest_Info final : public CElementObject
|
||||
_float m_fOriginPerviewSize{};
|
||||
_float m_fPreviewOffSet{};
|
||||
_float4 m_vHeaderBack{};
|
||||
|
||||
_int m_iQuest_Index{};
|
||||
_int m_iCurrentQuest{};
|
||||
|
||||
_int m_iPerQuestIndex{};
|
||||
public:
|
||||
|
||||
@@ -32,7 +32,7 @@ class CQuest_Info_Header final : public CElementObject
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
public:
|
||||
void Set_Hover(_int Index);
|
||||
void Set_Hover(void* pArg);
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
@@ -42,6 +42,7 @@ class CQuest_Info_Header final : public CElementObject
|
||||
|
||||
_int m_iColor = true;
|
||||
_int m_iQuest_Index{};
|
||||
_int m_iCurrentQuest{};
|
||||
public:
|
||||
static CQuest_Info_Header* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -32,7 +32,7 @@ class CQuest_Info_Line final : public CElementObject
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
public:
|
||||
void Set_Hover(_int Index);
|
||||
void Set_Hover(void* pArg);
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
@@ -41,7 +41,7 @@ class CQuest_Info_Line final : public CElementObject
|
||||
|
||||
_int m_iColor = { false };
|
||||
_int m_iQuest_Index{};
|
||||
|
||||
_int m_iCurrentQuest{};
|
||||
public:
|
||||
static CQuest_Info_Line* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -13,6 +13,12 @@ NS_BEGIN(Client)
|
||||
|
||||
class CQuest_Slot final : public CElementObject
|
||||
{
|
||||
struct FontInfo
|
||||
{
|
||||
_wstring pFontSizeName;
|
||||
_wstring pQuestName;
|
||||
_float2 m_fFontSize{};
|
||||
};
|
||||
private:
|
||||
CQuest_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CQuest_Slot(const CQuest_Slot& rhs);
|
||||
@@ -37,6 +43,10 @@ class CQuest_Slot final : public CElementObject
|
||||
|
||||
private:
|
||||
void Hover();
|
||||
void Font_Size();
|
||||
void Font_Setting(_int Index);
|
||||
|
||||
_int Mousechack(POINT Mouse);
|
||||
|
||||
public:
|
||||
void Set_QuestType(_int Index);
|
||||
@@ -46,14 +56,20 @@ class CQuest_Slot final : public CElementObject
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_UI_Instance* m_pVIBufferCom = { nullptr };
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
CURRENTQUESTSECETINFO m_Info;
|
||||
_float m_fOffSetX{};
|
||||
_float m_fOffSetY{};
|
||||
_uint m_iCols{};
|
||||
_int m_iColor{};
|
||||
|
||||
_int m_iQuestIndex{};
|
||||
_int m_iCurrentQeustClick{};
|
||||
_int m_iQuestCount{};
|
||||
|
||||
_float m_fPositionX{};
|
||||
_float m_fPositionY{};
|
||||
|
||||
_int m_Index{};
|
||||
vector<FontInfo> m_Fonts;
|
||||
public:
|
||||
static CQuest_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -12,12 +12,20 @@ class CRanrak final : public CMonster
|
||||
enum class RANRAK_SKILL
|
||||
{
|
||||
FIREBREATH,
|
||||
FIRESWEEP,
|
||||
FIREBALL,
|
||||
SWIPE,
|
||||
PULSE,
|
||||
TUCKED,
|
||||
END
|
||||
};
|
||||
|
||||
enum class RANRAK_PHASE
|
||||
{
|
||||
PHASE_AIR,
|
||||
PHASE_GROUND,
|
||||
END
|
||||
};
|
||||
private:
|
||||
CRanrak(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CRanrak(const CRanrak& Prototype);
|
||||
@@ -65,11 +73,14 @@ class CRanrak final : public CMonster
|
||||
virtual void Add_FSM();
|
||||
virtual void Set_Anim();
|
||||
|
||||
_int m_ePhase = ENUM_CLASS(RANRAK_PHASE::PHASE_AIR);
|
||||
|
||||
_float m_fSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::END)] = {};
|
||||
_float m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::END)] = { 20.f ,20.f,20.f,20.f};
|
||||
_float m_fMaxSkillCoolTime[ENUM_CLASS(RANRAK_SKILL::END)] = { 40.f,40.f ,15.f,40.f,40.f,40.f };
|
||||
|
||||
_float m_fDegree = {};
|
||||
_float m_fCross = {};
|
||||
_float m_fTuckedTime = {};
|
||||
|
||||
void Behavior_IdleEnter();
|
||||
HRESULT Behavior_IdleExitCheck();
|
||||
@@ -87,6 +98,10 @@ class CRanrak final : public CMonster
|
||||
HRESULT Behavior_CombatExitCheck(_float fTimeDelta);
|
||||
void Behavior_CombatExit();
|
||||
|
||||
void Behavior_GroundEnter();
|
||||
HRESULT Behavior_GroundExitCheck(_float fTimeDelta);
|
||||
void Behavior_GroundExit();
|
||||
|
||||
void Behavior_HoverEnter();
|
||||
HRESULT Behavior_HoverExitCheck(_float fTimeDelta);
|
||||
void Behavior_HoverExit();
|
||||
@@ -99,10 +114,22 @@ class CRanrak final : public CMonster
|
||||
HRESULT Behavior_FireBreathExitCheck(_float fTimeDelta);
|
||||
void Behavior_FireBreathExit();
|
||||
|
||||
void Behavior_FireSweepEnter();
|
||||
HRESULT Behavior_FireSweepExitCheck(_float fTimeDelta);
|
||||
void Behavior_FireSweepExit();
|
||||
|
||||
void Behavior_FireBallEnter();
|
||||
HRESULT Behavior_FireBallExitCheck(_float fTimeDelta);
|
||||
void Behavior_FireBallExit();
|
||||
|
||||
void Behavior_SwipeEnter();
|
||||
HRESULT Behavior_SwipeExitCheck(_float fTimeDelta);
|
||||
void Behavior_SwipeExit();
|
||||
|
||||
void Behavior_SkillEnter();
|
||||
HRESULT Behavior_SkillExitCheck(_float fTimeDelta);
|
||||
void Behavior_SkillExit();
|
||||
|
||||
void Behavior_PulseEnter();
|
||||
HRESULT Behavior_PulseExitCheck(_float fTimeDelta);
|
||||
void Behavior_PulseExit();
|
||||
@@ -111,6 +138,10 @@ class CRanrak final : public CMonster
|
||||
HRESULT Behavior_TuckedExitCheck(_float fTimeDelta);
|
||||
void Behavior_TuckedExit();
|
||||
|
||||
void Behavior_LandEnter();
|
||||
HRESULT Behavior_LandExitCheck(_float fTimeDelta);
|
||||
void Behavior_LandExit();
|
||||
|
||||
void Behavior_HitEnter();
|
||||
HRESULT Behavior_HitExitCheck(_float fTimeDelta);
|
||||
void Behavior_HitExit();
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
#include "State_Root.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CState_FireSweep final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagFireSweep : public CState_Root::STATE_ROOT_DESC {
|
||||
function<void(_float fTimeDelta)> funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> funcLateUpdate = { nullptr };
|
||||
}STATE_FIRESWEEP_DESC;
|
||||
private:
|
||||
CState_FireSweep();
|
||||
virtual ~CState_FireSweep() = default;
|
||||
|
||||
public:
|
||||
virtual void Enter();
|
||||
virtual HRESULT Update(_float fTimeDelta);
|
||||
virtual void Exit();
|
||||
|
||||
private:
|
||||
function<void(_float fTimeDelta)> m_funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> m_funcLateUpdate = { nullptr };
|
||||
|
||||
private:
|
||||
HRESULT Initialize(STATE_FIRESWEEP_DESC* pDesc);
|
||||
|
||||
public:
|
||||
static CState_FireSweep* Create(STATE_FIRESWEEP_DESC* pDesc);
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity();
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
#include "State_Root.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CState_Ground final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagGround : public CState_Root::STATE_ROOT_DESC {
|
||||
function<void(_float fTimeDelta)> funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> funcLateUpdate = { nullptr };
|
||||
}STATE_GROUND_DESC;
|
||||
private:
|
||||
CState_Ground();
|
||||
virtual ~CState_Ground() = default;
|
||||
|
||||
public:
|
||||
virtual void Enter();
|
||||
virtual HRESULT Update(_float fTimeDelta);
|
||||
virtual void Exit();
|
||||
|
||||
private:
|
||||
function<void(_float fTimeDelta)> m_funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> m_funcLateUpdate = { nullptr };
|
||||
|
||||
private:
|
||||
HRESULT Initialize(STATE_GROUND_DESC* pDesc);
|
||||
|
||||
public:
|
||||
static CState_Ground* Create(STATE_GROUND_DESC* pDesc);
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity();
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
#include "State_Root.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CState_Skill final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagSkill : public CState_Root::STATE_ROOT_DESC {
|
||||
function<void(_float fTimeDelta)> funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> funcLateUpdate = { nullptr };
|
||||
}STATE_SKILL_DESC;
|
||||
private:
|
||||
CState_Skill();
|
||||
virtual ~CState_Skill() = default;
|
||||
|
||||
public:
|
||||
virtual void Enter();
|
||||
virtual HRESULT Update(_float fTimeDelta);
|
||||
virtual void Exit();
|
||||
|
||||
private:
|
||||
function<void(_float fTimeDelta)> m_funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> m_funcLateUpdate = { nullptr };
|
||||
|
||||
private:
|
||||
HRESULT Initialize(STATE_SKILL_DESC* pDesc);
|
||||
|
||||
public:
|
||||
static CState_Skill* Create(STATE_SKILL_DESC* pDesc);
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity();
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
#include "State_Root.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CState_Slide final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagSlide : public CState_Root::STATE_ROOT_DESC {
|
||||
function<void(_float fTimeDelta)> funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> funcLateUpdate = { nullptr };
|
||||
}STATE_SLIDE_DESC;
|
||||
public:
|
||||
CState_Slide();
|
||||
virtual ~CState_Slide() = default;
|
||||
|
||||
public:
|
||||
virtual void Enter();
|
||||
virtual HRESULT Update(_float fTimeDelta);
|
||||
virtual void Exit();
|
||||
|
||||
private:
|
||||
function<void(_float fTimeDelta)> m_funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> m_funcLateUpdate = { nullptr };
|
||||
|
||||
private:
|
||||
HRESULT Initialize(STATE_SLIDE_DESC* pDesc);
|
||||
|
||||
public:
|
||||
static CState_Slide* Create(STATE_SLIDE_DESC* pDesc);
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity();
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
#include "State_Root.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CState_Swipe final : public CState_Root
|
||||
{
|
||||
public:
|
||||
typedef struct tagSwipe : public CState_Root::STATE_ROOT_DESC {
|
||||
function<void(_float fTimeDelta)> funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> funcLateUpdate = { nullptr };
|
||||
}STATE_SWIPE_DESC;
|
||||
private:
|
||||
CState_Swipe();
|
||||
virtual ~CState_Swipe() = default;
|
||||
|
||||
public:
|
||||
virtual void Enter();
|
||||
virtual HRESULT Update(_float fTimeDelta);
|
||||
virtual void Exit();
|
||||
|
||||
private:
|
||||
function<void(_float fTimeDelta)> m_funcPriorityUpdate = { nullptr };
|
||||
function<void(_float fTimeDelta)> m_funcLateUpdate = { nullptr };
|
||||
|
||||
private:
|
||||
HRESULT Initialize(STATE_SWIPE_DESC* pDesc);
|
||||
|
||||
public:
|
||||
static CState_Swipe* Create(STATE_SWIPE_DESC* pDesc);
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity();
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,258 @@
|
||||
<Emart>
|
||||
<Name SpellName="봄바르다" Size="550">
|
||||
<Start>
|
||||
<Pos x="730" y="200"/>
|
||||
</Start>
|
||||
<Position>
|
||||
<Pos x="625" y="60"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="810" y="-185"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="395" y="-185"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="515" y="-45"/>
|
||||
</Position>
|
||||
</Name>
|
||||
<Name SpellName="루모스" Size="520">
|
||||
<Start>
|
||||
<Pos x="410" y="-210"/>
|
||||
</Start>
|
||||
<Position>
|
||||
<Pos x="600" y="200"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="790" y="-230"/>
|
||||
</Position>
|
||||
</Name>
|
||||
<Name SpellName="아씨오" Size="520">
|
||||
<Start>
|
||||
<Pos x="850" y="-110"/>
|
||||
</Start>
|
||||
<Position>
|
||||
<Pos x="841" y="-78"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="830" y="-46"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="815" y="-14"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="794" y="18"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="764.5" y="50"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="719" y="82"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="687" y="95.9"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="655" y="104.5"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="623" y="109"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="591" y="110"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="559" y="108"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="527" y="102.5"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="495" y="93"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="463" y="78"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="431" y="56.5"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="399" y="24"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="379" y="-2"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="369" y="-20"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="354.5" y="-52"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="347.5" y="-71"/>
|
||||
</Position>
|
||||
</Name>
|
||||
<Name SpellName="디센도" Size="520">
|
||||
<Start>
|
||||
<Pos x="453" y="-245"/>
|
||||
</Start>
|
||||
<Position>
|
||||
<Pos x="453" y="90"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="458" y="122"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="471" y="154"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="494" y="186"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="500" y="192"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="510" y="200"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="518" y="206"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="550" y="222"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="582" y="228.5"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="614" y="228.5"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="646" y="220.5"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="678" y="206"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="690" y="197.5"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="720" y="165.5"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="736" y="133"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="744" y="101"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="745" y="69"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="739" y="37"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="725" y="5"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="707" y="-20"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="675" y="-47"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="643" y="-61.5"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="580" y="-68"/>
|
||||
</Position>
|
||||
</Name>
|
||||
<Name SpellName="레벨리오" Size="550">
|
||||
<Start>
|
||||
<Pos x="454" y="-240"/>
|
||||
</Start>
|
||||
<Position>
|
||||
<Pos x="454" y="90"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="459" y="122"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="472" y="154"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="490" y="180"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="490" y="180"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="510" y="199"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="542" y="218"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="574" y="227"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="606" y="229"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="638" y="224"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="670" y="211"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="670" y="211"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="690" y="197"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="720" y="164"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="736" y="132"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="743" y="100"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="744" y="68"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="738" y="36"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="723" y="4"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="697" y="-28"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="665" y="-50"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="633" y="-62"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="602" y="-67"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="621" y="-90"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="648" y="-120"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="675" y="-150"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="702" y="-180"/>
|
||||
</Position>
|
||||
<Position>
|
||||
<Pos x="710" y="-189"/>
|
||||
</Position>
|
||||
</Name>
|
||||
</Emart>
|
||||
@@ -468,42 +468,47 @@ float4 BlendDiffuse(float4 vDiffuseA, Texture2D DiffuseBlendTexture, float2 vTex
|
||||
return lerp(vDiffuseA, vDiffuseBlendColor, fRatio);
|
||||
|
||||
}
|
||||
|
||||
float2 CalcVelocityUV(float4 vCurrentProjPos, float4 vPreviousProjPos)
|
||||
float2 CalcVelocityUV(float4 vCurrentProjPos, float4 vPreviousProjPos, float fIntensity = 1.f)
|
||||
{
|
||||
if (vCurrentProjPos.w <= FLT_EPSILON5 || vPreviousProjPos.w <= FLT_EPSILON5) {
|
||||
return float2(0.0f, 0.0f);
|
||||
if (vCurrentProjPos.w <= FLT_EPSILON5 || vPreviousProjPos.w <= FLT_EPSILON5)
|
||||
{
|
||||
return float2(0.5f, 0.5f);
|
||||
}
|
||||
|
||||
float2 currentUV = (vCurrentProjPos.xy/vCurrentProjPos.w);
|
||||
float2 previousUV = (vPreviousProjPos.xy / vCurrentProjPos.w);
|
||||
float2 currentNDC = vCurrentProjPos.xy / vCurrentProjPos.w;
|
||||
float2 previousNDC = vPreviousProjPos.xy / vPreviousProjPos.w;
|
||||
|
||||
currentUV.y *= -1.f;
|
||||
previousUV.y *= -1.f;
|
||||
currentNDC.y *= -1.f;
|
||||
previousNDC.y *= -1.f;
|
||||
|
||||
return currentUV - previousUV;
|
||||
// UV 델타
|
||||
float2 velocityUV = (currentNDC - previousNDC) * 0.5f;
|
||||
velocityUV *= fIntensity;
|
||||
velocityUV = clamp(velocityUV, -1.0f, 1.0f);
|
||||
|
||||
return velocityUV * 0.5f + 0.5f; // 0 속도 -> 0.5
|
||||
}
|
||||
|
||||
float3 DownSampleFast(Texture2D SrcTexture2D, float2 vCenterTexcoord, float2 vSrcTexelSize, float2 vResolution)
|
||||
{
|
||||
float2 uv = float2(0.f, 0.f);
|
||||
float3 vCenterColor = SrcTexture2D.SampleLevel(BorderZeroSampler, uv, 0);
|
||||
float3 vCenterColor = SrcTexture2D.SampleLevel(BorderZeroSampler, vCenterTexcoord, 0);
|
||||
uv = vCenterTexcoord + vSrcTexelSize * float2(-1.0, -1.0);
|
||||
float3 fLTColor = BilinearFetches(vResolution, SrcTexture2D, uv, BorderZeroLinearSampler);
|
||||
float3 fLTColor = BilinearFetches(vResolution, SrcTexture2D, uv, BorderZeroSampler);
|
||||
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);
|
||||
float3 fRTColor = BilinearFetches(vResolution, SrcTexture2D, uv, BorderZeroSampler);
|
||||
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);
|
||||
float3 fLBColor = BilinearFetches(vResolution, SrcTexture2D, uv, BorderZeroSampler);
|
||||
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);
|
||||
float3 fRBColor = BilinearFetches(vResolution, SrcTexture2D, uv, BorderZeroSampler);
|
||||
|
||||
return vCenterColor * 0.25f + (fLTColor + fRTColor + fLBColor + fRBColor) * 0.0625f + (fTColor + fLColor + fRColor + fBColor) * 0.125f;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,13 @@ sampler ClampSampler = sampler_state
|
||||
AddressV = clamp;
|
||||
};
|
||||
|
||||
sampler ClampLinearSampler = sampler_state
|
||||
{
|
||||
Filter = MIN_MAG_MIP_LINEAR;
|
||||
AddressU = clamp;
|
||||
AddressV = clamp;
|
||||
};
|
||||
|
||||
sampler MirrorSampler = sampler_state
|
||||
{
|
||||
Filter = MIN_MAG_MIP_LINEAR;
|
||||
|
||||
@@ -14,9 +14,12 @@ float g_fShadowFar_MIDDDLE;
|
||||
float g_fShadowFar_FAR;
|
||||
float g_fCascadeSplitRatioNear;
|
||||
float g_fCascadeSplitRatioFar;
|
||||
uint g_iMaxShadowWidth;
|
||||
uint g_iMaxShadowHeight;
|
||||
float2 g_vNearShadowResolution;
|
||||
float2 g_vMiddleShadowResolution;
|
||||
float2 g_vFarShadowResolution;
|
||||
float2 g_vPreShadowResolution;
|
||||
float2 g_vResolution;
|
||||
float2 g_vSrcResolution;
|
||||
float4 g_vShadowBias;
|
||||
|
||||
uint g_iBloomEmbossingPass;
|
||||
@@ -60,7 +63,6 @@ Texture2D g_DepthTexture;
|
||||
Texture2D g_SpecularTexture;
|
||||
Texture2D g_ShadowNearTexture;
|
||||
Texture2D g_ShadowMiddleTexture;
|
||||
Texture2D g_ShadowFarTexture;
|
||||
Texture2D g_PreShadowTexture;
|
||||
Texture2D g_BlurTexture;
|
||||
Texture2D g_BlurXTexture;
|
||||
@@ -73,10 +75,14 @@ Texture2D g_OriginalTexture;
|
||||
|
||||
Texture2D g_ColorTexture;
|
||||
Texture2D g_VelocityTexture;
|
||||
Texture2D g_TileVelocityTexture;
|
||||
|
||||
int g_iMBSampleCount;
|
||||
int g_fMBBlurRadius;
|
||||
float g_iMBType;
|
||||
int g_iMBMaxSampleCount;
|
||||
float g_fMBBlurRadius;
|
||||
int g_iMBType;
|
||||
int g_iMBTileSize;
|
||||
float g_fMBSampleBias;
|
||||
|
||||
vector g_vLightDiffuse;
|
||||
vector g_vLightAmbient;
|
||||
@@ -147,6 +153,11 @@ struct VS_OUT
|
||||
struct PS_OUT_VELOCITYBLUR
|
||||
{
|
||||
float4 vColor : SV_TARGET0;
|
||||
float2 vVelocity : SV_TARGET1;
|
||||
};
|
||||
struct PS_OUT_VELOCITYTILE
|
||||
{
|
||||
float2 vVelocity : SV_TARGET0;
|
||||
};
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
@@ -227,25 +238,178 @@ struct PS_OUT_SSAO_BLUR
|
||||
// g_ColorTexture;
|
||||
// g_DepthTexture;
|
||||
// g_VelocityTexture;
|
||||
// g_DiffuseTexture;
|
||||
// g_fFar
|
||||
// g_fMBSampleBias
|
||||
// g_fMBBlurRadius
|
||||
// g_iMBType
|
||||
// g_iMBSampleCount
|
||||
PS_OUT_VELOCITYBLUR PS_MOTIONBLUR_X(PS_IN In)
|
||||
// g_iMBMaxSampleCount
|
||||
// g_iMBType
|
||||
PS_OUT_VELOCITYBLUR PS_MOTIONBLUR(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);
|
||||
PS_OUT_VELOCITYBLUR Out = (PS_OUT_VELOCITYBLUR) 0;
|
||||
|
||||
//for (int i = -g_iMBSampleCount; i < g_iMBSampleCount; ++i)
|
||||
//{
|
||||
// vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x;
|
||||
// vTexcoord.y = In.vTexcoord.y;
|
||||
float2 vCenterUV = In.vTexcoord;
|
||||
float2 vFullResolutionTexelSize = 1.f / g_vResolution;
|
||||
float fCenterDepth = g_DepthTexture.Sample(PointSampler, vCenterUV).y;
|
||||
float2 vCenterVelo = g_VelocityTexture.Sample(PointSampler, vCenterUV).xy * 2.f - 1.f; // 0~1 -> -1~+1
|
||||
float2 vCenterVeloPixel = vCenterVelo * g_vResolution.xy;
|
||||
bool bBorrowedVelocityFromTile = false;
|
||||
|
||||
float2 vBlurVelo = vCenterVelo;
|
||||
float2 vBlurVeloPixel = vCenterVeloPixel;
|
||||
if (length(vBlurVeloPixel) < 0.5f) {
|
||||
vBlurVelo = g_TileVelocityTexture.Sample(PointSampler, vCenterUV).xy * 2.f - 1.f;
|
||||
vBlurVeloPixel = vBlurVelo * g_vResolution.xy;
|
||||
bBorrowedVelocityFromTile = true;
|
||||
}
|
||||
|
||||
if (length(vBlurVeloPixel) < 0.5f) {
|
||||
Out.vColor = g_ColorTexture.Sample(ClampLinearSampler, vCenterUV);
|
||||
Out.vVelocity = float2(0.5f, 0.5f);
|
||||
return Out;
|
||||
}
|
||||
|
||||
float2 vBlurDirPixel = (vBlurVeloPixel / max(length(vBlurVeloPixel), FLT_EPSILON5));
|
||||
int iMaxRadius = min(g_iMBSampleCount, g_iMBMaxSampleCount);
|
||||
|
||||
// 샘플링 당 이동 픽셀
|
||||
float fSamplePixelSpeed = g_fMBBlurRadius / max((float) iMaxRadius, 1.f);
|
||||
|
||||
// 샘플유닛의 크기
|
||||
float fScalePixelToSampleUnit = (float) iMaxRadius / max(g_fMBBlurRadius, FLT_EPSILON5);
|
||||
float fScaleDepth = 0.5f / max(g_fMBSampleBias, FLT_EPSILON5);
|
||||
float4 vAccColorSum = float4(0.f, 0.f, 0.f, 0.f);
|
||||
float2 vAccVeloSum = float2(0.f, 0.f);
|
||||
float fAccWeight = 0.f;
|
||||
|
||||
// 센터의 스프레드 길이
|
||||
float2 vReferenceVelocityPixel = vCenterVeloPixel;
|
||||
if (true == bBorrowedVelocityFromTile)
|
||||
{
|
||||
vReferenceVelocityPixel = vBlurVeloPixel;
|
||||
}
|
||||
float fCenterSpreadLengthPixel = clamp(abs(dot(vReferenceVelocityPixel, vBlurDirPixel)), 0.f, g_fMBBlurRadius);
|
||||
|
||||
[loop]
|
||||
for (int iInterval = -iMaxRadius; iInterval <= iMaxRadius; ++iInterval) {
|
||||
float fOffset = (float) abs(iInterval);
|
||||
float2 vOffsetPixel = vBlurDirPixel * ((float) iInterval * fSamplePixelSpeed);
|
||||
float2 vSamplingUV = vCenterUV + vOffsetPixel * vFullResolutionTexelSize;
|
||||
if (false == IsValidUV(vSamplingUV)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
float fSampledDepth = g_DepthTexture.Sample(PointSampler, vSamplingUV).y;
|
||||
float2 vSampledVelo = g_VelocityTexture.Sample(PointSampler, vSamplingUV).xy * 2.f - 1.f;
|
||||
float2 vSampledVeloPixel = vSampledVelo * g_vResolution.xy;
|
||||
|
||||
// 샘플의 스프레드 길이
|
||||
float fBlurSampleAccurate = abs(dot(vSampledVeloPixel, vBlurDirPixel));
|
||||
float fSampleSpreadLengthPixel = clamp(fBlurSampleAccurate, 0.f, g_fMBBlurRadius);
|
||||
if (true == bBorrowedVelocityFromTile)
|
||||
{
|
||||
fSampleSpreadLengthPixel = max(fSampleSpreadLengthPixel, fCenterSpreadLengthPixel);
|
||||
}
|
||||
|
||||
// 샘플과 센터의 (깊이테스트 + 스프레드테스트)
|
||||
float fWeightCalculated = SampleWeight(fCenterDepth, fSampledDepth, fOffset, fCenterSpreadLengthPixel, fSampleSpreadLengthPixel, fScalePixelToSampleUnit, fScaleDepth);
|
||||
|
||||
// vColor += g_fWeights_32[i + 15] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
||||
//}
|
||||
if (fWeightCalculated <= 0.f) {
|
||||
continue;
|
||||
}
|
||||
|
||||
float4 vSampledColor = g_ColorTexture.Sample(ClampLinearSampler, vSamplingUV);
|
||||
vAccColorSum += vSampledColor * fWeightCalculated;
|
||||
vAccVeloSum += vSampledVelo * fWeightCalculated;
|
||||
fAccWeight += fWeightCalculated;
|
||||
}
|
||||
float4 vBlurredColor = vAccColorSum / max(fAccWeight, FLT_EPSILON5);
|
||||
float2 vBlurredVelo = vAccVeloSum / max(fAccWeight, FLT_EPSILON5);
|
||||
Out.vColor = vBlurredColor;
|
||||
Out.vVelocity = vBlurredVelo * 0.5f + 0.5f;
|
||||
return Out;
|
||||
}
|
||||
PS_OUT_VELOCITYTILE PS_MOTIONBLUR_TILESAMPLE(PS_IN In)
|
||||
{
|
||||
PS_OUT_VELOCITYTILE Out = (PS_OUT_VELOCITYTILE) 0;
|
||||
|
||||
float2 uv = In.vTexcoord;
|
||||
float2 vSrcTexelSize = float2(1.f / g_vSrcResolution.x, 1.f / g_vSrcResolution.y);
|
||||
|
||||
int2 vTilePixelIndex = int2(uv * g_vResolution);
|
||||
vTilePixelIndex = clamp(vTilePixelIndex, int2(0, 0), int2(g_vResolution) - 1);
|
||||
|
||||
int2 vTileStartSourcePixel = vTilePixelIndex * g_iMBTileSize;
|
||||
|
||||
float2 vMaxVel = float2(0.5f, 0.5f);
|
||||
float fMaxSpeed = 0.f;
|
||||
float2 vSampleVel;
|
||||
float2 vSampleUV;
|
||||
float2 vSampleDiff;
|
||||
float fSampleSpeed;
|
||||
|
||||
[loop]
|
||||
for (int iY = 0; iY < g_iMBTileSize; ++iY)
|
||||
{
|
||||
[loop]
|
||||
for (int iX = 0; iX < g_iMBTileSize; ++iX)
|
||||
{
|
||||
int2 vSourcePixel = vTileStartSourcePixel + int2(iX, iY);
|
||||
|
||||
if (vSourcePixel.x < 0 || vSourcePixel.y < 0 || vSourcePixel.x >= (int) g_vSrcResolution.x || vSourcePixel.y >= (int) g_vSrcResolution.y)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
float2 vSourceUV = (float2(vSourcePixel) + 0.5f) * vSrcTexelSize;
|
||||
|
||||
vSampleVel = g_VelocityTexture.SampleLevel(ClampSampler, vSourceUV, 0).xy;
|
||||
|
||||
vSampleUV = vSampleVel * 2.0f - 1.0f;
|
||||
|
||||
fSampleSpeed = length(vSampleUV * g_vSrcResolution);
|
||||
|
||||
if (fSampleSpeed > fMaxSpeed)
|
||||
{
|
||||
fMaxSpeed = fSampleSpeed;
|
||||
vMaxVel = vSampleVel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Out.vVelocity = vMaxVel;
|
||||
return Out;
|
||||
}
|
||||
PS_OUT_VELOCITYTILE PS_MOTIONBLUR_TENTSAMPLE(PS_IN In)
|
||||
{
|
||||
PS_OUT_VELOCITYTILE Out = (PS_OUT_VELOCITYTILE) 0;
|
||||
|
||||
float2 uv = In.vTexcoord;
|
||||
float2 vSrcTexelSize = float2(1.f / g_vResolution.x, 1.f / g_vResolution.y);
|
||||
float2 vMaxVel = float2(0.5f, 0.5f);
|
||||
float vMaxSpeed = 0.f;
|
||||
float2 vSampleVel;
|
||||
float2 vSampleUV;
|
||||
float2 vSampleDiff;
|
||||
float fSampleSpeed;
|
||||
|
||||
for (int i = -1; i <= 1; ++i)
|
||||
{
|
||||
for (int j = -1; j <= 1; ++j)
|
||||
{
|
||||
vSampleUV.x = uv.x + vSrcTexelSize.x * i;
|
||||
vSampleUV.y = uv.y + vSrcTexelSize.y * j;
|
||||
vSampleVel = g_VelocityTexture.Sample(ClampSampler, vSampleUV);
|
||||
vSampleDiff = vSampleVel *2.f - 1.f;
|
||||
fSampleSpeed = length(vSampleDiff * g_vResolution * g_iMBTileSize);
|
||||
if (fSampleSpeed > vMaxSpeed) {
|
||||
vMaxSpeed = fSampleSpeed;
|
||||
vMaxVel = vSampleVel;
|
||||
}
|
||||
}
|
||||
}
|
||||
Out.vVelocity = vMaxVel;
|
||||
return Out;
|
||||
}
|
||||
PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
|
||||
@@ -641,10 +805,9 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
||||
vPreShadowPosition = mul(vPreShadowPosition, g_PreShadowLightProjMatrix);
|
||||
}
|
||||
/* 광원의 NDC에서 샘플링 */
|
||||
float fVisibility_Dynamic_Near = ShadowVisibility_hwPCF(g_ShadowNearTexture, vNearShadowPos, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), g_vShadowBias.x);
|
||||
float fVisibility_Dynamic_Middle = ShadowVisibility_hwPCF(g_ShadowMiddleTexture, vMiddleShadowPos, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), g_vShadowBias.y);
|
||||
//float fVisibility_Dynamic_Far = ShadowVisibility_hwPCF(g_ShadowFarTexture, vFarShadowPos, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), g_vShadowBias.z);
|
||||
float fVisibility_Static = ShadowVisibility_hwPCF(g_PreShadowTexture, vPreShadowPosition, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), g_vShadowBias.w);
|
||||
float fVisibility_Dynamic_Near = ShadowVisibility_hwPCF(g_ShadowNearTexture, vNearShadowPos, g_vNearShadowResolution, g_vShadowBias.x);
|
||||
float fVisibility_Dynamic_Middle = ShadowVisibility_hwPCF(g_ShadowMiddleTexture, vMiddleShadowPos, g_vMiddleShadowResolution, g_vShadowBias.y);
|
||||
float fVisibility_Static = ShadowVisibility_hwPCF(g_PreShadowTexture, vPreShadowPosition, g_vPreShadowResolution, g_vShadowBias.w);
|
||||
|
||||
////////////////////////////
|
||||
// 케스케이드
|
||||
@@ -661,9 +824,6 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
||||
|
||||
// Near -> Middle
|
||||
float fVisibilityDynamic = lerp(fVisibility_Dynamic_Near, fVisibility_Dynamic_Middle, fCascadeBlend_NearToMiddle);
|
||||
// Middle -> Far 경계 부드럽게
|
||||
//fVisibilityDynamic = lerp(fVisibilityDynamic, fVisibility_Dynamic_Far, fCascadeBlend_MiddleToFar);
|
||||
|
||||
|
||||
// 1번째 방법
|
||||
// Dynamic->Static 부드럽게 전환
|
||||
@@ -794,11 +954,11 @@ PS_OUT_FLT4_SINGLE PS_MAIN_EMBOSS(PS_IN In)
|
||||
{
|
||||
PS_OUT_FLT4_SINGLE Out;
|
||||
float2 uv = In.vTexcoord;
|
||||
float4 fSrcAlpha = g_DiffuseTexture.Sample(PointSampler, uv);
|
||||
float2 vSrcTexelSize = float2(1.f / g_vResolution.x, 1.f / g_vResolution.y);
|
||||
float fSrcAlpha = g_DiffuseTexture.Sample(PointSampler, uv).a;
|
||||
float2 vSrcTexelSize = float2(1.f / g_vSrcResolution.x, 1.f / g_vSrcResolution.y);
|
||||
float3 vColor = (0.f, 0.f, 0.f);
|
||||
|
||||
vColor = DownSampleFast(g_DiffuseTexture, In.vTexcoord, vSrcTexelSize, g_vResolution);
|
||||
vColor = DownSampleFast(g_DiffuseTexture, In.vTexcoord, vSrcTexelSize, g_vSrcResolution);
|
||||
|
||||
float fIntensity = dot(vColor, float3(0.2126f, 0.7152f, 0.0722f));
|
||||
fIntensity = max(FLT_EPSILON3, fIntensity);
|
||||
@@ -806,7 +966,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_EMBOSS(PS_IN In)
|
||||
|
||||
float fBloomIntensity = GetBloomCurve(fIntensity, g_fBloomThreshold, g_iBloomEmbossingPass);
|
||||
float3 bloomColor = (vColor * fBloomIntensity) / fIntensity;
|
||||
Out.vFirstTarget = fSrcAlpha;
|
||||
Out.vFirstTarget = float4(bloomColor, fSrcAlpha);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -815,13 +975,13 @@ 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);
|
||||
float fSrcAlpha = g_DiffuseTexture.SampleLevel(BorderZeroSampler, uv, 0).a;
|
||||
float2 vSrcTexelSize = float2(1.f / g_vSrcResolution.x, 1.f / g_vSrcResolution.y);
|
||||
float3 vColor = (0.f, 0.f, 0.f);
|
||||
|
||||
vColor = DownSampleFast(g_DiffuseTexture, In.vTexcoord, vSrcTexelSize, g_vResolution);
|
||||
vColor = DownSampleFast(g_DiffuseTexture, In.vTexcoord, vSrcTexelSize, g_vSrcResolution);
|
||||
|
||||
Out.vFirstTarget = float4(vColor, 1.f);
|
||||
Out.vFirstTarget = float4(vColor, fSrcAlpha);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -1394,7 +1554,7 @@ technique11 DefaultTechnique
|
||||
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();
|
||||
PixelShader = compile ps_5_0 PS_MOTIONBLUR();
|
||||
}
|
||||
pass DownSamplePass // 19
|
||||
{
|
||||
@@ -1405,5 +1565,22 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN_DOWNSAMPLE();
|
||||
}
|
||||
|
||||
pass MotionBlurTileSamplePass // 20
|
||||
{
|
||||
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_MOTIONBLUR_TILESAMPLE();
|
||||
}
|
||||
pass MotionBlurTentSamplePass // 21
|
||||
{
|
||||
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_MOTIONBLUR_TENTSAMPLE();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,6 +215,15 @@ void SampleLocalTRS_Cur(uint bone, float t, out float3 S, out float4 R, out floa
|
||||
DecomposeAffine_RowMajor(g_BoneLocalBuffer[bone].BoneLocal, S, R, T);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ch.KeyCount < 2)
|
||||
{
|
||||
KeyFrame k = g_KeyFrameBuffer[ch.StartIndex];
|
||||
S = k.vScale;
|
||||
T = k.vTranslation;
|
||||
R = QuatNormalize(k.vRotation);
|
||||
return;
|
||||
}
|
||||
|
||||
uint idx0 = FindKeyIndexCur(ch.StartIndex, ch.KeyCount, t);
|
||||
uint idx1 = idx0 + 1;
|
||||
@@ -239,6 +248,15 @@ void SampleLocalTRS_Prev(uint bone, float t, out float3 S, out float4 R, out flo
|
||||
DecomposeAffine_RowMajor(g_BoneLocalBuffer[bone].BoneLocal, S, R, T);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ch.KeyCount < 2)
|
||||
{
|
||||
KeyFrame k = g_KeyFrameBuffer[ch.StartIndex];
|
||||
S = k.vScale;
|
||||
T = k.vTranslation;
|
||||
R = QuatNormalize(k.vRotation);
|
||||
return;
|
||||
}
|
||||
|
||||
uint idx0 = FindKeyIndexPrev(ch.StartIndex, ch.KeyCount, t);
|
||||
uint idx1 = idx0 + 1;
|
||||
@@ -256,6 +274,20 @@ void SampleLocalTRS_Prev(uint bone, float t, out float3 S, out float4 R, out flo
|
||||
|
||||
row_major float4x4 SampleBlendedLocal(uint bone)
|
||||
{
|
||||
if (PrevAnimIndex == 0xFFFFFFFFu)
|
||||
{
|
||||
float3 S;
|
||||
float4 R;
|
||||
float3 T;
|
||||
SampleLocalTRS_Cur(bone, CurrentTime, S, R, T);
|
||||
if ((int) bone == RootBoneIndex)
|
||||
{
|
||||
T = 0;
|
||||
R = RootInitRot;
|
||||
}
|
||||
return MakeAffine(S, R, T);
|
||||
}
|
||||
|
||||
if (CurrentAnimIndex == PrevAnimIndex)
|
||||
{
|
||||
float3 S;
|
||||
|
||||
@@ -39,19 +39,19 @@ void CS_MAIN(uint3 DTid : SV_DispatchThreadID)
|
||||
|
||||
uint global = g_BoneRemap[local];
|
||||
|
||||
row_major float4x4 combined = g_LocalMatIn[global];
|
||||
float4x4 combined = g_LocalMatIn[global];
|
||||
|
||||
int p = g_ParentBuffer[global];
|
||||
while (p != -1)
|
||||
{
|
||||
combined = mul(combined, g_LocalMatIn[(uint) p]);
|
||||
p = g_ParentBuffer[(uint) p];
|
||||
combined = mul(combined,g_LocalMatIn[p]);
|
||||
p = g_ParentBuffer[p];
|
||||
}
|
||||
|
||||
combined = mul(combined, PreTransformMatrix);
|
||||
|
||||
g_LocalPosOutput[local].Combined = combined;
|
||||
g_LocalPosOutput[local].LocalCombined = combined;
|
||||
|
||||
|
||||
g_LocalPosOutput[local].Local = g_LocalMatIn[global];
|
||||
g_LocalPosOutput[local].LocalCombined = combined;
|
||||
g_LocalPosOutput[local].Combined = combined;
|
||||
|
||||
}
|
||||
|
||||
@@ -1745,6 +1745,27 @@ PS_OUT PS_Broomstick(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_SpellLearn(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
float4 tex = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float tex1 = g_Texture1.Sample(DefaultSampler, In.vTexcoord).r;
|
||||
Color = tex;
|
||||
|
||||
tex1 *= 0.95f;
|
||||
|
||||
Color.a = tex1;
|
||||
|
||||
Color.a *= Alpha;
|
||||
|
||||
Out.vColor = Color;
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct VS_IN3D
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
@@ -2305,6 +2326,16 @@ technique11 PosTexTechnique11
|
||||
PixelShader = compile ps_5_0 PS_Broomstick();
|
||||
}
|
||||
|
||||
pass SpellLearn
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
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_SpellLearn();
|
||||
}
|
||||
|
||||
pass Enemy_Detection
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
|
||||
@@ -431,7 +431,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);
|
||||
Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos) * 0.5f + 0.5f;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 567 KiB |
|
After Width: | Height: | Size: 9.6 KiB |
@@ -197,6 +197,11 @@ call Update_Shaders.bat
|
||||
<ClInclude Include="..\public\Quest_Slot.h" />
|
||||
<ClInclude Include="..\public\Quest_Status.h" />
|
||||
<ClInclude Include="..\Public\Skill_Data.h" />
|
||||
<ClInclude Include="..\Public\SpellLearn.h" />
|
||||
<ClInclude Include="..\public\SpellLearn_Canvas.h" />
|
||||
<ClInclude Include="..\public\SpellLearn_MovePointer.h" />
|
||||
<ClInclude Include="..\public\SpellLearn_Name.h" />
|
||||
<ClInclude Include="..\public\SpellLearn_Panel.h" />
|
||||
<ClInclude Include="..\Public\State_Blink.h" />
|
||||
<ClInclude Include="..\Public\State_Dead.h" />
|
||||
<ClInclude Include="..\Public\State_Hit.h" />
|
||||
@@ -415,6 +420,11 @@ call Update_Shaders.bat
|
||||
<ClCompile Include="..\private\Quest_Slot.cpp" />
|
||||
<ClCompile Include="..\private\Quest_Status.cpp" />
|
||||
<ClCompile Include="..\Private\Skill_Data.cpp" />
|
||||
<ClCompile Include="..\Private\SpellLearn.cpp" />
|
||||
<ClCompile Include="..\private\SpellLearn_Canvas.cpp" />
|
||||
<ClCompile Include="..\private\SpellLearn_MovePointer.cpp" />
|
||||
<ClCompile Include="..\private\SpellLearn_Name.cpp" />
|
||||
<ClCompile Include="..\private\SpellLearn_Panel.cpp" />
|
||||
<ClCompile Include="..\Private\State_Blink.cpp" />
|
||||
<ClCompile Include="..\Private\State_Dead.cpp" />
|
||||
<ClCompile Include="..\Private\State_Hit.cpp" />
|
||||
|
||||
@@ -610,6 +610,24 @@
|
||||
<Filter Include="50.UI\QuestInstance">
|
||||
<UniqueIdentifier>{a2d06f57-c74f-4604-91b4-884bf6586584}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\SpellLearn_Canvas">
|
||||
<UniqueIdentifier>{91999870-f29b-4c24-b888-09eb08b8e10c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\SpellLearn_Canvas\SpellLearn_Panel">
|
||||
<UniqueIdentifier>{37571a2a-97dd-447b-a25b-11194584a57a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Name">
|
||||
<UniqueIdentifier>{f4d24f99-186c-4074-90ef-48a95d74fb47}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn">
|
||||
<UniqueIdentifier>{7a016450-f745-4313-ba9d-781fa5909b76}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_MovePointer">
|
||||
<UniqueIdentifier>{d9382839-c0b8-4b3d-9227-6dcf65fba44f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="80.State\Focus\Slide">
|
||||
<UniqueIdentifier>{eef1db06-8a9f-42b4-93e2-cc29de2b275d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Editor.h">
|
||||
@@ -1218,6 +1236,21 @@
|
||||
<ClInclude Include="..\public\QuestInstance.h">
|
||||
<Filter>50.UI\QuestInstance</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\SpellLearn_Canvas.h">
|
||||
<Filter>50.UI\SpellLearn_Canvas</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\SpellLearn_Panel.h">
|
||||
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\SpellLearn_Name.h">
|
||||
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Name</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\SpellLearn.h">
|
||||
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\SpellLearn_MovePointer.h">
|
||||
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_MovePointer</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Editor.ico">
|
||||
@@ -1828,6 +1861,21 @@
|
||||
<ClCompile Include="..\private\QuestInstance.cpp">
|
||||
<Filter>50.UI\QuestInstance</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\SpellLearn_Canvas.cpp">
|
||||
<Filter>50.UI\SpellLearn_Canvas</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\SpellLearn_Panel.cpp">
|
||||
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\SpellLearn_Name.cpp">
|
||||
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Name</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\SpellLearn.cpp">
|
||||
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\SpellLearn_MovePointer.cpp">
|
||||
<Filter>50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_MovePointer</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Editor.rc">
|
||||
|
||||
@@ -111,6 +111,12 @@
|
||||
|
||||
#include "QuestInstance.h"
|
||||
|
||||
#include "SpellLearn_Canvas.h"
|
||||
#include "SpellLearn_Panel.h"
|
||||
#include "SpellLearn_Name.h"
|
||||
#include "SpellLearn.h"
|
||||
#include "SpellLearn_MovePointer.h"
|
||||
|
||||
#include "IMGUIUI.h"
|
||||
|
||||
#pragma endregion
|
||||
@@ -531,6 +537,22 @@ HRESULT CLoader::Loading_For_UI()
|
||||
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), wstrFileName,
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
||||
});
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Textures/SpellUnlock", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
|
||||
{
|
||||
|
||||
_string strFilePath = pFilePath;
|
||||
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), wstrFileName,
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
|
||||
return E_FAIL;
|
||||
@@ -1184,6 +1206,27 @@ HRESULT CLoader::Loading_For_UI()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CSpellLearn_Canvas>(g_iStaticLevel, CSpellLearn_Canvas::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CSpellLearn_Panel>(g_iStaticLevel, CSpellLearn_Panel::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CSpellLearn_Name>(g_iStaticLevel, CSpellLearn_Name::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CSpellLearn>(g_iStaticLevel, CSpellLearn::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CSpellLearn_MovePointer>(g_iStaticLevel, CSpellLearn_MovePointer::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CIMGUIUI>(g_iStaticLevel, CIMGUIUI::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
@@ -2226,10 +2269,10 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
vector<future<pair<_wstring, CModel*>*>> futures = {};
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_SM_BRR_RaceRing_01_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM_LOCAL, "C:/MeshTable\\Game\\Environment\\BroomFlight\\Meshes\\SM_BRR_RaceRing_01.fbx", XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
//if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_SK_ConjuredDragon_Model"),
|
||||
// CModel::Create(m_pDevice, m_pContext, MODEL::ANIM_LOCAL, "C:/MeshTable\\Game\\RiggedObjects\\Characters\\Creatures\\Dragons\\ConjuredDragon\\SK_ConjuredDragon.fbx", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity())))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
#pragma region BODY
|
||||
|
||||
@@ -2332,6 +2375,11 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
TEXT("Prototype_Component_Dragon_Model")
|
||||
));
|
||||
|
||||
futures.emplace_back(Deferred_ModelLoad(
|
||||
MODEL::ANIM, "../Bin/Resources/Models/Monster/Dragon/Dragon_Anim.fbx", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(),
|
||||
TEXT("Prototype_Component_Dragon_Model")
|
||||
));
|
||||
|
||||
#pragma endregion
|
||||
|
||||
futures.emplace_back(Deferred_ModelLoad(
|
||||
@@ -2359,6 +2407,12 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
TEXT("Prototype_Component_Npc_Model")
|
||||
));
|
||||
|
||||
|
||||
//futures.emplace_back(Deferred_ModelLoad(
|
||||
// MODEL::ANIM, "../Bin/Resources/Models/Monster/Dragon/SK_ConjuredDragon_Anim.fbx", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
|
||||
// TEXT("Prototype_Component_Npc_Model")
|
||||
//));
|
||||
|
||||
futures.emplace_back(Deferred_ModelLoad(
|
||||
MODEL::ANIM, "../Bin/Resources/Models/Object/Wand/Wand.bin",XMMatrixIdentity(),
|
||||
TEXT("Prototype_Component_Wand_Model")
|
||||
|
||||
@@ -0,0 +1,223 @@
|
||||
#include "pch.h"
|
||||
#include "SpellLearn.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CSpellLearn::CSpellLearn(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpellLearn::CSpellLearn(const CSpellLearn& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 600.f;
|
||||
Desc.fY = 0.f;
|
||||
Desc.fSizeX = 550.f;
|
||||
Desc.fSizeY = 550.f;
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 5.f;
|
||||
Visible(false);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpellLearn::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
{
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
}
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta * m_fAlphaTime;;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpellLearn::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_SU_Levioso_Path"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CSpellLearn* CSpellLearn::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpellLearn* pInstance = new CSpellLearn(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpellLearn");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpellLearn::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpellLearn* pInstance = new CSpellLearn(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpell_Header");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpellLearn::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
void CSpellLearn::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
#include "pch.h"
|
||||
#include "UI_Manager.h"
|
||||
#include "SpellLearn_Canvas.h"
|
||||
#include "GameInstance.h"
|
||||
#include "SpellLearn_Panel.h"
|
||||
|
||||
CSpellLearn_Canvas::CSpellLearn_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CCanvasObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpellLearn_Canvas::CSpellLearn_Canvas(const CSpellLearn_Canvas& rhs)
|
||||
:CCanvasObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Canvas::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Canvas::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = 0.f;
|
||||
Desc.fSizeX = 1920.f;
|
||||
Desc.fSizeY = 1080.f;
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Panel(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Visible(false);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpellLearn_Canvas::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_Canvas::Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_Canvas::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible) {
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Canvas::Render()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpellLearn_Canvas::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Canvas::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Canvas::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Canvas::Ready_Panel(void* pArg)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CSpellLearn_Panel**>(&m_pSpellLearn_Panel))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Panel(TEXT("SpellLearn_Panel"), m_pSpellLearn_Panel);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpellLearn_Canvas::Clear_Penel()
|
||||
{
|
||||
}
|
||||
|
||||
CSpellLearn_Canvas* CSpellLearn_Canvas::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpellLearn_Canvas* pInstance = new CSpellLearn_Canvas(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpellLearn_Canvas");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpellLearn_Canvas::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpellLearn_Canvas* pInstance = new CSpellLearn_Canvas(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpellLearn_Canvas");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpellLearn_Canvas::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
void CSpellLearn_Canvas::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,272 @@
|
||||
#include "pch.h"
|
||||
#include "SpellLearn_MovePointer.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CSpellLearn_MovePointer::CSpellLearn_MovePointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpellLearn_MovePointer::CSpellLearn_MovePointer(const CSpellLearn_MovePointer& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_MovePointer::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_MovePointer::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 454.f;
|
||||
Desc.fY = -240.f;
|
||||
Desc.fSizeX = 32.f;
|
||||
Desc.fSizeY = 32.f;
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 5.f;
|
||||
m_fMoveSpeed = 15.f;
|
||||
m_MoveLine.push_back(XMVectorSet(454.f, -240.f, 0.f, 1.f));
|
||||
m_MoveLine.push_back(XMVectorSet(454.f, 90.f, 0.f, 1.f));
|
||||
|
||||
|
||||
|
||||
Index = 0;
|
||||
|
||||
Visible(false);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpellLearn_MovePointer::SpellLearn(_int Index)
|
||||
{
|
||||
m_iSpell = Index;
|
||||
m_bMoveStart = true;
|
||||
}
|
||||
|
||||
void CSpellLearn_MovePointer::Line(_float fTime)
|
||||
{
|
||||
m_vLerp_Position = m_MoveLine[Index];
|
||||
|
||||
if (Start_Lerp(m_fMoveSpeed * fTime) == true)
|
||||
{
|
||||
if (Index < m_MoveLine.size() -1)
|
||||
{
|
||||
++Index;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bMoveStart = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CSpellLearn_MovePointer::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_MovePointer::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
{
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
}
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta * m_fAlphaTime;;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_pGameInstance->Key_Down(DIK_L))
|
||||
{
|
||||
m_bMoveStart = true;
|
||||
}
|
||||
|
||||
if (m_bMoveStart == true)
|
||||
{
|
||||
if (m_iSpell == ENUM_CLASS(SPELL_LINE::LINE))
|
||||
{
|
||||
Line(fTimeDelta);
|
||||
}
|
||||
else if (m_iSpell == ENUM_CLASS(SPELL_LINE::CURVE))
|
||||
{
|
||||
//Curve();
|
||||
}
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_MovePointer::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_MovePointer::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpellLearn_MovePointer::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_MovePointer::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_MovePointer::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_SU_Cursor"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CSpellLearn_MovePointer* CSpellLearn_MovePointer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpellLearn_MovePointer* pInstance = new CSpellLearn_MovePointer(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpellLearn_MovePointer");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpellLearn_MovePointer::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpellLearn_MovePointer* pInstance = new CSpellLearn_MovePointer(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpellLearn_MovePointer");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpellLearn_MovePointer::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
void CSpellLearn_MovePointer::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,243 @@
|
||||
#include "pch.h"
|
||||
#include "SpellLearn_Name.h"
|
||||
|
||||
CSpellLearn_Name::CSpellLearn_Name(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpellLearn_Name::CSpellLearn_Name(const CSpellLearn_Name& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Name::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Name::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 600.f;
|
||||
Desc.fY = 420.f;
|
||||
Desc.fSizeX = 432.f;
|
||||
Desc.fSizeY = 27.f;
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 5.f;
|
||||
m_vNine_Slice = _float4(216.f, 216.f, 0.f, 27.f);
|
||||
m_fFontX = 944.f;
|
||||
m_fFontY = 520.f;
|
||||
SizeUpX(550.f);
|
||||
SizeUpY(27.f);
|
||||
Visible(false);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
void CSpellLearn_Name::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_Name::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
{
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
}
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta * m_fAlphaTime;;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_Name::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Name::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::QUEST_BORDER)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), TEXT("봄바르다")) - 30) * 0.5f;
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("봄바르다"), _float2((m_fFontX + m_fX) - OffSet, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpellLearn_Name::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Name::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fNine_Slice", &m_vNine_Slice, sizeof(_float4))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOrigin_Size", &m_fOrigin_Size, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Name::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_Spell_Name"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CSpellLearn_Name* CSpellLearn_Name::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpellLearn_Name* pInstance = new CSpellLearn_Name(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpellLearn_Name");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpellLearn_Name::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpellLearn_Name* pInstance = new CSpellLearn_Name(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpellLearn_Name");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpellLearn_Name::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
void CSpellLearn_Name::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
#include "pch.h"
|
||||
#include "SpellLearn_Panel.h"
|
||||
#include "GameInstance.h"
|
||||
#include "SpellLearn_Name.h"
|
||||
#include "SpellLearn.h"
|
||||
#include "SpellLearn_MovePointer.h"
|
||||
|
||||
CSpellLearn_Panel::CSpellLearn_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CPanelObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpellLearn_Panel::CSpellLearn_Panel(const CSpellLearn_Panel& rhs)
|
||||
:CPanelObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Panel::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Panel::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 960.f;
|
||||
Desc.fY = -540.f;
|
||||
Desc.fSizeX = g_iWinSizeX;
|
||||
Desc.fSizeY = g_iWinSizeY;
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Element(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
m_fCanvasAlpha = 1.f;
|
||||
m_fSortZ = 0.05f;
|
||||
m_fDelayTime = 1.f;
|
||||
Visible(true);
|
||||
ElementAllVisible(true);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpellLearn_Panel::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_Panel::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpellLearn_Panel::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Panel::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::SPELL_LEARN)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpellLearn_Panel::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Panel::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Panel::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_SpellLearn"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_SpellLinkDivide"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpellLearn_Panel::Ready_Element(void* pArg)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_Name>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_Name**>(&m_pSpellLearn_Name))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("SpellLearn_Name"), m_pSpellLearn_Name);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn**>(&m_pSpellLearn))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("SpellLearn"), m_pSpellLearn);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_MovePointer>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_MovePointer**>(&m_pSpellLearn_MovePointer))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("SpellLearn_MovePointer"), m_pSpellLearn_MovePointer);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CSpellLearn_Panel* CSpellLearn_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpellLearn_Panel* pInstance = new CSpellLearn_Panel(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpellLearn_Panel");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpellLearn_Panel::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpellLearn_Panel* pInstance = new CSpellLearn_Panel(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpellLearn_Panel");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpellLearn_Panel::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom1);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
void CSpellLearn_Panel::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -92,6 +92,7 @@ HRESULT CSpell_Canvas::Ready_Panel(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Panel(TEXT("Spell_Panel"), m_pSpell_Panel);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "GamePlay_Canvas.h"
|
||||
#include "Spell_Canvas.h"
|
||||
#include "Quest_Canvas.h"
|
||||
#include "SpellLearn_Canvas.h"
|
||||
#include "Mouse_Cursor.h"
|
||||
#include "CameraLockOn.h"
|
||||
#include "Loding_Canvas.h"
|
||||
@@ -165,6 +166,11 @@ HRESULT CUI_Manager::Ready_Components(void* pArg)
|
||||
}
|
||||
Add_Canvas(TEXT("Quest_Canves"), m_pQuest_Canves);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpellLearn_Canvas>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CSpellLearn_Canvas**>(&m_pSpellLearn_Canvas)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Canvas(TEXT("SpellLearn_Canvas"), m_pSpellLearn_Canvas);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMouse_Cursor>(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast<CMouse_Cursor**>(&m_pMouse_Cursor)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace Editor
|
||||
REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER,
|
||||
SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN,
|
||||
ENEMY_HPBAR, BOSS_HPBAR, QUEST_BORDER, QUEST_INFO, QUEST_STATUS, BROOMSTICK,
|
||||
SPELL_LEARN,
|
||||
ENEMY_DETECTION, INTERACTION_OBJECT, END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX , DISTORTION ,END };
|
||||
enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, SPELL_LOCK, QUEST_SLOT, END };
|
||||
@@ -58,6 +59,8 @@ namespace Editor
|
||||
END
|
||||
};
|
||||
|
||||
enum class SPELL_LINE { LINE, CURVE };
|
||||
|
||||
enum class BLOOM_TYPE { NONE, BASIC, MULTIPLY, END };
|
||||
|
||||
enum class ELEMENT_INTERACTABLE_ID { BARREL, BOX, END };
|
||||
|
||||
@@ -101,6 +101,7 @@ class CIMGUIUI final : public CGameObject
|
||||
_float2 m_fFontPos {};
|
||||
_float m_fFontX {};
|
||||
_float m_fFontY {};
|
||||
|
||||
public:
|
||||
static CIMGUIUI* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CSpellLearn final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CSpellLearn(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpellLearn(const CSpellLearn& rhs);
|
||||
virtual ~CSpellLearn() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
public:
|
||||
static CSpellLearn* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,48 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "CanvasObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CGameObject;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CSpellLearn_Canvas final : public CCanvasObject
|
||||
{
|
||||
private:
|
||||
CSpellLearn_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpellLearn_Canvas(const CSpellLearn_Canvas& rhs);
|
||||
virtual ~CSpellLearn_Canvas() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Ready_Panel(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
public:
|
||||
void Clear_Penel();
|
||||
|
||||
private:
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
CGameObject* m_pSpellLearn_Panel = { nullptr };
|
||||
|
||||
public:
|
||||
static CSpellLearn_Canvas* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,52 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CSpellLearn_MovePointer final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CSpellLearn_MovePointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpellLearn_MovePointer(const CSpellLearn_MovePointer& rhs);
|
||||
virtual ~CSpellLearn_MovePointer() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
public:
|
||||
void SpellLearn(_int Index);
|
||||
private:
|
||||
void Line(_float fTime);
|
||||
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
_bool m_bMoveStart = { false };
|
||||
_int m_iSpell{};
|
||||
|
||||
_int Index{};
|
||||
vector<_vector> m_MoveLine;
|
||||
|
||||
public:
|
||||
static CSpellLearn_MovePointer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CSpellLearn_Name final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CSpellLearn_Name(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpellLearn_Name(const CSpellLearn_Name& rhs);
|
||||
virtual ~CSpellLearn_Name() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
public:
|
||||
static CSpellLearn_Name* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,51 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "PanelObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CGameObject;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CSpellLearn_Panel final : public CPanelObject
|
||||
{
|
||||
|
||||
private:
|
||||
CSpellLearn_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpellLearn_Panel(const CSpellLearn_Panel& rhs);
|
||||
virtual ~CSpellLearn_Panel() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Ready_Element(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
CGameObject* m_pSpellLearn_Name = { nullptr };
|
||||
CGameObject* m_pSpellLearn = { nullptr };
|
||||
CGameObject* m_pSpellLearn_MovePointer = { nullptr };
|
||||
|
||||
public:
|
||||
static CSpellLearn_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -53,6 +53,7 @@ class CUI_Manager final : public CUIObject
|
||||
CGameObject* m_pSpell_Canvas = { nullptr };
|
||||
CGameObject* m_pLoding_Canvas= { nullptr };
|
||||
CGameObject* m_pQuest_Canves= { nullptr };
|
||||
CGameObject* m_pSpellLearn_Canvas = { nullptr };
|
||||
CGameObject* m_pMouse_Cursor = { nullptr };
|
||||
CGameObject* m_pCamera_LockOn = { nullptr };
|
||||
_bool m_bCanvas_Change = { false };
|
||||
|
||||
@@ -468,42 +468,47 @@ float4 BlendDiffuse(float4 vDiffuseA, Texture2D DiffuseBlendTexture, float2 vTex
|
||||
return lerp(vDiffuseA, vDiffuseBlendColor, fRatio);
|
||||
|
||||
}
|
||||
|
||||
float2 CalcVelocityUV(float4 vCurrentProjPos, float4 vPreviousProjPos)
|
||||
float2 CalcVelocityUV(float4 vCurrentProjPos, float4 vPreviousProjPos, float fIntensity = 1.f)
|
||||
{
|
||||
if (vCurrentProjPos.w <= FLT_EPSILON5 || vPreviousProjPos.w <= FLT_EPSILON5) {
|
||||
return float2(0.0f, 0.0f);
|
||||
if (vCurrentProjPos.w <= FLT_EPSILON5 || vPreviousProjPos.w <= FLT_EPSILON5)
|
||||
{
|
||||
return float2(0.5f, 0.5f);
|
||||
}
|
||||
|
||||
float2 currentUV = (vCurrentProjPos.xy/vCurrentProjPos.w);
|
||||
float2 previousUV = (vPreviousProjPos.xy / vCurrentProjPos.w);
|
||||
float2 currentNDC = vCurrentProjPos.xy / vCurrentProjPos.w;
|
||||
float2 previousNDC = vPreviousProjPos.xy / vPreviousProjPos.w;
|
||||
|
||||
currentUV.y *= -1.f;
|
||||
previousUV.y *= -1.f;
|
||||
currentNDC.y *= -1.f;
|
||||
previousNDC.y *= -1.f;
|
||||
|
||||
return currentUV - previousUV;
|
||||
// UV 델타
|
||||
float2 velocityUV = (currentNDC - previousNDC) * 0.5f;
|
||||
velocityUV *= fIntensity;
|
||||
velocityUV = clamp(velocityUV, -1.0f, 1.0f);
|
||||
|
||||
return velocityUV * 0.5f + 0.5f; // 0 속도 -> 0.5
|
||||
}
|
||||
|
||||
float3 DownSampleFast(Texture2D SrcTexture2D, float2 vCenterTexcoord, float2 vSrcTexelSize, float2 vResolution)
|
||||
{
|
||||
float2 uv = float2(0.f, 0.f);
|
||||
float3 vCenterColor = SrcTexture2D.SampleLevel(BorderZeroSampler, uv, 0);
|
||||
float3 vCenterColor = SrcTexture2D.SampleLevel(BorderZeroSampler, vCenterTexcoord, 0);
|
||||
uv = vCenterTexcoord + vSrcTexelSize * float2(-1.0, -1.0);
|
||||
float3 fLTColor = BilinearFetches(vResolution, SrcTexture2D, uv, BorderZeroLinearSampler);
|
||||
float3 fLTColor = BilinearFetches(vResolution, SrcTexture2D, uv, BorderZeroSampler);
|
||||
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);
|
||||
float3 fRTColor = BilinearFetches(vResolution, SrcTexture2D, uv, BorderZeroSampler);
|
||||
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);
|
||||
float3 fLBColor = BilinearFetches(vResolution, SrcTexture2D, uv, BorderZeroSampler);
|
||||
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);
|
||||
float3 fRBColor = BilinearFetches(vResolution, SrcTexture2D, uv, BorderZeroSampler);
|
||||
|
||||
return vCenterColor * 0.25f + (fLTColor + fRTColor + fLBColor + fRBColor) * 0.0625f + (fTColor + fLColor + fRColor + fBColor) * 0.125f;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,13 @@ sampler ClampSampler = sampler_state
|
||||
AddressV = clamp;
|
||||
};
|
||||
|
||||
sampler ClampLinearSampler = sampler_state
|
||||
{
|
||||
Filter = MIN_MAG_MIP_LINEAR;
|
||||
AddressU = clamp;
|
||||
AddressV = clamp;
|
||||
};
|
||||
|
||||
sampler MirrorSampler = sampler_state
|
||||
{
|
||||
Filter = MIN_MAG_MIP_LINEAR;
|
||||
|
||||
@@ -14,9 +14,12 @@ float g_fShadowFar_MIDDDLE;
|
||||
float g_fShadowFar_FAR;
|
||||
float g_fCascadeSplitRatioNear;
|
||||
float g_fCascadeSplitRatioFar;
|
||||
uint g_iMaxShadowWidth;
|
||||
uint g_iMaxShadowHeight;
|
||||
float2 g_vNearShadowResolution;
|
||||
float2 g_vMiddleShadowResolution;
|
||||
float2 g_vFarShadowResolution;
|
||||
float2 g_vPreShadowResolution;
|
||||
float2 g_vResolution;
|
||||
float2 g_vSrcResolution;
|
||||
float4 g_vShadowBias;
|
||||
|
||||
uint g_iBloomEmbossingPass;
|
||||
@@ -60,7 +63,6 @@ Texture2D g_DepthTexture;
|
||||
Texture2D g_SpecularTexture;
|
||||
Texture2D g_ShadowNearTexture;
|
||||
Texture2D g_ShadowMiddleTexture;
|
||||
Texture2D g_ShadowFarTexture;
|
||||
Texture2D g_PreShadowTexture;
|
||||
Texture2D g_BlurTexture;
|
||||
Texture2D g_BlurXTexture;
|
||||
@@ -73,10 +75,14 @@ Texture2D g_OriginalTexture;
|
||||
|
||||
Texture2D g_ColorTexture;
|
||||
Texture2D g_VelocityTexture;
|
||||
Texture2D g_TileVelocityTexture;
|
||||
|
||||
int g_iMBSampleCount;
|
||||
int g_fMBBlurRadius;
|
||||
float g_iMBType;
|
||||
int g_iMBMaxSampleCount;
|
||||
float g_fMBBlurRadius;
|
||||
int g_iMBType;
|
||||
int g_iMBTileSize;
|
||||
float g_fMBSampleBias;
|
||||
|
||||
vector g_vLightDiffuse;
|
||||
vector g_vLightAmbient;
|
||||
@@ -147,6 +153,11 @@ struct VS_OUT
|
||||
struct PS_OUT_VELOCITYBLUR
|
||||
{
|
||||
float4 vColor : SV_TARGET0;
|
||||
float2 vVelocity : SV_TARGET1;
|
||||
};
|
||||
struct PS_OUT_VELOCITYTILE
|
||||
{
|
||||
float2 vVelocity : SV_TARGET0;
|
||||
};
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
@@ -227,25 +238,178 @@ struct PS_OUT_SSAO_BLUR
|
||||
// g_ColorTexture;
|
||||
// g_DepthTexture;
|
||||
// g_VelocityTexture;
|
||||
// g_DiffuseTexture;
|
||||
// g_fFar
|
||||
// g_fMBSampleBias
|
||||
// g_fMBBlurRadius
|
||||
// g_iMBType
|
||||
// g_iMBSampleCount
|
||||
PS_OUT_VELOCITYBLUR PS_MOTIONBLUR_X(PS_IN In)
|
||||
// g_iMBMaxSampleCount
|
||||
// g_iMBType
|
||||
PS_OUT_VELOCITYBLUR PS_MOTIONBLUR(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);
|
||||
PS_OUT_VELOCITYBLUR Out = (PS_OUT_VELOCITYBLUR) 0;
|
||||
|
||||
//for (int i = -g_iMBSampleCount; i < g_iMBSampleCount; ++i)
|
||||
//{
|
||||
// vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x;
|
||||
// vTexcoord.y = In.vTexcoord.y;
|
||||
float2 vCenterUV = In.vTexcoord;
|
||||
float2 vFullResolutionTexelSize = 1.f / g_vResolution;
|
||||
float fCenterDepth = g_DepthTexture.Sample(PointSampler, vCenterUV).y;
|
||||
float2 vCenterVelo = g_VelocityTexture.Sample(PointSampler, vCenterUV).xy * 2.f - 1.f; // 0~1 -> -1~+1
|
||||
float2 vCenterVeloPixel = vCenterVelo * g_vResolution.xy;
|
||||
bool bBorrowedVelocityFromTile = false;
|
||||
|
||||
float2 vBlurVelo = vCenterVelo;
|
||||
float2 vBlurVeloPixel = vCenterVeloPixel;
|
||||
if (length(vBlurVeloPixel) < 0.5f) {
|
||||
vBlurVelo = g_TileVelocityTexture.Sample(PointSampler, vCenterUV).xy * 2.f - 1.f;
|
||||
vBlurVeloPixel = vBlurVelo * g_vResolution.xy;
|
||||
bBorrowedVelocityFromTile = true;
|
||||
}
|
||||
|
||||
if (length(vBlurVeloPixel) < 0.5f) {
|
||||
Out.vColor = g_ColorTexture.Sample(ClampLinearSampler, vCenterUV);
|
||||
Out.vVelocity = float2(0.5f, 0.5f);
|
||||
return Out;
|
||||
}
|
||||
|
||||
float2 vBlurDirPixel = (vBlurVeloPixel / max(length(vBlurVeloPixel), FLT_EPSILON5));
|
||||
int iMaxRadius = min(g_iMBSampleCount, g_iMBMaxSampleCount);
|
||||
|
||||
// 샘플링 당 이동 픽셀
|
||||
float fSamplePixelSpeed = g_fMBBlurRadius / max((float) iMaxRadius, 1.f);
|
||||
|
||||
// 샘플유닛의 크기
|
||||
float fScalePixelToSampleUnit = (float) iMaxRadius / max(g_fMBBlurRadius, FLT_EPSILON5);
|
||||
float fScaleDepth = 0.5f / max(g_fMBSampleBias, FLT_EPSILON5);
|
||||
float4 vAccColorSum = float4(0.f, 0.f, 0.f, 0.f);
|
||||
float2 vAccVeloSum = float2(0.f, 0.f);
|
||||
float fAccWeight = 0.f;
|
||||
|
||||
// 센터의 스프레드 길이
|
||||
float2 vReferenceVelocityPixel = vCenterVeloPixel;
|
||||
if (true == bBorrowedVelocityFromTile)
|
||||
{
|
||||
vReferenceVelocityPixel = vBlurVeloPixel;
|
||||
}
|
||||
float fCenterSpreadLengthPixel = clamp(abs(dot(vReferenceVelocityPixel, vBlurDirPixel)), 0.f, g_fMBBlurRadius);
|
||||
|
||||
[loop]
|
||||
for (int iInterval = -iMaxRadius; iInterval <= iMaxRadius; ++iInterval) {
|
||||
float fOffset = (float) abs(iInterval);
|
||||
float2 vOffsetPixel = vBlurDirPixel * ((float) iInterval * fSamplePixelSpeed);
|
||||
float2 vSamplingUV = vCenterUV + vOffsetPixel * vFullResolutionTexelSize;
|
||||
if (false == IsValidUV(vSamplingUV)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
float fSampledDepth = g_DepthTexture.Sample(PointSampler, vSamplingUV).y;
|
||||
float2 vSampledVelo = g_VelocityTexture.Sample(PointSampler, vSamplingUV).xy * 2.f - 1.f;
|
||||
float2 vSampledVeloPixel = vSampledVelo * g_vResolution.xy;
|
||||
|
||||
// 샘플의 스프레드 길이
|
||||
float fBlurSampleAccurate = abs(dot(vSampledVeloPixel, vBlurDirPixel));
|
||||
float fSampleSpreadLengthPixel = clamp(fBlurSampleAccurate, 0.f, g_fMBBlurRadius);
|
||||
if (true == bBorrowedVelocityFromTile)
|
||||
{
|
||||
fSampleSpreadLengthPixel = max(fSampleSpreadLengthPixel, fCenterSpreadLengthPixel);
|
||||
}
|
||||
|
||||
// 샘플과 센터의 (깊이테스트 + 스프레드테스트)
|
||||
float fWeightCalculated = SampleWeight(fCenterDepth, fSampledDepth, fOffset, fCenterSpreadLengthPixel, fSampleSpreadLengthPixel, fScalePixelToSampleUnit, fScaleDepth);
|
||||
|
||||
// vColor += g_fWeights_32[i + 15] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
||||
//}
|
||||
if (fWeightCalculated <= 0.f) {
|
||||
continue;
|
||||
}
|
||||
|
||||
float4 vSampledColor = g_ColorTexture.Sample(ClampLinearSampler, vSamplingUV);
|
||||
vAccColorSum += vSampledColor * fWeightCalculated;
|
||||
vAccVeloSum += vSampledVelo * fWeightCalculated;
|
||||
fAccWeight += fWeightCalculated;
|
||||
}
|
||||
float4 vBlurredColor = vAccColorSum / max(fAccWeight, FLT_EPSILON5);
|
||||
float2 vBlurredVelo = vAccVeloSum / max(fAccWeight, FLT_EPSILON5);
|
||||
Out.vColor = vBlurredColor;
|
||||
Out.vVelocity = vBlurredVelo * 0.5f + 0.5f;
|
||||
return Out;
|
||||
}
|
||||
PS_OUT_VELOCITYTILE PS_MOTIONBLUR_TILESAMPLE(PS_IN In)
|
||||
{
|
||||
PS_OUT_VELOCITYTILE Out = (PS_OUT_VELOCITYTILE) 0;
|
||||
|
||||
float2 uv = In.vTexcoord;
|
||||
float2 vSrcTexelSize = float2(1.f / g_vSrcResolution.x, 1.f / g_vSrcResolution.y);
|
||||
|
||||
int2 vTilePixelIndex = int2(uv * g_vResolution);
|
||||
vTilePixelIndex = clamp(vTilePixelIndex, int2(0, 0), int2(g_vResolution) - 1);
|
||||
|
||||
int2 vTileStartSourcePixel = vTilePixelIndex * g_iMBTileSize;
|
||||
|
||||
float2 vMaxVel = float2(0.5f, 0.5f);
|
||||
float fMaxSpeed = 0.f;
|
||||
float2 vSampleVel;
|
||||
float2 vSampleUV;
|
||||
float2 vSampleDiff;
|
||||
float fSampleSpeed;
|
||||
|
||||
[loop]
|
||||
for (int iY = 0; iY < g_iMBTileSize; ++iY)
|
||||
{
|
||||
[loop]
|
||||
for (int iX = 0; iX < g_iMBTileSize; ++iX)
|
||||
{
|
||||
int2 vSourcePixel = vTileStartSourcePixel + int2(iX, iY);
|
||||
|
||||
if (vSourcePixel.x < 0 || vSourcePixel.y < 0 || vSourcePixel.x >= (int) g_vSrcResolution.x || vSourcePixel.y >= (int) g_vSrcResolution.y)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
float2 vSourceUV = (float2(vSourcePixel) + 0.5f) * vSrcTexelSize;
|
||||
|
||||
vSampleVel = g_VelocityTexture.SampleLevel(ClampSampler, vSourceUV, 0).xy;
|
||||
|
||||
vSampleUV = vSampleVel * 2.0f - 1.0f;
|
||||
|
||||
fSampleSpeed = length(vSampleUV * g_vSrcResolution);
|
||||
|
||||
if (fSampleSpeed > fMaxSpeed)
|
||||
{
|
||||
fMaxSpeed = fSampleSpeed;
|
||||
vMaxVel = vSampleVel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Out.vVelocity = vMaxVel;
|
||||
return Out;
|
||||
}
|
||||
PS_OUT_VELOCITYTILE PS_MOTIONBLUR_TENTSAMPLE(PS_IN In)
|
||||
{
|
||||
PS_OUT_VELOCITYTILE Out = (PS_OUT_VELOCITYTILE) 0;
|
||||
|
||||
float2 uv = In.vTexcoord;
|
||||
float2 vSrcTexelSize = float2(1.f / g_vResolution.x, 1.f / g_vResolution.y);
|
||||
float2 vMaxVel = float2(0.5f, 0.5f);
|
||||
float vMaxSpeed = 0.f;
|
||||
float2 vSampleVel;
|
||||
float2 vSampleUV;
|
||||
float2 vSampleDiff;
|
||||
float fSampleSpeed;
|
||||
|
||||
for (int i = -1; i <= 1; ++i)
|
||||
{
|
||||
for (int j = -1; j <= 1; ++j)
|
||||
{
|
||||
vSampleUV.x = uv.x + vSrcTexelSize.x * i;
|
||||
vSampleUV.y = uv.y + vSrcTexelSize.y * j;
|
||||
vSampleVel = g_VelocityTexture.Sample(ClampSampler, vSampleUV);
|
||||
vSampleDiff = vSampleVel *2.f - 1.f;
|
||||
fSampleSpeed = length(vSampleDiff * g_vResolution * g_iMBTileSize);
|
||||
if (fSampleSpeed > vMaxSpeed) {
|
||||
vMaxSpeed = fSampleSpeed;
|
||||
vMaxVel = vSampleVel;
|
||||
}
|
||||
}
|
||||
}
|
||||
Out.vVelocity = vMaxVel;
|
||||
return Out;
|
||||
}
|
||||
PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
|
||||
@@ -641,10 +805,9 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
||||
vPreShadowPosition = mul(vPreShadowPosition, g_PreShadowLightProjMatrix);
|
||||
}
|
||||
/* 광원의 NDC에서 샘플링 */
|
||||
float fVisibility_Dynamic_Near = ShadowVisibility_hwPCF(g_ShadowNearTexture, vNearShadowPos, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), g_vShadowBias.x);
|
||||
float fVisibility_Dynamic_Middle = ShadowVisibility_hwPCF(g_ShadowMiddleTexture, vMiddleShadowPos, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), g_vShadowBias.y);
|
||||
//float fVisibility_Dynamic_Far = ShadowVisibility_hwPCF(g_ShadowFarTexture, vFarShadowPos, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), g_vShadowBias.z);
|
||||
float fVisibility_Static = ShadowVisibility_hwPCF(g_PreShadowTexture, vPreShadowPosition, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), g_vShadowBias.w);
|
||||
float fVisibility_Dynamic_Near = ShadowVisibility_hwPCF(g_ShadowNearTexture, vNearShadowPos, g_vNearShadowResolution, g_vShadowBias.x);
|
||||
float fVisibility_Dynamic_Middle = ShadowVisibility_hwPCF(g_ShadowMiddleTexture, vMiddleShadowPos, g_vMiddleShadowResolution, g_vShadowBias.y);
|
||||
float fVisibility_Static = ShadowVisibility_hwPCF(g_PreShadowTexture, vPreShadowPosition, g_vPreShadowResolution, g_vShadowBias.w);
|
||||
|
||||
////////////////////////////
|
||||
// 케스케이드
|
||||
@@ -661,9 +824,6 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
||||
|
||||
// Near -> Middle
|
||||
float fVisibilityDynamic = lerp(fVisibility_Dynamic_Near, fVisibility_Dynamic_Middle, fCascadeBlend_NearToMiddle);
|
||||
// Middle -> Far 경계 부드럽게
|
||||
//fVisibilityDynamic = lerp(fVisibilityDynamic, fVisibility_Dynamic_Far, fCascadeBlend_MiddleToFar);
|
||||
|
||||
|
||||
// 1번째 방법
|
||||
// Dynamic->Static 부드럽게 전환
|
||||
@@ -794,11 +954,11 @@ PS_OUT_FLT4_SINGLE PS_MAIN_EMBOSS(PS_IN In)
|
||||
{
|
||||
PS_OUT_FLT4_SINGLE Out;
|
||||
float2 uv = In.vTexcoord;
|
||||
float4 fSrcAlpha = g_DiffuseTexture.Sample(PointSampler, uv);
|
||||
float2 vSrcTexelSize = float2(1.f / g_vResolution.x, 1.f / g_vResolution.y);
|
||||
float fSrcAlpha = g_DiffuseTexture.Sample(PointSampler, uv).a;
|
||||
float2 vSrcTexelSize = float2(1.f / g_vSrcResolution.x, 1.f / g_vSrcResolution.y);
|
||||
float3 vColor = (0.f, 0.f, 0.f);
|
||||
|
||||
vColor = DownSampleFast(g_DiffuseTexture, In.vTexcoord, vSrcTexelSize, g_vResolution);
|
||||
vColor = DownSampleFast(g_DiffuseTexture, In.vTexcoord, vSrcTexelSize, g_vSrcResolution);
|
||||
|
||||
float fIntensity = dot(vColor, float3(0.2126f, 0.7152f, 0.0722f));
|
||||
fIntensity = max(FLT_EPSILON3, fIntensity);
|
||||
@@ -806,7 +966,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_EMBOSS(PS_IN In)
|
||||
|
||||
float fBloomIntensity = GetBloomCurve(fIntensity, g_fBloomThreshold, g_iBloomEmbossingPass);
|
||||
float3 bloomColor = (vColor * fBloomIntensity) / fIntensity;
|
||||
Out.vFirstTarget = fSrcAlpha;
|
||||
Out.vFirstTarget = float4(bloomColor, fSrcAlpha);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -815,13 +975,13 @@ 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);
|
||||
float fSrcAlpha = g_DiffuseTexture.SampleLevel(BorderZeroSampler, uv, 0).a;
|
||||
float2 vSrcTexelSize = float2(1.f / g_vSrcResolution.x, 1.f / g_vSrcResolution.y);
|
||||
float3 vColor = (0.f, 0.f, 0.f);
|
||||
|
||||
vColor = DownSampleFast(g_DiffuseTexture, In.vTexcoord, vSrcTexelSize, g_vResolution);
|
||||
vColor = DownSampleFast(g_DiffuseTexture, In.vTexcoord, vSrcTexelSize, g_vSrcResolution);
|
||||
|
||||
Out.vFirstTarget = float4(vColor, 1.f);
|
||||
Out.vFirstTarget = float4(vColor, fSrcAlpha);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -1394,7 +1554,7 @@ technique11 DefaultTechnique
|
||||
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();
|
||||
PixelShader = compile ps_5_0 PS_MOTIONBLUR();
|
||||
}
|
||||
pass DownSamplePass // 19
|
||||
{
|
||||
@@ -1405,5 +1565,22 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN_DOWNSAMPLE();
|
||||
}
|
||||
|
||||
pass MotionBlurTileSamplePass // 20
|
||||
{
|
||||
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_MOTIONBLUR_TILESAMPLE();
|
||||
}
|
||||
pass MotionBlurTentSamplePass // 21
|
||||
{
|
||||
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_MOTIONBLUR_TENTSAMPLE();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,6 +215,15 @@ void SampleLocalTRS_Cur(uint bone, float t, out float3 S, out float4 R, out floa
|
||||
DecomposeAffine_RowMajor(g_BoneLocalBuffer[bone].BoneLocal, S, R, T);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ch.KeyCount < 2)
|
||||
{
|
||||
KeyFrame k = g_KeyFrameBuffer[ch.StartIndex];
|
||||
S = k.vScale;
|
||||
T = k.vTranslation;
|
||||
R = QuatNormalize(k.vRotation);
|
||||
return;
|
||||
}
|
||||
|
||||
uint idx0 = FindKeyIndexCur(ch.StartIndex, ch.KeyCount, t);
|
||||
uint idx1 = idx0 + 1;
|
||||
@@ -239,6 +248,15 @@ void SampleLocalTRS_Prev(uint bone, float t, out float3 S, out float4 R, out flo
|
||||
DecomposeAffine_RowMajor(g_BoneLocalBuffer[bone].BoneLocal, S, R, T);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ch.KeyCount < 2)
|
||||
{
|
||||
KeyFrame k = g_KeyFrameBuffer[ch.StartIndex];
|
||||
S = k.vScale;
|
||||
T = k.vTranslation;
|
||||
R = QuatNormalize(k.vRotation);
|
||||
return;
|
||||
}
|
||||
|
||||
uint idx0 = FindKeyIndexPrev(ch.StartIndex, ch.KeyCount, t);
|
||||
uint idx1 = idx0 + 1;
|
||||
@@ -256,6 +274,20 @@ void SampleLocalTRS_Prev(uint bone, float t, out float3 S, out float4 R, out flo
|
||||
|
||||
row_major float4x4 SampleBlendedLocal(uint bone)
|
||||
{
|
||||
if (PrevAnimIndex == 0xFFFFFFFFu)
|
||||
{
|
||||
float3 S;
|
||||
float4 R;
|
||||
float3 T;
|
||||
SampleLocalTRS_Cur(bone, CurrentTime, S, R, T);
|
||||
if ((int) bone == RootBoneIndex)
|
||||
{
|
||||
T = 0;
|
||||
R = RootInitRot;
|
||||
}
|
||||
return MakeAffine(S, R, T);
|
||||
}
|
||||
|
||||
if (CurrentAnimIndex == PrevAnimIndex)
|
||||
{
|
||||
float3 S;
|
||||
|
||||
@@ -39,19 +39,19 @@ void CS_MAIN(uint3 DTid : SV_DispatchThreadID)
|
||||
|
||||
uint global = g_BoneRemap[local];
|
||||
|
||||
row_major float4x4 combined = g_LocalMatIn[global];
|
||||
float4x4 combined = g_LocalMatIn[global];
|
||||
|
||||
int p = g_ParentBuffer[global];
|
||||
while (p != -1)
|
||||
{
|
||||
combined = mul(combined, g_LocalMatIn[(uint) p]);
|
||||
p = g_ParentBuffer[(uint) p];
|
||||
combined = mul(combined,g_LocalMatIn[p]);
|
||||
p = g_ParentBuffer[p];
|
||||
}
|
||||
|
||||
combined = mul(combined, PreTransformMatrix);
|
||||
|
||||
g_LocalPosOutput[local].Combined = combined;
|
||||
g_LocalPosOutput[local].LocalCombined = combined;
|
||||
|
||||
|
||||
g_LocalPosOutput[local].Local = g_LocalMatIn[global];
|
||||
g_LocalPosOutput[local].LocalCombined = combined;
|
||||
g_LocalPosOutput[local].Combined = combined;
|
||||
|
||||
}
|
||||
|
||||
@@ -182,6 +182,7 @@ call Update_Lib.bat
|
||||
<ClCompile Include="..\Private\Bounding_AABB.cpp" />
|
||||
<ClCompile Include="..\Private\Bounding_OBB.cpp" />
|
||||
<ClCompile Include="..\Private\Bounding_Sphere.cpp" />
|
||||
<ClCompile Include="..\Private\CallBack_QueryFilterCallback.cpp" />
|
||||
<ClCompile Include="..\Private\Camera.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
</ExcludedFromBuild>
|
||||
@@ -214,6 +215,7 @@ call Update_Lib.bat
|
||||
<ClCompile Include="..\private\OcclusionQuery.cpp" />
|
||||
<ClCompile Include="..\private\Quest.cpp" />
|
||||
<ClCompile Include="..\Private\Renderer_Declare.cpp" />
|
||||
<ClCompile Include="..\Private\RenderEventDebugger.cpp" />
|
||||
<ClCompile Include="..\private\Resource_Manager.cpp" />
|
||||
<ClCompile Include="..\Private\RigidBody_Dynamic_Joint.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
@@ -328,14 +330,6 @@ call Update_Lib.bat
|
||||
<ClCompile Include="..\Private\VIBuffer_Rect.cpp" />
|
||||
<ClCompile Include="..\private\VIBuffer_UI_Instance.cpp" />
|
||||
<ClCompile Include="..\Private\VIBuffer_Terrain.cpp" />
|
||||
<ClCompile Include="..\Public\NCallBack_Playable_Behavior.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Public\NCallBack_Playable_HitRepot.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Public\Animation.h" />
|
||||
@@ -429,6 +423,7 @@ call Update_Lib.bat
|
||||
<ClInclude Include="..\Public\Bounding_AABB.h" />
|
||||
<ClInclude Include="..\Public\Bounding_OBB.h" />
|
||||
<ClInclude Include="..\Public\Bounding_Sphere.h" />
|
||||
<ClInclude Include="..\Public\CallBack_QueryFilterCallback.h" />
|
||||
<ClInclude Include="..\public\Fog.h" />
|
||||
<ClInclude Include="..\public\Font.h" />
|
||||
<ClInclude Include="..\public\Font_Manager.h" />
|
||||
@@ -436,19 +431,12 @@ call Update_Lib.bat
|
||||
<ClInclude Include="..\public\QuadTree.h" />
|
||||
<ClInclude Include="..\public\OcclusionQuery.h" />
|
||||
<ClInclude Include="..\public\Quest.h" />
|
||||
<ClInclude Include="..\Public\RenderEventDebugger.h" />
|
||||
<ClInclude Include="..\public\Resource_Manager.h" />
|
||||
<ClInclude Include="..\Public\RigidBody_Dynamic_Joint.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\NCallBack_Playable_Behavior.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\NCallBack_Playable_HitRepot.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Camera.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
</ExcludedFromBuild>
|
||||
|
||||
@@ -307,6 +307,9 @@
|
||||
<Filter Include="02.Element\01.GameObject\51.Quest">
|
||||
<UniqueIdentifier>{5e5c6c23-470f-4e7a-93e0-303e5171f4fd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Utility\01.Renderer\RenderEventDebugger">
|
||||
<UniqueIdentifier>{fd18d84d-d656-4dbd-9859-436191a27b91}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Base.cpp">
|
||||
@@ -522,12 +525,6 @@
|
||||
<ClCompile Include="..\Private\RigidBody.cpp">
|
||||
<Filter>02.Element\02.Component\07.RigidBody</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Public\NCallBack_Playable_HitRepot.cpp">
|
||||
<Filter>02.Element\02.Component\08.Character_Controller\CallBack</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Public\NCallBack_Playable_Behavior.cpp">
|
||||
<Filter>02.Element\02.Component\08.Character_Controller\CallBack</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\FSM.cpp">
|
||||
<Filter>02.Element\02.Component\10.FSM</Filter>
|
||||
</ClCompile>
|
||||
@@ -588,6 +585,12 @@
|
||||
<ClCompile Include="..\private\Quest.cpp">
|
||||
<Filter>02.Element\01.GameObject\51.Quest</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\RenderEventDebugger.cpp">
|
||||
<Filter>01.Utility\01.Renderer\RenderEventDebugger</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\CallBack_QueryFilterCallback.cpp">
|
||||
<Filter>02.Element\02.Component\08.Character_Controller\CallBack</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Public\Base.h">
|
||||
@@ -1166,12 +1169,6 @@
|
||||
<ClInclude Include="..\Public\RigidBody_Dynamic.h">
|
||||
<Filter>02.Element\02.Component\07.RigidBody\10.Dynamic</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\NCallBack_Playable_HitRepot.h">
|
||||
<Filter>02.Element\02.Component\08.Character_Controller\CallBack</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\NCallBack_Playable_Behavior.h">
|
||||
<Filter>02.Element\02.Component\08.Character_Controller\CallBack</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\FSM.h">
|
||||
<Filter>02.Element\02.Component\10.FSM</Filter>
|
||||
</ClInclude>
|
||||
@@ -1235,6 +1232,12 @@
|
||||
<ClInclude Include="..\public\Quest.h">
|
||||
<Filter>02.Element\01.GameObject\51.Quest</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\RenderEventDebugger.h">
|
||||
<Filter>01.Utility\01.Renderer\RenderEventDebugger</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\CallBack_QueryFilterCallback.h">
|
||||
<Filter>02.Element\02.Component\08.Character_Controller\CallBack</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\Public\Assimp\color4.inl">
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
#include "pch.h"
|
||||
#include "CallBack_QueryFilterCallback.h"
|
||||
@@ -2,6 +2,8 @@
|
||||
#include "Character_Controller.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CPhysX_CctQueryFilterCallback CCharacter_Controller::s_QueryFilterCallback_IGNORE_Shield = {};
|
||||
|
||||
CCharacter_Controller::CCharacter_Controller(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CComponent{ pDevice, pContext }
|
||||
{
|
||||
@@ -248,6 +250,7 @@ void CCharacter_Controller::Move(_float fTimeDelta)
|
||||
PSX::PxVec3 pxVecMomentum = {}; // 순간 이동량
|
||||
_float fMinimumDistant = FLT_EPSILON3; // 이동량 오차 허용치, ( 크면 클수록 이동이 더 일찍 끝난다, 순간 이동량보다 같거나 더 크면 안움직일듯? )
|
||||
PSX::PxControllerFilters pxFilter = {}; // 충돌 대상 필터
|
||||
pxFilter.mFilterCallback = &s_QueryFilterCallback_IGNORE_Shield; // 쉴드 무시
|
||||
const PSX::PxObstacleContext* pPxObstacles = { nullptr }; // 캐릭터가 충돌해야할 추가적인 장애물 객체?, 닿은 장애물은 캐시된다?
|
||||
if (true == m_bGravity) {
|
||||
if (0 >= m_iIsOnGround) { // 공중: 무조건 중력
|
||||
|
||||
@@ -130,7 +130,7 @@ _float CElementObject::Get_Nine_Slice_Bottom()
|
||||
return m_vNine_Slice.w;
|
||||
}
|
||||
|
||||
void CElementObject::Start_Lerp(_float fTimeDelta)
|
||||
_bool CElementObject::Start_Lerp(_float fTimeDelta)
|
||||
{
|
||||
_vector Pos = m_fCurrent_Position;
|
||||
|
||||
@@ -146,7 +146,7 @@ void CElementObject::Start_Lerp(_float fTimeDelta)
|
||||
{
|
||||
m_fX = m_vLerp_Position.m128_f32[0];
|
||||
m_fY = m_vLerp_Position.m128_f32[1];
|
||||
m_bLerpOn = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
else
|
||||
@@ -154,6 +154,7 @@ void CElementObject::Start_Lerp(_float fTimeDelta)
|
||||
XMVECTOR DirNorm = XMVector3Normalize(Dir);
|
||||
m_fX = (Pos + DirNorm * move).m128_f32[0];
|
||||
m_fY = (Pos + DirNorm * move).m128_f32[1];
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -860,13 +860,17 @@ HRESULT CGameInstance::Bind_RenderTarget(const _wstring& strTargetTag, CShader*
|
||||
return m_pRenderTarget_Manager->Bind_RenderTarget(strTargetTag, pShader, pConstantName);
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Copy_RenderTargetTo(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D)
|
||||
HRESULT CGameInstance::Copy_RenderTargetTo(const _wstring& strSrcTag, ID3D11Texture2D* pDst2D)
|
||||
{
|
||||
return m_pRenderTarget_Manager->Copy_RenderTargetTo(strTargetTag, pTexture2D);
|
||||
return m_pRenderTarget_Manager->Copy_RenderTargetTo(strSrcTag, pDst2D);
|
||||
}
|
||||
HRESULT CGameInstance::Copy_RenderTargetFrom(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D)
|
||||
HRESULT CGameInstance::Copy_RenderTargetFrom(const _wstring& strDstTag, ID3D11Texture2D* pSrc2D)
|
||||
{
|
||||
return m_pRenderTarget_Manager->Copy_RenderTargetFrom(strTargetTag, pTexture2D);
|
||||
return m_pRenderTarget_Manager->Copy_RenderTargetFrom(strDstTag, pSrc2D);
|
||||
}
|
||||
HRESULT CGameInstance::Copy_RenderTargetAToB(const _wstring& strATag, const _wstring& strBTag)
|
||||
{
|
||||
return m_pRenderTarget_Manager->Copy_RenderTargetAToB(strATag, strBTag);
|
||||
}
|
||||
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)
|
||||
{
|
||||
@@ -884,6 +888,10 @@ HRESULT CGameInstance::Bind_CS_RenderTarget(_uint iIndex, const _wstring& strTar
|
||||
{
|
||||
return m_pRenderTarget_Manager->Bind_CS_RenderTarget(iIndex, strTargetTag);
|
||||
}
|
||||
_float2 CGameInstance::Get_RenderTargetSize(const _wstring& wstrTargetKey)
|
||||
{
|
||||
return m_pRenderTarget_Manager->Get_RenderTargetSize(wstrTargetKey);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
void CGameInstance::RenderTarget_Debuger()
|
||||
{
|
||||
@@ -948,7 +956,7 @@ void CGameInstance::Add_ModelToMap(const _char* filePath, CModel* pModel)
|
||||
}
|
||||
#endif
|
||||
|
||||
void CGameInstance::Add_SaveModel(const _char* filePath, SaveModel sModel)
|
||||
void CGameInstance::Add_SaveModel(const _char* filePath, SaveModel& sModel)
|
||||
{
|
||||
lock_guard<mutex> lock(m_mtxLoadModelLock);
|
||||
m_sModelMap[filePath] = sModel;
|
||||
|
||||
@@ -108,7 +108,8 @@ void CGameObject::Set_Shadow(pair<_bool, _ubyte> shadowResult)
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::SHADOW_MIDDLE, this);
|
||||
}
|
||||
if (0 < (m_iShadow & (_ubyte)SHADOW::SHADOW_FAR)) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::SHADOW_FAR, this);
|
||||
m_iShadow = 0;
|
||||
assert(false); // 지금은 Shadow_Far 미사용
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -23,7 +23,7 @@ HRESULT CMesh::Bind_BoneMatrices(const vector<class CBone*>& Bones, CShader* pSh
|
||||
|
||||
for (size_t i = 0; i < m_iNumBones; ++i) {
|
||||
XMStoreFloat4x4(&m_pBoneMatrices[i],
|
||||
/*XMLoadFloat4x4(&m_offsetMatrices[i]) **/ Bones[m_BoneIndices[i]]->Get_CombinedTransformationMatrix());
|
||||
XMLoadFloat4x4(&m_offsetMatrices[i]) * Bones[m_BoneIndices[i]]->Get_CombinedTransformationMatrix());
|
||||
}
|
||||
|
||||
if (0 == m_iNumBones) {
|
||||
@@ -645,6 +645,7 @@ HRESULT CMesh::Ready_VertexBuffer_For_Anim(vector<class CBone*>& Bones, const ai
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
CMesh* CMesh::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, MODEL eType, const CModel* pModel, SaveMesh* _SaveMesh, _fmatrix PreTransformMatrix)
|
||||
|
||||
@@ -159,6 +159,8 @@ _bool CModel::Play_Anim(_float fTimeDelta, CTransform* pTransform)
|
||||
|
||||
m_bIsFinishedAnim = pCurAnim->Update_TransformationMatrices(m_Bones, m_bIsLoop, fTimeDelta, true, m_iBoneMask, m_vector,m_iRootBoneIndex);
|
||||
|
||||
pCurAnim->InterpAnim(pPreAnim, m_Bones, m_fRatio);
|
||||
|
||||
if (m_fRatio >= 1.f)
|
||||
{
|
||||
m_iPreAnimIndex = m_iCurrentAnimIndex;
|
||||
@@ -172,7 +174,6 @@ _bool CModel::Play_Anim(_float fTimeDelta, CTransform* pTransform)
|
||||
m_iPreAnimIndex = m_iCurrentAnimIndex;
|
||||
}
|
||||
|
||||
|
||||
if (m_bIsFinishedAnim)
|
||||
{
|
||||
if (m_bIsLoop)
|
||||
@@ -184,14 +185,10 @@ _bool CModel::Play_Anim(_float fTimeDelta, CTransform* pTransform)
|
||||
XMStoreFloat3(&m_vPrevRootPos, m_vector[2]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ComputeAnimation(m_iCurrentAnimIndex, 0);
|
||||
|
||||
if (m_bIsFinishedAnim)
|
||||
{
|
||||
m_vPrevRootRot = { 0.f,0.f,0.f,0.f };
|
||||
m_bInitialRootRotSaved = false;
|
||||
}
|
||||
|
||||
|
||||
if (m_bRatio) {
|
||||
Update_RootBone(m_fAmount * m_fRatio);
|
||||
@@ -513,11 +510,6 @@ void CModel::Initialize_RootBone()
|
||||
}
|
||||
}
|
||||
|
||||
void CModel::BeginFrame()
|
||||
{
|
||||
fill(m_CPUBoneMask.begin(), m_CPUBoneMask.end(), false);
|
||||
}
|
||||
|
||||
vector<_float4x4> CModel::Get_OffsetMatrix(_int iIndex)
|
||||
{
|
||||
return m_Meshes[iIndex]->Get_OffsetMatrix();
|
||||
@@ -542,52 +534,6 @@ void CModel::Mark_CPUChain(_int boneIdx)
|
||||
}
|
||||
}
|
||||
|
||||
//void CModel::Create_BoneStagingBuffer()
|
||||
//{
|
||||
// D3D11_BUFFER_DESC desc{};
|
||||
// desc.Usage = D3D11_USAGE_STAGING;
|
||||
// desc.ByteWidth = sizeof(BONE_DESC) * (_uint)m_Bones.size();
|
||||
// desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
|
||||
// desc.BindFlags = 0;
|
||||
// desc.MiscFlags = D3D11_RESOURCE_MISC_BUFFER_STRUCTURED;
|
||||
// desc.StructureByteStride = sizeof(BONE_DESC);
|
||||
//
|
||||
// HRESULT hr = m_pDevice->CreateBuffer(&desc, nullptr, &m_pBoneStagingBuffer);
|
||||
//}
|
||||
|
||||
//const _float4x4 CModel::Get_BoneMatrix_GPU(_uint boneIndex)
|
||||
//{
|
||||
//
|
||||
// m_pContext->CopyResource(m_pBoneStagingBuffer, m_pBoneMatrixBuffer);
|
||||
//
|
||||
// D3D11_MAPPED_SUBRESOURCE mapped{};
|
||||
// m_pContext->Map(
|
||||
// m_pBoneStagingBuffer,
|
||||
// 0,
|
||||
// D3D11_MAP_READ,
|
||||
// 0,
|
||||
// &mapped
|
||||
// );
|
||||
//
|
||||
// BONE_DESC*pBone = static_cast<BONE_DESC*>(mapped.pData);
|
||||
//
|
||||
// m_pContext->Unmap(m_pBoneStagingBuffer, 0);
|
||||
//
|
||||
// return pBone->Combined;
|
||||
//}
|
||||
|
||||
//const _float4x4* CModel::Get_BoneMatrixPtr_Socket(const _char* name)
|
||||
//{
|
||||
// _int idx = Find_BoneIndex(name);
|
||||
// if (idx < 0)
|
||||
// return nullptr;
|
||||
//
|
||||
// _float4x4 mat = Get_BoneMatrix_GPU(idx);
|
||||
// m_SocketCache[name] = mat;
|
||||
//
|
||||
// return &m_SocketCache[name];
|
||||
//}
|
||||
|
||||
|
||||
const _float4x4* CModel::Get_BoneMatrixPtr(const _char* pBoneName)
|
||||
{
|
||||
@@ -2112,9 +2058,7 @@ _bool CModel::LoadData(const _char* filename)
|
||||
|
||||
fclose(fp);
|
||||
|
||||
m_SaveModel.push_back(NewModel);
|
||||
|
||||
m_pGameInstance->Add_SaveModel(filename, m_SaveModel.back());
|
||||
m_pGameInstance->Add_SaveModel(filename, NewModel);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -2256,7 +2200,6 @@ HRESULT CModel::Initialize(void* pArg)
|
||||
Create_BoneLocalVB();
|
||||
Create_ParentSrv();
|
||||
Create_BoneLocalSrv();
|
||||
//Create_BoneStagingBuffer();
|
||||
|
||||
if (FAILED(Create_ComputeShaderLocal()))
|
||||
return E_FAIL;
|
||||
@@ -2403,8 +2346,6 @@ void CModel::Free()
|
||||
|
||||
SAFE_RELEASE(m_pTransform);
|
||||
|
||||
m_SaveModel.clear();
|
||||
|
||||
m_Parent.clear();
|
||||
m_AnimRanges.clear();
|
||||
|
||||
|
||||
@@ -312,7 +312,27 @@ void CPipeLine::Make_LightBoxes()
|
||||
fMinZ += m_vShadowBoxMarginMin.z;
|
||||
fMaxZ += m_vShadowBoxMarginMax.z;
|
||||
|
||||
Adjust_ShadowTexcel(fMinX, fMinY, fMaxX, fMaxY, g_iMaxShadowWidth, g_iMaxShadowHeight);
|
||||
_uint iShadowWidth = { 0 };
|
||||
_uint iShadowHeight = { 0 };
|
||||
switch (iIndex)
|
||||
{
|
||||
case 0:
|
||||
iShadowWidth = g_iNearShadowWidth;
|
||||
iShadowHeight = g_iNearShadowHeight;
|
||||
break;
|
||||
case 1:
|
||||
iShadowWidth = g_iMiddleShadowWidth;
|
||||
iShadowHeight = g_iMiddleShadowHeight;
|
||||
break;
|
||||
case 2:
|
||||
iShadowWidth = g_iFarShadowWidth;
|
||||
iShadowHeight = g_iFarShadowHeight;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Adjust_ShadowTexcel(fMinX, fMinY, fMaxX, fMaxY, iShadowWidth, iShadowHeight);
|
||||
|
||||
targetPlanes[0] = _float4(-1.f, 0.f, 0.f, fMinX); // Left
|
||||
targetPlanes[1] = _float4(1.f, 0.f, 0.f, -fMaxX); // Right
|
||||
@@ -386,7 +406,7 @@ void CPipeLine::Update_ShadowDepthNdcZ()
|
||||
}
|
||||
}
|
||||
|
||||
// Out으로 _float4를 새롭게 메모리로 받고 다시 밖에서 할당할 바에 레퍼런스로 쓰는게 더 나은듯
|
||||
// Out으로 _float4를 새롭게 메모리로 받고 다시 밖에서 할당할 바에 레퍼런스로 쓰는게 더 나을지도?
|
||||
// 카메라 미세 흔들림으로 인한 그림자 튐 보정
|
||||
void CPipeLine::Adjust_ShadowTexcel(_float& fMinX, _float& fMinY, _float& fMaxX, _float& fMaxY, _uint iShadowWidth, _uint iShadowHeight)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
#include "pch.h"
|
||||
#include "RenderEventDebugger.h"
|
||||
@@ -12,11 +12,12 @@ CRenderTarget::CRenderTarget(ID3D11Device* pDevice, ID3D11DeviceContext* pContex
|
||||
SAFE_ADDREF(m_pContext);
|
||||
}
|
||||
|
||||
|
||||
HRESULT CRenderTarget::Initialize(_uint iSizeX, _uint iSizeY, DXGI_FORMAT ePixelFormat, const _float4& vClearColor)
|
||||
{
|
||||
D3D11_TEXTURE2D_DESC TextureDesc{};
|
||||
|
||||
m_vTargetSize.x = (_float)iSizeX;
|
||||
m_vTargetSize.y = (_float)iSizeY;
|
||||
TextureDesc.Width = iSizeX;
|
||||
TextureDesc.Height = iSizeY;
|
||||
TextureDesc.MipLevels = 1;
|
||||
@@ -63,7 +64,6 @@ HRESULT CRenderTarget::Bind_ShaderResource(CShader* pShader, const _char* pConst
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRenderTarget::Clear()
|
||||
{
|
||||
m_pContext->ClearRenderTargetView(m_pRTV, reinterpret_cast<_float*>(&m_vClearColor));
|
||||
@@ -73,10 +73,19 @@ void CRenderTarget::Copy_ResourceTo(ID3D11Texture2D* pTexture2D)
|
||||
{
|
||||
m_pContext->CopyResource(pTexture2D, m_pTexture2D);
|
||||
}
|
||||
void CRenderTarget::Copy_ResourceTo(const CRenderTarget& Target)
|
||||
{
|
||||
m_pContext->CopyResource(Target.m_pTexture2D, m_pTexture2D);
|
||||
}
|
||||
|
||||
void CRenderTarget::Copy_ResourceFrom(ID3D11Texture2D* pTexture2D)
|
||||
{
|
||||
m_pContext->CopyResource(m_pTexture2D, pTexture2D);
|
||||
}
|
||||
void CRenderTarget::Copy_ResourceFrom(const CRenderTarget& Target)
|
||||
{
|
||||
m_pContext->CopyResource(m_pTexture2D, Target.m_pTexture2D);
|
||||
}
|
||||
void CRenderTarget::Get_TextureDesc(D3D11_TEXTURE2D_DESC& Desc)
|
||||
{
|
||||
m_pTexture2D->GetDesc(&Desc);
|
||||
|
||||
@@ -175,26 +175,42 @@ HRESULT CRenderTarget_Manager::Begin_MRT_NO_DepthStencil(const _wstring& strMRTT
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CRenderTarget_Manager::Copy_RenderTargetTo(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D)
|
||||
HRESULT CRenderTarget_Manager::Copy_RenderTargetTo(const _wstring& strSrcTag, ID3D11Texture2D* pDst2D)
|
||||
{
|
||||
CRenderTarget* pRenderTarget = Find_RenderTarget(strTargetTag);
|
||||
CRenderTarget* pRenderTarget = Find_RenderTarget(strSrcTag);
|
||||
if (nullptr == pRenderTarget) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
pRenderTarget->Copy_ResourceTo(pTexture2D);
|
||||
pRenderTarget->Copy_ResourceTo(pDst2D);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRenderTarget_Manager::Copy_RenderTargetFrom(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D)
|
||||
HRESULT CRenderTarget_Manager::Copy_RenderTargetFrom(const _wstring& strDstTag, ID3D11Texture2D* pSrc2D)
|
||||
{
|
||||
CRenderTarget* pRenderTarget = Find_RenderTarget(strTargetTag);
|
||||
CRenderTarget* pRenderTarget = Find_RenderTarget(strDstTag);
|
||||
if (nullptr == pRenderTarget) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
pRenderTarget->Copy_ResourceFrom(pTexture2D);
|
||||
pRenderTarget->Copy_ResourceFrom(pSrc2D);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRenderTarget_Manager::Copy_RenderTargetAToB(const _wstring& strATag, const _wstring& strBTag)
|
||||
{
|
||||
CRenderTarget* pTargetA = Find_RenderTarget(strATag);
|
||||
if (nullptr == pTargetA) {
|
||||
return E_FAIL;
|
||||
}
|
||||
CRenderTarget* pTargetB = Find_RenderTarget(strBTag);
|
||||
if (nullptr == pTargetB) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
pTargetA->Copy_ResourceTo(*pTargetB);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -344,6 +360,11 @@ HRESULT CRenderTarget_Manager::Refit_RenderTarget(CVIBuffer_Rect* pVIBuffer, CSh
|
||||
assert(false);
|
||||
}
|
||||
|
||||
vResolution = { vp.Width, vp.Height };
|
||||
if (FAILED(pShader->Bind_RawValue("g_vSrcResolution", &vResolution, sizeof(_float2)))) {
|
||||
assert(false);
|
||||
}
|
||||
|
||||
pOutput->Clear();
|
||||
|
||||
{ // Bind RTVs
|
||||
@@ -370,6 +391,12 @@ HRESULT CRenderTarget_Manager::Refit_RenderTarget(CVIBuffer_Rect* pVIBuffer, CSh
|
||||
case Engine::SHADER_PASS_DEFERRED::DOWNSAMPLE:
|
||||
pConstantName = "g_DiffuseTexture";
|
||||
break;
|
||||
case Engine::SHADER_PASS_DEFERRED::MOTIONBLURTENT:
|
||||
pConstantName = "g_VelocityTexture";
|
||||
break;
|
||||
case Engine::SHADER_PASS_DEFERRED::MOTIONBLURTILE:
|
||||
pConstantName = "g_VelocityTexture";
|
||||
break;
|
||||
case Engine::SHADER_PASS_DEFERRED::BLOOM_BLURY:
|
||||
pConstantName = "g_BlurXTexture";
|
||||
break;
|
||||
@@ -469,6 +496,16 @@ HRESULT CRenderTarget_Manager::Finish_RenderTarget(CVIBuffer_Rect* pVIBuffer, CS
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_float2 CRenderTarget_Manager::Get_RenderTargetSize(const _wstring& wstrTargetKey)
|
||||
{
|
||||
CRenderTarget* pRenderTarget = Find_RenderTarget(wstrTargetKey);
|
||||
if (nullptr == pRenderTarget) {
|
||||
return _float2();
|
||||
}
|
||||
|
||||
return pRenderTarget->Get_TargetSize();
|
||||
}
|
||||
|
||||
HRESULT CRenderTarget_Manager::End_MRT()
|
||||
{
|
||||
ID3D11RenderTargetView* pRenderTargets[D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT] = { m_pBackBufferRTV };
|
||||
|
||||
@@ -6,11 +6,7 @@
|
||||
|
||||
void CRenderer::Render()
|
||||
{
|
||||
_uint iNumViewPort = { 1 };
|
||||
D3D11_VIEWPORT vp = {};
|
||||
m_pContext->RSGetViewports(&iNumViewPort, &vp);
|
||||
_float2 vResolution = { vp.Width, vp.Height };
|
||||
|
||||
Bind_RawValue();
|
||||
Render_Priority();
|
||||
Render_Shadow();
|
||||
Render_NonBlend();
|
||||
@@ -130,6 +126,29 @@ HRESULT CRenderer::Bind_PrevMatrix(class CShader* pShader, const _char* pConstan
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRenderer::Bind_RawValue()
|
||||
{
|
||||
_uint iNumViewPort = { 1 };
|
||||
D3D11_VIEWPORT vp = {};
|
||||
m_pContext->RSGetViewports(&iNumViewPort, &vp);
|
||||
_float2 vResolution = { vp.Width, vp.Height };
|
||||
if (FAILED(m_pShader->Bind_RawValue("g_vResolution", &vResolution, sizeof(_float2)))) {
|
||||
assert(false);
|
||||
}
|
||||
if (FAILED(m_pShader->Bind_RawValue("g_vNearShadowResolution", &m_vNearShadowResoltion, sizeof(_float2)))) {
|
||||
return;
|
||||
}
|
||||
if (FAILED(m_pShader->Bind_RawValue("g_vMiddleShadowResolution", &m_vMiddleShadowResoltion, sizeof(_float2)))) {
|
||||
return;
|
||||
}
|
||||
if (FAILED(m_pShader->Bind_RawValue("g_vFarShadowResolution", &m_vFarShadowResoltion, sizeof(_float2)))) {
|
||||
return;
|
||||
}
|
||||
if (FAILED(m_pShader->Bind_RawValue("g_vPreShadowResolution", &m_vPreShadowResoltion, sizeof(_float2)))) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void CRenderer::Render_Occlusion()
|
||||
{
|
||||
COMPUTE_TIMEDELTA("Timer_Render_Occlusion");
|
||||
@@ -163,6 +182,7 @@ void CRenderer::Render_Occlusion()
|
||||
void CRenderer::Render_Priority()
|
||||
{
|
||||
COMPUTE_TIMEDELTA("Timer_Render_Priority");
|
||||
EVENTSCOPE_("Render_Priority");
|
||||
for (auto& pRenderObject : m_RenderObjects[ENUM_CLASS(RENDER::PRIORITY)])
|
||||
{
|
||||
if (nullptr != pRenderObject) {
|
||||
@@ -181,6 +201,7 @@ void CRenderer::Render_Priority()
|
||||
void CRenderer::Render_Shadow()
|
||||
{
|
||||
COMPUTE_TIMEDELTA("Timer_Render_Shadow");
|
||||
EVENTSCOPE_("Render_Shadow");
|
||||
D3D11_VIEWPORT ViewPortOldDesc;
|
||||
_uint iNumViewOldPort = { 1 };
|
||||
ZeroMemory(&ViewPortOldDesc, sizeof(D3D11_VIEWPORT));
|
||||
@@ -207,8 +228,8 @@ void CRenderer::Render_Shadow()
|
||||
{
|
||||
ViewPortDesc.TopLeftX = 0;
|
||||
ViewPortDesc.TopLeftY = 0;
|
||||
ViewPortDesc.Width = (_float)(g_iMaxShadowWidth);
|
||||
ViewPortDesc.Height = (_float)(g_iMaxShadowHeight);
|
||||
ViewPortDesc.Width = (_float)(m_vNearShadowResoltion.x);
|
||||
ViewPortDesc.Height = (_float)(m_vNearShadowResoltion.y);
|
||||
ViewPortDesc.MinDepth = 0.f;
|
||||
ViewPortDesc.MaxDepth = 1.f;
|
||||
}
|
||||
@@ -240,8 +261,8 @@ void CRenderer::Render_Shadow()
|
||||
{
|
||||
ViewPortDesc.TopLeftX = 0;
|
||||
ViewPortDesc.TopLeftY = 0;
|
||||
ViewPortDesc.Width = (_float)(g_iMaxShadowWidth);
|
||||
ViewPortDesc.Height = (_float)(g_iMaxShadowHeight);
|
||||
ViewPortDesc.Width = (_float)(m_vMiddleShadowResoltion.x);
|
||||
ViewPortDesc.Height = (_float)(m_vMiddleShadowResoltion.y);
|
||||
ViewPortDesc.MinDepth = 0.f;
|
||||
ViewPortDesc.MaxDepth = 1.f;
|
||||
}
|
||||
@@ -263,48 +284,15 @@ void CRenderer::Render_Shadow()
|
||||
return;
|
||||
}
|
||||
}
|
||||
{ // MRT_Shadow_Far
|
||||
if (FAILED(m_pGameInstance->Begin_MRT(TEXT("MRT_Shadow_Far"), m_pShadowDSV_FAR))) {
|
||||
return;
|
||||
}
|
||||
|
||||
D3D11_VIEWPORT ViewPortDesc;
|
||||
ZeroMemory(&ViewPortDesc, sizeof(D3D11_VIEWPORT));
|
||||
{
|
||||
ViewPortDesc.TopLeftX = 0;
|
||||
ViewPortDesc.TopLeftY = 0;
|
||||
ViewPortDesc.Width = (_float)(g_iMaxShadowWidth);
|
||||
ViewPortDesc.Height = (_float)(g_iMaxShadowHeight);
|
||||
ViewPortDesc.MinDepth = 0.f;
|
||||
ViewPortDesc.MaxDepth = 1.f;
|
||||
}
|
||||
m_pContext->RSSetViewports(1, &ViewPortDesc);
|
||||
|
||||
for (auto& pRenderObject : m_RenderObjects[ENUM_CLASS(RENDER::SHADOW_FAR)]) {
|
||||
if (nullptr != pRenderObject) {
|
||||
if (FAILED(pRenderObject->Render_Shadow(SHADOW::SHADOW_FAR))) {
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
|
||||
SAFE_RELEASE(pRenderObject);
|
||||
}
|
||||
|
||||
m_RenderObjects[ENUM_CLASS(RENDER::SHADOW_FAR)].clear();
|
||||
|
||||
if (FAILED(m_pGameInstance->End_MRT())) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
m_pContext->RSSetViewports(iNumViewOldPort, &ViewPortOldDesc);
|
||||
|
||||
|
||||
COMPUTE_TIMEDELTA("Timer_Render_Shadow");
|
||||
}
|
||||
|
||||
void CRenderer::Render_NonBlend()
|
||||
{
|
||||
COMPUTE_TIMEDELTA("Timer_Render_NonBlend");
|
||||
EVENTSCOPE_("Render_NonBlend");
|
||||
if (FAILED(m_pGameInstance->Begin_MRT(TEXT("MRT_GameObjects")))) {
|
||||
return;
|
||||
}
|
||||
@@ -330,6 +318,7 @@ void CRenderer::Render_NonBlend()
|
||||
void CRenderer::Render_LightAcc()
|
||||
{
|
||||
COMPUTE_TIMEDELTA("Timer_Render_LightAcc");
|
||||
EVENTSCOPE_("Render_LightAcc");
|
||||
if (FAILED(m_pGameInstance->Begin_MRT(TEXT("MRT_LightAcc")))) {
|
||||
return;
|
||||
}
|
||||
@@ -373,6 +362,7 @@ void CRenderer::Render_LightAcc()
|
||||
void CRenderer::Render_Combined()
|
||||
{
|
||||
COMPUTE_TIMEDELTA("Timer_Render_Combined");
|
||||
EVENTSCOPE_("Render_Combined");
|
||||
if (FAILED(m_pGameInstance->Begin_MRT(TEXT("MRT_Combined")))) {
|
||||
return;
|
||||
}
|
||||
@@ -384,13 +374,7 @@ void CRenderer::Render_Combined()
|
||||
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));
|
||||
|
||||
if (FAILED(m_pShader->Bind_RawValue("g_iMaxShadowWidth", &g_iMaxShadowWidth, sizeof(_uint)))) {
|
||||
return;
|
||||
}
|
||||
if (FAILED(m_pShader->Bind_RawValue("g_iMaxShadowHeight", &g_iMaxShadowHeight, sizeof(_uint)))) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShader->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return;
|
||||
}
|
||||
@@ -441,9 +425,6 @@ void CRenderer::Render_Combined()
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Shadow_Middle"), m_pShader, "g_ShadowMiddleTexture"))) {
|
||||
return;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Shadow_Far"), m_pShader, "g_ShadowFarTexture"))) {
|
||||
return;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_PreShadow"), m_pShader, "g_PreShadowTexture"))) {
|
||||
return;
|
||||
}
|
||||
@@ -469,6 +450,7 @@ void CRenderer::Render_Combined()
|
||||
void CRenderer::Render_EnvironmentPostProcess()
|
||||
{
|
||||
COMPUTE_TIMEDELTA("Timer_Render_EnvironmentPostProcess");
|
||||
EVENTSCOPE_("Render_EnvironmentPostProcess");
|
||||
if (FAILED(m_pGameInstance->Begin_MRT(TEXT("MRT_ENV_Blur_X")))) { // Target_ENV_Blur_X
|
||||
return;
|
||||
}
|
||||
@@ -539,6 +521,7 @@ void CRenderer::Render_EnvironmentPostProcess()
|
||||
void CRenderer::Render_Fog()
|
||||
{
|
||||
COMPUTE_TIMEDELTA("Timer_Render_Fog");
|
||||
EVENTSCOPE_("Render_Fog");
|
||||
m_pShader->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float));
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_FogValue(m_pShader))) { // 여기서 포그에서 쓰는 상수들 바인딩 해줌
|
||||
@@ -563,6 +546,7 @@ void CRenderer::Render_Fog()
|
||||
void CRenderer::Render_Effect()
|
||||
{
|
||||
COMPUTE_TIMEDELTA("Timer_Render_Effect");
|
||||
EVENTSCOPE_("Render_Effect");
|
||||
|
||||
if (FAILED(m_pGameInstance->Begin_MRT_NO_DepthStencil(TEXT("MRT_WB")))) {
|
||||
return;
|
||||
@@ -587,6 +571,7 @@ void CRenderer::Render_Effect()
|
||||
void CRenderer::Render_WeightBlend()
|
||||
{
|
||||
COMPUTE_TIMEDELTA("Timer_Render_WeightBlend");
|
||||
EVENTSCOPE_("Render_WeightBlend");
|
||||
// Bind_Resorces
|
||||
|
||||
m_pWeightBlendShader->Bind_Matrix("g_WorldMatrix", &m_ScreenWorldMatrix);
|
||||
@@ -612,6 +597,7 @@ void CRenderer::Render_WeightBlend()
|
||||
void CRenderer::Render_NonLight()
|
||||
{
|
||||
COMPUTE_TIMEDELTA("Timer_Render_NonLight");
|
||||
EVENTSCOPE_("Render_NonLight");
|
||||
for (auto& pRenderObject : m_RenderObjects[ENUM_CLASS(RENDER::NONLIGHT)])
|
||||
{
|
||||
if (nullptr != pRenderObject)
|
||||
@@ -627,6 +613,7 @@ void CRenderer::Render_NonLight()
|
||||
void CRenderer::Render_Blur()
|
||||
{
|
||||
COMPUTE_TIMEDELTA("Timer_Render_Blur");
|
||||
EVENTSCOPE_("Render_Blur");
|
||||
if (FAILED(m_pGameInstance->Begin_MRT(TEXT("MRT_Blur")))) {
|
||||
return;
|
||||
}
|
||||
@@ -678,6 +665,7 @@ void CRenderer::Render_Blur()
|
||||
void CRenderer::Render_SSAO()
|
||||
{
|
||||
COMPUTE_TIMEDELTA("Timer_Render_SSAO");
|
||||
EVENTSCOPE_("Render_SSAO");
|
||||
_uint iKernelSize = SSAO_SAMPLE_NUMBER;
|
||||
|
||||
if (FAILED(m_pGameInstance->Begin_MRT(TEXT("MRT_SSAO_OCCLUSION")))) {
|
||||
@@ -772,6 +760,7 @@ void CRenderer::Render_SSAO()
|
||||
void CRenderer::Render_SSAO_BLUR()
|
||||
{
|
||||
COMPUTE_TIMEDELTA("Timer_Render_SSAO_BLUR");
|
||||
EVENTSCOPE_("Render_SSAO_BLUR");
|
||||
if (FAILED(m_pGameInstance->Begin_MRT(TEXT("MRT_SSAO_BLUR")))) {
|
||||
return;
|
||||
}
|
||||
@@ -800,6 +789,7 @@ void CRenderer::Render_SSAO_BLUR()
|
||||
void CRenderer::Render_Blend()
|
||||
{
|
||||
COMPUTE_TIMEDELTA("Timer_Render_Blend");
|
||||
EVENTSCOPE_("Render_Blend");
|
||||
m_RenderObjects[ENUM_CLASS(RENDER::BLEND)].sort([](CGameObject* pSour, CGameObject* pDest)->_bool {
|
||||
return pSour->Get_Depth() > pDest->Get_Depth();
|
||||
});
|
||||
@@ -824,45 +814,88 @@ void CRenderer::Render_PostProcessing()
|
||||
{
|
||||
/* 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();
|
||||
EVENTSCOPE_("Render_PostProcessing");
|
||||
{
|
||||
ID3D11Texture2D* pBackBuffer = { nullptr };
|
||||
m_pGameInstance->Get_BackBufferPTR(&pBackBuffer);
|
||||
if (FAILED(m_pGameInstance->Copy_RenderTargetFrom(TEXT("Target_AfterBlend"), pBackBuffer))) {
|
||||
assert(false);
|
||||
}
|
||||
SAFE_RELEASE(pBackBuffer);
|
||||
if (FAILED(m_pShader->Bind_RawValue("g_iMBTileSize", &m_iMBTileSize, sizeof(_int)))) {
|
||||
assert(false); return;
|
||||
}
|
||||
m_pGameInstance->Copy_RenderTargetAToB(TEXT("Target_AfterBlend"), TEXT("Target_MotionBlur"));
|
||||
m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_VelocityMap"), TEXT("Target_VelocityTile"), SHADER_PASS_DEFERRED::MOTIONBLURTILE);
|
||||
m_pGameInstance->Refit_RenderTarget(m_pVIBuffer, m_pShader, TEXT("Target_VelocityTile"), TEXT("Target_VelocityTent"), SHADER_PASS_DEFERRED::MOTIONBLURTENT);
|
||||
}
|
||||
/* MotionBlur */
|
||||
if (false == m_bMB) {
|
||||
if (FAILED(m_pGameInstance->Begin_MRT(TEXT("MRT_MotionBlur")))) {
|
||||
assert(false); return;
|
||||
}
|
||||
}
|
||||
{ // Bind_Resorces
|
||||
if (FAILED(m_pShader->Bind_Matrix("g_WorldMatrix", &m_ScreenWorldMatrix))) {
|
||||
assert(false); return;
|
||||
}
|
||||
if (FAILED(m_pShader->Bind_Matrix("g_ViewMatrix", &m_ScreenViewMatrix))) {
|
||||
assert(false); return;
|
||||
}
|
||||
if (FAILED(m_pShader->Bind_Matrix("g_ProjMatrix", &m_ScreenProjMatrix))) {
|
||||
assert(false); return;
|
||||
}
|
||||
if (FAILED(m_pShader->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
assert(false); return;
|
||||
}
|
||||
if (FAILED(m_pShader->Bind_RawValue("g_fMBBlurRadius", &m_fMBBlurRadius, sizeof(_float)))) {
|
||||
assert(false); return;
|
||||
}
|
||||
if (FAILED(m_pShader->Bind_RawValue("g_fMBSampleBias", &m_fMBSampleBias, sizeof(_float)))) {
|
||||
assert(false); return;
|
||||
}
|
||||
if (FAILED(m_pShader->Bind_RawValue("g_iMBSampleCount", &m_iMBSampleCount, sizeof(_int)))) {
|
||||
assert(false); return;
|
||||
}
|
||||
if (FAILED(m_pShader->Bind_RawValue("g_iMBMaxSampleCount", &m_iMBMaxSampleCount, sizeof(_int)))) {
|
||||
assert(false); return;
|
||||
}
|
||||
if (FAILED(m_pShader->Bind_RawValue("g_iMBType", &m_iMBType, sizeof(_int)))) {
|
||||
assert(false); return;
|
||||
}
|
||||
}
|
||||
{
|
||||
// Bind_Targets
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_AfterBlend"), m_pShader, "g_DiffuseTexture"))) {
|
||||
assert(false);
|
||||
return;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_AfterBlend"), 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;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_VelocityTent"), m_pShader, "g_TileVelocityTexture"))) {
|
||||
assert(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
m_pShader->Begin(ENUM_CLASS(SHADER_PASS_DEFERRED::MOTIONBLUR));
|
||||
|
||||
m_pVIBuffer->Bind_Resources();
|
||||
m_pVIBuffer->Render();
|
||||
if (false == m_bMB) {
|
||||
if (FAILED(m_pGameInstance->End_MRT())) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Begin_MRT(TEXT("MRT_Bloom")))) {
|
||||
return;
|
||||
}
|
||||
@@ -928,6 +961,7 @@ void CRenderer::Render_PostProcessing()
|
||||
void CRenderer::Render_Distortion()
|
||||
{
|
||||
COMPUTE_TIMEDELTA("Timer_Render_Distortion");
|
||||
EVENTSCOPE_("Render_Distortion");
|
||||
|
||||
if (FAILED(m_pGameInstance->Begin_MRT(TEXT("MRT_Distortion")))) {
|
||||
return;
|
||||
@@ -953,6 +987,7 @@ void CRenderer::Render_Distortion()
|
||||
void CRenderer::Render_DistortionAcc()
|
||||
{
|
||||
COMPUTE_TIMEDELTA("Timer_Render_DistortionAcc");
|
||||
EVENTSCOPE_("Render_DistortionAcc");
|
||||
// Bind_Resorces
|
||||
|
||||
ID3D11Texture2D* pBackBufferTexture2D = { nullptr };
|
||||
@@ -988,6 +1023,7 @@ void CRenderer::Render_DistortionAcc()
|
||||
void CRenderer::Render_UI()
|
||||
{
|
||||
COMPUTE_TIMEDELTA("Timer_Render_UI");
|
||||
EVENTSCOPE_("Render_UI");
|
||||
m_RenderObjects[ENUM_CLASS(RENDER::UI)].sort([](CGameObject* pDest, CGameObject* pSrc)->_bool {
|
||||
_float3 vDstPos = {};
|
||||
_float3 vSrcPos = {};
|
||||
@@ -1016,6 +1052,7 @@ void CRenderer::Render_UI()
|
||||
void CRenderer::Render_UI_Overley()
|
||||
{
|
||||
COMPUTE_TIMEDELTA("Timer_Render_UI_Overley");
|
||||
EVENTSCOPE_("Render_UI_Overley");
|
||||
for (auto& pRenderObject : m_RenderObjects[ENUM_CLASS(RENDER::UI_OVERLAY)])
|
||||
{
|
||||
if (nullptr != pRenderObject) {
|
||||
@@ -1034,6 +1071,7 @@ void CRenderer::Render_UI_Overley()
|
||||
void CRenderer::Render_LastColor()
|
||||
{
|
||||
COMPUTE_TIMEDELTA("Timer_Render_LastColor");
|
||||
EVENTSCOPE_("Render_LastColor");
|
||||
// Bind_Resorces
|
||||
|
||||
m_pLastColorShader->Bind_Matrix("g_WorldMatrix", &m_ScreenWorldMatrix);
|
||||
@@ -1054,6 +1092,7 @@ void CRenderer::Render_LastColor()
|
||||
void CRenderer::Render_Tone_Mapping()
|
||||
{
|
||||
COMPUTE_TIMEDELTA("Timer_Render_Tone_Mapping");
|
||||
EVENTSCOPE_("Render_Tone_Mapping");
|
||||
{ // BackBuffer
|
||||
ID3D11Texture2D* pBackBuffer = nullptr;
|
||||
m_pGameInstance->Get_BackBufferPTR(&pBackBuffer);
|
||||
@@ -1090,6 +1129,7 @@ void CRenderer::Render_Tone_Mapping()
|
||||
|
||||
void CRenderer::Render_Debug()
|
||||
{
|
||||
EVENTSCOPE_("Render_Debug");
|
||||
for (auto& pDebugCom : m_DebugComponents)
|
||||
{
|
||||
if (nullptr != pDebugCom) {
|
||||
@@ -1111,7 +1151,7 @@ void CRenderer::Render_Debug()
|
||||
return;
|
||||
}
|
||||
|
||||
/* 렌더타겟을 디버그로 직교투영을 통해 그려라. */
|
||||
/* 렌더타겟을 디버그로 직교투영 */
|
||||
if (FAILED(m_pGameInstance->Render_RenderTarget_Debug(m_pShader, m_pVIBuffer))) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -37,15 +37,15 @@ HRESULT CRenderer::Add_DebugComponent(CComponent* pDebugCom)
|
||||
}
|
||||
#endif
|
||||
|
||||
HRESULT CRenderer::Ready_ShadowDepthStencilView(_uint iSizeX, _uint iSizeY)
|
||||
HRESULT CRenderer::Ready_ShadowDepthStencilView(_float2 vSize, ID3D11DepthStencilView** pDSV)
|
||||
{
|
||||
ID3D11Texture2D* pShadowDepthStencilTexture = nullptr;
|
||||
|
||||
D3D11_TEXTURE2D_DESC TextureDesc;
|
||||
ZeroMemory(&TextureDesc, sizeof(D3D11_TEXTURE2D_DESC));
|
||||
|
||||
TextureDesc.Width = iSizeX;
|
||||
TextureDesc.Height = iSizeY;
|
||||
TextureDesc.Width = (_uint)vSize.x;
|
||||
TextureDesc.Height = (_uint)vSize.y;
|
||||
TextureDesc.MipLevels = 1;
|
||||
TextureDesc.ArraySize = 1;
|
||||
TextureDesc.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
|
||||
@@ -62,18 +62,7 @@ HRESULT CRenderer::Ready_ShadowDepthStencilView(_uint iSizeX, _uint iSizeY)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pDevice->CreateDepthStencilView(pShadowDepthStencilTexture, nullptr, &m_pShadowDSV_NEAR))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pDevice->CreateDepthStencilView(pShadowDepthStencilTexture, nullptr, &m_pShadowDSV_MIDDLE))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pDevice->CreateDepthStencilView(pShadowDepthStencilTexture, nullptr, &m_pShadowDSV_FAR))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDevice->CreateDepthStencilView(pShadowDepthStencilTexture, nullptr, &m_pPreShadowDSV))) {
|
||||
if (FAILED(m_pDevice->CreateDepthStencilView(pShadowDepthStencilTexture, nullptr, pDSV))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -148,6 +137,11 @@ void CRenderer::Fill_Geometry(_uint iNumSample)
|
||||
}
|
||||
HRESULT CRenderer::Initialize()
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
m_AnnotationHelper.Initialize(m_pContext);
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
_uint iNumViewports = { 1 };
|
||||
|
||||
D3D11_VIEWPORT Viewport{};
|
||||
@@ -194,22 +188,17 @@ HRESULT CRenderer::Initialize()
|
||||
return E_FAIL;
|
||||
}
|
||||
/* Target_Shadow_Near */
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Shadow_Near"), (_uint)g_iMaxShadowWidth, (_uint)g_iMaxShadowHeight,
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Shadow_Near"), (_uint)m_vNearShadowResoltion.x, (_uint)m_vNearShadowResoltion.y,
|
||||
DXGI_FORMAT_R32_FLOAT, _float4(1.f, 1.f, 1.f, 1.f)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
/* Target_Shadow_Middle */
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Shadow_Middle"), (_uint)g_iMaxShadowWidth, (_uint)g_iMaxShadowHeight,
|
||||
DXGI_FORMAT_R32_FLOAT, _float4(1.f, 1.f, 1.f, 1.f)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
/* Target_Shadow_Far */
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Shadow_Far"), (_uint)g_iMaxShadowWidth, (_uint)g_iMaxShadowHeight,
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Shadow_Middle"), (_uint)m_vMiddleShadowResoltion.x, (_uint)m_vMiddleShadowResoltion.y,
|
||||
DXGI_FORMAT_R32_FLOAT, _float4(1.f, 1.f, 1.f, 1.f)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
/* Target_PreShadow */
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_PreShadow"), (_uint)g_iMaxShadowWidth, (_uint)g_iMaxShadowHeight,
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_PreShadow"), (_uint)m_vPreShadowResoltion.x, (_uint)m_vPreShadowResoltion.y,
|
||||
DXGI_FORMAT_R32_FLOAT, _float4(1.f, 1.f, 1.f, 1.f)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -269,14 +258,13 @@ HRESULT CRenderer::Initialize()
|
||||
|
||||
/* 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)))) {
|
||||
DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.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)))) {
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_MotionBlur"), (_uint)Viewport.Width, (_uint)Viewport.Height,
|
||||
DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.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)))) {
|
||||
@@ -350,7 +338,15 @@ HRESULT CRenderer::Initialize()
|
||||
|
||||
/* 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)))) {
|
||||
DXGI_FORMAT_R32G32_FLOAT, _float4(0.5f, 0.5f, 0.f, 0.f)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_VelocityTile"), (_uint)(Viewport.Width / (_float)m_iMBTileSize), (_uint)(Viewport.Height / (_float)m_iMBTileSize),
|
||||
DXGI_FORMAT_R32G32_FLOAT, _float4(0.5f, 0.5f, 0.f, 0.f)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_VelocityTent"), (_uint)(Viewport.Width / (_float)m_iMBTileSize), (_uint)(Viewport.Height / (_float)m_iMBTileSize),
|
||||
DXGI_FORMAT_R32G32_FLOAT, _float4(0.5f, 0.5f, 0.f, 0.f)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_BeforeNormal"), (_uint)Viewport.Width, (_uint)Viewport.Height,
|
||||
@@ -373,7 +369,19 @@ HRESULT CRenderer::Initialize()
|
||||
|
||||
|
||||
|
||||
if (FAILED(Ready_ShadowDepthStencilView(g_iMaxShadowWidth, g_iMaxShadowHeight))) {
|
||||
if (FAILED(Ready_ShadowDepthStencilView(m_vNearShadowResoltion, &m_pShadowDSV_NEAR))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_ShadowDepthStencilView(m_vMiddleShadowResoltion, &m_pShadowDSV_MIDDLE))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_ShadowDepthStencilView(m_vFarShadowResoltion, &m_pShadowDSV_FAR))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_ShadowDepthStencilView(m_vPreShadowResoltion, &m_pPreShadowDSV))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -431,10 +439,6 @@ HRESULT CRenderer::Initialize()
|
||||
if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Shadow_Middle"), TEXT("Target_Shadow_Middle")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
/* MRT_Shadow_Far */
|
||||
if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Shadow_Far"), TEXT("Target_Shadow_Far")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* MRT_PreShadow */
|
||||
if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_PreShadow"), TEXT("Target_PreShadow")))) {
|
||||
@@ -498,9 +502,10 @@ HRESULT CRenderer::Initialize()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* MRT_MotionBlur */
|
||||
if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_MotionBlur"), TEXT("Target_MotionBlur")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
m_pShader = (CShader*)m_pGameInstance->Clone_Asset_Prototype(g_iStaticLevel, FX_DEFERRED, nullptr, nullptr);
|
||||
@@ -639,6 +644,12 @@ void CRenderer::Describe_Entitiy()
|
||||
GUI::SliderFloat("m_fExposure", &m_fExposure, 0.5f, 2.f, "%.3f");
|
||||
GUI::EndChild();
|
||||
}
|
||||
if (GUI::CollapsingHeader("MotionBlurr")) {
|
||||
GUI::Checkbox("m_bMB", &m_bMB);
|
||||
GUI::SliderFloat("g_fMBSampleBias", &m_fMBSampleBias, -1.f, 1.f, "%.3f");
|
||||
GUI::SliderFloat("g_fMBBlurRadius", &m_fMBBlurRadius, 0.1f, (_float)m_iMBMaxSampleCount, "%.1f");
|
||||
GUI::SliderInt("g_iMBSampleCount", &m_iMBSampleCount, 0, m_iMBMaxSampleCount, "%d");
|
||||
}
|
||||
if (GUI::CollapsingHeader("End_Padding")) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ void CUIObject::Nine_Slice_Left(_float X)
|
||||
|
||||
void CUIObject::Nine_Slice_Right(_float Y)
|
||||
{
|
||||
m_vNine_Slice.y =Y;
|
||||
m_vNine_Slice.y = Y;
|
||||
}
|
||||
|
||||
void CUIObject::Nine_Slice_Top(_float Z)
|
||||
@@ -367,8 +367,14 @@ void CUIObject::Lerp_PosY(_float PosY)
|
||||
m_fLerpY = PosY;
|
||||
}
|
||||
|
||||
void CUIObject::Start_Lerp(_float fTimeDelta)
|
||||
_bool CUIObject::Start_Lerp(_float fTimeDelta)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
_bool CUIObject::Start_Bezier(_float fTimeDelta)
|
||||
{
|
||||
return _bool();
|
||||
}
|
||||
|
||||
void CUIObject::Reset_Pos(_float fTimeDelta)
|
||||
|
||||
@@ -336,6 +336,32 @@ _int CVIBuffer_UI_Instance::Set_Mouse_Hover(_float2 fMousePos)
|
||||
return hoveredIndex;
|
||||
}
|
||||
|
||||
void CVIBuffer_UI_Instance::Set_Hover(_int Index)
|
||||
{
|
||||
D3D11_MAPPED_SUBRESOURCE SubResource{};
|
||||
|
||||
m_pContext->Map(m_pVBInstance, 0, D3D11_MAP_WRITE_NO_OVERWRITE, 0, &SubResource);
|
||||
|
||||
VTX_INSTANCE_UI* pVertices = static_cast<VTX_INSTANCE_UI*>(SubResource.pData);
|
||||
|
||||
if(Index == -1)
|
||||
for (_uint i = 0; i < m_iNumInstance; i++)
|
||||
pVertices[i].bHover = 0.f;
|
||||
|
||||
for (_uint i = 0; i < m_iNumInstance; i++)
|
||||
{
|
||||
if (i == Index)
|
||||
{
|
||||
pVertices[i].bHover = 1.f;
|
||||
}
|
||||
else
|
||||
{
|
||||
pVertices[i].bHover = 0.f;
|
||||
}
|
||||
}
|
||||
m_pContext->Unmap(m_pVBInstance, 0);
|
||||
}
|
||||
|
||||
void CVIBuffer_UI_Instance::Set_Hover_Index(_uint iIndex)
|
||||
{
|
||||
D3D11_MAPPED_SUBRESOURCE SubResource{};
|
||||
|
||||