diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj
index 1f7df31cc..84e2df0f2 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj
@@ -166,10 +166,14 @@ call Update_Resources.bat
+
+
+
+
@@ -392,6 +396,7 @@ call Update_Resources.bat
+
@@ -404,10 +409,14 @@ call Update_Resources.bat
+
+
+
+
@@ -637,6 +646,7 @@ call Update_Resources.bat
+
diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
index 78794bf9c..42bd5e443 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters
@@ -50,7 +50,7 @@
02.GameObjects\Cameras\Debug
- 02.GameObjects\Environment\Lights\Main
+ 02.GameObjects\Environment\99.Lights\Main
03.InfoInstance\00.PlayerInfo
@@ -731,6 +731,21 @@
04.Mechanic\Dialogue
+
+ 02.GameObjects\Environment\98,WorldDecal
+
+
+ 02.GameObjects\Environment\99.Lights\PointLight
+
+
+ 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_FireBall
+
+
+ 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Breath
+
+
+ 02.GameObjects\Cameras\CameraPosition\AI
+
04.Mechanic\Dialogue\Dialogue_Data
@@ -804,15 +819,9 @@
{e12b3048-dd6d-41bf-b346-e4abdaa4f215}
-
- {74f21f9b-30bf-412e-ba4e-526958ab2a52}
-
{8d89a59c-fbd2-4a4a-ab01-a70abb80cc49}
-
- {b24c78ef-dccc-41f0-a086-053ae6b7fbf4}
-
{603938cc-e4fe-44d8-890b-784174a86161}
@@ -1515,12 +1524,36 @@
{93545681-c4c5-4a6a-9496-7b2e7b8a9302}
+
+ {087ad9ea-445d-4bf7-8ec4-0f29a0c2dd53}
+
{09764279-bf54-48e4-853a-45b5a65c92a7}
{11c35878-12b4-4c55-b872-004fed9a4fb2}
+
+ {74f21f9b-30bf-412e-ba4e-526958ab2a52}
+
+
+ {b24c78ef-dccc-41f0-a086-053ae6b7fbf4}
+
+
+ {511923f0-d74a-4e9e-9fc6-30ae8ddf8d53}
+
+
+ {4151af66-59d0-496d-a9a0-0c0603166192}
+
+
+ {a682b36b-cead-4c0d-abda-466b0a5f52c2}
+
+
+ {a3b5e707-dbb3-47da-a77b-b0ca62b89e99}
+
+
+ {a24f4687-f540-44e5-ae47-fe176c4c9042}
+
{b03591a7-a14e-425a-8a3f-2a6a054c884a}
@@ -1560,7 +1593,7 @@
02.GameObjects\Cameras\Debug
- 02.GameObjects\Environment\Lights\Main
+ 02.GameObjects\Environment\99.Lights\Main
03.InfoInstance\00.PlayerInfo
@@ -2202,6 +2235,21 @@
04.Mechanic\Dialogue
+
+ 02.GameObjects\Environment\98,WorldDecal
+
+
+ 02.GameObjects\Environment\99.Lights\PointLight
+
+
+ 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_FireBall
+
+
+ 02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Breath
+
+
+ 02.GameObjects\Cameras\CameraPosition\AI
+
04.Mechanic\Dialogue\Dialogue_Data
diff --git a/Jusin154_Team3D/Client/Private/Broom.cpp b/Jusin154_Team3D/Client/Private/Broom.cpp
index 1486449d4..4802ebd41 100644
--- a/Jusin154_Team3D/Client/Private/Broom.cpp
+++ b/Jusin154_Team3D/Client/Private/Broom.cpp
@@ -35,8 +35,6 @@ HRESULT CBroom::Initialize(void* pArg)
}
-
-
Add_FSM();
Set_Anim();
@@ -50,7 +48,7 @@ HRESULT CBroom::Initialize(void* pArg)
m_pFSM->Change_State(FSMSTATE::IDLE);
}
- m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(0.f, 10.f, 0.f, 1.f));
+ m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(0.f,-100.f, 0.f, 1.f));
m_pParentUnit = dynamic_cast(m_pOwner);
@@ -62,8 +60,10 @@ HRESULT CBroom::Initialize(void* pArg)
m_pWindEffect->Get_Effect_Info()->isBillboard = false;
}
-
-
+ else {
+ m_fAISeed = m_pGameInstance->Real_Random_Float(0.f, XM_2PI);
+ m_fAICondition = 1.f;
+ }
return S_OK;
@@ -85,8 +85,15 @@ void CBroom::Update(_float fTimeDelta)
else {
m_bHoverToggle = m_Input.bHoverToggle;
m_bTurbo = m_Input.bTurbo;
- }
+ m_fAITime += fTimeDelta;
+
+ _float target = 1.f + sinf(m_fAITime * 0.3f + m_fAISeed) * 0.15f;
+
+ m_fAICondition += (target - m_fAICondition) * fTimeDelta * 0.3f;
+
+ m_fAICondition = clamp(m_fAICondition, 0.85f, 1.15f);
+ }
if (!m_bRide)
{
m_bHoverToggle = true;
@@ -122,7 +129,7 @@ void CBroom::Update(_float fTimeDelta)
return;
}
- m_pWindEffect->Set_Visible(true);
+ m_pWindEffect->Set_Visible(false);
m_pWindEffect->Get_Component()->Set_TimeMult(0.5f + m_fSpeed / 20.f);
m_pWindEffect->Get_Effect_Info()->fBlurIntensity = m_fSpeed / 30.f;
@@ -287,15 +294,19 @@ void CBroom::PlayerInput()
if (m_pGameInstance->Key_Up(DIK_LSHIFT))
{
- m_Input.bHoverToggle = !m_Input.bHoverToggle;
- m_bHoverToggle = m_Input.bHoverToggle;
+ m_bHoverToggle = !m_bHoverToggle;
}
-
m_Input.bTurbo = m_pGameInstance->Mouse_Pressing(DIM_LBUTTON);
m_bTurbo = m_Input.bTurbo;
}
+void CBroom::Set_AISpeed(_float speedMul, _float accelMul)
+{
+ m_fAISpeedMul = speedMul;
+ m_fAIAccelMul = accelMul;
+}
+
CBroom* CBroom::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
diff --git a/Jusin154_Team3D/Client/Private/BroomRaceManager.cpp b/Jusin154_Team3D/Client/Private/BroomRaceManager.cpp
index eabc93d8b..08a5d9a48 100644
--- a/Jusin154_Team3D/Client/Private/BroomRaceManager.cpp
+++ b/Jusin154_Team3D/Client/Private/BroomRaceManager.cpp
@@ -4,6 +4,9 @@
#include "GameInstance.h"
#include "RaceRing.h"
#include "Layer.h"
+#include "BroomRacerAI.h"
+#include "Player.h"
+#include "Broom.h"
CBroomRaceManager::CBroomRaceManager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CGameObject(pDevice, pContext)
@@ -30,10 +33,6 @@ HRESULT CBroomRaceManager::Initialize(void* pArg)
return E_FAIL;
}
-#ifdef _DEBUG
- m_pGripShape = (GeometricPrimitive::CreateSphere(m_pContext, 1.f, 10, false, false));
- m_pSubShape = (GeometricPrimitive::CreateSphere(m_pContext, 1.2f, 10, false, false));
-#endif // _DEBUG
return S_OK;
}
@@ -41,13 +40,25 @@ HRESULT CBroomRaceManager::Initialize(void* pArg)
void CBroomRaceManager::Priority_Update(_float fTimeDelta)
{
__super::Priority_Update(fTimeDelta);
+ switch (m_eRaceState)
+ {
+ case ENUM_CLASS(RACE_STATE::COUNTDOWN):
+ Update_Countdown(fTimeDelta);
+ break;
+ case ENUM_CLASS(RACE_STATE::RACING):
+ Check_RingPassed();
+ break;
+ }
- Check_RingPassed();
}
void CBroomRaceManager::Update(_float fTimeDelta)
{
__super::Update(fTimeDelta);
+
+
+
+
#ifdef _DEBUG
Describe_Entity();
#endif // _DEBUG
@@ -56,8 +67,15 @@ void CBroomRaceManager::Update(_float fTimeDelta)
void CBroomRaceManager::Late_Update(_float fTimeDelta)
{
__super::Late_Update(fTimeDelta);
+ m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
}
+HRESULT CBroomRaceManager::Render()
+{
+ m_pGameInstance->Render_Text(TEXT("Font_size20"), ToolTip.c_str(), _float2(g_iWinSizeX*0.5f, g_iWinSizeY*0.5f),XMVectorSet(1.f,1.f,1.f,1.f),5.f);
+
+ return S_OK;
+}
HRESULT CBroomRaceManager::Ready_Components()
{
@@ -123,64 +141,201 @@ void CBroomRaceManager::Free()
void CBroomRaceManager::Describe_Entity()
{
+ if (GUI::Button("Race Start"))
+ {
+ m_eRaceState = ENUM_CLASS(RACE_STATE::READY);
+ const _float SPAWN_DISTANCE = 80.f;
+ for (auto& racer : m_Racers)
+ {
+ CTransform* pRingTransform =
+ m_pRaceRings[0]->Get_Component();
+
+ _vector ringPos = pRingTransform->Get_State(STATE::POSITION);
+ _vector ringLook = pRingTransform->Get_State(STATE::RIGHT);
+ ringLook = XMVector3Normalize(ringLook);
+
+ _vector spawnPos = ringPos - ringLook * SPAWN_DISTANCE;
+
+ if (racer.pAI)
+ {
+ CTransform* pBroomTransform =
+ racer.pAI->Get_Broom()->Get_Component();
+ _float fRand = m_pGameInstance->Real_Random_Float(-10.f, 10.f);
+ spawnPos.m128_f32[2] += fRand;
+
+ pBroomTransform->Set_State(STATE::POSITION, spawnPos);
+ pBroomTransform->LookAt(pRingTransform->Get_State(STATE::POSITION));
+ racer.pAI->Get_Broom()->Set_Move(false);
+ }
+ else if (racer.pRacer)
+ {
+ CTransform* pTransform =
+ racer.pRacer->Get_Component();
+ spawnPos.m128_f32[1] -= 2.f;
+ pTransform->Set_State(STATE::POSITION,spawnPos);
+ pTransform->LookAt(pRingTransform->Get_State(STATE::POSITION));
+ racer.pRacer->Get_Component()->Change_State(FSMSTATE::BROOM_RIDE);
+ racer.pRacer->Get_Broom()->Set_Move(false);
+ }
+ }
+ }
+ if (m_eRaceState == ENUM_CLASS(RACE_STATE::READY))
+ {
+ if (GUI::Button("Countdown"))
+ {
+ m_eRaceState = ENUM_CLASS(RACE_STATE::COUNTDOWN);
+ }
+ }
}
+
#endif // _DEBUG
+void CBroomRaceManager::Update_Countdown(_float fTimeDelta)
+{
+ m_fCountTimer += fTimeDelta;
+
+ if (m_fCountTimer >= 1.f)
+ {
+ m_fCountTimer = 0.f;
+ --m_iCount;
+
+ if (m_iCount > 0)
+ {
+ ToolTip = to_wstring(m_iCount);
+ }
+ else
+ {
+ ToolTip = to_wstring(0);
+ StartRaceMove();
+ }
+ }
+}
+
+void CBroomRaceManager::StartRaceMove()
+{
+ for (auto& racer : m_Racers)
+ {
+ if (racer.pAI)
+ {
+ racer.pAI->Get_Broom()->Set_Move(true);
+ }
+ else if (racer.pRacer)
+ {
+ racer.pRacer->Get_Broom()->Set_Move(true);
+ }
+ }
+
+ m_eRaceState = ENUM_CLASS(RACE_STATE::RACING);
+}
+
+
+
void CBroomRaceManager::Check_RingPassed()
{
+ const float PASS_RADIUS = 5.f;
+
for (auto& racer : m_Racers)
{
CRaceRing* pRing = m_pRaceRings[racer.curRing];
- _vector ringPos = pRing->Get_WorldPostion();
- _vector broomPos = racer.pRacer->Get_WorldPostion();
- _vector ringFwd =pRing->Get_Component()->Get_State(STATE::LOOK);
+ _vector ringPos = pRing->Get_WorldPostion();
+
+ _vector ringFwd =
+ pRing->Get_Component()->Get_State(STATE::RIGHT);
ringFwd = XMVector3Normalize(ringFwd);
- _float prevSide = XMVectorGetX(XMVector3Dot(ringFwd, racer.prevPos - ringPos));
- _float currSide = XMVectorGetX(XMVector3Dot(ringFwd, broomPos - ringPos));
- _float dist = XMVectorGetX(XMVector3Length(broomPos - ringPos));
+ _vector currPos = racer.pAI ? racer.pAI->Get_WorldPostion() : racer.pRacer->Get_WorldPostion();
- const _float PASS_RADIUS = 50.f;
-
- GUI::Text("CurRing %d", racer.curRing);
+ _vector prevPos = racer.prevPos;
+ _float d0 = XMVectorGetX(
+ XMVector3Dot(prevPos - ringPos, ringFwd));
+ _float d1 = XMVectorGetX(
+ XMVector3Dot(currPos - ringPos, ringFwd));
#ifdef _DEBUG
- m_pGripShape->Draw(m_pTransformCom->Get_XMWorldMatrix(), m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW), m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ), DirectX::Colors::Green, nullptr, true);
- m_pSubShape->Draw(pRing->Get_Component()->Get_XMWorldMatrix(), m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW), m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ), DirectX::Colors::Purple, nullptr, true);
+ GUI::Text("%s", racer.pAI ? "AI" : "Player");
+ GUI::SameLine();
+ GUI::Text("CurRing %d", racer.curRing);
+ GUI::Text("PrevSide %.2f", d0);
+ GUI::Text("CurrSide %.2f", d1);
#endif // _DEBUG
-
- if (prevSide < 0.f && currSide >= 0.f && dist < PASS_RADIUS)
+ if (d0 * d1 <= 0.f && fabs(d0 - d1) > 1e-4f)
{
- racer.curRing++;
- if (racer.curRing >= m_pRaceRings.size())
- racer.curRing = 0;
+ _float t = d0 / (d0 - d1);
+ t = std::clamp(t, 0.f, 1.f);
+
+ _vector hitPos =
+ prevPos + (currPos - prevPos) * t;
+
+ _vector v = hitPos - ringPos;
+ _float side = XMVectorGetX(XMVector3Dot(v, ringFwd));
+ _vector proj = hitPos - ringFwd * side;
+
+ _float dist =
+ XMVectorGetX(XMVector3Length(proj - ringPos));
+
+ if (dist <= PASS_RADIUS)
+ {
+ if(racer.pRacer){
+ pRing->Set_Target(false);
+ }
+
+
+ racer.curRing = (racer.curRing + 1) % m_pRaceRings.size();
+
+ if (racer.pRacer) {
+ m_pRaceRings[racer.curRing]->Set_Target(true);
+ }
+
+ racer.pAI ? SetTargetRing(racer.pAI) : SetTargetRing(racer.pRacer);
+ }
}
- racer.prevPos = broomPos;
+ racer.prevPos = currPos;
}
}
-CRaceRing* CBroomRaceManager::GetTargetRing(CGameObject* pRacer)
-{
+
+void CBroomRaceManager::SetTargetRing(CGameObject*pRacer)
+{
for (auto& racer : m_Racers)
{
- if (racer.pRacer == pRacer)
- return m_pRaceRings[racer.curRing];
+ if (racer.pAI)
+ {
+ if (racer.pAI == pRacer)
+ {
+ if (racer.pAI)
+ {
+ racer.pAI->Set_RaceRing(m_pRaceRings[racer.curRing]);
+ }
+ }
+ }
+ else if (racer.pRacer)
+ {
+ if (racer.pRacer == pRacer)
+ {
+ racer.pRacer->Set_RaceRing(m_pRaceRings[racer.curRing]);
+ }
+ }
}
- return nullptr;
}
void CBroomRaceManager::Push_BroomRacer(RacerInfo Info)
{
RacerInfo info;
info.pRacer = Info.pRacer;
+ info.pAI = Info.pAI;
info.curRing = Info.curRing;
info.prevPos = Info.prevPos;
+ if(Info.pAI)
+ info.pAI->Set_RaceRing(m_pRaceRings[info.curRing]);
+ else if(Info.pRacer)
+ info.pRacer->Set_RaceRing(m_pRaceRings[info.curRing]);
+
m_Racers.push_back(info);
SAFE_ADDREF(Info.pRacer);
}
diff --git a/Jusin154_Team3D/Client/Private/BroomRacerAI.cpp b/Jusin154_Team3D/Client/Private/BroomRacerAI.cpp
index 08b443936..d2f1f3c84 100644
--- a/Jusin154_Team3D/Client/Private/BroomRacerAI.cpp
+++ b/Jusin154_Team3D/Client/Private/BroomRacerAI.cpp
@@ -4,7 +4,7 @@
#include "GameInstance.h"
#include "Broom.h"
#include "RaceRing.h"
-#include "CamPosition_Shoulder.h"
+#include "CamPosition_AI.h"
#include "BroomRaceManager.h"
#pragma region STATE
@@ -71,10 +71,11 @@ HRESULT CBroomRacerAI::Initialize(void* pArg)
}
_float X = m_pGameInstance->Real_Random_Float(-200.f, 200.f);
- _float Y = m_pGameInstance->Real_Random_Float(-200.f, 200.f);
- _float Z = m_pGameInstance->Real_Random_Float(-200.f, 200.f);
+ _float Y = m_pGameInstance->Real_Random_Float(-5.f, 5.f);
+
+
+ m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(-200.f, Y, 0.f, 1.f));
- m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(X, Y, Z, 1.f));
#ifdef _DEBUG
m_BasicEffect = make_unique(m_pDevice);
@@ -85,20 +86,30 @@ HRESULT CBroomRacerAI::Initialize(void* pArg)
m_Batch = make_unique>(m_pContext);
#endif // _DEBUG
-
-
m_pBroom->Set_Ride(true);
m_pBroomRaceManager = static_cast(pArg);
CBroomRaceManager::RacerInfo Info;
- Info.pRacer = this;
+ Info.pAI = this;
Info.curRing = 0;
Info.prevPos = Get_WorldPostion();
m_pBroomRaceManager->Push_BroomRacer(Info);
+ m_LaneOffsetX = m_pGameInstance->Real_Random_Float(-3.f, 3.f);
+ m_LaneOffsetY = m_pGameInstance->Real_Random_Float(-3.f, 3.f);
+
+ m_TurnGain = m_pGameInstance->Real_Random_Float(0.85f, 1.15f);
+ m_HeightGain = m_pGameInstance->Real_Random_Float(0.85f, 1.15f);
+
+ m_pBroom->Set_AISpeed(
+ m_pGameInstance->Real_Random_Float(0.8f, 1.2f),
+ m_pGameInstance->Real_Random_Float(0.8f, 1.2f)
+ );
+
+
return S_OK;
}
@@ -106,11 +117,13 @@ void CBroomRacerAI::Priority_Update(_float fTimeDelta)
{
__super::Priority_Update(fTimeDelta);
- m_pRaceRing = m_pBroomRaceManager->GetTargetRing(this);
+
}
void CBroomRacerAI::Update(_float fTimeDelta)
{
+ Set_Input(fTimeDelta);
+
m_pFSM->Update_State(fTimeDelta);
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
@@ -125,7 +138,6 @@ void CBroomRacerAI::Update(_float fTimeDelta)
void CBroomRacerAI::Late_Update(_float fTimeDelta)
{
- Set_Input(fTimeDelta);
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
Set_Shadow(m_pGameInstance->IsIn_ShadowViewFrustum(m_pTransformCom->Get_State(STATE::POSITION), m_pTransformCom->Get_Radius()));
@@ -189,6 +201,7 @@ HRESULT CBroomRacerAI::Render()
}
+
return S_OK;
}
HRESULT CBroomRacerAI::Render_Shadow(SHADOW eType)
@@ -247,8 +260,22 @@ HRESULT CBroomRacerAI::Ready_Components()
return E_FAIL;
}
- m_strModelPrototypeTag = TEXT("Prototype_Component_VictorRookWood_Model");
- //m_strModelPrototypeTag = TEXT("Prototype_Component_Npc_Model");
+ _int iRand = m_pGameInstance->Real_Random_Int(0, 2);
+
+ switch (iRand)
+ {
+ case 0:
+ m_strModelPrototypeTag = TEXT("Prototype_Component_VictorRookWood_Model");
+ break;
+ case 1:
+ m_strModelPrototypeTag = TEXT("Prototype_Component_Npc_Model");
+ break;
+ case 2:
+ m_strModelPrototypeTag = TEXT("Prototype_Component_Ghost_Peeves_Model");
+ break;
+ default:
+ break;
+ }
/* Com_Model */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag,
@@ -310,6 +337,10 @@ HRESULT CBroomRacerAI::Bind_ShaderResources()
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
return E_FAIL;
}
+ _float Intensity = 0.f;
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fMBIntensity", &Intensity, sizeof(_float)))) {
+ return E_FAIL;
+ }
return S_OK;
}
@@ -368,41 +399,59 @@ HRESULT CBroomRacerAI::Bind_ShaderParameters(_uint iMeshOrder)
return S_OK;
}
+_vector CBroomRacerAI::Get_RingForwardTarget()
+{
+ _vector ringPos = m_pRaceRing->Get_WorldPostion();
+ _vector ringFwd = m_pRaceRing->Get_Component()->Get_State(STATE::RIGHT);
+ ringFwd = XMVector3Normalize(ringFwd);
+
+ _vector targetPos = ringPos + ringFwd;
+ targetPos = XMVectorSet(targetPos.m128_f32[0] + m_LaneOffsetX, targetPos.m128_f32[1] + m_LaneOffsetY, targetPos.m128_f32[2], 1.f);
+
+ return targetPos;
+}
_float CBroomRacerAI::ComputeTurnToRing()
{
- _vector toRing = m_pRaceRing->Get_WorldPostion() - m_pBroom->Get_WorldPostion();
- toRing = XMVector3Normalize(XMVectorSetY(toRing, 0.f));
+ _vector targetPos = Get_RingForwardTarget();
+
+ _vector toTarget = targetPos - m_pBroom->Get_WorldPostion();
+ toTarget = XMVector3Normalize(XMVectorSetY(toTarget, 0.f));
_vector myLook = m_pBroom->Get_Component()->Get_State(STATE::LOOK);
myLook = XMVector3Normalize(XMVectorSetY(myLook, 0.f));
- _vector cross = XMVector3Cross(myLook, toRing);
- _float turn = XMVectorGetY(cross);
+ _float turn = XMVectorGetY(XMVector3Cross(myLook, toTarget));
- _float DEAD = 0.05f;
- if (fabsf(turn) < DEAD)
+ _float dist = XMVectorGetX(XMVector3Length(targetPos - m_pBroom->Get_WorldPostion()));
+
+ _float atten = clamp(dist / 40.f, 0.f, 1.f);
+
+ if (fabsf(turn) < 0.02f)
return 0.f;
- return clamp(turn, -1.f, 1.f);
+ return clamp(turn * atten, -1.f, 1.f);
}
+
_float CBroomRacerAI::ComputeHeightAdjust()
{
- _float dy = (XMVectorGetY(m_pRaceRing->Get_WorldPostion()) + 15.f)
- - XMVectorGetY(m_pBroom->Get_WorldPostion());
+ _vector targetPos = Get_RingForwardTarget();
+ _vector broomPos = m_pBroom->Get_WorldPostion();
- _float DEAD = 5.f;
- _float RANGE = 40.f;
+ _float dy = XMVectorGetY(targetPos) - XMVectorGetY(broomPos);
- if (fabsf(dy) < DEAD)
+ _float dist = XMVectorGetX(XMVector3Length(targetPos - broomPos));
+
+ _float atten = clamp(dist / 40.f, 0.f, 1.f);
+
+ if (fabsf(dy) < 1.f)
return 0.f;
- return clamp(dy / RANGE, -1.f, 1.f);
+ return clamp((dy / 20.f) * atten, -1.f, 1.f);
}
-
CBroomRacerAI* CBroomRacerAI::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CBroomRacerAI* pInstance = new CBroomRacerAI(pDevice, pContext);
@@ -435,7 +484,7 @@ void CBroomRacerAI::Free()
SAFE_RELEASE(m_pBroomModel);
SAFE_RELEASE(m_pBroomTransform);
SAFE_RELEASE(m_pBroom);
- SAFE_RELEASE(m_pCamPosition_ShoulderPart);
+ SAFE_RELEASE(m_pCamPosition_AIPart);
}
#ifdef _DEBUG
@@ -493,9 +542,10 @@ HRESULT CBroomRacerAI::Behavior_Broom_HoverExitCheck(_float fTimeDelta)
if (!m_pBroom->Get_Hover())
{
m_pFSM->Change_State(FSMSTATE::BROOM_RIDE_MOVE);
+ return E_FAIL;
}
- return E_FAIL;
+ return S_OK;
}
void CBroomRacerAI::Behavior_Broom_HoverExit()
@@ -520,34 +570,19 @@ HRESULT CBroomRacerAI::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
if (!m_pBroom->Get_Hover())
{
- if (Y > 0.f)
- {
- pairAnimInfo = m_Animation[STATEANIM::BROOM_UP];
- }
- else if (Y < 0.f)
- {
- pairAnimInfo = m_Animation[STATEANIM::BROOM_DOWN];
- }
-
_float ax = fabsf(X);
_float ay = fabsf(Y);
_float az = fabsf(Z);
if (ay > ax && ay > az)
{
- if (Y > 0)
- pairAnimInfo = m_Animation[STATEANIM::BROOM_UP];
- else
- pairAnimInfo = m_Animation[STATEANIM::BROOM_DOWN];
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FWD];
}
else if (ax >= az)
{
if (ay >= ax)
{
- if (Y > 0)
- pairAnimInfo = m_Animation[STATEANIM::BROOM_UP];
- else
- pairAnimInfo = m_Animation[STATEANIM::BROOM_DOWN];
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FWD];
}
else {
if (X < 0)
@@ -561,13 +596,7 @@ HRESULT CBroomRacerAI::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
}
else
{
- if (Y > 0)
- pairAnimInfo = m_Animation[STATEANIM::BROOM_UP];
- else if (Y< 0)
- pairAnimInfo = m_Animation[STATEANIM::BROOM_DOWN];
- else {
- pairAnimInfo = m_Animation[STATEANIM::BROOM_FWD];
- }
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_FWD];
}
@@ -577,9 +606,10 @@ HRESULT CBroomRacerAI::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
if (m_pBroom->Get_Hover())
{
m_pFSM->Change_State(FSMSTATE::BROOM_RIDE_MOVE);
+ return E_FAIL;
}
- return E_FAIL;
+ return S_OK;
}
void CBroomRacerAI::Behavior_Broom_FlyExit()
@@ -606,9 +636,10 @@ HRESULT CBroomRacerAI::Behavior_Broom_TurboFlyExitCheck(_float fTimeDelta)
if (m_pBroom->Get_Hover())
{
m_pFSM->Change_State(FSMSTATE::BROOM_RIDE_MOVE);
+ return E_FAIL;
}
- return E_FAIL;
+ return S_OK;
}
void CBroomRacerAI::Behavior_Broom_TurboFlyExit()
@@ -741,18 +772,24 @@ void CBroomRacerAI::Set_Input(_float fTimeDelta)
_float targetX = ComputeTurnToRing();
_float targetY = ComputeHeightAdjust();
- _float SMOOTH = 6.f;
+ CBroom::BroomInput InputDesc{};
- m_fSmoothX += (targetX - m_fSmoothX) * SMOOTH * fTimeDelta;
- m_fSmoothY += (targetY - m_fSmoothY) * SMOOTH * fTimeDelta;
+ InputDesc.X = 0.f;
+ InputDesc.Y = 0.f;
+ InputDesc.Z = 0.f;
+
+ /*if (m_bMove)
+ {*/
+ InputDesc.Z = 1.f;
+ InputDesc.X = targetX*m_TurnGain;
+ InputDesc.Y = targetY*m_HeightGain;
+ //}
+
+ InputDesc.bHoverToggle = (m_pBroomRaceManager->Get_RaceState() != ENUM_CLASS(CBroomRaceManager::RACE_STATE::RACING));
- CBroom::BroomInput InputDesc;
- InputDesc.Z = 1.f;
- InputDesc.X = m_fSmoothX;
- InputDesc.Y = m_fSmoothY;
- InputDesc.bHoverToggle = false;
InputDesc.bTurbo = false;
m_pBroom->Set_Input(InputDesc);
}
+
diff --git a/Jusin154_Team3D/Client/Private/Broom_States.cpp b/Jusin154_Team3D/Client/Private/Broom_States.cpp
index a27fbba8e..46e9196be 100644
--- a/Jusin154_Team3D/Client/Private/Broom_States.cpp
+++ b/Jusin154_Team3D/Client/Private/Broom_States.cpp
@@ -123,6 +123,9 @@ void CBroom::Behavior_MoveEnter()
HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta)
{
+ if (false == m_bMove)
+ return S_OK;
+
pair<_uint, _bool> pairAnimInfo = {};
_uint iCurrentAnimIndex = m_pModelCom->Get_AnimIndex();
@@ -183,6 +186,8 @@ void CBroom::Behavior_Broom_HoverEnter()
HRESULT CBroom::Behavior_Broom_HoverExitCheck(_float fTimeDelta)
{
+ if (false == m_bMove)
+ return S_OK;
pair<_uint, _bool> pairAnimInfo = {};
_uint iCurrentAnimIndex = m_pModelCom->Get_AnimIndex();
_bool bFwd = m_Input.Z > 0.f;
@@ -317,15 +322,6 @@ HRESULT CBroom::Behavior_Broom_HoverExitCheck(_float fTimeDelta)
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_STOP_B];
}
- if (bShift)
- {
- m_bHoverToggle = false;
- }
- if (bTurbo)
- {
- m_bTurbo = true;
- }
-
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
}
@@ -376,6 +372,7 @@ HRESULT CBroom::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
if (SUCCEEDED(InputAction()) || SUCCEEDED(InputMove()))
{
+
if (bFwd) {
m_fTargetSpeed = m_fFlyMaxSpeed;
}
@@ -387,7 +384,13 @@ HRESULT CBroom::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
m_fTargetSpeed = m_fFlyMaxSpeed;
}
- m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fFlyAccel;
+ if (m_pParentUnit->IsAI())
+ {
+ m_fTargetSpeed *= m_fAICondition;
+ m_fTargetSpeed *= m_fAISpeedMul;
+ }
+
+ m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fFlyAccel* m_fAIAccelMul;
m_pTransformCom->Go_LerpStraight(m_fSpeed, fTimeDelta);
_float fTargetVertSpeed = 0.f;
@@ -495,15 +498,6 @@ HRESULT CBroom::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
}
}
- if (bShift)
- {
- m_bHoverToggle = true;
- }
- if (bTurbo)
- {
- m_bTurbo = true;
- }
-
if (m_bHoverToggle)
{
m_fTargetSpeed = 0.f;
@@ -515,17 +509,17 @@ HRESULT CBroom::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_STOP_B];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
- if (bShift && iCurrentAnimIndex == m_Animation[STATEANIM::BROOM_HOVER_STOP_B].first)
+ /*if (bShift && iCurrentAnimIndex == m_Animation[STATEANIM::BROOM_HOVER_STOP_B].first)
{
m_bHoverToggle = false;
- }
+ }*/
if (SUCCEEDED(InputAction()) || SUCCEEDED(InputMove()))
{
if (fRatio >= 0.5f && iCurrentAnimIndex == m_Animation[STATEANIM::BROOM_HOVER_STOP_B].first)
{
m_pFSM->Change_State(FSMSTATE::HOVER);
+ return E_FAIL;
}
- return E_FAIL;
}
if (m_pModelCom->IsFinishedAnim())
{
@@ -573,19 +567,6 @@ HRESULT CBroom::Behavior_Broom_TurboFlyExitCheck(_float fTimeDelta)
_bool bShift = m_Input.bHoverToggle;
_bool bTurbo = m_Input.bTurbo;
- if (bShift)
- {
- m_bHoverToggle = true;
- }
-
- if (bTurbo)
- {
- m_bTurbo = true;
- }
- else {
- m_bTurbo = false;
- }
-
if (!m_bHoverToggle)
{
if (SUCCEEDED(InputMove()))
@@ -649,20 +630,20 @@ HRESULT CBroom::Behavior_Broom_TurboFlyExitCheck(_float fTimeDelta)
{
if (vInput.z <= 0.f)
{
- Camera_InterpTurn(fTimeDelta * 0.3f);
+ Camera_InterpTurn(fTimeDelta * 0.35f);
}
else {
- Camera_InterpTurn(fTimeDelta * 0.15f);
+ Camera_InterpTurn(fTimeDelta * 0.2f);
}
}
else if (vInput.x > 0.f)
{
if (vInput.z <= 0.f)
{
- Camera_InterpTurn(fTimeDelta * 0.3f);
+ Camera_InterpTurn(fTimeDelta * 0.35f);
}
else {
- Camera_InterpTurn(fTimeDelta * 0.15f);
+ Camera_InterpTurn(fTimeDelta * 0.2f);
}
}
@@ -837,7 +818,7 @@ void CBroom::Add_FSM()
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(fTimedelta); };
Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
- if (m_bHoverToggle)
+ if (m_bHoverToggle && m_bMove)
{
_float3 fMove = m_pGameInstance->Get_MouseMove();
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * fMove.x * 0.02f);
@@ -900,15 +881,6 @@ void CBroom::Set_Anim()
m_Animation[STATEANIM::BROOM_FLY_LEFT_B] = { 15,true };
m_Animation[STATEANIM::BROOM_FLY_RIGHT_B] = { 16,true };
m_Animation[STATEANIM::BROOM_FLY_UP_B] = { 17,true };
- //Mount 29
- //호버 스탑 6
- //호버 제자리 24
- //플라이 업 17 다운 13 왼쪽15 오른쪽 16
-
- //호버 다운 25
- //호버 왼쪽 26
- // 호버 오른쪽 27
- //호버 업 28
}
#pragma endregion State
diff --git a/Jusin154_Team3D/Client/Private/CamPosition_AI.cpp b/Jusin154_Team3D/Client/Private/CamPosition_AI.cpp
new file mode 100644
index 000000000..ec7e294b2
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/CamPosition_AI.cpp
@@ -0,0 +1,378 @@
+#include "pch.h"
+#include "CamPosition_AI.h"
+#include "CamPosition_Target.h"
+#include "GameInstance.h"
+#include "Camera_Gaze.h"
+#include "Player.h"
+
+CCamPosition_AI::CCamPosition_AI(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CCamPosition(pDevice, pContext)
+{
+}
+CCamPosition_AI::CCamPosition_AI(const CCamPosition_AI& rhs)
+ : CCamPosition(rhs)
+{
+}
+HRESULT CCamPosition_AI::Initialize_Prototype()
+{
+ return S_OK;
+}
+HRESULT CCamPosition_AI::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg))) {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+ if (FAILED(Ready_SubParts())) {
+ return E_FAIL;
+ }
+
+ CAMERA_AI_DESC* pDesc = static_cast(pArg);
+ {
+ m_pLookTransform = m_pTarget_LookPart->Get_Component();
+ m_pFollowTransform = m_pTarget_FollowPart->Get_Component();
+ m_pParentPos = m_pParentTransformCom->Get_StatePtr(STATE::POSITION);
+ m_vDampingStartPosition = *m_pParentPos;
+ m_vDampingDestPosition = *m_pParentPos;
+ m_vDampingLerpTimer.x = m_vDampingLerpTimer.y;
+ m_vFocalRatio.x = m_vFocalRatio.y;
+ m_fFocalRatioTargetValue = m_vFocalRatio.y;
+
+ _vector vLookTargetPos = Calc_LookTargetPos();
+ m_pLookTransform->Set_State(STATE::POSITION, vLookTargetPos);
+ m_pFollowTransform->Set_State(STATE::POSITION, Calc_FollowTargetPos(vLookTargetPos) + XMVectorSet(0.f, 0.f, 1.f, 0.f));
+ }
+ m_bDampingParentPos = true;
+
+ return S_OK;
+}
+
+void CCamPosition_AI::Priority_Update(_float fTimeDelta)
+{
+ if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_AI))) {
+ return;
+ }
+ {
+ if (false == m_bDampingParentPos) {
+ m_vDampingLerpTimer.x = 0.f;
+ m_vDampingStartPosition = *m_pParentPos;
+ m_vDampingDestPosition = *m_pParentPos;
+ }
+ else {
+ m_vDampingLerpTimer.x += fTimeDelta;
+ if (m_vDampingLerpTimer.x >= m_vDampingLerpTimer.y) {
+ XMStoreFloat4(&m_vDampingStartPosition, Calc_DampingParentPos());
+ m_vDampingLerpTimer.x = max(m_vDampingLerpTimer.x - m_vDampingLerpTimer.y, 0.f);
+ m_vDampingDestPosition = *m_pParentPos;
+ }
+ }
+ }
+ if (true == m_bMovable) {
+ m_vAccRotDegrees.y += m_pGameInstance->Get_MouseMove().x * m_fMouseSensor;
+ m_vAccRotDegrees.x += m_pGameInstance->Get_MouseMove().y * m_fMouseSensor;
+ CMyTools::AdjustAccumulateDegreePitchYawDegree(m_vAccRotDegrees);
+ }
+ {
+ _vector vLookTargetPos = Calc_LookTargetPos();
+ m_pLookTransform->Set_State(STATE::POSITION, vLookTargetPos);
+ m_pFollowTransform->Set_State(STATE::POSITION, Calc_FollowTargetPos(vLookTargetPos));
+
+ _float focalRatioLerpAlpha = fTimeDelta * m_fFocalRatioLerpSpeed;
+ if (focalRatioLerpAlpha > 1.f)
+ {
+ focalRatioLerpAlpha = 1.f;
+ }
+
+ m_vFocalRatio.x = CMyTools::Lerp_f1D(m_vFocalRatio.x, m_fFocalRatioTargetValue, focalRatioLerpAlpha);
+ }
+}
+
+void CCamPosition_AI::Update(_float fTimeDelta)
+{
+ if (m_pGameInstance->Key_Up(DIK_HOME)) {
+
+ m_pBinded_Camera->Toggle_AIPriority();
+ }
+ if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_AI))) {
+ return;
+ }
+#ifdef _DEBUG
+ Describe_Entity();
+#endif // _DEBUG
+}
+
+void CCamPosition_AI::Late_Update(_float fTimeDelta)
+{
+ if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_AI))) {
+ return;
+ }
+ if (true == m_bShoulderLerp)
+ {
+ m_vShoulderLerpTimer.x += fTimeDelta;
+
+ _float fLerpRatio = m_vShoulderLerpTimer.x/m_vShoulderLerpTimer.y;
+ if (fLerpRatio >= 1.f) {
+ fLerpRatio = 1.f;
+ m_bShoulderLerp = false;
+ }
+ if (false == m_bShoulderLerp) {
+ m_vShoulderLerpTimer.x = 0.f;
+ m_fFollowTargetIncludedAngleDegree = m_vShoulderLerpDegree.y;
+ } else {
+ m_fFollowTargetIncludedAngleDegree = CMyTools::Lerp_f1D(m_vShoulderLerpDegree.x, m_vShoulderLerpDegree.y, fLerpRatio);
+ }
+ }
+ if (true == m_bStartGame) {
+ m_vStartLerpTimer.x += fTimeDelta;
+ if (m_vStartLerpTimer.x >= m_vStartLerpTimer.y) {
+ m_vStartLerpTimer.x = 0.f;
+ m_bDampingParentPos = true;
+ m_bStartGame = false;
+ }
+ m_pGameInstance->Add_RenderGroup(RENDER::UI_OVERLAY, this);
+ }
+}
+
+HRESULT CCamPosition_AI::Render()
+{
+ return S_OK;
+}
+
+_vector CCamPosition_AI::Get_WorldPostion()
+{
+ return m_pTransformCom->Get_State(STATE::POSITION);
+}
+
+_vector CCamPosition_AI::Calc_LookTargetPos()
+{
+ _vector vDestPos = Calc_DampingParentPos();
+
+ _vector vFoward = { 0.f, 0.f, 1.f, 0.f };
+ _vector vRotCameraq = XMQuaternionRotationRollPitchYaw(XMConvertToRadians(m_vAccRotDegrees.x + m_vAccRealDegrees.x), XMConvertToRadians(m_vAccRotDegrees.y + m_vAccRealDegrees.y), 0.f);
+ vFoward = XMVector3Normalize(XMVector3Rotate(vFoward, vRotCameraq));
+
+ _vector vHeadPos = vDestPos + XMVectorSet(0.f, m_fHeadHeight, 0.f, 0.f);
+ _vector vFowardPos = vHeadPos + vFoward * m_fCameraFowardDistance;
+
+ return XMVectorLerp(vHeadPos, vFowardPos, m_vFocalRatio.x);
+}
+_vector CCamPosition_AI::Calc_FollowTargetPos(_vector vLookTargetWorldPos)
+{
+ _float fBestFollowTargetDistance = m_fCameraBarrelLength * (1.f - m_fDefaultCameraBackToFrontRatio);
+
+ _vector fRotQ = XMQuaternionRotationAxis(XMVectorSet(0.f, 1.f, 0.f, 0.f), XMConvertToRadians(-m_fFollowTargetIncludedAngleDegree));
+ _vector vDestPos = Calc_DampingParentPos();
+ _vector vHeadPos = vDestPos + XMVectorSet(0.f, m_fHeadHeight, 0.f, 0.f);
+ _vector vDir = vHeadPos - vLookTargetWorldPos;
+ _float fLengthSQ = XMVectorGetX(XMVector3LengthSq(vDir));
+
+ if (fLengthSQ < FLT_EPSILON)
+ {
+ vDir = XMVectorSet(0.f, 0.f, 1.f, 0.f);
+ vDir = XMVector3Rotate(vDir, fRotQ);
+ }
+ else
+ {
+ vDir = XMVector3Normalize(vDir);
+ vDir = XMVector3Rotate(vDir, fRotQ);
+ }
+
+ m_BufferHit = {};
+ _bool bHit = m_pGameInstance->SphereCast( 0.25f, vLookTargetWorldPos, vDir, fBestFollowTargetDistance,
+ PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eSTATIC/*|PSX::PxQueryFlag::eDYNAMIC*/, m_BufferHit);
+
+ if (false == bHit) {
+ return vLookTargetWorldPos + vDir * fBestFollowTargetDistance;
+ }
+
+ vector sweepHits;
+ _uint iTouchCount = m_BufferHit.getNbTouches();
+
+ if (true == m_BufferHit.hasBlock) {
+ sweepHits.reserve(iTouchCount + 1);
+ sweepHits.emplace_back(m_BufferHit.block);
+ }
+ else {
+ sweepHits.reserve(iTouchCount);
+ }
+
+ auto* touches = m_BufferHit.getTouches();
+ for (_uint index = 0; index < iTouchCount; ++index) {
+ sweepHits.emplace_back(touches[index]);
+ }
+ CMyTools::SortHitsByDistance(sweepHits);
+
+ // 벽면에서 팔로우 타겟을 살짝 띄우는 오프셋
+ _float fCameraSurfaceOffset = 0.05f;
+ _float fCameraMinDistance = 0.20f;
+ _float fDistance = { };
+ _float fFinalTargetDistance = fBestFollowTargetDistance;
+ for (auto& hit : sweepHits)
+ {
+ fDistance = hit.distance - fCameraSurfaceOffset;
+ if (fDistance < fFinalTargetDistance) {
+ if (fDistance < fCameraMinDistance) {
+ fDistance = fCameraMinDistance;
+ }
+ fFinalTargetDistance = fDistance;
+ break;
+ }
+ }
+
+ _float fSafeDistance = fBestFollowTargetDistance;
+ if (fSafeDistance < FLT_EPSILON3)
+ {
+ fSafeDistance = FLT_EPSILON3;
+ }
+
+ _float fBestFocalRatio = m_vFocalRatio.y * fFinalTargetDistance / fSafeDistance;
+
+ if (fBestFocalRatio < m_fFocalRatioMin) {
+ fBestFocalRatio = m_fFocalRatioMin;
+ } else if (fBestFocalRatio > m_vFocalRatio.y) {
+ fBestFocalRatio = m_vFocalRatio.y;
+ }
+
+ m_fFocalRatioTargetValue = fBestFocalRatio;
+
+ return vLookTargetWorldPos + vDir * fFinalTargetDistance;
+}
+_vector CCamPosition_AI::Calc_DampingParentPos()
+{
+ _float duration = max(m_vDampingLerpTimer.y, FLT_EPSILON);
+ _float fTime = m_vDampingLerpTimer.x / duration;
+ fTime = CMyTools::Saturate(fTime); // 0~1
+
+ return XMVectorLerp(XMLoadFloat4(&m_vDampingStartPosition), XMLoadFloat4(&m_vDampingDestPosition), fTime);
+}
+void CCamPosition_AI::Set_CameraShake(_float fXShock, _float fYShock)
+{
+ m_vAccRealDegrees.x = fXShock;
+ m_vAccRealDegrees.y = fYShock;
+}
+_vector CCamPosition_AI::Get_ShoulderGlobalPos()
+{
+ // Right/Left 숄더를 로컬 X 부호로 결정
+ _float shoulderSideSign = (true == m_bRightShoulderActive) ? 1.f : -1.f;
+
+ _float3 shoulderLocalPosition = m_vShoulderLocalPos;
+ shoulderLocalPosition.x *= shoulderSideSign;
+
+ _vector shoulderLocalOffset = XMLoadFloat3(&shoulderLocalPosition);
+
+ // 카메라 회전(현재 마우스로 누적된 pitch/yaw)
+ _vector cameraRotationQuaternion = XMQuaternionRotationRollPitchYaw(
+ XMConvertToRadians(m_vAccRotDegrees.x + m_vAccRealDegrees.x),
+ XMConvertToRadians(m_vAccRotDegrees.y + m_vAccRealDegrees.y), 0.f
+ );
+
+ // 카메라 로컬 오프셋을 카메라 회전에 맞춰 월드로 회전
+ _vector shoulderWorldOffset = XMVector3Rotate(shoulderLocalOffset, cameraRotationQuaternion);
+
+ return shoulderWorldOffset;
+}
+
+
+HRESULT CCamPosition_AI::Ready_Components(void* pArg)
+{
+ CTransform::TRANSFORM_DESC DescTransfrom = {};
+ DescTransfrom.fRadius = 30.f;
+ DescTransfrom.fRotationPerSec = 0.f;
+ DescTransfrom.fSpeedPerSec = 0.f;
+ if (FAILED(__super::Ready_Components(&DescTransfrom))) {
+ return E_FAIL;
+ }
+ return S_OK;
+}
+HRESULT CCamPosition_AI::Ready_SubParts()
+{
+ {
+ CCamPosition_Target::CAMERAPOSITION_TARGET_DESC Desc{};
+ Desc.pParentTransform = m_pTransformCom;
+ m_pTarget_LookPart = m_pGameInstance->Clone_Prototype< CCamPosition_Target>(g_iStaticLevel, &Desc);
+ m_pTarget_LookPart->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(-34.f, 5, -10.4f, 1.f));
+ m_pTarget_FollowPart = m_pGameInstance->Clone_Prototype< CCamPosition_Target>(g_iStaticLevel, &Desc);
+ m_pTarget_FollowPart->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(-34.f, 5, -11.4f, 1.f));
+ }
+
+ CCamera_Gaze::CAMERA_GAZE_DESC CameraDesc{};
+ CameraDesc.fFovy = XMConvertToRadians(60.0f);
+ CameraDesc.fNear = 0.1f;
+ CameraDesc.fFar = 500.f;
+ CameraDesc.fSpeedPerSec = 5.f;
+ CameraDesc.fRotationPerSec = XMConvertToRadians(90.f);
+ CameraDesc.pFollowTarget = m_pTarget_FollowPart;
+ CameraDesc.pLookTarget = m_pTarget_LookPart;
+ CameraDesc.iPriority = 102;
+ CameraDesc.pCameraKey = CAMERA_AI;
+ CameraDesc.bEnableTransitionLerp = true;
+ CameraDesc.bEnableFollowLerp = false;
+ CameraDesc.bEnableLookLerp = false;
+ CameraDesc.vTransitionTime = { 0.f, 1.f };
+ CameraDesc.vFollowLerpTime = { 0.f, TIMER_SHORT_LERP };
+ CameraDesc.vLookLerpTime = { 0.f, TIMER_SHORT_LERP };
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &CameraDesc, nullptr, &m_pBinded_Camera)))
+ {
+ return E_FAIL;
+ }
+
+ m_pGameInstance->Add_Camera(NEXT_LEVEL, m_pBinded_Camera, CAMERA_AI);
+ if (FAILED(m_pGameInstance->Bind_Camera(NEXT_LEVEL, CAMERA_AI, true))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+CCamPosition_AI* CCamPosition_AI::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CCamPosition_AI* pInstance = new CCamPosition_AI(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CCamPosition_AI");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+CCamPosition_AI* CCamPosition_AI::Clone(void* pArg, class CGameObject* pOWner)
+{
+ CCamPosition_AI* pInstance = new CCamPosition_AI(*this);
+ pInstance->m_pOwner = pOWner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CCamPosition_AI");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+void CCamPosition_AI::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pTarget_LookPart);
+ SAFE_RELEASE(m_pTarget_FollowPart);
+}
+#ifdef _DEBUG
+
+void CCamPosition_AI::Describe_Entity()
+{
+ GUI::Begin("CAMERA", 0, IMGUI_GLOBAL_BEGIN_FLAG);
+ if (GUI::CollapsingHeader("Cam_Shoulder")) {
+ m_pTransformCom->Describe_Entity();
+
+ GUI::Text("fMouseSensor : %.1f", m_fMouseSensor);
+ GUI::SliderFloat("m_fFollowTargetIncludedAngleDegree", &m_fFollowTargetIncludedAngleDegree, -360.f, 360.f, "%.1f");
+ GUI::SliderFloat("m_fDefaultCameraBackToFrontRatio", &m_fDefaultCameraBackToFrontRatio, -1.f, 1.f);
+ GUI::SliderFloat("m_vFocalRatio", &m_vFocalRatio.x, 0.f, 1.f);
+ GUI::SliderFloat("m_fCameraFowardDistance", &m_fCameraFowardDistance, 0.f, 4.f);
+ }
+ GUI::End();
+}
+
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp
index 0b100f941..4fe005d8e 100644
--- a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp
+++ b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp
@@ -95,6 +95,10 @@ void CCamPosition_Shoulder::Update(_float fTimeDelta)
m_pBinded_Camera->Toggle_Priority();
}
+ if (m_pGameInstance->Key_Up(DIK_HOME)) {
+
+ m_pBinded_Camera->Toggle_AIPriority();
+ }
if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_SHOULDER))) {
return;
}
diff --git a/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp b/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp
index 1fb18dc42..f54d07e0a 100644
--- a/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp
+++ b/Jusin154_Team3D/Client/Private/Camera_Gaze.cpp
@@ -109,6 +109,17 @@ void CCamera_Gaze::Toggle_Priority()
}
}
+void CCamera_Gaze::Toggle_AIPriority()
+{
+ if (m_iPriority == 55) {
+ m_iPriority = 102;
+ }
+ else {
+ m_iPriority = 55;
+ m_pGameInstance->Bind_Camera(NEXT_LEVEL, CAMERA_SHOULDER, false);
+ }
+}
+
void CCamera_Gaze::Late_Update(_float fTimeDelta)
{
if (false == m_bActive) {
diff --git a/Jusin154_Team3D/Client/Private/Dialogue.cpp b/Jusin154_Team3D/Client/Private/Dialogue.cpp
index 0fa9025b3..aa0095f1a 100644
--- a/Jusin154_Team3D/Client/Private/Dialogue.cpp
+++ b/Jusin154_Team3D/Client/Private/Dialogue.cpp
@@ -279,7 +279,10 @@ void CDialogue::Free()
SAFE_RELEASE(m_pShaderCom);
SAFE_RELEASE(m_pVIBufferCom);
}
-
+#ifdef _DEBUG
void CDialogue::Describe_Entity()
{
}
+#endif // DEBUG
+
+
diff --git a/Jusin154_Team3D/Client/Private/EffectObject.cpp b/Jusin154_Team3D/Client/Private/EffectObject.cpp
index 9602254e7..fd1b7642f 100644
--- a/Jusin154_Team3D/Client/Private/EffectObject.cpp
+++ b/Jusin154_Team3D/Client/Private/EffectObject.cpp
@@ -100,7 +100,7 @@ HRESULT CEffectObject::Render_Blur()
}
}
- if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NONPOS)
+ if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NONPOS || m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::DEFAULT_NONPOS)
BlurPass = SHADER_PASS_INSTANCE_MODEL::NONPOS_BLUR;
if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::WB_CULLING)
@@ -365,6 +365,22 @@ HRESULT CEffectObject::Load(CEffect_Container::EFFECT_SAVE_INFO EffectSaveInfo,
}
}
+ if (m_EffectInfo.isNomalMap)
+ {
+
+ m_strNomalMapName = EffectSaveInfo.wstrNomalName;;
+
+ if (m_strDistortionName.length() > 0)
+ {
+ if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strNomalMapName,
+ reinterpret_cast(&m_pNormal_TextureCom))))
+ {
+
+ return E_FAIL;
+ }
+ }
+ }
+
m_strModelName = EffectSaveInfo.wstrModelName;
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strModelName,
@@ -627,6 +643,38 @@ HRESULT CEffectObject::Load(const _char* pFilePath, LEVEL eLevel)
}
+ }
+
+
+ if (m_EffectInfo.isNomalMap)
+ {
+ size_t iComponentLength = {};
+
+ if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+
+ if (iComponentLength != 0)
+ {
+ _char szName[MAX_PATH] = {};
+
+ if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+
+ m_strNomalMapName = CMyTools::ToWstring(szName);
+
+ if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strNomalMapName,
+ reinterpret_cast(&m_pNormal_TextureCom))))
+ {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+ }
+
+
}
size_t iComponentLength = {};
@@ -719,7 +767,7 @@ HRESULT CEffectObject::Bind_ShaderResources()
}
- if (m_EffectInfo.isMotionBlur == true)
+ if (m_EffectInfo.isMotionBlur == true || m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::DEFAULT)
{
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
@@ -1008,7 +1056,9 @@ HRESULT CEffectObject::Bind_ShaderResources()
return E_FAIL;
}
-
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_isNoDissolveSmoothStep", &m_EffectInfo.isNoDissolveSmoothStep, sizeof(_bool)))) {
+ return E_FAIL;
+ }
if (m_pDiffuse_TextureCom != nullptr)
@@ -1053,7 +1103,22 @@ HRESULT CEffectObject::Bind_ShaderResources()
}
}
+ if (m_pNormal_TextureCom != nullptr)
+ {
+ if (FAILED(m_pShaderCom->Bind_SRV("g_NormalTexture", m_pNormal_TextureCom->Get_SRV(0)))) {
+ return E_FAIL;
+ }
+ _float fUsingSurfaceParams = MRO_PARAMETER;
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fUsingSurfaceParams", &fUsingSurfaceParams, sizeof(_float))))
+ return E_FAIL;
+
+ if (FAILED(m_pShaderCom->Bind_SRV("g_SurfaceParamsTexture", m_pSurface_TextureCom->Get_SRV(0)))) {
+ return E_FAIL;
+ }
+
+ }
return S_OK;
@@ -1106,6 +1171,8 @@ void CEffectObject::Free()
SAFE_RELEASE(m_pDissolve_TextureCom);
SAFE_RELEASE(m_pEmissive_TextureCom);
SAFE_RELEASE(m_pDistortion_TextureCom);
+ SAFE_RELEASE(m_pNormal_TextureCom);
+ SAFE_RELEASE(m_pSurface_TextureCom);
SAFE_RELEASE(m_pShaderCom);
SAFE_RELEASE(m_pInstance_ModelCom);
diff --git a/Jusin154_Team3D/Client/Private/EffectParts.cpp b/Jusin154_Team3D/Client/Private/EffectParts.cpp
index f5f093cda..6243eced9 100644
--- a/Jusin154_Team3D/Client/Private/EffectParts.cpp
+++ b/Jusin154_Team3D/Client/Private/EffectParts.cpp
@@ -119,6 +119,12 @@ HRESULT CEffectParts::Ready_Components(void* pArg)
{
return E_FAIL;
}
+
+
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Base_MRO"),
+ reinterpret_cast(&m_pSurface_TextureCom))))
+ return E_FAIL;
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/EffectPool.cpp b/Jusin154_Team3D/Client/Private/EffectPool.cpp
index 80bf9a228..00a072d6e 100644
--- a/Jusin154_Team3D/Client/Private/EffectPool.cpp
+++ b/Jusin154_Team3D/Client/Private/EffectPool.cpp
@@ -42,6 +42,8 @@
#include "Blink.h"
#include "Transformation.h"
#include "Avadakedavra.h"
+#include "Ranrok_FireBall.h"
+#include "Ranrok_Breath.h"
CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
@@ -81,7 +83,7 @@ HRESULT CEffectPool::Initialize(void* pArg)
#endif //
#ifdef 진우
m_isActiveEffectCreate = true;
- m_isActiveMonsterEffectCreate = false;
+ m_isActiveMonsterEffectCreate = true;
#endif //
#ifdef 기무리
m_isActiveEffectCreate = true;
@@ -560,6 +562,29 @@ HRESULT CEffectPool::Ready_MonsterEffect()
))) return E_FAIL;
+ if (FAILED(Create_Effect(SKILL_TYPE::RANROK_FIREBALL, 5, g_iStaticLevel, g_iStaticLevel, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
+
+ CRanrok_FireBall* pEffect = nullptr;
+
+ pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr);
+
+ return pEffect; }
+
+ ))) return E_FAIL;
+
+ if (FAILED(Create_Effect(SKILL_TYPE::RANROK_BREATH, 5, g_iStaticLevel, g_iStaticLevel, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
+
+ CRanrok_Breath* pEffect = nullptr;
+
+ pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr);
+
+ return pEffect; }
+
+ ))) return E_FAIL;
+
+
+
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Effect_Container.cpp b/Jusin154_Team3D/Client/Private/Effect_Container.cpp
index 4e3d4b1c1..adf490335 100644
--- a/Jusin154_Team3D/Client/Private/Effect_Container.cpp
+++ b/Jusin154_Team3D/Client/Private/Effect_Container.cpp
@@ -347,6 +347,30 @@ HRESULT CEffect_Container::Load_Data(const _char* pPath)
}
+ }
+
+ if (EffectSaveInfo.EffectInfo.isNomalMap)
+ {
+ size_t iComponentLength = {};
+
+ if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+
+ if (iComponentLength != 0)
+ {
+ _char szName[MAX_PATH] = {};
+
+ if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
+ CloseHandle(hFile);
+ return E_FAIL;
+ }
+
+ EffectSaveInfo.wstrNomalName = CMyTools::ToWstring(szName);
+ }
+
+
}
size_t iComponentLength = {};
@@ -595,7 +619,6 @@ HRESULT CEffect_Container::Reset_EffectParts()
return S_OK;
}
-
_int CEffect_Container::CollisionCheck()
{
_bool bIsCollide = { false };
@@ -633,10 +656,10 @@ _int CEffect_Container::CollisionCheck()
default:
break;
}
-
+
//switch (pUserData->eKind)
//{
-
+
//case PHYSX_KIND::BODY_STATIC:
//case PHYSX_KIND::BODY_DYNAMIC:
//{
@@ -654,7 +677,6 @@ _int CEffect_Container::CollisionCheck()
return -1;
}
-
ON_COLLISION_INFO CEffect_Container::SweepTarget(_vector StartPos, _vector EndPos, _float fRadius , _bool isTerrainCollision )
{
_vector vStartPos = StartPos;
@@ -880,6 +902,83 @@ ON_COLLISION_INFO CEffect_Container::MonsterSweepTarget(_vector StartPos, _vecto
return tagCollInfo;
}
+ON_COLLISION_INFO CEffect_Container::MonsterRayCast(_vector StartPos, _vector _vDir, _float _fLength, _uint iMaxHitCapacity)
+{
+ _vector vStartPos = StartPos;
+ _vector vDir = _vDir;
+
+ _float fLength = _fLength;
+
+ vector Raycasts = {};
+ Raycasts.resize(iMaxHitCapacity);
+
+ _bool bHit = m_pGameInstance->RayCast(vStartPos, vDir, fLength, Raycasts.data(), iMaxHitCapacity, m_iHitCount);
+
+ ON_COLLISION_INFO tagCollInfo = {};
+
+ for (_uint i = 0; i < iMaxHitCapacity; i++)
+ {
+ PSX::PxRigidActor* pActor = Raycasts[i].actor;
+ PSX::PxShape* pShape = Raycasts[i].shape;
+
+
+ tagCollInfo.vWorldPos.w = 1.f;
+
+ if (bHit) {
+
+ memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &Raycasts[i].position, sizeof(Raycasts[i].position));
+
+ memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &Raycasts[i].normal, sizeof(Raycasts[i].normal));
+ XMStoreFloat4(&tagCollInfo.vHitDir, vDir);
+ tagCollInfo.fLength = fLength;
+
+ if (nullptr != pActor && nullptr != pActor->userData)
+ {
+ PhsXUserData* pUserData = static_cast(pActor->userData);
+ tagCollInfo.pObject = pUserData->pOwner;
+
+ switch (pUserData->eKind)
+ {
+ case PHYSX_KIND::CCTActor:
+ {
+ switch (PXOBJECT(pUserData->iSubKind))
+ {
+
+ case PXOBJECT::PLAYER:
+ {
+ pUserData->pOwner->OnCollision(this, &tagCollInfo);
+ m_bHit = true;
+ }
+ break;
+ case PXOBJECT::SKILL_PROTEGO:
+ {
+ pUserData->pOwner->OnCollision(this, &tagCollInfo);
+ m_bHit = true;
+ }
+ }
+ }
+ }
+
+
+ switch (PXOBJECT(pUserData->iSubKind))
+ {
+ case PXOBJECT::TERRAIN:
+ {
+
+ m_bHit = true;
+ break;
+ }
+ }
+ }
+
+ }
+
+ return tagCollInfo;
+ }
+
+ return tagCollInfo;
+}
+
void CEffect_Container::Update_Event(_float fTimeDelta)
{
diff --git a/Jusin154_Team3D/Client/Private/InfoInstance.cpp b/Jusin154_Team3D/Client/Private/InfoInstance.cpp
index 4acb69db3..70e96f3aa 100644
--- a/Jusin154_Team3D/Client/Private/InfoInstance.cpp
+++ b/Jusin154_Team3D/Client/Private/InfoInstance.cpp
@@ -134,6 +134,14 @@ HRESULT CInfoInstance::Load_ChestElemet(const _char* pFileName, const _wchar* pL
{
return m_pMapInfo->Load_ChestElemet(pFileName, pLayerTag);
}
+HRESULT CInfoInstance::Load_WorldDecal(const _char* pFileName, const _wchar* pLayerTag)
+{
+ return m_pMapInfo->Load_WorldDecal(pFileName, pLayerTag);
+}
+HRESULT CInfoInstance::Load_PointLights(const _char* pFileName, const _wchar* pLayerTag)
+{
+ return m_pMapInfo->Load_PointLights(pFileName, pLayerTag);;
+}
#pragma endregion
#pragma region SPELL_INFO
diff --git a/Jusin154_Team3D/Client/Private/InteractiveInfo.cpp b/Jusin154_Team3D/Client/Private/InteractiveInfo.cpp
index fd8232636..25e9df4c0 100644
--- a/Jusin154_Team3D/Client/Private/InteractiveInfo.cpp
+++ b/Jusin154_Team3D/Client/Private/InteractiveInfo.cpp
@@ -34,6 +34,14 @@ void CInteractiveInfo::Change_Level()
for (CMapElement_Interactable* pInteractive : m_ActiveInteractive) {
SAFE_RELEASE(pInteractive);
} m_ActiveInteractive.clear();
+
+ for (CMapElement_Interactable* pInteractive : m_PoolingInteractive) {
+ SAFE_RELEASE(pInteractive);
+ } m_PoolingInteractive.clear();
+
+ for (CMapElement_Interactable* pInteractive : m_PoolingActiveInteractive) {
+ SAFE_RELEASE(pInteractive);
+ } m_PoolingActiveInteractive.clear();
}
HRESULT CInteractiveInfo::Regist_ActiveInteractive(CMapElement_Interactable* pUnit)
@@ -191,6 +199,7 @@ HRESULT CInteractiveInfo::Ready_PoolingInteractive()
if (nullptr != pInteractable)
{
+ SAFE_ADDREF(pInteractable);
m_PoolingInteractive.push_back(pInteractable);
}
else
diff --git a/Jusin154_Team3D/Client/Private/Level_Field.cpp b/Jusin154_Team3D/Client/Private/Level_Field.cpp
index 536cb8a7d..9c23705d7 100644
--- a/Jusin154_Team3D/Client/Private/Level_Field.cpp
+++ b/Jusin154_Team3D/Client/Private/Level_Field.cpp
@@ -134,8 +134,8 @@ HRESULT CLevel_Field::Ready_Lights()
return E_FAIL;
}
- _float4 vDiffuse = _float4(0.3f, 0.3f, 0.3f, 0.f);
- _float4 vAmbient = _float4(0.12f, 0.12f, 0.12f, 0.f);
+ _float4 vDiffuse = _float4(0.745f, 0.797f, 0.8f, 0.f);
+ _float4 vAmbient = _float4(0.1f, 0.13f, 0.13f, 0.f);
_float4 vSpecular = _float4(0.05f, 0.05f, 0.05f, 0.f);
pLight->Get_Component()->Set_Color(vDiffuse, vAmbient, vSpecular);
@@ -187,11 +187,13 @@ HRESULT CLevel_Field::Ready_Layer_SkyBox()
HRESULT CLevel_Field::Ready_Background()
{
- _float4 vColor = _float4(0.2f, 0.2f, 0.2f, 1.f);
+ _float4 vColor = _float4(0.2f, 0.246f, 0.253f, 1.f);
m_pGameInstance->Set_FogColor(vColor);
- m_pGameInstance->Set_Fog(10.f, 5.f);
+ m_pGameInstance->Set_Fog(10.f, 8.f);
CInfoInstance::GetInstance()->Load_MapObjects("Dungeon_Map_Data", LAYER_BACKGROUND);
+ CInfoInstance::GetInstance()->Load_WorldDecal("Duengon_Decal_Data", LAYER_BACKGROUND);
+ CInfoInstance::GetInstance()->Load_PointLights("Duengon_PointLight_Data", LAYER_BACKGROUND);
return S_OK;
}
diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
index 0f263fa88..2cca88c8f 100644
--- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
+++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp
@@ -577,6 +577,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag)
CPlayer::PLAYERDESC playerDesc = {};
playerDesc.vPos = _float4(-21.f, 0.f, -14.f, 1.f);
playerDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f);
+ playerDesc.pBroomRaceManager = m_pBroomRaceManager;
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &playerDesc))) {
return E_FAIL;
@@ -603,7 +604,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag)
HRESULT CLevel_GamePlay::Ready_Layer_BroomRacerAI(const _wstring& strLayerTag)
{
- for (_uint i = 0; i < 1; ++i) {
+ for (_uint i = 0; i < 10; ++i) {
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, m_pBroomRaceManager))) {
return E_FAIL;
}
@@ -618,8 +619,12 @@ HRESULT CLevel_GamePlay::Ready_Layer_Item(const _wstring& strLayerTag)
HRESULT CLevel_GamePlay::Ready_Layer_RaceRing(const _wstring& strLayerTag)
{
- for (_uint i = 0; i < 1; ++i) {
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, m_pBroomRaceManager))) {
+ for (_uint i = 0; i < 10; ++i) {
+
+ CRaceRing::RACERING_DESC RaceRingDesc {};
+ RaceRingDesc.pBroomRaceManager = m_pBroomRaceManager;
+ RaceRingDesc.iIndex = i;
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &RaceRingDesc))) {
return E_FAIL;
}
}
@@ -665,11 +670,13 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster()
return E_FAIL;
}
-#if 진우
-#else
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
return E_FAIL;
}
+
+#if 진우
+#else
+
#endif
diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp
index 9823c413b..f96dae1a0 100644
--- a/Jusin154_Team3D/Client/Private/Loader.cpp
+++ b/Jusin154_Team3D/Client/Private/Loader.cpp
@@ -13,6 +13,7 @@
#include "CamPosition_Shoulder.h"
#include "CamPosition_Socket.h"
#include "CamPosition_Target.h"
+#include "CamPosition_AI.h"
#include "SkyBox.h"
#include "Troll_Weapon.h"
#include "Troll_Rock.h"
@@ -180,6 +181,8 @@
#include "Mage_Down_Attack.h"
#include "Mage_Nomal_Attack.h"
#include "MageSide.h"
+#include "Ranrok_FireBall.h"
+#include "Ranrok_Breath.h"
#include "StunEffect.h"
#include "Box_Splesh.h"
@@ -212,6 +215,8 @@
#include "MapElement_Chest.h"
#include "MapElement_Chest_Lid.h"
#include "MapElement_Static.h"
+#include "WorldDecal.h"
+#include "PointLight.h"
#pragma endregion
@@ -1417,6 +1422,11 @@ HRESULT CLoader::Loading_For_GamePlay()
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Base_MRO"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("C:/MeshTable/Game/Environment//MasterMaterials/BaseTextures/T_Base011_MRO.dds"), 0)))) {
+ return E_FAIL;
+ }
+
#pragma region EFFECT
Asset_FileLoad("../Bin/Resources/Textures/Effect/Trails", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) {
@@ -1520,7 +1530,7 @@ HRESULT CLoader::Loading_For_GamePlay()
return E_FAIL;
}
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_INSTANCE_PROP_MODEL,
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_INSTANCE_PROP_MODEL,
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_VtxWorldModelInstance.hlsl"),
VTX_MODEL_INSTANCE_MODEL::Elements, VTX_MODEL_INSTANCE_MODEL::iNumElements)))) {
return E_FAIL;
@@ -1688,7 +1698,6 @@ HRESULT CLoader::Loading_For_GamePlay()
Desc1.vLocalTranslation = { 0.f, 0.f, 0.f };
}
-
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_HEAVY_WALL"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
return E_FAIL;
}
@@ -1756,11 +1765,6 @@ HRESULT CLoader::Loading_For_GamePlay()
return E_FAIL;
}
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_VictorRookWood_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/VictorRookWood/VictorRookWood.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
- return E_FAIL;
- }
-
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Model"),
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin/Goblin.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))){
return E_FAIL;
@@ -1784,6 +1788,16 @@ HRESULT CLoader::Loading_For_GamePlay()
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_VictorRookWood_Model"),
+ CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/VictorRookWood/VictorRookWood.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Ghost_Peeves_Model"),
+ CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.bin", XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
+ return E_FAIL;
+ }
+
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Troll_Model"),
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))){
return E_FAIL;
@@ -1807,7 +1821,7 @@ HRESULT CLoader::Loading_For_GamePlay()
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_RaceRing_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Object/RaceRing/SM_BRR_RaceRing_01.bin", XMMatrixIdentity()))))
+ CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Object/RaceRing/SM_BRR_RaceRing_01.bin", XMMatrixRotationX(XMConvertToRadians(90.f)) * XMMatrixIdentity()))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Broom_Model"),
@@ -1979,7 +1993,15 @@ HRESULT CLoader::Loading_For_GamePlay()
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRanrok_FireBall::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRanrok_Breath::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+
+
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CGoblin_Teleport::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
@@ -2737,6 +2759,10 @@ HRESULT CLoader::Loading_For_GamePlay()
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCamPosition_Shoulder::Create(m_pDevice, m_pContext))))
return E_FAIL;
+ /* For.Prototype_GameObject_CamPosition_AI */
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCamPosition_AI::Create(m_pDevice, m_pContext))))
+ return E_FAIL;
+
/* For.Prototype_GameObject_CamPosition_Target */
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCamPosition_Target::Create(m_pDevice, m_pContext))))
return E_FAIL;
@@ -2830,8 +2856,6 @@ HRESULT CLoader::Loading_For_GamePlay()
HRESULT CLoader::Loading_For_Field()
{
- m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
-
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
#pragma region DUNGEON
@@ -2922,7 +2946,6 @@ HRESULT CLoader::Loading_For_Field()
#pragma endregion
-
{ // MapModels
_uint iIndex = 0;
for (auto& JobMapModels : jobMapModels)
@@ -2946,12 +2969,61 @@ HRESULT CLoader::Loading_For_Field()
}
}
+ /* For.Prototype_Component_DecalBox */
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_DecalBox"),
+ CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Effect/Decal/DecalBox.fbx", XMMatrixIdentity()))))
+ return E_FAIL;
+
+ m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
+
+#pragma region MAP_TEXTURE
+ /* Base_MRO */
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Base_MRO"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("C:/MeshTable/Game/Environment//MasterMaterials/BaseTextures/T_Base011_MRO.dds"), 0)))) {
+ return E_FAIL;
+ }
+ /* Decal_MSK */
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Decal_MSK"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("C:/MeshTable/Game/Environment/Sanctum_Dungeon/Textures/Repository/T_Rift_Material_MSK.dds"), 0)))) {
+ return E_FAIL;
+ }
+ /* Decal_Noraml */
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Decal_Noraml"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("C:/MeshTable/Game/Environment/Sanctum_Dungeon/Textures/Repository/T_Rift_Veins_N.dds"), 0)))) {
+ return E_FAIL;
+ }
+ /* Decal_Fade */
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Decal_Fade"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("C:/MeshTable/Game/VFX/Textures/Noises/VFX_T_Noise08_D.png"), 0)))) {
+ return E_FAIL;
+ }
+ /* Decal_MaskNoise */
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Decal_MaskNoise"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("C:/MeshTable/Game/VFX/Textures/Noises/VFX_T_TankMoteNoiseVinceTest_D.png"), 0)))) {
+ return E_FAIL;
+ }
+ /* Decal_MaskNoise */
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Decal_DiffuseMask"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("C:/MeshTable/Game/VFX/Textures/VFX_T_DementorTatter_D.dds"), 0)))) {
+ return E_FAIL;
+ }
+#pragma endregion
+
+
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
m_strMessage = TEXT("이펙트를(을) 로딩 중 입니다.");
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
+ /* For.Prototype_GameObject_PointLight */
+ if (FAILED(m_pGameInstance->Add_Prototype(ENUM_CLASS(LEVEL::FIELD), CPointLight::Create(m_pDevice, m_pContext))))
+ return E_FAIL;
+
+ /* For.Prototype_GameObject_WorldDecal */
+ if (FAILED(m_pGameInstance->Add_Prototype(ENUM_CLASS(LEVEL::FIELD), CWorldDecal::Create(m_pDevice, m_pContext))))
+ return E_FAIL;
+
m_strMessage = TEXT("정보를 불러오는 중입니다.");
m_strMessage = TEXT("로딩이 완료되었습니다..");
diff --git a/Jusin154_Team3D/Client/Private/Mage_Nomal_Attack.cpp b/Jusin154_Team3D/Client/Private/Mage_Nomal_Attack.cpp
index 810b37b30..9f62d6027 100644
--- a/Jusin154_Team3D/Client/Private/Mage_Nomal_Attack.cpp
+++ b/Jusin154_Team3D/Client/Private/Mage_Nomal_Attack.cpp
@@ -21,8 +21,6 @@ CMage_Nomal_Attack::CMage_Nomal_Attack(const CMage_Nomal_Attack& rhs)
HRESULT CMage_Nomal_Attack::Initialize_Prototype()
{
-
-
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/NomalAttack")))
return E_FAIL;
diff --git a/Jusin154_Team3D/Client/Private/MapInfo.cpp b/Jusin154_Team3D/Client/Private/MapInfo.cpp
index c5b01b921..1b8501711 100644
--- a/Jusin154_Team3D/Client/Private/MapInfo.cpp
+++ b/Jusin154_Team3D/Client/Private/MapInfo.cpp
@@ -13,6 +13,8 @@
#include "MapElement_Door.h"
#include "MapElement_Chest.h"
#include "MapElement_Static.h"
+#include "WorldDecal.h"
+#include "PointLight.h"
#include "Layer.h"
CMapInfo::CMapInfo()
@@ -733,6 +735,139 @@ HRESULT CMapInfo::Load_ChestElemet(const _char* pFileName, const _wchar* pLayerT
return S_OK;
}
+HRESULT CMapInfo::Load_WorldDecal(const _char* pFileName, const _wchar* pLayerTag)
+{
+ tinyxml2::XMLDocument xmlDoc;
+
+ string strPath = "../Bin/Resources/Data/Map/Decal/" + string(pFileName) + ".xml";
+
+ if ((tinyxml2::XML_SUCCESS != xmlDoc.LoadFile(strPath.c_str())))
+ return E_FAIL;
+
+ tinyxml2::XMLElement* root = xmlDoc.FirstChildElement("Decal");
+
+ if (nullptr == root)
+ {
+ MSG_BOX("Failed to Find root");
+ return S_OK;
+ }
+
+ for (auto* Object = root->FirstChildElement("Object"); Object; Object = Object->NextSiblingElement("Object"))
+ {
+ CWorldDecal::WORLD_DECAL_DESC Desc = {};
+
+ /* Transform */
+ auto* Rotation = Object->FirstChildElement("Scale");
+ Rotation->QueryFloatAttribute("x", &Desc.vScale.x);
+ Rotation->QueryFloatAttribute("y", &Desc.vScale.y);
+ Rotation->QueryFloatAttribute("z", &Desc.vScale.z);
+
+ auto* Scale = Object->FirstChildElement("Rotation");
+ Scale->QueryFloatAttribute("x", &Desc.vRotation.x);
+ Scale->QueryFloatAttribute("y", &Desc.vRotation.y);
+ Scale->QueryFloatAttribute("z", &Desc.vRotation.z);
+
+ auto* Position = Object->FirstChildElement("Position");
+ Position->QueryFloatAttribute("x", &Desc.vPosition.x);
+ Position->QueryFloatAttribute("y", &Desc.vPosition.y);
+ Position->QueryFloatAttribute("z", &Desc.vPosition.z);
+
+ /* Decal Desc */
+ auto* Shader_Value = Object->FirstChildElement("Shader_Value");
+ Shader_Value->QueryFloatAttribute("UVTiling", &Desc.fUVTiling);
+ Shader_Value->QueryFloatAttribute("UVSpeedX", &Desc.vUVSpeed.x);
+ Shader_Value->QueryFloatAttribute("UVSpeedY", &Desc.vUVSpeed.y);
+
+ /* MaskRed */
+ auto* MaskRed = Object->FirstChildElement("MaskRed");
+ MaskRed->QueryFloatAttribute("r", &Desc.vMaskRed.x);
+ MaskRed->QueryFloatAttribute("g", &Desc.vMaskRed.y);
+ MaskRed->QueryFloatAttribute("b", &Desc.vMaskRed.z);
+ MaskRed->QueryFloatAttribute("a", &Desc.vMaskRed.w);
+
+ /* MaskGreen */
+ auto* MaskGreen = Object->FirstChildElement("MaskGreen");
+ MaskGreen->QueryFloatAttribute("r", &Desc.vMaskGreen.x);
+ MaskGreen->QueryFloatAttribute("g", &Desc.vMaskGreen.y);
+ MaskGreen->QueryFloatAttribute("b", &Desc.vMaskGreen.z);
+ MaskGreen->QueryFloatAttribute("a", &Desc.vMaskGreen.w);
+
+ /* MaskBlue */
+ auto* MaskBlue = Object->FirstChildElement("MaskBlue");
+ MaskBlue->QueryFloatAttribute("r", &Desc.vMaskBlue.x);
+ MaskBlue->QueryFloatAttribute("g", &Desc.vMaskBlue.y);
+ MaskBlue->QueryFloatAttribute("b", &Desc.vMaskBlue.z);
+ MaskBlue->QueryFloatAttribute("a", &Desc.vMaskBlue.w);
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(NEXT_LEVEL, NEXT_LEVEL, pLayerTag, &Desc)))
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CMapInfo::Load_PointLights(const _char* pFilePath, const _wchar* pLayerTag)
+{
+ tinyxml2::XMLDocument xmlDoc;
+
+ string strPath = "../Bin/Resources/Data/Map/Light/" + string(pFilePath) + ".xml";
+
+ if ((tinyxml2::XML_SUCCESS != xmlDoc.LoadFile(strPath.c_str())))
+ return E_FAIL;
+
+ tinyxml2::XMLElement* root = xmlDoc.FirstChildElement("MapLightObjects");
+
+ if (nullptr == root)
+ {
+ MSG_BOX("Failed to Find root");
+ return S_OK;
+ }
+
+ for (auto* Object = root->FirstChildElement("Object"); Object; Object = Object->NextSiblingElement("Object"))
+ {
+ CPointLight::POINTLIGHT_DESC Desc = {};
+
+ /* Transform */
+ auto* Position = Object->FirstChildElement("Position");
+ Position->QueryFloatAttribute("x", &Desc.vPosition.x);
+ Position->QueryFloatAttribute("y", &Desc.vPosition.y);
+ Position->QueryFloatAttribute("z", &Desc.vPosition.z);
+
+ /* Light Desc */
+ auto* Diffuse = Object->FirstChildElement("Diffuse");
+ Diffuse->QueryFloatAttribute("x", &Desc.vDiffuse.x);
+ Diffuse->QueryFloatAttribute("y", &Desc.vDiffuse.y);
+ Diffuse->QueryFloatAttribute("z", &Desc.vDiffuse.z);
+
+ auto* Ambient = Object->FirstChildElement("Ambient");
+ Ambient->QueryFloatAttribute("x", &Desc.vAmbient.x);
+ Ambient->QueryFloatAttribute("y", &Desc.vAmbient.y);
+ Ambient->QueryFloatAttribute("z", &Desc.vAmbient.z);
+
+ auto* Specular = Object->FirstChildElement("Specular");
+ Specular->QueryFloatAttribute("x", &Desc.vSpecular.x);
+ Specular->QueryFloatAttribute("y", &Desc.vSpecular.y);
+ Specular->QueryFloatAttribute("z", &Desc.vSpecular.z);
+
+ auto* PosOffset = Object->FirstChildElement("PosOffset");
+ PosOffset->QueryFloatAttribute("x", &Desc.vPosOffset.x);
+ PosOffset->QueryFloatAttribute("y", &Desc.vPosOffset.y);
+ PosOffset->QueryFloatAttribute("z", &Desc.vPosOffset.z);
+
+ auto* Info = Object->FirstChildElement("Info");
+ Info->QueryFloatAttribute("LightAttRange", &Desc.fLightAttRange);
+ Info->QueryFloatAttribute("LightAttSpeed", &Desc.fLightAttSpeed);
+ Info->QueryFloatAttribute("Range", &Desc.fRange);
+ _uint iPow = {};
+ Info->QueryUnsignedAttribute("Pow", &iPow);
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(NEXT_LEVEL, NEXT_LEVEL, pLayerTag, &Desc)))
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
HRESULT CMapInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex)
{
m_pGameInstance = CGameInstance::GetInstance();
diff --git a/Jusin154_Team3D/Client/Private/NPCInteraction.cpp b/Jusin154_Team3D/Client/Private/NPCInteraction.cpp
index af9639530..020a65e67 100644
--- a/Jusin154_Team3D/Client/Private/NPCInteraction.cpp
+++ b/Jusin154_Team3D/Client/Private/NPCInteraction.cpp
@@ -298,7 +298,10 @@ void CNPCInteraction::Free()
SAFE_RELEASE(m_pShaderCom);
SAFE_RELEASE(m_pVIBufferCom);
}
-
+#ifdef _DEBUG
void CNPCInteraction::Describe_Entity()
{
}
+#endif // DEBUG
+
+
diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp
index 8aee1afc3..c0ca9a43f 100644
--- a/Jusin154_Team3D/Client/Private/Player.cpp
+++ b/Jusin154_Team3D/Client/Private/Player.cpp
@@ -15,6 +15,8 @@
#include "Monster.h"
#include "Broom.h"
#include "MapElement_Interactable.h"
+#include "BroomRaceManager.h"
+#include "RaceRing.h"
#pragma region STATE
#include "State_Idle.h"
@@ -102,6 +104,19 @@ HRESULT CPlayer::Initialize(void* pArg)
m_pCharacter_Controller->Set_Position(vPos);
m_pTransformCom->Set_State(STATE::POSITION, vPos);
m_pTransformCom->Rotation(vRotQ);
+
+ m_pBroomRaceManager = pDesc->pBroomRaceManager;
+
+ if (m_pBroomRaceManager)
+ {
+ CBroomRaceManager::RacerInfo Info;
+
+ Info.pRacer = this;
+ Info.curRing = 0;
+ Info.prevPos = Get_WorldPostion();
+
+ m_pBroomRaceManager->Push_BroomRacer(Info);
+ }
}
#ifdef _DEBUG
@@ -123,6 +138,9 @@ HRESULT CPlayer::Initialize(void* pArg)
m_pModelCom->Set_Temp(true);
+
+
+
return S_OK;
}
@@ -726,6 +744,7 @@ void CPlayer::Free()
SAFE_RELEASE(m_pBroomModel);
SAFE_RELEASE(m_pBroomTransform);
SAFE_RELEASE(m_pBroom);
+ SAFE_RELEASE(m_pRaceRing);
}
#ifdef _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp
index d5e2d79cb..e2bc1b266 100644
--- a/Jusin154_Team3D/Client/Private/Player_States.cpp
+++ b/Jusin154_Team3D/Client/Private/Player_States.cpp
@@ -355,7 +355,7 @@ void CPlayer::Behavior_MoveEnter()
_bool bRight = m_pGameInstance->Key_Pressing(DIK_D);
_bool bBackward = m_pGameInstance->Key_Pressing(DIK_S);
m_pFSM->Enable_State(FSMSTATE::MOVE);
- if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE | FSMSTATE::DODGE | FSMSTATE::LAND)) {
+ if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE | FSMSTATE::DODGE | FSMSTATE::LAND | FSMSTATE::DISMOUNT)) {
if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE))
{
@@ -2142,6 +2142,8 @@ void CPlayer::Behavior_Broom_HoverExit()
void CPlayer::Behavior_Broom_FlyEnter()
{
m_pFSM->Enable_State(FSMSTATE::FLY);
+ m_fNeutralTime = 0.f;
+ m_fNoInputTime = 0.f;
}
HRESULT CPlayer::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
@@ -2159,6 +2161,7 @@ HRESULT CPlayer::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
{
if (SUCCEEDED(InputBroom()) || SUCCEEDED(InputMove()))
{
+ m_fNoInputTime = 0.f;
_float3 vInput = { 0.f, 0.f, 0.f };
if (bFwd) vInput.z += 1.f;
@@ -2188,43 +2191,96 @@ HRESULT CPlayer::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
if (ay > ax && ay > az)
{
- if (vInput.y > 0)
+ if (vInput.y > 0) {
pairAnimInfo = m_Animation[STATEANIM::BROOM_UP];
- else if (vInput.y < 0)
+
+ }
+ else if (vInput.y < 0) {
pairAnimInfo = m_Animation[STATEANIM::BROOM_DOWN];
+ }
}
else if (ax >= az)
{
if (ay >= ax)
{
- if (vInput.y > 0)
+ if (vInput.y > 0) {
pairAnimInfo = m_Animation[STATEANIM::BROOM_UP];
- else if (vInput.y < 0)
+
+ }
+ else if (vInput.y < 0) {
pairAnimInfo = m_Animation[STATEANIM::BROOM_DOWN];
+
+ }
+ else {
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_IDLE];
+ }
}
else {
- if (vInput.x < 0)
+ if (vInput.x < 0) {
pairAnimInfo = m_Animation[STATEANIM::BROOM_LEFT];
- else if (vInput.x > 0)
+
+ }
+ else if (vInput.x > 0) {
pairAnimInfo = m_Animation[STATEANIM::BROOM_RIGHT];
+
+ }
else {
- pairAnimInfo = m_Animation[STATEANIM::BROOM_FWD];
+ pairAnimInfo = m_Animation[STATEANIM::BROOM_IDLE];
}
}
}
else
{
- if (vInput.y > 0)
+ if (vInput.y > 0) {
pairAnimInfo = m_Animation[STATEANIM::BROOM_UP];
- else if (vInput.y < 0)
+
+ }
+ else if (vInput.y < 0) {
pairAnimInfo = m_Animation[STATEANIM::BROOM_DOWN];
+
+ }
else {
pairAnimInfo = m_Animation[STATEANIM::BROOM_FWD];
}
}
+
+ _bool bNeutralAnim =
+ (pairAnimInfo.first == m_Animation[STATEANIM::BROOM_FWD].first ||
+ pairAnimInfo.first == m_Animation[STATEANIM::BROOM_IDLE].first);
+
+ if (!bNeutralAnim)
+ {
+ m_fNeutralTime = 0.f;
+ if (iCurrAnimIndex != pairAnimInfo.first)
+ {
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ }
+ else
+ {
+ m_fNeutralTime += fTimeDelta;
+
+ if (m_fNeutralTime > 0.2f)
+ {
+ if (iCurrAnimIndex != pairAnimInfo.first)
+ {
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ }
+ }
}
else {
- pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_IDLE);
+ m_fNoInputTime += fTimeDelta;
+
+ if (m_fNoInputTime > 0.2f)
+ {
+ pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_IDLE);
+
+ if (iCurrAnimIndex != pairAnimInfo.first)
+ {
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ }
+ }
}
if (m_pGameInstance->Key_Down(DIK_R))
@@ -2234,9 +2290,8 @@ HRESULT CPlayer::Behavior_Broom_FlyExitCheck(_float fTimeDelta)
[this]() {
m_pEffectPool->Use_Skill(SKILL_TYPE::REVELIO, this);
}, 0.2f);
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
}
-
- m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true,0.8f);
}
if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_REVELIO].first)
@@ -2281,6 +2336,8 @@ void CPlayer::Behavior_Broom_FlyExit()
void CPlayer::Behavior_Broom_TurboFlyEnter()
{
m_pFSM->Enable_State(FSMSTATE::TURBOFLY);
+ m_fNeutralTime = 0.f;
+ m_fNoInputTime = 0.f;
}
HRESULT CPlayer::Behavior_Broom_TurboFlyExitCheck(_float fTimeDelta)
@@ -2298,6 +2355,7 @@ HRESULT CPlayer::Behavior_Broom_TurboFlyExitCheck(_float fTimeDelta)
{
if (SUCCEEDED(InputBroom()) || SUCCEEDED(InputMove()))
{
+ m_fNoInputTime = 0.f;
_float3 vInput = { 0.f, 0.f, 0.f };
if (bFwd) vInput.z += 1.f;
@@ -2361,15 +2419,39 @@ HRESULT CPlayer::Behavior_Broom_TurboFlyExitCheck(_float fTimeDelta)
pairAnimInfo = m_Animation[STATEANIM::BROOM_TURBO_FWD];
}
}
+
+ _bool bNeutralAnim =
+ (pairAnimInfo.first == m_Animation[STATEANIM::BROOM_TURBO_FWD].first);
+
+ if (!bNeutralAnim)
+ {
+ m_fNeutralTime = 0.f;
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,true,1.f,false);
+ }
+ else
+ {
+ m_fNeutralTime += fTimeDelta;
+
+ if (m_fNeutralTime > 0.2f)
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
+ }
}
else {
- pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_TURBO_FWD);
+
+ m_fNoInputTime += fTimeDelta;
+
+ if (m_fNoInputTime > 0.2f)
+ {
+ pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_TURBO_FWD);
+
+ if (iCurrAnimIndex != pairAnimInfo.first)
+ {
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true, 1.f, false);
+ }
+ }
}
-
- m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.f,true,1.f,false);
}
-
if (m_pGameInstance->Key_Pressing(DIK_N))
{
auto flags = m_pCharacter_Controller->Get_CollisionFlags();
@@ -2434,8 +2516,11 @@ HRESULT CPlayer::Behavior_Broom_DismountExitCheck(_float fTimeDelta)
{
m_pBroomTransform->Set_Scale(m_BroomScale);
}
- if (fRatio >= 0.85f) {
+ if (fRatio >= 0.5f) {
m_BroomScale = { 0.f,0.f,0.f };
+ m_pBroomTransform->Set_State(STATE::POSITION,XMVectorSet(XMVectorGetX(m_pTransformCom->Get_State(STATE::POSITION)),
+ 200.f,
+ XMVectorGetZ(m_pTransformCom->Get_State(STATE::POSITION)), 1.f));
if (SUCCEEDED(InputMove()))
{
m_pFSM->Change_State(FSMSTATE::MOVE);
@@ -3039,7 +3124,7 @@ void CPlayer::Add_FSM()
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
if (!m_bOnce) {
m_pBroomTransform->Set_WorldMatrix(m_pTransformCom->Get_XMWorldMatrix());
- m_pBroomTransform->Set_State(STATE::POSITION, m_pBroomTransform->Get_State(STATE::POSITION) + XMVectorSet(0.f,2.f,0.f,0.f));
+ m_pBroomTransform->Set_State(STATE::POSITION, m_pTransformCom->Get_State(STATE::POSITION) + XMVectorSet(0.f,2.f,0.f,0.f));
_float3 vScale = { 0.3f,0.3f,0.3f };
m_pBroomTransform->Set_Scale(vScale);
m_bOnce = true;
@@ -3249,7 +3334,7 @@ void CPlayer::Set_Anim()
m_Animation[STATEANIM::BROOM_MOUNT] = { 735,false };
m_Animation[STATEANIM::BROOM_MOUNT_END] = { 738,false };
m_Animation[STATEANIM::BROOM_HOVER_START] = { 700,false };
- m_Animation[STATEANIM::BROOM_DISMOUNT] = { 739,false };
+ m_Animation[STATEANIM::BROOM_DISMOUNT] = { 676,false };
m_Animation[STATEANIM::BROOM_HOVER_IDLE] = { 704,true };
m_Animation[STATEANIM::BROOM_HOVER_FWD] = { 701,true };
diff --git a/Jusin154_Team3D/Client/Private/PointLight.cpp b/Jusin154_Team3D/Client/Private/PointLight.cpp
new file mode 100644
index 000000000..9850b9c1c
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/PointLight.cpp
@@ -0,0 +1,133 @@
+#include "pch.h"
+#include "PointLight.h"
+
+#include "GameInstance.h"
+#include "Layer.h"
+
+CPointLight::CPointLight(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CGameObject{ pDevice, pContext }
+{
+}
+
+CPointLight::CPointLight(const CPointLight& rhs)
+ : CGameObject(rhs)
+{
+}
+
+void CPointLight::Priority_Update(_float fTimeDelta)
+{
+}
+
+void CPointLight::Update(_float fTimeDelta)
+{
+ m_fAttenuationTime += fTimeDelta * m_fLightIntensitySpeed;
+}
+
+void CPointLight::Late_Update(_float fTimeDelta)
+{
+ m_pLightCom->Set_AttPower(sinf(m_fAttenuationTime) * sinf(m_fAttenuationTime) * m_fLightIntensity + m_fLightIntensity + 1.f);
+}
+
+HRESULT CPointLight::Render()
+{
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CPointLight::Initialize_Prototype()
+{
+ return S_OK;
+}
+
+HRESULT CPointLight::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Components(pArg)))
+ return E_FAIL;
+
+ return S_OK;
+}
+
+HRESULT CPointLight::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ LIGHT_DESC LightDesc{};
+ LightDesc.iLevel = NEXT_LEVEL;
+ LightDesc.pPosition = m_pTransformCom->Get_StatePtr(STATE::POSITION);
+
+
+ POINTLIGHT_DESC* pDesc = static_cast(pArg);
+
+ m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vPosition), 1.f));
+ LightDesc.eType = LIGHT::POINT;
+ LightDesc.vDiffuse = pDesc->vDiffuse;
+ LightDesc.vAmbient = pDesc->vAmbient;
+ LightDesc.vSpecular = pDesc->vSpecular;
+ LightDesc.vPosOffset = _float4(pDesc->vPosOffset.x, pDesc->vPosOffset.y, pDesc->vPosOffset.z, 1.f);
+ LightDesc.fRange = pDesc->fRange;
+
+ m_fLightIntensity = pDesc->fLightAttRange;
+ m_fLightIntensitySpeed = pDesc->fLightAttSpeed;
+
+ /* Com_Light*/
+ if (FAILED(Add_Component(g_iStaticLevel, &m_pLightCom, &LightDesc)))
+ {
+ return E_FAIL;
+ }
+
+ m_pGameInstance->Add_Light(NEXT_LEVEL, m_pLightCom);
+
+ return S_OK;
+}
+
+HRESULT CPointLight::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+CPointLight* CPointLight::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CPointLight* pInstance = new CPointLight(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CPointLight");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CPointLight::Clone(void* pArg, CGameObject* pOwner)
+{
+ CPointLight* pInstance = new CPointLight(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CPointLight");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+void CPointLight::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pLightCom);
+}
+
+#ifdef _DEBUG
+void CPointLight::Describe_Entity()
+{
+
+}
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Private/RaceRing.cpp b/Jusin154_Team3D/Client/Private/RaceRing.cpp
index 98e97da44..9617d7c93 100644
--- a/Jusin154_Team3D/Client/Private/RaceRing.cpp
+++ b/Jusin154_Team3D/Client/Private/RaceRing.cpp
@@ -30,25 +30,21 @@ HRESULT CRaceRing::Initialize(void* pArg)
return E_FAIL;
}
+ m_pBroomRaceManager = static_cast(pArg)->pBroomRaceManager;
+ m_iIndex = static_cast(pArg)->iIndex;
_float X = m_pGameInstance->Real_Random_Float(-200.f, 200.f);
- _float Y = m_pGameInstance->Real_Random_Float(-5.f, 5.f);
- _float Z = m_pGameInstance->Real_Random_Float(-200.f, 200.f);
+ _float Y = m_pGameInstance->Real_Random_Float(15.f, 60.f);
+ _float Z = m_pGameInstance->Real_Random_Float(-50.f, 50.f);
- m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(X, Y, Z, 1.f));
-
- m_pBroomRaceManager = static_cast(pArg);
+ m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet((_float)m_iIndex *100.f, Y, Z, 1.f));
m_pBroomRaceManager->Push_RaceRing(this);
-
-
return S_OK;
}
void CRaceRing::Priority_Update(_float fTimeDelta)
{
-
-
#ifdef _DEBUG
Describe_Entity();
@@ -146,6 +142,7 @@ HRESULT CRaceRing::Bind_ShaderResources()
}
+
CRaceRing* CRaceRing::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CRaceRing* pInstance = new CRaceRing(pDevice, pContext);
diff --git a/Jusin154_Team3D/Client/Private/Ranrok.cpp b/Jusin154_Team3D/Client/Private/Ranrok.cpp
index b8c5d5256..741617bc3 100644
--- a/Jusin154_Team3D/Client/Private/Ranrok.cpp
+++ b/Jusin154_Team3D/Client/Private/Ranrok.cpp
@@ -62,8 +62,8 @@ HRESULT CRanrok::Initialize(void* pArg)
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody);
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody,&m_bCollisionPlayer);
- //m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object();
- //SAFE_ADDREF(m_pEffectPool);
+ m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object();
+ SAFE_ADDREF(m_pEffectPool);
if (NEXT_LEVEL == ENUM_CLASS(LEVEL::FIELD))
{
@@ -646,7 +646,7 @@ void CRanrok::Free()
SAFE_RELEASE(m_pCharacter_Controller);
SAFE_RELEASE(m_pRigidBody);
- //SAFE_RELEASE(m_pEffectPool);
+ SAFE_RELEASE(m_pEffectPool);
Safe_Delete(m_pCallBack_Behavior);
Safe_Delete(m_pCallBack_HitReport);
}
diff --git a/Jusin154_Team3D/Client/Private/Ranrok_Breath.cpp b/Jusin154_Team3D/Client/Private/Ranrok_Breath.cpp
new file mode 100644
index 000000000..2022c4da7
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/Ranrok_Breath.cpp
@@ -0,0 +1,308 @@
+#include "pch.h"
+#include "Ranrok_Breath.h"
+
+#include "GameInstance.h"
+#include "EffectParts.h"
+#include "Wand.h"
+#include "Player.h"
+#include "InfoInstance.h"
+
+CRanrok_Breath::CRanrok_Breath(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CEffect_Container{ pDevice, pContext }
+{
+}
+
+CRanrok_Breath::CRanrok_Breath(const CRanrok_Breath& rhs)
+ : CEffect_Container(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
+{
+ SAFE_ADDREF(m_pInfoInstance);
+}
+
+HRESULT CRanrok_Breath::Initialize_Prototype()
+{
+
+
+ if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokBreath")))
+ return E_FAIL;
+ return S_OK;
+
+}
+
+HRESULT CRanrok_Breath::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Components(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Create_Effect()))
+ return E_FAIL;
+
+ m_wstrEffectName = L"RanrokBreath";
+
+
+ m_pBreath = Get_PartObject("Breath");
+ m_pBreath_Black = Get_PartObject("Breath_Black");
+ m_pBreathSlog = Get_PartObject("BreathSlog");
+ m_pMouthFire = Get_PartObject("MouthFire");
+
+ SAFE_ADDREF(m_pBreath);
+ SAFE_ADDREF(m_pBreath_Black);
+ SAFE_ADDREF(m_pBreathSlog);
+ SAFE_ADDREF(m_pMouthFire);
+
+ m_fDuration = 5.f;
+
+
+ m_Events.emplace(0.5f, [&]() {
+ m_isStartRayCast = true;
+ });
+
+
+ m_Events.emplace(3.f, [&]() {
+
+ // 파티클 제어
+ m_isParticleEnd = true;
+
+ CEffectParts* pRock_PT = Get_PartObject("Rock_PT");
+ CEffectParts* pBottomFire = Get_PartObject("BottomFire");
+ CEffectParts* pSplatterBottom0 = Get_PartObject("SplatterBottom0");
+
+ m_pMouthFire->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
+
+ pRock_PT->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
+ pBottomFire->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
+ pSplatterBottom0->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
+
+ m_pBreath->Get_Component()->Set_Loop(false);
+ m_pBreath->Get_Effect_Info()->isDissolve = true;
+
+ m_pBreath_Black->Get_Component()->Set_Loop(false);
+ m_pBreath_Black->Get_Effect_Info()->isDissolve = true;
+
+ m_pBreathSlog->Set_Visible(false);
+
+ });
+ return S_OK;
+}
+
+void CRanrok_Breath::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+
+
+}
+
+void CRanrok_Breath::Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Update(fTimeDelta);
+
+ Update_Event(fTimeDelta);
+
+ _matrix BoneMat = XMLoadFloat4x4(m_pOwner->Get_Component()->Get_BoneMatrixPtr("tongue_01"));
+
+ for (int i = 0; i < 3; ++i) {
+ BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]);
+ }
+
+ _matrix WorldMat = m_pOwner->Get_Component()->Get_XMWorldMatrix() ;
+
+ _matrix CombinedMat = BoneMat * WorldMat;
+
+
+
+ m_pBreath->Get_Component()->Set_WorldMatrix(CombinedMat);
+ m_pBreath_Black->Get_Component()->Set_WorldMatrix(CombinedMat);
+ m_pBreathSlog->Get_Component()->Set_WorldMatrix(CombinedMat);
+
+ if(m_isParticleEnd == false)
+ m_pMouthFire->Get_Component()->Set_State(STATE::POSITION, CombinedMat.r[3]);
+
+
+ _vector vStartPos = CombinedMat.r[3];
+
+ XMStoreFloat4(&m_vStartPos, vStartPos);
+
+ if(m_isStartRayCast == true)
+ {
+ ON_COLLISION_INFO CollisionInfo = MonsterRayCast(XMLoadFloat4(&m_vStartPos), CombinedMat.r[2] * -1.f, 50.f, 50);
+ if (m_bHit = true)
+ OnCollision(this, &CollisionInfo);
+
+ }
+
+
+
+}
+
+void CRanrok_Breath::Late_Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Late_Update(fTimeDelta);
+
+
+}
+
+HRESULT CRanrok_Breath::Pre_Setting(CGameObject* pObject, void* pArg)
+{
+ if (FAILED(__super::Pre_Setting(pObject, nullptr)))
+ return E_FAIL;
+
+
+ /* 초기 객체 비지블*/
+
+ CEffectParts* pBlurMesh = Get_PartObject("BlurMesh");
+
+ m_pBreath->Set_Visible(true);
+ m_pBreath_Black->Set_Visible(true);
+ m_pBreathSlog->Set_Visible(true);
+ m_pMouthFire->Set_Visible(true);
+ pBlurMesh->Set_Visible(true);
+
+ /* 초기 객체 위치 초기화*/
+
+ _matrix BoneMat = XMLoadFloat4x4(m_pOwner->Get_Component()->Get_BoneMatrixPtr("tongue_01"));
+
+ for (int i = 0; i < 3; ++i) {
+ BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]);
+ }
+
+ _matrix WorldMat = m_pOwner->Get_Component()->Get_XMWorldMatrix() ;
+
+ _matrix CombinedMat = BoneMat * WorldMat;
+
+
+
+ m_pBreath->Get_Component()->Set_WorldMatrix(CombinedMat);
+ m_pBreath_Black->Get_Component()->Set_WorldMatrix(CombinedMat);
+ m_pBreathSlog->Get_Component()->Set_WorldMatrix(CombinedMat);
+
+ _vector vStartPos = CombinedMat.r[3];
+
+ XMStoreFloat4(&m_vStartPos, vStartPos);
+
+
+
+ m_pMouthFire->Get_Component()->Set_State(STATE::POSITION, CombinedMat.r[3]);
+ pBlurMesh->Get_Component()->Set_State(STATE::POSITION, CombinedMat.r[3]);
+
+ /* 브레스 디졸브를 위해 초기값 설정*/
+ m_pBreath->Get_Component()->Set_Loop(true);
+ m_pBreath->Get_Effect_Info()->isDissolve = false;
+
+ m_pBreath_Black->Get_Component()->Set_Loop(true);
+ m_pBreath_Black->Get_Effect_Info()->isDissolve = false;
+
+ m_isParticleEnd = false;
+ m_isStartRayCast = false;
+ return S_OK;
+}
+
+HRESULT CRanrok_Breath::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CRanrok_Breath::Ready_Child()
+{
+ return S_OK;
+}
+
+CRanrok_Breath* CRanrok_Breath::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CRanrok_Breath* pInstance = new CRanrok_Breath(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CRanrok_Breath");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+
+CGameObject* CRanrok_Breath::Clone(void* pArg, CGameObject* pOwner)
+{
+ CRanrok_Breath* pInstance = new CRanrok_Breath(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CRanrok_Breath");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CRanrok_Breath::OnCollision(CGameObject* pOther, void* pDesc)
+{
+ if (m_bHit == false)
+ return;
+
+ ON_COLLISION_INFO CollisionDesc = *static_cast(pDesc);
+
+ _vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos);
+
+ if (XMVectorGetX(XMVector4Length(vPos)) <= 0.f) /* 000 일때 들어오지마 */
+ return;
+
+ _vector vPrePos = XMLoadFloat4(&m_vPreCollisionPos);
+ _vector vDir = XMVector3Normalize(vPos - vPrePos);
+
+ if (m_isParticleEnd == true)
+ return;
+
+ CEffectParts* pRock_PT = Get_PartObject("Rock_PT");
+ CEffectParts* pBottomFire = Get_PartObject("BottomFire");
+ CEffectParts* pSplatterBottom0 = Get_PartObject("SplatterBottom0");
+
+ pRock_PT->Set_Visible(true);
+ pRock_PT->Get_Component()->Set_State(STATE::POSITION, vPos);
+
+ pBottomFire->Set_Visible(true);
+ pBottomFire->Get_Component()->Set_State(STATE::POSITION, vPos);
+
+ pSplatterBottom0->Set_Visible(true);
+ pSplatterBottom0->Get_Component()->Set_State(STATE::POSITION, vPos + vDir * 3.f);
+
+ XMStoreFloat4(&m_vPreCollisionPos, vPos);
+}
+
+void CRanrok_Breath::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pInfoInstance);
+
+ SAFE_RELEASE(m_pBreath);
+ SAFE_RELEASE(m_pBreath_Black);
+ SAFE_RELEASE(m_pBreathSlog);
+ SAFE_RELEASE(m_pMouthFire);
+
+ //SAFE_RELEASE(m_pFireBall_Tail);
+}
+#ifdef _DEBUG
+void CRanrok_Breath::Describe_Entity()
+{
+
+}
+#endif
+
+HRESULT CRanrok_Breath::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+
diff --git a/Jusin154_Team3D/Client/Private/Ranrok_FireBall.cpp b/Jusin154_Team3D/Client/Private/Ranrok_FireBall.cpp
new file mode 100644
index 000000000..4eec50dab
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/Ranrok_FireBall.cpp
@@ -0,0 +1,268 @@
+#include "pch.h"
+#include "Ranrok_FireBall.h"
+
+#include "GameInstance.h"
+#include "EffectParts.h"
+#include "Wand.h"
+#include "Player.h"
+#include "InfoInstance.h"
+
+CRanrok_FireBall::CRanrok_FireBall(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CEffect_Container{ pDevice, pContext }
+{
+}
+
+CRanrok_FireBall::CRanrok_FireBall(const CRanrok_FireBall& rhs)
+ : CEffect_Container(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
+{
+ SAFE_ADDREF(m_pInfoInstance);
+}
+
+HRESULT CRanrok_FireBall::Initialize_Prototype()
+{
+
+ if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokFireBall")))
+ return E_FAIL;
+
+ return S_OK;
+
+}
+
+HRESULT CRanrok_FireBall::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Components(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Create_Effect()))
+ return E_FAIL;
+
+
+ m_wstrEffectName = L"RanrokFireBall";
+
+
+ m_pFireBall = Get_PartObject("FireBall");
+ m_pFireBall_PT = Get_PartObject("FireBall_PT");
+ m_pFireBall_Surface = Get_PartObject("FireBall_Surface");
+
+
+ SAFE_ADDREF(m_pFireBall);
+ SAFE_ADDREF(m_pFireBall_PT);
+ SAFE_ADDREF(m_pFireBall_Surface);
+
+ m_fDuration = 4.f;
+
+
+ return S_OK;
+}
+
+void CRanrok_FireBall::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+
+ XMStoreFloat4(&m_vStartPos, m_pFireBall->Get_WorldPostion());
+}
+
+void CRanrok_FireBall::Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Update(fTimeDelta);
+
+ Update_Event(fTimeDelta);
+
+
+ m_pFireBall->Get_Component()->Translation(XMLoadFloat3(&m_vLook) * m_fLinearSpeed);
+ m_pFireBall_PT->Get_Component()->Translation(XMLoadFloat3(&m_vLook) * m_fLinearSpeed);
+ m_pFireBall_Surface->Get_Component()->Translation(XMLoadFloat3(&m_vLook) * m_fLinearSpeed);
+ //m_pFireBall_Tail->Get_Component()->Translation(XMLoadFloat3(&m_vLook) * m_fLinearSpeed);
+
+ if (false == m_bHit) {
+ _vector vStartPos = XMLoadFloat4(&m_vStartPos);
+ _vector vEndPos = m_pFireBall->Get_WorldPostion();
+ ON_COLLISION_INFO CollisionInfo = MonsterSweepTarget(vStartPos, vEndPos, 0.2f, true);
+
+ OnCollision(this, &CollisionInfo);
+ }
+
+}
+
+void CRanrok_FireBall::Late_Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Late_Update(fTimeDelta);
+
+
+}
+
+HRESULT CRanrok_FireBall::Pre_Setting(CGameObject* pObject, void* pArg)
+{
+ if (FAILED(__super::Pre_Setting(pObject, nullptr)))
+ return E_FAIL;
+
+ CEffectParts* pBlack_Smoke = Get_PartObject("Black_Smoke");
+ CEffectParts* pFireBall_Ring = Get_PartObject("FireBall_Ring");
+
+ /* 초기 객체 비지블*/
+ m_pFireBall->Set_Visible(true);
+ m_pFireBall_PT->Set_Visible(true);
+ m_pFireBall_Surface->Set_Visible(true);
+
+ pBlack_Smoke->Set_Visible(true);
+ pFireBall_Ring->Set_Visible(true);
+
+ /* 초기 객체 위치 초기화*/
+
+ _matrix BoneMat = XMLoadFloat4x4(m_pOwner->Get_Component()->Get_BoneMatrixPtr("jaw"));
+
+ for (int i = 0; i < 3; ++i) {
+ BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]);
+ }
+
+ _matrix WorldMat = m_pOwner->Get_Component()->Get_XMWorldMatrix();
+
+ _matrix CombinedMat = BoneMat * WorldMat;
+
+ _vector vStartPos = CombinedMat.r[3];
+
+ XMStoreFloat4(&m_vStartPos, vStartPos);
+
+ /* 플레이어 위치 받기 */
+ CUnit* pPlayer = m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first;
+
+ if (pPlayer == nullptr)
+ return E_FAIL;
+
+ /* 초기 방향 */
+ XMStoreFloat4(&m_vTargetPos, pPlayer->Get_Component()->Get_Position());
+ XMStoreFloat3(&m_vLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos)));
+
+ m_pFireBall_PT->Get_Component()->Set_State(STATE::POSITION, vStartPos);
+ //m_pFireBall_Tail->Get_Component()->Set_State(STATE::POSITION, vStartPos - XMLoadFloat3(&m_vLook) * 5.f);
+ pBlack_Smoke->Get_Component()->Set_State(STATE::POSITION, vStartPos);
+ pFireBall_Ring->Get_Component()->Set_State(STATE::POSITION, vStartPos);
+ /* PJ 월드 구성하기 */
+
+
+ _vector vLook = XMVector3Normalize(XMLoadFloat3(&m_vLook));
+ _vector vRight = XMVector3Normalize(XMVector3Cross(XMVectorSet(0.f, 1.f, 0.f, 0.f), vLook));
+ _vector vUp = XMVector3Normalize(XMVector3Cross(vLook, vRight));
+ _vector vPos = vStartPos;
+
+ _matrix PJ_WorldMat = { vRight , vUp ,vLook , vPos };
+
+ m_pFireBall->Get_Component()->Set_WorldMatrix(PJ_WorldMat);
+ m_pFireBall_Surface->Get_Component()->Set_WorldMatrix(PJ_WorldMat);
+
+ return S_OK;
+}
+
+HRESULT CRanrok_FireBall::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CRanrok_FireBall::Ready_Child()
+{
+ return S_OK;
+}
+
+CRanrok_FireBall* CRanrok_FireBall::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CRanrok_FireBall* pInstance = new CRanrok_FireBall(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CRanrok_FireBall");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+
+CGameObject* CRanrok_FireBall::Clone(void* pArg, CGameObject* pOwner)
+{
+ CRanrok_FireBall* pInstance = new CRanrok_FireBall(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CRanrok_FireBall");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CRanrok_FireBall::OnCollision(CGameObject* pOther, void* pDesc)
+{
+ if (m_bHit == false)
+ return;
+
+ ON_COLLISION_INFO CollisionDesc = *static_cast(pDesc);
+
+ _vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos);
+
+
+ for (auto& pPair : m_PartObjects)
+ {
+ pPair.second->Set_Visible(true);
+ pPair.second->Get_Component()->Set_State(STATE::POSITION, vPos);
+ }
+
+
+ m_pFireBall->Set_Visible(false);
+ m_pFireBall_Surface->Set_Visible(false);
+
+ //m_pFireBall_Tail->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
+ m_pFireBall_PT->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
+
+
+ CEffectParts* pBlack_Smoke = Get_PartObject("Black_Smoke");
+
+ pBlack_Smoke->Set_Visible(false);
+
+ CPlayer* pPlayer = static_cast(m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first);
+
+
+ if (pPlayer == nullptr)
+ return;
+
+ pPlayer->Start_CameraShake(0.3f, 2.f);
+
+}
+
+void CRanrok_FireBall::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pInfoInstance);
+
+ SAFE_RELEASE(m_pFireBall);
+ SAFE_RELEASE(m_pFireBall_PT);
+ SAFE_RELEASE(m_pFireBall_Surface);
+ //SAFE_RELEASE(m_pFireBall_Tail);
+}
+#ifdef _DEBUG
+void CRanrok_FireBall::Describe_Entity()
+{
+
+}
+#endif
+
+HRESULT CRanrok_FireBall::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+
diff --git a/Jusin154_Team3D/Client/Private/Ranrok_States.cpp b/Jusin154_Team3D/Client/Private/Ranrok_States.cpp
index 53f3b6b46..ba317eb0d 100644
--- a/Jusin154_Team3D/Client/Private/Ranrok_States.cpp
+++ b/Jusin154_Team3D/Client/Private/Ranrok_States.cpp
@@ -4,7 +4,6 @@
#include "GameInstance.h"
#include "Player.h"
#include "Effect_Container.h"
-#include "EffectParts.h"
#include "EffectPool.h"
#pragma region STATE
@@ -39,7 +38,7 @@ void CRanrok::Behavior_IdleEnter()
HRESULT CRanrok::Behavior_IdleExitCheck()
{
- if (m_fTargetDistance <= 35.f && m_fTargetDistance !=0.f)
+ if (m_fTargetDistance <= 100.f && m_fTargetDistance != 0.f)
{
m_pFSM->Change_State(FSMSTATE::COMBAT);
return E_FAIL;
@@ -87,7 +86,7 @@ HRESULT CRanrok::Behavior_MoveExitCheck(_float fTimeDelta)
pair<_uint, _bool> pairAnimInfo = {};
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
- if (m_fTargetDistance <= 35.f && m_fTargetDistance != 0.f)
+ if (m_fTargetDistance <= 100.f && m_fTargetDistance != 0.f)
{
m_pFSM->Change_State(FSMSTATE::COMBAT);
return E_FAIL;
@@ -117,33 +116,33 @@ HRESULT CRanrok::Behavior_CombatExitCheck(_float fTimeDelta)
}
- if (m_fTargetDistance <= 35.f && m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)] <= 0.f)
+ if (m_fTargetDistance <= 100.f && m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)] <= 0.f)
{
m_pFSM->Change_State(FSMSTATE::FIREBREATH);
return E_FAIL;
}
- else if (m_fTargetDistance <= 35.f && m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBALL)] <= 0.f)
+ else if (m_fTargetDistance <= 100.f && m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBALL)] <= 0.f)
{
m_pFSM->Change_State(FSMSTATE::FIREBALL);
return E_FAIL;
}
- else if (m_fTargetDistance <= 35.f && m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIRESWEEP)] <= 0.f)
+ else if (m_fTargetDistance <= 100.f && m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIRESWEEP)] <= 0.f)
{
m_pFSM->Change_State(FSMSTATE::FIRESWEEP);
return E_FAIL;
}
- else if (m_fTargetDistance <= 35.f && m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::RUSH)] <= 0.f && m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND))
+ else if (m_fTargetDistance <= 100.f && m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::RUSH)] <= 0.f && m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND))
{
m_pFSM->Change_State(FSMSTATE::RUSH);
return E_FAIL;
}
- else if (m_fTargetDistance <= 35.f && m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::SWIPE)] <= 0.f && m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND))
+ else if (m_fTargetDistance <= 100.f && m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::SWIPE)] <= 0.f && m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND))
{
m_pFSM->Change_State(FSMSTATE::SWIPE);
return E_FAIL;
}
- else if (m_fTargetDistance <= 35.f && m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::PULSE)] <= 0.f)
+ else if (m_fTargetDistance <= 100.f && m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::PULSE)] <= 0.f)
{
m_pFSM->Change_State(FSMSTATE::PULSE);
return E_FAIL;
@@ -154,7 +153,7 @@ HRESULT CRanrok::Behavior_CombatExitCheck(_float fTimeDelta)
return E_FAIL;
}
else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND)) {
- if (m_pFSM->IsEnable_Previous(FSMSTATE::TUCKED| FSMSTATE::PULSE))
+ if (m_pFSM->IsEnable_Previous(FSMSTATE::TUCKED | FSMSTATE::PULSE))
{
m_pFSM->Change_State(FSMSTATE::LAND);
}
@@ -184,7 +183,7 @@ void CRanrok::Behavior_GroundEnter()
HRESULT CRanrok::Behavior_GroundExitCheck(_float fTimeDelta)
{
- if (m_fTargetDistance <= 35.f && m_fTargetDistance != 0.f)
+ if (m_fTargetDistance <= 100.f && m_fTargetDistance != 0.f)
{
m_pFSM->Change_State(FSMSTATE::COMBAT);
return E_FAIL;
@@ -290,15 +289,25 @@ void CRanrok::Behavior_FireBreathEnter()
pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_WINDUP_A];
Add_Event(pairAnimInfo.first,
- [&]() { pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_A];
- m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
- m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)]; },
- 0.95f);
+ [&]() {
+ pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_A];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)];
+ m_bLookAt = false;
+ }, 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); },
- 0.95f);
+ [&]() {
+ pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_COOLDOWN_A];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ m_bLookAt = true;
+ }, 0.95f);
+
+ Add_Event(m_Animation[STATEANIM::FIREBREATH_A].first,
+ [this]() {
+ m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this);
+ }, 0.1f);
+
}
else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND))
{
@@ -345,18 +354,32 @@ void CRanrok::Behavior_FireSweepEnter()
Add_Event(pairAnimInfo.first,
[&]() { pairAnimInfo = m_Animation[STATEANIM::FIRESWEEP_A];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
- m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIRESWEEP)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIRESWEEP)]; },
- 0.95f);
+ m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIRESWEEP)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIRESWEEP)];
+ m_bLookAt = false;
+ }, 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); },
- 0.95f);
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ m_bLookAt = true;
+ },
+ 0.94f);
+
+
+ Add_Event(m_Animation[STATEANIM::FIRESWEEP_A].first,
+ [this]() {
+ m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this);
+ }, 0.08f);
}
else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND))
{
pairAnimInfo = m_Animation[STATEANIM::FIRESWEEP_G];
m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIRESWEEP)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIRESWEEP)];
+
+ Add_Event(m_Animation[STATEANIM::FIRESWEEP_G].first,
+ [this]() {
+ m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this);
+ }, 0.2f);
}
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
}
@@ -399,11 +422,24 @@ void CRanrok::Behavior_FireBallEnter()
{
case 0:
pairAnimInfo = m_Animation[STATEANIM::FIREBALL1_A];
+
+ Add_Event(pairAnimInfo.first,
+ [this]() {
+ m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_FIREBALL, this);
+ }, 0.38f);
+
break;
case 1:
pairAnimInfo = m_Animation[STATEANIM::FIREBALL2_A];
+
+ Add_Event(pairAnimInfo.first,
+ [this]() {
+ m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_FIREBALL, this);
+ }, 0.5f);
+
break;
}
+
}
else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND))
{
@@ -413,11 +449,25 @@ void CRanrok::Behavior_FireBallEnter()
{
case 0:
pairAnimInfo = m_Animation[STATEANIM::FIREBALL1_G];
+
+ Add_Event(pairAnimInfo.first,
+ [this]() {
+ m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_FIREBALL, this);
+ }, 0.4f);
+
break;
case 1:
pairAnimInfo = m_Animation[STATEANIM::FIREBALL2_G];
+
+ Add_Event(pairAnimInfo.first,
+ [this]() {
+ m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_FIREBALL, this);
+ }, 0.45f);
break;
}
+
+
+
}
m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBALL)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBALL)];
@@ -436,7 +486,7 @@ HRESULT CRanrok::Behavior_FireBallExitCheck(_float fTimeDelta)
m_pFSM->Change_State(FSMSTATE::COMBAT);
return E_FAIL;
}
- else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND)){
+ else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND)) {
m_pFSM->Change_State(FSMSTATE::GROUND);
return E_FAIL;
}
@@ -456,13 +506,13 @@ void CRanrok::Behavior_SwipeEnter()
m_pFSM->Enable_State(FSMSTATE::SWIPE);
if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND))
{
- if (m_fCross > 0)
- {
- pairAnimInfo = m_Animation[STATEANIM::GROUND_SWIPE_L];
- }
+ /*if (m_fCross > 0)
+ {*/
+ pairAnimInfo = m_Animation[STATEANIM::GROUND_SWIPE_L];
+ /*}
else {
pairAnimInfo = m_Animation[STATEANIM::GROUND_SWIPE_R];
- }
+ }*/
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
}
@@ -530,8 +580,8 @@ HRESULT CRanrok::Behavior_RushExitCheck(_float fTimeDelta)
m_fRushTime += fTimeDelta;
if (m_fRushTime >= 2.5f && iCurrAnimIndex == m_Animation[STATEANIM::RUSH_LOOP].first)
{
- m_pFSM->Change_State(FSMSTATE::SWIPE);
- return E_FAIL;
+ m_pFSM->Change_State(FSMSTATE::SWIPE);
+ return E_FAIL;
}
else if (iCurrAnimIndex == m_Animation[STATEANIM::RUSH_LOOP].first)
@@ -570,9 +620,9 @@ void CRanrok::Behavior_PulseEnter()
m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::PULSE)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::PULSE)];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
- Add_Event(pairAnimInfo.first,
+ /*Add_Event(pairAnimInfo.first,
[this]() { CameraShake(10.f, 2.f, 5.f, 1.2f); },
- 0.39f);
+ 0.39f);*/
}
HRESULT CRanrok::Behavior_PulseExitCheck(_float fTimeDelta)
@@ -581,7 +631,7 @@ HRESULT CRanrok::Behavior_PulseExitCheck(_float fTimeDelta)
_int iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
_float fRatio = m_pModelCom->Get_CurrentTrackProgressRatio();
- if (fRatio>=0.95f)
+ if (fRatio >= 0.95f)
{
m_pFSM->Change_State(FSMSTATE::COMBAT);
return E_FAIL;
@@ -599,8 +649,7 @@ void CRanrok::Behavior_TuckedEnter()
{
pair<_uint, _bool> pairAnimInfo = {};
m_pFSM->Enable_State(FSMSTATE::TUCKED);
- m_pCharacter_Controller->SetGravity(true);
-
+
//if (m_iCurrentFlow == 0)
//{
// pairAnimInfo = m_Animation[STATEANIM::FLY];
@@ -619,7 +668,7 @@ HRESULT CRanrok::Behavior_TuckedExitCheck(_float fTimeDelta)
MoveTo(fTimeDelta);
- if (m_bTucked && iCurrAnimIndex !=m_Animation[STATEANIM::FLY_TO_HOVER].first)
+ if (m_bTucked && iCurrAnimIndex != m_Animation[STATEANIM::FLY_TO_HOVER].first)
{
m_iCurrentFlow++;
pairAnimInfo = m_Animation[STATEANIM::FLY_TO_HOVER];
@@ -651,9 +700,9 @@ void CRanrok::Behavior_LandEnter()
pairAnimInfo = m_Animation[STATEANIM::LAND];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
- Add_Event(pairAnimInfo.first,
+ /*Add_Event(pairAnimInfo.first,
[this]() { CameraShake(30.f, 5.f, 10.f, 1.2f); },
- 0.53f);
+ 0.53f);*/
}
HRESULT CRanrok::Behavior_LandExitCheck(_float fTimeDelta)
@@ -1018,7 +1067,7 @@ void CRanrok::Set_Anim()
m_Animation[STATEANIM::HIT_BWD3] = { 35,false }; // Ground Large
m_Animation[STATEANIM::HIT_BWD4] = { 36,false }; // Ground Small
- m_Animation[STATEANIM::DEAD] = { 34,false };
+ m_Animation[STATEANIM::DEAD] = { 34,false };
m_Animation[STATEANIM::FLY] = { 18,true };
diff --git a/Jusin154_Team3D/Client/Private/WorldDecal.cpp b/Jusin154_Team3D/Client/Private/WorldDecal.cpp
new file mode 100644
index 000000000..543c9d6f8
--- /dev/null
+++ b/Jusin154_Team3D/Client/Private/WorldDecal.cpp
@@ -0,0 +1,255 @@
+#include "pch.h"
+#include "WorldDecal.h"
+
+#include "GameInstance.h"
+
+CWorldDecal::CWorldDecal(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CGameObject{ pDevice, pContext }
+{
+}
+
+CWorldDecal::CWorldDecal(const CWorldDecal& rhs)
+ : CGameObject(rhs)
+ , m_fWinSizeX{ rhs.m_fWinSizeX }
+ , m_fWinSizeY{ rhs.m_fWinSizeY }
+{
+}
+
+HRESULT CWorldDecal::Initialize_Prototype()
+{
+ m_fWinSizeX = g_iWinSizeX;
+ m_fWinSizeY = g_iWinSizeY;
+
+ return S_OK;
+}
+
+HRESULT CWorldDecal::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Components(pArg)))
+ return E_FAIL;
+
+ WORLD_DECAL_DESC* pDesc = static_cast(pArg);
+ m_pTransformCom->Set_Scale(pDesc->vScale);
+ m_pTransformCom->Rotation(XMConvertToRadians(pDesc->vRotation.x), XMConvertToRadians(pDesc->vRotation.y), XMConvertToRadians(pDesc->vRotation.z));
+ m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vPosition), 1.f));
+
+ m_fUVTiling = pDesc->fUVTiling;
+ m_vUVSpeed = pDesc->vUVSpeed;
+ m_vMaskRed = pDesc->vMaskRed;
+ m_vMaskGreen = pDesc->vMaskGreen;
+ m_vMaskBlue = pDesc->vMaskBlue;
+
+ _float fBoxRadius = 0.86f; // 1,1,1 기준
+ _float fMaxScale = max(pDesc->vScale.x, max(pDesc->vScale.y, pDesc->vScale.z)) * fBoxRadius;
+
+ m_pTransformCom->Set_Radius(fMaxScale);
+
+ XMStoreFloat4x4(&m_WorldMatrixInv, m_pTransformCom->Get_WorldMatrixInv());
+
+ return S_OK;
+}
+
+void CWorldDecal::Priority_Update(_float fTimeDelta)
+{
+
+}
+
+void CWorldDecal::Update(_float fTimeDelta)
+{
+ m_fTimeAcc.x += fTimeDelta * m_vUVSpeed.x;
+ m_fTimeAcc.y += fTimeDelta * m_vUVSpeed.y;
+}
+
+void CWorldDecal::Late_Update(_float fTimeDelta)
+{
+ if (m_pGameInstance->IsIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) {
+ m_pGameInstance->Add_RenderGroup(RENDER::DECAL, this);
+ }
+}
+
+HRESULT CWorldDecal::Render()
+{
+ if (FAILED(Bind_ShaderResources())) {
+ return E_FAIL;
+ }
+
+ _uint iNumMesh = m_pModelCom->Get_NumMeshes();
+
+ for (_uint i = 0; i < iNumMesh; i++)
+ {
+ if (FAILED(m_pShaderCom->Bind_SRV("g_MaskingTexture", m_pMaskTextureCom->Get_SRV(0)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_SRV("g_NormalTexture", m_pNormalTextureCom->Get_SRV(0)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_SRV("g_SurfaceParamsTexture", m_pSurfaceTextureCom->Get_SRV(0)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_SRV("g_NoiseTexture", m_pFadeTextureCom->Get_SRV(0)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_SRV("g_DiffsueMaskTexture", m_pDiffuseMaskTextureCom->Get_SRV(0)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DECAL)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pModelCom->Render(i))) {
+ return E_FAIL;
+ }
+ }
+
+ return S_OK;
+}
+
+HRESULT CWorldDecal::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ /* Com_Texture */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Decal_MSK"),
+ reinterpret_cast(&m_pMaskTextureCom))))
+ return E_FAIL;
+ /* Com_Texture */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Decal_Noraml"),
+ reinterpret_cast(&m_pNormalTextureCom))))
+ return E_FAIL;
+ /* Com_Texture */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Base_MRO"),
+ reinterpret_cast(&m_pSurfaceTextureCom))))
+ return E_FAIL;
+ /* Com_Texture */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Decal_Fade"),
+ reinterpret_cast(&m_pFadeTextureCom))))
+ return E_FAIL;
+ /* Com_Texture */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Decal_DiffuseMask"),
+ reinterpret_cast(&m_pDiffuseMaskTextureCom))))
+ return E_FAIL;
+
+ /* Com_Model */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_DecalBox"),
+ reinterpret_cast(&m_pModelCom))))
+ return E_FAIL;
+
+ /* Com_Shader */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
+ reinterpret_cast(&m_pShaderCom))))
+ return E_FAIL;
+
+ return S_OK;
+}
+
+HRESULT CWorldDecal::Bind_ShaderResources()
+{
+ if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
+ return E_FAIL;
+ }
+ 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_WorldMatrixInv", &m_WorldMatrixInv))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrixInv", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW_INV)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrixInv", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ_INV)))) {
+ 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_fUsingSurfaceParams", &m_fUsingSurfaceParams, sizeof(_float)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fWinSizeX", &m_fWinSizeX, sizeof(_float)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fWinSizeY", &m_fWinSizeY, sizeof(_float)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_vTime", &m_fTimeAcc, sizeof(_float2)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fUVTiling", &m_fUVTiling, sizeof(_float)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_vMaskColorRed", &m_vMaskRed, sizeof(_float4)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_vMaskColorGreen", &m_vMaskGreen, sizeof(_float4)))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_vMaskColorBlue", &m_vMaskBlue, sizeof(_float4)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Depth"), m_pShaderCom, "g_DepthTexture"))) {
+ return E_FAIL;
+ }
+ if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_NormalCopy"), m_pShaderCom, "g_NormalMapTexture"))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+CWorldDecal* CWorldDecal::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CWorldDecal* pInstance = new CWorldDecal(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CWorldDecal");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+CGameObject* CWorldDecal::Clone(void* pArg, CGameObject* pOwner)
+{
+ CWorldDecal* pInstance = new CWorldDecal(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CWorldDecal");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CWorldDecal::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pDiffuseMaskTextureCom);
+ SAFE_RELEASE(m_pFadeTextureCom);
+ SAFE_RELEASE(m_pMaskTextureCom);
+ SAFE_RELEASE(m_pNormalTextureCom);
+ SAFE_RELEASE(m_pSurfaceTextureCom);
+ SAFE_RELEASE(m_pModelCom);
+ SAFE_RELEASE(m_pShaderCom);
+}
+
+#ifdef _DEBUG
+void CWorldDecal::Describe_Entity()
+{
+}
+#endif // _DEBUG
diff --git a/Jusin154_Team3D/Client/Public/Broom.h b/Jusin154_Team3D/Client/Public/Broom.h
index 624678d12..60fa310ca 100644
--- a/Jusin154_Team3D/Client/Public/Broom.h
+++ b/Jusin154_Team3D/Client/Public/Broom.h
@@ -35,6 +35,8 @@ class CBroom final : public CUnit
_bool Get_Turbo() { return m_bTurbo; }
void Set_Input(BroomInput broomInput) { m_Input = broomInput; }
+ void Set_AISpeed(_float speedMul, _float accelMul);
+ void Set_Move(_bool bMove) { m_bMove = bMove; }
HRESULT Ready_Child();
private:
CInfoInstance* m_pInfoInstance = { nullptr };
@@ -60,13 +62,23 @@ class CBroom final : public CUnit
_float m_fTurnDecel = 0.3f;
_float m_fVerticalSpeed = 0.f;
-
_float m_fFlyAccel = 1.f;
_float m_fFlyDecel = 1.f;
_float m_fTurboAccel = 1.3f;
_float m_fTurboDecel = 0.6f;
+ _bool m_bMove = { true };
+
+#pragma region AI
+ _float m_fAISpeedMul = 1.f;
+ _float m_fAIAccelMul = 1.f;
+
+ _float m_fAICondition = 1.f;
+ _float m_fAISeed = 0.f;
+ _float m_fAITime = 0.f;
+
+#pragma endregion
_float3 m_vCameraLookDir = { 0.f, 0.f, 1.f, };
@@ -75,6 +87,7 @@ class CBroom final : public CUnit
BroomInput m_Input;
class CEffectParts* m_pWindEffect = { nullptr };
_float m_fCameraOffset = { 10.f };
+
private:
HRESULT Ready_Components();
HRESULT Bind_ShaderResources();
@@ -98,6 +111,7 @@ class CBroom final : public CUnit
_float m_fAmount = { 1.f };
_float m_fInputTime = {};
_bool m_bRatio = { false };
+
HRESULT InputAction();
HRESULT InputMove();
diff --git a/Jusin154_Team3D/Client/Public/BroomRaceManager.h b/Jusin154_Team3D/Client/Public/BroomRaceManager.h
index 13e94259d..d93a98846 100644
--- a/Jusin154_Team3D/Client/Public/BroomRaceManager.h
+++ b/Jusin154_Team3D/Client/Public/BroomRaceManager.h
@@ -10,11 +10,23 @@ class CBroomRaceManager final : public CGameObject
public:
struct RacerInfo
{
- CGameObject* pRacer = nullptr;
+ class CPlayer* pRacer = nullptr;
+ class CBroomRacerAI* pAI = nullptr;
_uint curRing = 0;
_vector prevPos = XMVectorZero();
};
+ enum class RACE_STATE
+ {
+ READY,
+ COUNTDOWN,
+ START,
+ RACING,
+ FINISH,
+ END
+ };
+
+
private:
CBroomRaceManager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CBroomRaceManager(const CBroomRaceManager& Prototype);
@@ -24,23 +36,25 @@ class CBroomRaceManager final : public CGameObject
virtual void Priority_Update(_float fTimeDelta) override;
virtual void Update(_float fTimeDelta) override;
virtual void Late_Update(_float fTimeDelta) override;
- class CRaceRing* GetTargetRing(CGameObject* pRacer);
+ virtual HRESULT Render() override;
+ void SetTargetRing(CGameObject* pRacer);
void Push_BroomRacer(RacerInfo Info);
- void Push_RaceRing(CRaceRing* Ring);
+ void Push_RaceRing(class CRaceRing* Ring);
+ _int Get_RaceState() const { return m_eRaceState; }
private:
vector m_pRaceRings = {};
vector m_Racers = {};
-
-
-#ifdef _DEBUG
- unique_ptr m_pGripShape = { nullptr };
- unique_ptr m_pSubShape = { nullptr };
-#endif // _DEBUG
+ _float m_fCountTimer = {};
+ _int m_iCount = { 3 };
+ _int m_eRaceState = { ENUM_CLASS(RACE_STATE::END) };
+ _wstring ToolTip;
private:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
HRESULT Ready_Components();
HRESULT Bind_ShaderResources() override;
+ void Update_Countdown(_float fTimeDelta);
+ void StartRaceMove();
void Check_RingPassed();
public:
diff --git a/Jusin154_Team3D/Client/Public/BroomRacerAI.h b/Jusin154_Team3D/Client/Public/BroomRacerAI.h
index 0ca3ce31e..e6e4097ad 100644
--- a/Jusin154_Team3D/Client/Public/BroomRacerAI.h
+++ b/Jusin154_Team3D/Client/Public/BroomRacerAI.h
@@ -39,6 +39,9 @@ class CBroomRacerAI final : public CUnit
virtual HRESULT Render_Shadow(SHADOW eType) override;
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr)override;
virtual void OnHit(CGameObject* pOther, CGameObject* pCaller = nullptr)override;
+ void Set_RaceRing(class CRaceRing* pRaceRing) {m_pRaceRing = pRaceRing;}
+ class CBroom* Get_Broom() { return m_pBroom; }
+ void Set_Move(_bool bMove) { m_bMove = bMove; }
private:
CLight* m_pLightCom = { nullptr };
LIGHT_DESC LightDesc = {};
@@ -48,7 +51,7 @@ class CBroomRacerAI final : public CUnit
class CBroom* m_pBroom = { nullptr };
class CRaceRing* m_pRaceRing = { nullptr };
class CBroomRaceManager* m_pBroomRaceManager = { nullptr };
- class CCamPosition_Shoulder* m_pCamPosition_ShoulderPart = { nullptr };
+ class CCamPosition_AI* m_pCamPosition_AIPart = { nullptr };
private:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
@@ -57,6 +60,8 @@ class CBroomRacerAI final : public CUnit
HRESULT Bind_ShaderResources();
HRESULT Bind_ShaderParameters(_uint iMeshOrder);
+ _vector Get_RingForwardTarget();
+
_float ComputeTurnToRing();
_float ComputeHeightAdjust();
#ifdef _DEBUG
@@ -95,8 +100,11 @@ class CBroomRacerAI final : public CUnit
_float m_fScaleSmoothSpeed = 2.5f;
_float m_fAnimTime = {};
_bool m_bTurbo = {};
- _float m_fSmoothX = {};
- _float m_fSmoothY = {};
+ _bool m_bMove = {};
+ _float m_LaneOffsetX = 0.f;
+ _float m_LaneOffsetY = 0.f;
+ _float m_TurnGain = 1.f;
+ _float m_HeightGain =1.f;
void Behavior_Broom_Ride_MoveEnter();
HRESULT Behavior_Broom_Ride_MoveExitCheck(_float fTimeDelta);
diff --git a/Jusin154_Team3D/Client/Public/CamPosition_AI.h b/Jusin154_Team3D/Client/Public/CamPosition_AI.h
new file mode 100644
index 000000000..b71c713b6
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/CamPosition_AI.h
@@ -0,0 +1,96 @@
+#pragma once
+#include "Client_Define.h"
+#include "CamPosition.h"
+#include "CamPosition_Target.h"
+
+NS_BEGIN(Client)
+
+class CCamPosition_AI final : public CCamPosition
+{
+public:
+ typedef struct tagCameraAI_Desc : public CCamPosition::CAMERAPOSITION_DESC
+ {
+ }CAMERA_AI_DESC;
+private:
+ CCamPosition_AI(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CCamPosition_AI(const CCamPosition_AI& rhs);
+ virtual ~CCamPosition_AI() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ virtual void Late_Update(_float fTimeDelta) override;
+ virtual HRESULT Render() override;
+
+ virtual _vector Get_WorldPostion() override;
+ _vector Get_ShoulderGlobalPos();
+ void Set_CameraShake(_float fXShock, _float fYShock);
+
+private:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ HRESULT Ready_Components(void* pArg);
+ HRESULT Ready_SubParts();
+ _vector Calc_LookTargetPos();
+ _vector Calc_FollowTargetPos(_vector vLookTargetWorldPos);
+ _vector Calc_DampingParentPos();
+
+#pragma region Base
+ _float m_fMouseSensor = { 0.1f };
+ _float m_fCameraFowardDistance = { 3.45f };
+ _float m_fCameraBarrelLength = { 10.f };
+ _float2 m_vFocalRatio = { 0.f, 0.467f };
+ _float m_fHeadHeight = { 1.61f };
+ _float m_fFollowTargetIncludedAngleDegree = { 20.f };
+ _float m_fDefaultCameraBackToFrontRatio = { 0.61f };
+ _float2 m_vAccRotDegrees = { 0.f, 0.f };
+ _float2 m_vAccRealDegrees = { 0.f, 0.f };
+ _float3 m_vShoulderLocalPos = { 1.f, 2.f, 2.f };
+#pragma endregion
+#pragma region Lerp
+ _bool m_bStartGame = { true };
+ _bool m_bDampingParentPos = { true };
+ _bool m_bShoulderLerp = { false };
+ _bool m_bRightShoulderActive = { true };
+ _float2 m_vShoulderLerpTimer = { 0.f, 0.30f };
+ _float2 m_vDampingLerpTimer = { 0.f, 0.10f };
+ _float2 m_vStartLerpTimer = { 0.f, 0.30f };
+
+ _float2 m_vShoulderLerpDegree = { };
+ _float2 m_vShoulderLerpIncludedAngleDegree = { -20.f, 20.f };
+ _float4 m_vDampingStartPosition = { };
+ _float4 m_vDampingDestPosition = { };
+
+ _float m_fFocalRatioTargetValue = 0.f;
+ _float m_fFocalRatioLerpSpeed = 6.f;
+ _float m_fFocalRatioMin = 0.05f;
+
+ _float2 m_vMoveLerpPositions = { };
+ _float2 m_vMoveLerpTimer = { 0.f, TIMER_SHORT_LERP };
+#pragma endregion
+ _float2 m_vCameraShakeTimer = { 0.f, 0.3f };
+
+ PSX::PxSweepBuffer m_BufferHit = {};
+
+ _bool m_bZoomIn = { false };
+ _bool m_bMovable = { true };
+
+ const _float4* m_pParentPos = { nullptr };
+ CTransform* m_pLookTransform = { nullptr };
+ CTransform* m_pFollowTransform = { nullptr };
+ CCamPosition_Target* m_pTarget_LookPart = { nullptr };
+ CCamPosition_Target* m_pTarget_FollowPart = { nullptr };
+ class CCamera_Gaze* m_pBinded_Camera = { nullptr };
+
+public:
+ static CCamPosition_AI* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CCamPosition_AI* Clone(void* pArg, class CGameObject* pOWner) override;
+ virtual void Free() override;
+
+#ifdef _DEBUG
+ void Describe_Entity() override;
+#endif // _DEBUG
+
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/Camera_Gaze.h b/Jusin154_Team3D/Client/Public/Camera_Gaze.h
index 67544ab4a..5d822a54c 100644
--- a/Jusin154_Team3D/Client/Public/Camera_Gaze.h
+++ b/Jusin154_Team3D/Client/Public/Camera_Gaze.h
@@ -23,6 +23,7 @@ class CCamera_Gaze final : public CCamera
void Enable_FollowLerp();
void Enable_LookLerp();
void Toggle_Priority();
+ void Toggle_AIPriority();
virtual void Late_Update(_float fTimeDelta) override;
virtual HRESULT Render() override;
diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h
index 6a76fbc9c..4c825a93d 100644
--- a/Jusin154_Team3D/Client/Public/Client_Enum.h
+++ b/Jusin154_Team3D/Client/Public/Client_Enum.h
@@ -7,11 +7,11 @@ namespace Client
enum class MAPOBJECT_RENDER_TYPE { NORMAL, DECAL, GLASS };
enum class SHADER_PASS_ANIM { DEFAULT, SHADOW, CAPTURE, BLUR, HAIR, EYELASH, OUTLINE_WRITE, OUTLINE_READ,SPECTOR, END };
- enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, EFFECT_ALPHABLEND_UVMOVE, MAPTOOL, GLASS, OUTLINE_WRITE, OUTLINE_READ, BLOOM, WATER, LAND, NONMRO,SPECTOR_WEAPON, GLASS_CUBE,END };
+ enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, EFFECT_ALPHABLEND_UVMOVE, MAPTOOL, GLASS, OUTLINE_WRITE, OUTLINE_READ, BLOOM, WATER, LAND, NONMRO,SPECTOR_WEAPON, GLASS_CUBE, LEVIOSO, DECAL, END };
enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, ENV_TERRAIN_ANISO, SHADOW, END };
enum class SHADER_PASS_PARTICLE { EXPLOSION, END };
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLEND, TRAILWB_FOR_BLEND, TRAIL_BLUR, TRAIL_BLOOM, 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, NONPOS, NONPOS_BLUR , BLUR_MESH, BLUR_CULLING, BLUR_CULLING_NO_EMISSIVE, BLOOM_CULLING, 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, NONPOS, NONPOS_BLUR , BLUR_MESH, BLUR_CULLING, BLUR_CULLING_NO_EMISSIVE, BLOOM_CULLING, DEFAULT_NONPOS, END};
enum class SHADER_PASS_UIEDITOR {
DEFAULT, COLOR, LOGO, LOGO_TEXT, LOGO_GLOW, ALPHABLEND, CLAMP, CURSOR,
LODING, HOLD_ROTATION, MISSION, QUESTTYPE, UVMULT, NINECLICE,
@@ -67,6 +67,11 @@ namespace Client
/*고블린 메이지*/
GOBLIN_MAGE_ATTACK , GOBLIN_MAGE_DOWN , GOBLIN_MAGE_SIDE,
+
+ /*란록*/
+
+ RANROK_FIREBALL, RANROK_BREATH,
+
END
};
diff --git a/Jusin154_Team3D/Client/Public/Client_Macro.h b/Jusin154_Team3D/Client/Public/Client_Macro.h
index d562ac8df..a1a9fddb0 100644
--- a/Jusin154_Team3D/Client/Public/Client_Macro.h
+++ b/Jusin154_Team3D/Client/Public/Client_Macro.h
@@ -33,7 +33,7 @@ namespace Client {
#define CAMERA_DEBUG TEXT("CAMERA_DEBUG")
#define CAMERA_SHOULDER TEXT("CAMERA_SHOULDER")
-#define CAMERA_HEAD TEXT("CAMERA_HEAD")
+#define CAMERA_AI TEXT("CAMERA_AI")
#pragma endregion
#pragma region COMPONENT
diff --git a/Jusin154_Team3D/Client/Public/Client_Struct.h b/Jusin154_Team3D/Client/Public/Client_Struct.h
index 3f65fa23e..7a17c270d 100644
--- a/Jusin154_Team3D/Client/Public/Client_Struct.h
+++ b/Jusin154_Team3D/Client/Public/Client_Struct.h
@@ -225,10 +225,10 @@ namespace Client
_float2 vDissolveUVGainAmount = {};
_bool isDissolveMove = {};
- _float3 vDissolveValue = {};
+ _float3 vDissolveValue = {}; /* Soft Mask , Cut Ratio*/
_float fModelDistortIntensity = {};
- _float vPadding0 = {};
+ _float fPadding0 = {};
_float fLightDeley = {};
_float fLightIntensity = {};
@@ -255,7 +255,11 @@ namespace Client
_bool isDiffuse_B = {};
_bool isBlurColor = {};
- _float vPadding4 = {};
+ _bool isBlurDissolve = {};
+ _bool isNomalMap = {};
+ _bool isNoDissolveSmoothStep = {};
+ _bool isPadding3 = {};
+
_float4 vPadding5 = {};
_bool isRimLight = {};
diff --git a/Jusin154_Team3D/Client/Public/Dialogue.h b/Jusin154_Team3D/Client/Public/Dialogue.h
index 38c2f69ed..d11cb0bcb 100644
--- a/Jusin154_Team3D/Client/Public/Dialogue.h
+++ b/Jusin154_Team3D/Client/Public/Dialogue.h
@@ -59,7 +59,9 @@ class CDialogue final : public CElementObject
static CDialogue* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
virtual void Free() override;
+#ifdef _DEBUG
void Describe_Entity() override;
+#endif // _DEBUG
};
NS_END
diff --git a/Jusin154_Team3D/Client/Public/EffectObject.h b/Jusin154_Team3D/Client/Public/EffectObject.h
index 422d740b8..b4032a504 100644
--- a/Jusin154_Team3D/Client/Public/EffectObject.h
+++ b/Jusin154_Team3D/Client/Public/EffectObject.h
@@ -48,6 +48,8 @@ class CEffectObject abstract : public CPartObject
CTexture* m_pDissolve_TextureCom = { nullptr };
CTexture* m_pEmissive_TextureCom = { nullptr };
CTexture* m_pDistortion_TextureCom = { nullptr };
+ CTexture* m_pNormal_TextureCom = { nullptr };
+ CTexture* m_pSurface_TextureCom = { nullptr };
CShader* m_pShaderCom = { nullptr };
CLight* m_pLightCom = { nullptr };
@@ -66,6 +68,7 @@ class CEffectObject abstract : public CPartObject
_wstring m_strModelName = {};
_wstring m_strEmissiveName = {};
_wstring m_strDistortionName = {};
+ _wstring m_strNomalMapName = {};
public:
virtual void Free() override;
diff --git a/Jusin154_Team3D/Client/Public/Effect_Container.h b/Jusin154_Team3D/Client/Public/Effect_Container.h
index 6ba718be1..ef543c9ff 100644
--- a/Jusin154_Team3D/Client/Public/Effect_Container.h
+++ b/Jusin154_Team3D/Client/Public/Effect_Container.h
@@ -25,6 +25,7 @@ class CEffect_Container abstract : public CContainerObject
_wstring wstrDissolveName = {};
_wstring wstrEmissiveName = {};
_wstring wstrDistortionName = {};
+ _wstring wstrNomalName = {};
_wstring wstrModelName = {};
_wstring wstrEffectName = {};
@@ -77,6 +78,7 @@ class CEffect_Container abstract : public CContainerObject
_int CollisionCheck();
ON_COLLISION_INFO SweepTarget(_vector StartPos, _vector EndPos, _float fRadius, _bool isTerrainCollision = false);
ON_COLLISION_INFO MonsterSweepTarget(_vector StartPos, _vector EndPos, _float fRadius, _bool isTerrainCollision = false);
+ ON_COLLISION_INFO MonsterRayCast(_vector StartPos, _vector vDir, _float fLength, _uint iMaxHitCapacity);
protected:
_float4 m_vStartPos = {};
@@ -93,6 +95,7 @@ class CEffect_Container abstract : public CContainerObject
_float m_fDelay = {};
_bool m_isDelayed = { false };
_bool m_isCollisionEnter = { false };
+ _uint m_iHitCount = {};
map<_float, function> m_Events = {};
_uint m_iSkillType = ENUM_CLASS(SKILL_TYPE::END);
diff --git a/Jusin154_Team3D/Client/Public/InfoInstance.h b/Jusin154_Team3D/Client/Public/InfoInstance.h
index 9fe3a36a8..3f515e871 100644
--- a/Jusin154_Team3D/Client/Public/InfoInstance.h
+++ b/Jusin154_Team3D/Client/Public/InfoInstance.h
@@ -54,6 +54,8 @@ DECLARE_SINGLETON(CInfoInstance)
HRESULT Load_WaterElemet(const _char* pFileName);
HRESULT Load_DoorElemet(const _char* pFileName, const _wchar* pLayerTag);
HRESULT Load_ChestElemet(const _char* pFileName, const _wchar* pLayerTag);
+ HRESULT Load_WorldDecal(const _char* pFileName, const _wchar* pLayerTag);
+ HRESULT Load_PointLights(const _char* pFileName, const _wchar* pLayerTag);
#pragma endregion
#pragma region Spell_INFO
HRESULT Load_SpellInfo(const _char* pFilePath);
diff --git a/Jusin154_Team3D/Client/Public/MapInfo.h b/Jusin154_Team3D/Client/Public/MapInfo.h
index 7a5d98b70..bd4a0ecb9 100644
--- a/Jusin154_Team3D/Client/Public/MapInfo.h
+++ b/Jusin154_Team3D/Client/Public/MapInfo.h
@@ -27,6 +27,8 @@ class CMapInfo final : public CBase
HRESULT Load_WaterElemet(const _char* pFileName);
HRESULT Load_DoorElemet(const _char* pFileName, const _wchar* pLayerTag);
HRESULT Load_ChestElemet(const _char* pFileName, const _wchar* pLayerTag);
+ HRESULT Load_WorldDecal(const _char* pFileName, const _wchar* pLayerTag);
+ HRESULT Load_PointLights(const _char* pFilePath, const _wchar* pLayerTag);
private:
CGameInstance* m_pGameInstance = { nullptr };
diff --git a/Jusin154_Team3D/Client/Public/NPCInteraction.h b/Jusin154_Team3D/Client/Public/NPCInteraction.h
index 3046f1b07..6a2955456 100644
--- a/Jusin154_Team3D/Client/Public/NPCInteraction.h
+++ b/Jusin154_Team3D/Client/Public/NPCInteraction.h
@@ -63,7 +63,11 @@ class CNPCInteraction final : public CGameObject
static CNPCInteraction* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
virtual void Free() override;
+#ifdef _DEBUG
void Describe_Entity() override;
+#endif // DEBUG
+
+
};
NS_END
diff --git a/Jusin154_Team3D/Client/Public/Player.h b/Jusin154_Team3D/Client/Public/Player.h
index df53ced11..51da992ec 100644
--- a/Jusin154_Team3D/Client/Public/Player.h
+++ b/Jusin154_Team3D/Client/Public/Player.h
@@ -30,6 +30,7 @@ class CPlayer final : public CUnit
typedef struct tagPlayerInitDesc {
_float4 vPos;
_float4 vRotQ;
+ class CBroomRaceManager* pBroomRaceManager;
}PLAYERDESC;
private:
CPlayer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
@@ -49,6 +50,8 @@ class CPlayer final : public CUnit
void Set_Shield(_bool bShield) { m_bShield = bShield; }
void Start_CameraShake(_float fTime, _float fIntense);
_int Get_UIState() { return m_eUIState; }
+ void Set_RaceRing(class CRaceRing* pRaceRing) { m_pRaceRing = pRaceRing; }
+ class CBroom* Get_Broom() { return m_pBroom; }
#ifdef _DEBUG
void Render_CameraCoordinateSystem();
#endif // _DEBUG
@@ -89,6 +92,9 @@ class CPlayer final : public CUnit
class CTransform* m_pBroomTransform = { nullptr };
class CBroom* m_pBroom = { nullptr };
CStat* m_pStat = { nullptr };
+
+ class CBroomRaceManager* m_pBroomRaceManager = { nullptr };
+ class CRaceRing* m_pRaceRing = { nullptr };
private:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
@@ -163,6 +169,10 @@ class CPlayer final : public CUnit
_float m_fMoveTime = {};
_float m_fCross = 0.f;
_float m_fabsDir = 0.f;
+ _float m_fNoInputTime = 0.f;
+ _float m_fNeutralTime = 0.f;
+
+
/* 무적 불 변수*/
#ifdef _DEBUG
_bool m_isDebugMode = { false };
diff --git a/Jusin154_Team3D/Client/Public/PointLight.h b/Jusin154_Team3D/Client/Public/PointLight.h
new file mode 100644
index 000000000..22062c163
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/PointLight.h
@@ -0,0 +1,61 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "GameObject.h"
+
+NS_BEGIN(Engine)
+class CLight;
+NS_END
+
+NS_BEGIN(Client)
+
+class CPointLight final : public CGameObject
+{
+public:
+ typedef struct tagPointLightDesc
+ {
+ _float3 vPosition;
+ _float4 vDiffuse;
+ _float4 vAmbient;
+ _float4 vSpecular;
+ _float3 vPosOffset;
+ _float fRange;
+ _float fLightAttRange;
+ _float fLightAttSpeed;
+ _float fPow;
+
+ }POINTLIGHT_DESC;
+private:
+ CPointLight(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CPointLight(const CPointLight& rhs);
+ virtual ~CPointLight() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ virtual void Late_Update(_float fTimeDelta) override;
+ virtual HRESULT Render() override;
+
+private:
+ CLight* m_pLightCom = { nullptr };
+
+ _float m_fAttenuationTime = { 0.f };
+ _float m_fLightIntensity = { 1.f };
+ _float m_fLightIntensitySpeed = { 1.f };
+
+private:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ virtual HRESULT Bind_ShaderResources()override;
+
+public:
+ static CPointLight* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
+ virtual void Free() override;
+#ifdef _DEBUG
+ void Describe_Entity() override;
+#endif // _DEBUG
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/RaceRing.h b/Jusin154_Team3D/Client/Public/RaceRing.h
index 643c2b98e..bc6385b74 100644
--- a/Jusin154_Team3D/Client/Public/RaceRing.h
+++ b/Jusin154_Team3D/Client/Public/RaceRing.h
@@ -7,6 +7,12 @@ NS_BEGIN(Client)
class CRaceRing final : public CGameObject
{
+public:
+ typedef struct RaceRingDesc
+ {
+ class CBroomRaceManager* pBroomRaceManager = { nullptr };
+ _int iIndex = { 0 };
+ }RACERING_DESC;
private:
CRaceRing(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CRaceRing(const CRaceRing& Prototype);
@@ -19,13 +25,14 @@ class CRaceRing final : public CGameObject
virtual void Update(_float fTimeDelta) override;
virtual void Late_Update(_float fTimeDelta) override;
virtual HRESULT Render() override;
+ void Set_Target(_bool bTarget){ m_bTarget = bTarget; }
private:
- CShader* m_pShaderCom = { nullptr };
- CModel* m_pModelCom = { nullptr };
- class CBroomRaceManager* m_pBroomRaceManager = { nullptr };
-
-
+ class CBroomRaceManager* m_pBroomRaceManager = { nullptr };
+ CShader* m_pShaderCom = { nullptr };
+ CModel* m_pModelCom = { nullptr };
+ _bool m_bTarget = { false };
+ _int m_iIndex = {};
private:
HRESULT Ready_Components();
diff --git a/Jusin154_Team3D/Client/Public/Ranrok_Breath.h b/Jusin154_Team3D/Client/Public/Ranrok_Breath.h
new file mode 100644
index 000000000..0f36e0daa
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/Ranrok_Breath.h
@@ -0,0 +1,63 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "Effect_Container.h"
+
+NS_BEGIN(Engine)
+NS_END
+
+NS_BEGIN(Client)
+
+class CRanrok_Breath final : public CEffect_Container
+{
+private:
+ CRanrok_Breath(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CRanrok_Breath(const CRanrok_Breath& rhs);
+ virtual ~CRanrok_Breath() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ virtual void Late_Update(_float fTimeDelta) override;
+
+public:
+ virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override;
+
+private:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ HRESULT Ready_Child();
+ HRESULT Bind_ShaderResources() override;
+ virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
+private:
+ _wstring m_wstrEffectName = {};
+
+ class CEffectParts* m_pBreath = { nullptr };
+ class CEffectParts* m_pBreath_Black = { nullptr };
+ class CEffectParts* m_pBreathSlog = { nullptr };
+ class CEffectParts* m_pMouthFire = { nullptr };
+
+ _float3 m_vLook = {};
+ _float m_fLinearSpeed = 0.8f;
+
+ _float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f };
+ _float4 m_vPreCollisionPos = {};
+ _float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f };
+
+ _bool m_isParticleEnd = {};
+ _bool m_isStartRayCast = {};
+private:
+ class CInfoInstance* m_pInfoInstance = { nullptr };
+public:
+ static CRanrok_Breath* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual void Free() override;
+ CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
+#ifdef _DEBUG
+ void Describe_Entity() override;
+#endif // DEBUG
+
+
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/Ranrok_FireBall.h b/Jusin154_Team3D/Client/Public/Ranrok_FireBall.h
new file mode 100644
index 000000000..e0b8ebde6
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/Ranrok_FireBall.h
@@ -0,0 +1,59 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "Effect_Container.h"
+
+NS_BEGIN(Engine)
+NS_END
+
+NS_BEGIN(Client)
+
+class CRanrok_FireBall final : public CEffect_Container
+{
+private:
+ CRanrok_FireBall(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CRanrok_FireBall(const CRanrok_FireBall& rhs);
+ virtual ~CRanrok_FireBall() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ virtual void Late_Update(_float fTimeDelta) override;
+
+public:
+ virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override;
+
+private:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ HRESULT Ready_Child();
+ HRESULT Bind_ShaderResources() override;
+ virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
+private:
+ _wstring m_wstrEffectName = {};
+
+ class CEffectParts* m_pFireBall = { nullptr };
+ class CEffectParts* m_pFireBall_PT = { nullptr };
+ class CEffectParts* m_pFireBall_Surface = { nullptr };
+ class CEffectParts* m_pFireBall_Tail = { nullptr };
+
+ _float3 m_vLook = {};
+ _float m_fLinearSpeed = 0.3f;
+
+ _float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f };
+ _float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f };
+private:
+ class CInfoInstance* m_pInfoInstance = { nullptr };
+public:
+ static CRanrok_FireBall* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual void Free() override;
+ CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
+#ifdef _DEBUG
+ void Describe_Entity() override;
+#endif // DEBUG
+
+
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Client/Public/WorldDecal.h b/Jusin154_Team3D/Client/Public/WorldDecal.h
new file mode 100644
index 000000000..d9778f4ec
--- /dev/null
+++ b/Jusin154_Team3D/Client/Public/WorldDecal.h
@@ -0,0 +1,79 @@
+#pragma once
+
+#include "Client_Define.h"
+#include "GameObject.h"
+
+NS_BEGIN(Engine)
+class CModel;
+class CShader;
+NS_END
+
+NS_BEGIN(Client)
+
+class CWorldDecal final : public CGameObject
+{
+public:
+ typedef struct tagWorldDecalDesc
+ {
+ _float3 vPosition = {};
+ _float3 vRotation = {};
+ _float3 vScale = { 1.f, 1.f, 1.f };
+ _float fUVTiling = { 1.f };
+ _float2 vUVSpeed = {};
+ _float4 vMaskRed = {};
+ _float4 vMaskGreen = {};
+ _float4 vMaskBlue = {};
+ }WORLD_DECAL_DESC;
+
+private:
+ CWorldDecal(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CWorldDecal(const CWorldDecal& rhs);
+ virtual ~CWorldDecal() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ virtual void Late_Update(_float fTimeDelta) override;
+ virtual HRESULT Render() override;
+
+private:
+ CShader* m_pShaderCom = { nullptr };
+ CModel* m_pModelCom = { nullptr };
+
+ CTexture* m_pMaskTextureCom = { nullptr };
+ CTexture* m_pNormalTextureCom = { nullptr };
+ CTexture* m_pSurfaceTextureCom = { nullptr };
+ CTexture* m_pFadeTextureCom = { nullptr };
+ CTexture* m_pDiffuseMaskTextureCom = { nullptr };
+
+ _float m_fUVTiling = { 1.f };
+ _float m_fUsingSurfaceParams = {};
+
+ _float m_fWinSizeX = {};
+ _float m_fWinSizeY = {};
+
+ _float2 m_fTimeAcc = {};
+ _float2 m_vUVSpeed = {};
+
+ _float4 m_vMaskRed = {};
+ _float4 m_vMaskGreen = {};
+ _float4 m_vMaskBlue = {};
+
+ _float4x4 m_WorldMatrixInv = {};
+
+private:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ virtual HRESULT Bind_ShaderResources() override;
+
+public:
+ static CWorldDecal* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
+ virtual void Free() override;
+#ifdef _DEBUG
+ void Describe_Entity() override;
+#endif // _DEBUG
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokBreath.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokBreath.bin
new file mode 100644
index 000000000..969dd22c1
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokBreath.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:689aba78dedc0a31d77676d8498b666885b1ccf8848e97a07c0c24f4c8b865ae
+size 577
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokFireBall.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokFireBall.bin
new file mode 100644
index 000000000..a49d55334
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokFireBall.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:94248c105e920d78f0d0e5806be2b2c2d69c36b61cbc52cc5a5f9e35cad318a2
+size 671
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/RanrokFireBall.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/RanrokFireBall.bin
deleted file mode 100644
index 8e7439a49..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/RanrokFireBall.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:2b39761058678a9755d3aa187e87d8e9c4cf4c60bcfa8a48db54d2e4fb547993
-size 300
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/FireBall_Tail.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/FireBall_Tail.bin
new file mode 100644
index 000000000..bab16664f
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/FireBall_Tail.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4505cc2e8886677f93a234959b7570bd4f66dcec8d47ac8c5b1d584a6e1f0bd8
+size 1087
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/BlurMesh.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/BlurMesh.bin
new file mode 100644
index 000000000..ec269f07c
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/BlurMesh.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e458f561b69c5157c688b2f416872cb393c78dc4791d267eda37759b755b5b7b
+size 1038
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/BottomFire.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/BottomFire.bin
new file mode 100644
index 000000000..52f92861d
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/BottomFire.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b23f06a0b3872a1fc0fb43d0c15eedcc51bbe821d371c59ea152eb04ca91f3e5
+size 1086
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/Breath.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/Breath.bin
new file mode 100644
index 000000000..82bd7a315
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/Breath.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4aec22635c4c3534141810ad650cf7647c34eb127d585eeead519b646d0c10bd
+size 1087
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/BreathSlog.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/BreathSlog.bin
new file mode 100644
index 000000000..6e3f0d30d
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/BreathSlog.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:110c5b86656c242c26b9b07f3bc4d2b3308b27621bf1b983581d69301f796f0d
+size 1085
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/Breath_Black.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/Breath_Black.bin
new file mode 100644
index 000000000..cd9fb2076
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/Breath_Black.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fd1fb444559795f21e6a3237b7828a0451be68b22ab976bd8c60fb19fd93374e
+size 1073
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/MouthFire.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/MouthFire.bin
new file mode 100644
index 000000000..dc8b85cb8
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/MouthFire.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ce40554cacbecb31c81657d1d5f2c2e77f1c1c2d3c03f44444598ac80b71fc82
+size 1074
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/Rock_PT.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/Rock_PT.bin
new file mode 100644
index 000000000..823d704a8
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/Rock_PT.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e265053a3bca6057227f0f9c28cb1bf4650f0ff70eab5371f6eab0bc310c1b24
+size 1066
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/SplatterBottom0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/SplatterBottom0.bin
new file mode 100644
index 000000000..46228fd43
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBreath/SplatterBottom0.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6c88d141245be0050de3b55f35a9fb0755bc13ecdca5bb22a0b5897c3081dc25
+size 1088
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/Black_Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/Black_Smoke.bin
new file mode 100644
index 000000000..487698e46
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/Black_Smoke.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4dafa174f05596126fd1d236c4c1655eff779b63a303f3a771005c884d0530d3
+size 1077
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/FireBall.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/FireBall.bin
index 9f2c43537..7d787bb73 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/FireBall.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/FireBall.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:a24e7a6e4de08530a23655f9d0de604b808456dcccbfed61c1fb4060821d0e52
+oid sha256:17a02ef904a527fde73ce50d7f8db6a53a061387daa8baf8147af158ef969fa9
size 1032
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/FireBall_PT.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/FireBall_PT.bin
index 7566c8696..9c3a55104 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/FireBall_PT.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/FireBall_PT.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:6ae9fbf6b6f9cb4db01ffaeea6b590db83c7d6bfaef8f92f60e59871bfa56125
-size 1138
+oid sha256:08f3ac592de5b3b522cda9543b23e49d9013cf03ae74d83c2351e0e433f6093f
+size 1136
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/FireBall_Ring.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/FireBall_Ring.bin
new file mode 100644
index 000000000..9fa7d3b71
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/FireBall_Ring.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5d9dc42cab92e649b62929e072c46381a883fd92a3524540ef9795ef36012d4f
+size 1076
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/FireBall_Surface.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/FireBall_Surface.bin
index e8023ecdf..f409f16fe 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/FireBall_Surface.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/FireBall_Surface.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:66b4178d5c55c7794852d9c9fd8dbf99ce8bc62493b20c39092a50a7dce9fef0
+oid sha256:2f41cd14f2cd317f28422fb7e0a37a5e503957347bc6da0eaaa422facf55f2b9
size 1027
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/FireBall_Tail.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/FireBall_Tail.bin
deleted file mode 100644
index 0ac02af54..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/FireBall_Tail.bin
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:c413ab3b2d0a161a8e5312524bb0c98c759332356c092e9bfdce31b38dfcae34
-size 1087
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/Hit_Effect.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/Hit_Effect.bin
index bfe7d56a2..522b1b001 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/Hit_Effect.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/Hit_Effect.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:bfbc3cfab6833ec29e5c8225339d95b2849d8d0872e3f411c57e5db19d0aff62
+oid sha256:d718e8b7d3a2f94e3caeec07660f5091bfacb9248e3d986dbfcf7328bdd34a40
size 1085
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/Hit_PT.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/Hit_PT.bin
index ddd0cecf5..861a97148 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/Hit_PT.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/Hit_PT.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:3a1ff82b443bad94101a2e44c5f30c0cd7d02040908e2bdd61ef98c98a759609
-size 1178
+oid sha256:8dcb25ea6795172f4813716b70663f7a10d033d05c745fa703ce13972792f3e9
+size 1174
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/Hit_PT_2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/Hit_PT_2.bin
new file mode 100644
index 000000000..a809feb5a
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/Hit_PT_2.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b451035db2a86bf2236fa8687c6e506654829f97b0940003a1d50c4e92fa8c39
+size 1174
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/Splatter0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/Splatter0.bin
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokFireBall/Splatter0.bin
rename to Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/Splatter0.bin
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/Splatter1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/Splatter1.bin
new file mode 100644
index 000000000..39242d7f3
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/Splatter1.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a258564d6ced7c563880da76d4674bed6408a274782eac790faecba3aa575937
+size 1081
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/SplatterBottom0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/SplatterBottom0.bin
new file mode 100644
index 000000000..026781fb9
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/SplatterBottom0.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cf659187a0d8d627c867b59dc4b81873a9102a9b140a4bcfe87e6011e0c62909
+size 1088
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test.bin
index c76d77da6..028f209ca 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Test.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:99a40bb54a9bb42e6ef3ab6eaeee3e365caf51d21936f12395d4bf812ff7a45d
-size 1026
+oid sha256:bdb2956e17b565f1634c1932ef1cc1d02e178a205a206ab099c406c3e72b93c4
+size 1039
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Decal/Duengon_Decal_Data.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Decal/Duengon_Decal_Data.xml
new file mode 100644
index 000000000..c32ed59d2
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Decal/Duengon_Decal_Data.xml
@@ -0,0 +1,138 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Light/Duengon_PointLight_Data.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Light/Duengon_PointLight_Data.xml
index 7b5472b69..db7ac6f8e 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Light/Duengon_PointLight_Data.xml
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Light/Duengon_PointLight_Data.xml
@@ -1,33 +1,123 @@
+
+
+
+
+
+
+
+
+
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/BaseFlattenNormalMap.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/BaseFlattenNormalMap.png
new file mode 100644
index 000000000..d8e1fd944
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/BaseFlattenNormalMap.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.bin
new file mode 100644
index 000000000..bed108392
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:89714a23c6f418c533029f0af1bd2e38a20e57bce367c5546047a3c8496d35f8
+size 19993985
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.fbx
new file mode 100644
index 000000000..fc1fa14a0
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.fbx
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:97a26ad1e1082ebd3c53bf35f781e6329966a7ef6a6f3999ea5512b671c054b6
+size 64858588
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.xml b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.xml
new file mode 100644
index 000000000..fdefae55a
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.xml
@@ -0,0 +1,237 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Adult_M_Arms_Ivory_N.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Adult_M_Arms_Ivory_N.dds
new file mode 100644
index 000000000..ce4f7d3de
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Adult_M_Arms_Ivory_N.dds differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_DefaultGrey_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_DefaultGrey_D.png
new file mode 100644
index 000000000..b414d5691
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_DefaultGrey_D.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Eye_Sclera_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Eye_Sclera_D.png
new file mode 100644
index 000000000..6e082532d
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Eye_Sclera_D.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Eye_Wetness_N.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Eye_Wetness_N.dds
new file mode 100644
index 000000000..3eacfd4ac
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Eye_Wetness_N.dds differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_Arms_D.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_Arms_D.dds
new file mode 100644
index 000000000..e02bb269b
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_Arms_D.dds differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_Arms_MRO.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_Arms_MRO.dds
new file mode 100644
index 000000000..76b40694b
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_Arms_MRO.dds differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_D.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_D.dds
new file mode 100644
index 000000000..017c27d4d
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_D.dds differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_Hair_D.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_Hair_D.dds
new file mode 100644
index 000000000..8c8437a67
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_Hair_D.dds differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_Hair_MRO.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_Hair_MRO.dds
new file mode 100644
index 000000000..826cbfa03
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_Hair_MRO.dds differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_Hair_N.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_Hair_N.dds
new file mode 100644
index 000000000..6888b23e1
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_Hair_N.dds differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_MRO.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_MRO.dds
new file mode 100644
index 000000000..1d8ef0982
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_MRO.dds differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_N.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_N.dds
new file mode 100644
index 000000000..7f19879aa
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Ghost_Peeves_N.dds differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_HUM_Head_Teeth_Decay5_D.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_HUM_Head_Teeth_Decay5_D.dds
new file mode 100644
index 000000000..5c0f6cae3
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_HUM_Head_Teeth_Decay5_D.dds differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_HUM_Head_Teeth_N.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_HUM_Head_Teeth_N.dds
new file mode 100644
index 000000000..4d226e763
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_HUM_Head_Teeth_N.dds differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Old_M_Head_Peeves_D.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Old_M_Head_Peeves_D.dds
new file mode 100644
index 000000000..26ce9b846
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Old_M_Head_Peeves_D.dds differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Old_M_Head_Peeves_MRO.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Old_M_Head_Peeves_MRO.dds
new file mode 100644
index 000000000..8d72c7b14
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Old_M_Head_Peeves_MRO.dds differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Old_M_Head_Peeves_N.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Old_M_Head_Peeves_N.dds
new file mode 100644
index 000000000..4a7e8f998
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Old_M_Head_Peeves_N.dds differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Poltergeist_Eye_D.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Poltergeist_Eye_D.dds
new file mode 100644
index 000000000..9cefbede6
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Poltergeist_Eye_D.dds differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Poltergeist_Eye_E.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Poltergeist_Eye_E.dds
new file mode 100644
index 000000000..6886922fb
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Poltergeist_Eye_E.dds differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Poltergeist_Eye_MRO.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Poltergeist_Eye_MRO.dds
new file mode 100644
index 000000000..8dd44d423
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/Ghost_Peeves/T_Poltergeist_Eye_MRO.dds differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/RaceRing/SM_BRR_RaceRing_01.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/RaceRing/SM_BRR_RaceRing_01.bin
index 8f24c4ab9..64b46713a 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/RaceRing/SM_BRR_RaceRing_01.bin
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/RaceRing/SM_BRR_RaceRing_01.bin
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:de48122c14fab532d19810a71d66dc6dacff899140d2bfdf27f32b1f4908b3b9
-size 593675
+oid sha256:88e03c1b70ee4e4881fffcaecb3721266c271d15b14bd5993524b08f52e372d3
+size 593780
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Blur.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Blur.hlsl
index bbd7c9266..d160873e0 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Blur.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Blur.hlsl
@@ -4,6 +4,7 @@ matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
Texture2D g_BlurTexture;
Texture2D g_BlurXTexture;
+Texture2D g_BlurYTexture;
float2 g_vResolution;
@@ -79,6 +80,11 @@ struct PS_OUT_BLUR_Y
float4 vBlurY : SV_TARGET0;
};
+struct PS_OUT_COMBINED
+{
+ float4 vBackBuffer : SV_TARGET0;
+};
+
PS_OUT_BLUR_X PS_MAIN_BLUR_X(PS_IN In)
{
PS_OUT_BLUR_X Out;
@@ -120,10 +126,25 @@ PS_OUT_BLUR_Y PS_MAIN_BLUR_Y(PS_IN In)
vColor += g_fWeights_32[i + 15] * g_BlurXTexture.Sample(BorderZeroSampler, vTexcoord);
}
+ Out.vBlurY = vColor;
+
+ return Out;
+}
+
+PS_OUT_COMBINED PS_COMBINED(PS_IN In)
+{
+ PS_OUT_COMBINED Out;
+
+
+ float4 vColor = { 0.f, 0.f, 0.f, 0.f };
+
+
+ vColor = g_BlurYTexture.Sample(DefaultSampler, In.vTexcoord);
+
if (vColor.a <= FLT_EPSILON5)
discard;
- Out.vBlurY = vColor;
+ Out.vBackBuffer = vColor;
return Out;
}
@@ -131,7 +152,7 @@ PS_OUT_BLUR_Y PS_MAIN_BLUR_Y(PS_IN In)
technique11 DefaultTechnique
{
- pass BlurXPass// 4
+ pass BlurXPass// 0
{
SetRasterizerState(RS_Default);
SetDepthStencilState(DSS_None, 0);
@@ -141,7 +162,7 @@ technique11 DefaultTechnique
PixelShader = compile ps_5_0 PS_MAIN_BLUR_X();
}
- pass BlurYPass // 4
+ pass BlurYPass // 1
{
SetRasterizerState(RS_Default);
SetDepthStencilState(DSS_None, 0);
@@ -151,5 +172,14 @@ technique11 DefaultTechnique
PixelShader = compile ps_5_0 PS_MAIN_BLUR_Y();
}
+ pass Combined // 2
+ {
+ SetRasterizerState(RS_Default);
+ SetDepthStencilState(DSS_None, 0);
+ SetBlendState(BS_Blend, 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_COMBINED();
+ }
}
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl
index 0d14ceee3..12a0a6da9 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl
@@ -94,6 +94,9 @@ float g_fFogPow;
float g_fFogHeightValue;
bool g_bFogVisible;
vector g_vFogColor;
+float g_fDepthPackExponent;
+
+Texture3D g_VolumeTexture;
float g_fWeights_32[32] =
{
@@ -1142,6 +1145,8 @@ PS_OUT_FLT4_SINGLE PS_MAIN_FOG(PS_IN In)
vector vColor = g_OriginalTexture.Sample(DefaultSampler, In.vTexcoord);
vector vDepthDesc = g_DepthTexture.Sample(DefaultSampler, In.vTexcoord);
+ float3 vVolumeUV = float3(In.vTexcoord.xy, pow(vDepthDesc.y, g_fDepthPackExponent));
+
if (0.f == g_fFogPow)
{
if (1 == vDepthDesc.y)
@@ -1151,9 +1156,10 @@ PS_OUT_FLT4_SINGLE PS_MAIN_FOG(PS_IN In)
return Out;
}
+ float4 vVolumeValue = g_VolumeTexture.Sample(DefaultSampler, vVolumeUV);
float fViewZ = vDepthDesc.y * g_fFar;
- float4 vPosition, vPreShadowPosition;
+ float4 vPosition;
vPosition.x = In.vTexcoord.x * 2.f - 1.f;
vPosition.y = In.vTexcoord.y * -2.f + 1.f;
vPosition.z = vDepthDesc.x;
@@ -1174,14 +1180,19 @@ PS_OUT_FLT4_SINGLE PS_MAIN_FOG(PS_IN In)
fRatio = pow(1.f - saturate(exp(-1.f * vDepthDesc.y * g_fFogDensity)), g_fFogPow);
- vFinalColor = lerp(vColor, g_vFogColor, fRatio);
- vFinalColor.a = 1.f;
+ vVolumeValue.r = vVolumeValue.r < 1.413f ? pow(abs(vVolumeValue.r * 0.38317f), 1.f / 2.2f) : 1.f - exp(-vVolumeValue.r);
+ vVolumeValue.g = vVolumeValue.g < 1.413f ? pow(abs(vVolumeValue.g * 0.38317f), 1.f / 2.2f) : 1.f - exp(-vVolumeValue.g);
+ vVolumeValue.b = vVolumeValue.b < 1.413f ? pow(abs(vVolumeValue.b * 0.38317f), 1.f / 2.2f) : 1.f - exp(-vVolumeValue.b);
+ vVolumeValue.a = saturate(1.f - vVolumeValue.a);
+ vFinalColor = float4(lerp(vColor.rgb, vVolumeValue.rgb, vVolumeValue.a), 1.f);
if (1.f == vDepthDesc.y)
{
- vFinalColor = float4(g_vFogColor);
+ vFinalColor = float4(vVolumeValue.rgb, 1.f);
}
- Out.vFirstTarget = vFinalColor;
+
+
+ Out.vFirstTarget = vVolumeValue;
return Out;
}
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl
index e859e4d1d..a8ac33933 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl
@@ -317,7 +317,7 @@ row_major float4x4 SampleBlendedLocal(uint bone)
- SampleLocalTRS_Prev(bone, PrevTime, sA, rA, tA);
+ SampleLocalTRS_Prev(bone, prevT, sA, rA, tA);
SampleLocalTRS_Cur(bone, CurrentTime, sB, rB, tB);
float3 S = lerp(sA, sB, br);
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl
index 49412e2fe..737b5e082 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl
@@ -27,6 +27,8 @@ float g_fOutLinePower;
float g_fUsingSurfaceParams;
float g_fEtherealRatio;
float g_fMixerFactor;
+float g_fMBIntensity = 1.f;
+
Texture2D g_DiffuseTexture : register(t00);
@@ -326,7 +328,7 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE_READ(PS_IN In)
(In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
1.f);
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
return Out;
}
@@ -367,7 +369,7 @@ PS_OUT PS_EYELASH_DAOTHV_ToSRO(PS_IN In)
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(lerp(0.7f, 0.3f, SpecMask), SpecMask * 0.5f, AoMask_Dao * AoMask_Thv, 0.f);
// SRO
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
return Out;
}
@@ -395,7 +397,7 @@ PS_OUT PS_TEETH_SRXO_ToSRO(PS_IN In)
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vSRXO_MASK.r, vSRXO_MASK.g, vSRXO_MASK.a, 0.f);
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
// SRO
return Out;
}
@@ -422,7 +424,7 @@ PS_OUT PS_EYE_DN_SRO(PS_IN In)
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(0.5f, 0.5f, 1.f, 0.f);
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
// SRO
return Out;
}
@@ -472,7 +474,7 @@ PS_OUT PS_FACIAL_HAIR_DAOTHV_ToSRO(PS_IN In)
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(lerp(0.7f, 0.3f, SpecMask), SpecMask * 0.5f, AoMask_Dao * AoMask_Thv, 0.f);
// SRO
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
return Out;
}
@@ -514,7 +516,7 @@ PS_OUT PS_HEAD_HAIR_DAOTHV_ToSRO(PS_IN In)
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(lerp(0.7f, 0.3f, SpecMask), SpecMask * 0.5f, AoMask_Dao * AoMask_Thv, 0.f);
// SRO
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
return Out;
}
@@ -541,7 +543,7 @@ PS_OUT PS_HEADwtHAND_DSRXON_ToSRO(PS_IN In)
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vSRXO_Mask.r, vSRXO_Mask.g, vSRXO_Mask.a, 0.f);
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
// SRO
return Out;
}
@@ -569,7 +571,7 @@ PS_OUT PS_LOWER_DSRON_ToSRO(PS_IN In)
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vSRO_Mask.r, vSRO_Mask.g, vSRO_Mask.b, 0.f);
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
// SRO
return Out;
}
@@ -597,7 +599,7 @@ PS_OUT PS_UPPER_DMRON_ToMRO(PS_IN In)
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vMRO_Mask.r, vMRO_Mask.g, vMRO_Mask.b, 0.f);
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
// MRO
return Out;
}
@@ -625,7 +627,7 @@ PS_OUT PS_GLASSES_DMRON_ToMRO(PS_IN In)
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vMRO_Mask.r, vMRO_Mask.g, vMRO_Mask.b, 0.f);
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
// SRO
return Out;
}
@@ -654,7 +656,7 @@ PS_OUT PS_EmissiveMetalness_DENMRO_ToMRO(PS_IN In)
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vMRO_Mask.r, vMRO_Mask.g, vMRO_Mask.b, 0.f);
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
// SRO
return Out;
}
@@ -683,7 +685,7 @@ PS_OUT PS_DNMRO_ToMRO(PS_IN In)
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vMRO_Mask.r, vMRO_Mask.g, vMRO_Mask.b, 0.f);
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
// SRO
return Out;
}
@@ -712,7 +714,7 @@ PS_OUT PS_MI_ClothSim_DSEN_ToSRO(PS_IN In)
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vSpecular_Mask.r, 0.5f, 1.f, 0.f);
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
// SRO
return Out;
}
@@ -747,7 +749,7 @@ PS_OUT PS_MI_DANSROMRO_ToSRO(PS_IN In)
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vSRO_Mask.r, Roughness, Occlusion, 0.f);
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
// SRO
return Out;
}
@@ -783,7 +785,7 @@ PS_OUT PS_Troll_Club_DAENMROSRXO_ToMROX(PS_IN In)
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vMRO_MASK.r, Roughness, Occlusion, vSRXO_Mask.b);
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
// SRO
return Out;
}
@@ -826,7 +828,7 @@ PS_OUT PS_Player_EyeLash_DAOTHV_ToSRO(PS_IN In)
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(lerp(0.1f, 0.3f, SpecMask), SpecMask * 0.5f, AoMask_Dao * AoMask_Thv, 0.f);
// SRO
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
return Out;
}
PS_OUT PS_Player_Eye_ToMRO(PS_IN In)
@@ -851,7 +853,7 @@ PS_OUT PS_Player_Eye_ToMRO(PS_IN In)
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vMROColor.r, vMROColor.g, vMROColor.b, 0.f);
// SRO
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
return Out;
}
PS_OUT PS_Player_Robe_ToMRO(PS_IN In)
@@ -878,7 +880,7 @@ PS_OUT PS_Player_Robe_ToMRO(PS_IN In)
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vMROColor.r, vMROColor.g, vMROColor.b, 0.f);
// SRO
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
return Out;
}
PS_OUT PS_Player_Suit_DSRON_ToSRO(PS_IN In)
@@ -903,7 +905,7 @@ PS_OUT PS_Player_Suit_DSRON_ToSRO(PS_IN In)
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vSROColor.r, vSROColor.g, vSROColor.b, 0.f);
// SRO
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
return Out;
}
PS_OUT PS_Player_HairDAOTHV_ToSRO(PS_IN In)
@@ -947,7 +949,7 @@ PS_OUT PS_Player_HairDAOTHV_ToSRO(PS_IN In)
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(lerp(0.7f, 0.3f, SpecMask), SpecMask * 0.5f, AoMask_Dao * AoMask_Thv, 0.f);
// SRO
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
return Out;
}
@@ -1017,7 +1019,7 @@ PS_OUT PS_Dragon_Body(PS_IN In)
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vMRO, 0.f);
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
// SRO
return Out;
}
@@ -1050,7 +1052,7 @@ PS_OUT PS_Dragon_Wings(PS_IN In)
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(vMRO, 0.f);
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
// SRO
return Out;
}
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Volumetric_Accumulate.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Volumetric_Accumulate.hlsl
new file mode 100644
index 000000000..aa5694dfa
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Volumetric_Accumulate.hlsl
@@ -0,0 +1,88 @@
+#include "Engine_Shader_Functions.hlsli"
+#include "Engine_Shader_Defines.hlsli"
+
+static const float DensityScale = 0.01f;
+
+Texture3D g_VolumeSRV : register(t0);
+
+RWTexture3D g_AccVolumeUAV : register(u0);
+
+cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐이더 바인딩할때 인덱스가 동일해야함
+{
+ uint3 VolumeSize;
+ float fDepthPackExponent;
+
+ float fTemporalAccum;
+ float fFrameIndex;
+ float fNear;
+ float fFar;
+
+ float3 vCameraPosition;
+ float fDensity;
+
+ float fLightIntensity;
+ float3 vLightDirection;
+
+ float4 vLightColor;
+
+ row_major matrix InvProjMatrix;
+ row_major matrix InvViewMatrix;
+
+ float fAsymmetryParameter;
+ float padding0;
+ float padding1;
+ float padding2;
+}
+
+float ConvertNdcZToDepth(float ndcZ);
+float SliceTickness(float ndcZ, uint dimZ);
+float4 ScatterStep(float3 accumulatedLight, float accumulatedTransmittance, float3 sliceLight, float sliceDensity, float tickness);
+// 볼륨 텍스쳐 밀도, 산란 누적 계산
+[numthreads(8, 8, 4)]
+void CS_MAIN( uint3 DispatchThreadID : SV_DispatchThreadID)
+{
+ uint3 dims;
+ g_AccVolumeUAV.GetDimensions(dims.x, dims.y, dims.z);
+ if (!all(DispatchThreadID < dims))
+ return;
+
+ float4 accumulatedColor = float4(0.f, 0.f, 0.f, 1.f);
+ uint3 Position = uint3(DispatchThreadID.xy, 0);
+
+ [loop]
+ for (uint i = 0; i < dims.z; ++i)
+ {
+ Position.z = i;
+ float4 slice = g_VolumeSRV[Position];
+ float tickness = SliceTickness((float)i / dims.z, dims.z);
+
+ accumulatedColor = ScatterStep(accumulatedColor.rgb, accumulatedColor.a, slice.rgb, slice.a, tickness);
+ g_AccVolumeUAV[Position] = accumulatedColor;
+ }
+}
+
+float SliceTickness (float ndcZ, uint dimZ)
+{
+ return ConvertNdcZToDepth(ndcZ + 1.f / float(dimZ)) - ConvertNdcZToDepth(ndcZ);
+}
+
+float ConvertNdcZToDepth(float ndcZ)
+{
+ float t = pow(ndcZ, fDepthPackExponent);
+ return t * (fFar - fNear) + fNear;
+}
+
+float4 ScatterStep(float3 accumulatedLight, float accumulatedTransmittance, float3 sliceLight, float sliceDensity, float tickness)
+{
+ sliceDensity = max(sliceDensity, 0.000001f);
+ sliceDensity *= DensityScale;
+ float sliceTransmittance = exp(-sliceDensity * tickness);
+
+ // Frostbite의 누적 방식
+ float3 sliceLightIntegral = sliceLight * (1.f - sliceTransmittance) / sliceDensity;
+
+ accumulatedLight += sliceLightIntegral * accumulatedTransmittance;
+ accumulatedTransmittance *= sliceTransmittance;
+
+ return float4(accumulatedLight, accumulatedTransmittance);
+}
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Volumetric_Compute.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Volumetric_Compute.hlsl
new file mode 100644
index 000000000..b602fc1e4
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Volumetric_Compute.hlsl
@@ -0,0 +1,111 @@
+#include "Engine_Shader_Functions.hlsli"
+#include "Engine_Shader_Defines.hlsli"
+
+static const float EPSILON = 1e-6f;
+
+struct LightData
+{
+ uint itype;
+ float3 vDirection;
+
+ float3 vPosition;
+ float fRange;
+
+ float4 vColor;
+};
+
+//StructuredBuffer g_LightBuffer : register(t1);
+
+RWTexture3D g_VolumeUAV : register(u0);
+
+cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐이더 바인딩할때 인덱스가 동일해야함
+{
+ uint3 VolumeSize;
+ float fDepthPackExponent;
+
+ float fTemporalAccum;
+ float fFrameIndex;
+ float fNear;
+ float fFar;
+
+ float3 vCameraPosition;
+ float fDensity;
+
+ float fLightIntensity;
+ float3 vLightDirection;
+
+ float4 vLightColor;
+
+ row_major matrix InvProjMatrix;
+ row_major matrix InvViewMatrix;
+
+ float fAsymmetryParameter;
+ float padding0;
+ float padding1;
+ float padding2;
+}
+
+float3 ConvertThreadIdToNdc(uint3 id, uint3 dims);
+float ConvertNdcZToDepth(float ndcZ);
+float3 ConvertToWorldPosition(float3 ndc, float depth);
+float3 ConvertThreadIdToWorldPosition(uint3 id, uint3 dims);
+float HenyeyGreensteinPhaseFunction(float3 vInputDir, float3 vOutputDir, float fAnisotropy);
+
+// 볼륨 텍스쳐 밀도, 산란 계산
+[numthreads(8, 8, 4)]
+void CS_MAIN( uint3 DispatchThreadID : SV_DispatchThreadID)
+{
+ uint3 dims;
+ g_VolumeUAV.GetDimensions(dims.x, dims.y, dims.z);
+ if (!all(DispatchThreadID < dims))
+ return;
+
+ float3 worldPosition = ConvertThreadIdToWorldPosition(DispatchThreadID, dims);
+ float3 toCamera = normalize(vCameraPosition - worldPosition);
+
+ float3 lighting = vLightColor.rgb * vLightColor.a;
+ float3 lightDir = normalize(vLightDirection);
+ float3 toLight = -lightDir;
+
+ float phase = HenyeyGreensteinPhaseFunction(lightDir, toCamera, fAsymmetryParameter);
+
+ lighting += vLightColor.rgb * vLightColor.rgb * phase;
+
+ g_VolumeUAV[DispatchThreadID] = float4(lighting * fLightIntensity * fDensity, fDensity);
+}
+
+float3 ConvertThreadIdToNdc(uint3 id, uint3 dims)
+{
+ float3 ndc = id + 0.5f;
+
+ ndc *= float3(2.0f / dims.x, -2.0f / dims.y, 1.0f / dims.z);
+ ndc += float3(-1.0f, 1.0f, 0.0f);
+
+ return ndc;
+}
+float ConvertNdcZToDepth(float ndcZ)
+{
+ float t = pow(ndcZ, fDepthPackExponent);
+ return t * (fFar - fNear) + fNear;
+}
+float3 ConvertToWorldPosition(float3 ndc, float depth)
+{
+ float4 vViewRay = mul(float4(ndc, 1.f), InvProjMatrix);
+ vViewRay /= vViewRay.w;
+ vViewRay /= vViewRay.z;
+ float4 worldPosition = mul(float4(vViewRay.xyz * depth, 1.f), InvViewMatrix);
+ return worldPosition.xyz;
+}
+float3 ConvertThreadIdToWorldPosition(uint3 id, uint3 dims)
+{
+ float3 ndc = ConvertThreadIdToNdc(id, dims);
+ float depth = ConvertNdcZToDepth(ndc.z);
+ return ConvertToWorldPosition(ndc, depth);
+}
+float HenyeyGreensteinPhaseFunction(float3 vInputDir, float3 vOutputDir, float fAsymmetryParameter)
+{
+ float cosTheta = dot(vInputDir, vOutputDir);
+
+ float denom = pow(1.f + (fAsymmetryParameter * fAsymmetryParameter) - 2.f * fAsymmetryParameter * cosTheta, 3.f / 2.f);
+ return (1.f / (4.f * PI)) * ((1.f - (fAsymmetryParameter * fAsymmetryParameter)) / max(denom, EPSILON));
+}
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Volumetrix_Accumulate.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Volumetrix_Accumulate.hlsl
new file mode 100644
index 000000000..aa5694dfa
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Volumetrix_Accumulate.hlsl
@@ -0,0 +1,88 @@
+#include "Engine_Shader_Functions.hlsli"
+#include "Engine_Shader_Defines.hlsli"
+
+static const float DensityScale = 0.01f;
+
+Texture3D g_VolumeSRV : register(t0);
+
+RWTexture3D g_AccVolumeUAV : register(u0);
+
+cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐이더 바인딩할때 인덱스가 동일해야함
+{
+ uint3 VolumeSize;
+ float fDepthPackExponent;
+
+ float fTemporalAccum;
+ float fFrameIndex;
+ float fNear;
+ float fFar;
+
+ float3 vCameraPosition;
+ float fDensity;
+
+ float fLightIntensity;
+ float3 vLightDirection;
+
+ float4 vLightColor;
+
+ row_major matrix InvProjMatrix;
+ row_major matrix InvViewMatrix;
+
+ float fAsymmetryParameter;
+ float padding0;
+ float padding1;
+ float padding2;
+}
+
+float ConvertNdcZToDepth(float ndcZ);
+float SliceTickness(float ndcZ, uint dimZ);
+float4 ScatterStep(float3 accumulatedLight, float accumulatedTransmittance, float3 sliceLight, float sliceDensity, float tickness);
+// 볼륨 텍스쳐 밀도, 산란 누적 계산
+[numthreads(8, 8, 4)]
+void CS_MAIN( uint3 DispatchThreadID : SV_DispatchThreadID)
+{
+ uint3 dims;
+ g_AccVolumeUAV.GetDimensions(dims.x, dims.y, dims.z);
+ if (!all(DispatchThreadID < dims))
+ return;
+
+ float4 accumulatedColor = float4(0.f, 0.f, 0.f, 1.f);
+ uint3 Position = uint3(DispatchThreadID.xy, 0);
+
+ [loop]
+ for (uint i = 0; i < dims.z; ++i)
+ {
+ Position.z = i;
+ float4 slice = g_VolumeSRV[Position];
+ float tickness = SliceTickness((float)i / dims.z, dims.z);
+
+ accumulatedColor = ScatterStep(accumulatedColor.rgb, accumulatedColor.a, slice.rgb, slice.a, tickness);
+ g_AccVolumeUAV[Position] = accumulatedColor;
+ }
+}
+
+float SliceTickness (float ndcZ, uint dimZ)
+{
+ return ConvertNdcZToDepth(ndcZ + 1.f / float(dimZ)) - ConvertNdcZToDepth(ndcZ);
+}
+
+float ConvertNdcZToDepth(float ndcZ)
+{
+ float t = pow(ndcZ, fDepthPackExponent);
+ return t * (fFar - fNear) + fNear;
+}
+
+float4 ScatterStep(float3 accumulatedLight, float accumulatedTransmittance, float3 sliceLight, float sliceDensity, float tickness)
+{
+ sliceDensity = max(sliceDensity, 0.000001f);
+ sliceDensity *= DensityScale;
+ float sliceTransmittance = exp(-sliceDensity * tickness);
+
+ // Frostbite의 누적 방식
+ float3 sliceLightIntegral = sliceLight * (1.f - sliceTransmittance) / sliceDensity;
+
+ accumulatedLight += sliceLightIntegral * accumulatedTransmittance;
+ accumulatedTransmittance *= sliceTransmittance;
+
+ return float4(accumulatedLight, accumulatedTransmittance);
+}
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Volumetrix_Compute.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Volumetrix_Compute.hlsl
new file mode 100644
index 000000000..b602fc1e4
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Volumetrix_Compute.hlsl
@@ -0,0 +1,111 @@
+#include "Engine_Shader_Functions.hlsli"
+#include "Engine_Shader_Defines.hlsli"
+
+static const float EPSILON = 1e-6f;
+
+struct LightData
+{
+ uint itype;
+ float3 vDirection;
+
+ float3 vPosition;
+ float fRange;
+
+ float4 vColor;
+};
+
+//StructuredBuffer g_LightBuffer : register(t1);
+
+RWTexture3D g_VolumeUAV : register(u0);
+
+cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐이더 바인딩할때 인덱스가 동일해야함
+{
+ uint3 VolumeSize;
+ float fDepthPackExponent;
+
+ float fTemporalAccum;
+ float fFrameIndex;
+ float fNear;
+ float fFar;
+
+ float3 vCameraPosition;
+ float fDensity;
+
+ float fLightIntensity;
+ float3 vLightDirection;
+
+ float4 vLightColor;
+
+ row_major matrix InvProjMatrix;
+ row_major matrix InvViewMatrix;
+
+ float fAsymmetryParameter;
+ float padding0;
+ float padding1;
+ float padding2;
+}
+
+float3 ConvertThreadIdToNdc(uint3 id, uint3 dims);
+float ConvertNdcZToDepth(float ndcZ);
+float3 ConvertToWorldPosition(float3 ndc, float depth);
+float3 ConvertThreadIdToWorldPosition(uint3 id, uint3 dims);
+float HenyeyGreensteinPhaseFunction(float3 vInputDir, float3 vOutputDir, float fAnisotropy);
+
+// 볼륨 텍스쳐 밀도, 산란 계산
+[numthreads(8, 8, 4)]
+void CS_MAIN( uint3 DispatchThreadID : SV_DispatchThreadID)
+{
+ uint3 dims;
+ g_VolumeUAV.GetDimensions(dims.x, dims.y, dims.z);
+ if (!all(DispatchThreadID < dims))
+ return;
+
+ float3 worldPosition = ConvertThreadIdToWorldPosition(DispatchThreadID, dims);
+ float3 toCamera = normalize(vCameraPosition - worldPosition);
+
+ float3 lighting = vLightColor.rgb * vLightColor.a;
+ float3 lightDir = normalize(vLightDirection);
+ float3 toLight = -lightDir;
+
+ float phase = HenyeyGreensteinPhaseFunction(lightDir, toCamera, fAsymmetryParameter);
+
+ lighting += vLightColor.rgb * vLightColor.rgb * phase;
+
+ g_VolumeUAV[DispatchThreadID] = float4(lighting * fLightIntensity * fDensity, fDensity);
+}
+
+float3 ConvertThreadIdToNdc(uint3 id, uint3 dims)
+{
+ float3 ndc = id + 0.5f;
+
+ ndc *= float3(2.0f / dims.x, -2.0f / dims.y, 1.0f / dims.z);
+ ndc += float3(-1.0f, 1.0f, 0.0f);
+
+ return ndc;
+}
+float ConvertNdcZToDepth(float ndcZ)
+{
+ float t = pow(ndcZ, fDepthPackExponent);
+ return t * (fFar - fNear) + fNear;
+}
+float3 ConvertToWorldPosition(float3 ndc, float depth)
+{
+ float4 vViewRay = mul(float4(ndc, 1.f), InvProjMatrix);
+ vViewRay /= vViewRay.w;
+ vViewRay /= vViewRay.z;
+ float4 worldPosition = mul(float4(vViewRay.xyz * depth, 1.f), InvViewMatrix);
+ return worldPosition.xyz;
+}
+float3 ConvertThreadIdToWorldPosition(uint3 id, uint3 dims)
+{
+ float3 ndc = ConvertThreadIdToNdc(id, dims);
+ float depth = ConvertNdcZToDepth(ndc.z);
+ return ConvertToWorldPosition(ndc, depth);
+}
+float HenyeyGreensteinPhaseFunction(float3 vInputDir, float3 vOutputDir, float fAsymmetryParameter)
+{
+ float cosTheta = dot(vInputDir, vOutputDir);
+
+ float denom = pow(1.f + (fAsymmetryParameter * fAsymmetryParameter) - 2.f * fAsymmetryParameter * cosTheta, 3.f / 2.f);
+ return (1.f / (4.f * PI)) * ((1.f - (fAsymmetryParameter * fAsymmetryParameter)) / max(denom, EPSILON));
+}
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl
index 88a4716f1..d52149768 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl
@@ -29,6 +29,7 @@ float g_fOutLinePower;
float g_fDisolveRatio;
float g_fDisolveAmount;
float g_fDisolveEdgeWidth;
+float g_fMBIntensity = 1.f;
float4 g_vDisolveEdgeColor;
float4 g_vCamPosition;
@@ -404,6 +405,7 @@ PS_OUT PS_MAIN(PS_IN In)
Out.vAlbedo = vMtrlDiffuse;
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
+
float fSurfaceParam = g_fUsingSurfaceParams;
if (true == AlmostEqual7(g_fUsingSurfaceParams, 0.f))
{
@@ -415,7 +417,7 @@ PS_OUT PS_MAIN(PS_IN In)
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = vSurface;
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
return Out;
}
@@ -479,7 +481,7 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE(PS_IN_OUTLINE In)
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
1.f);
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
return Out;
}
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl
index 345ee66cc..4c8eb51df 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl
@@ -22,6 +22,7 @@ vector g_vCamPosition;
uint g_iIndexU;
uint g_iIndexV;
float2 g_vTime;
+float g_fMBIntensity = 1.f;
float g_fDisolveRatio;
float g_fUsingSurfaceParams;
@@ -442,7 +443,7 @@ PS_OUT PS_MAIN(PS_IN In)
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = vSurface;
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
return Out;
}
@@ -478,7 +479,7 @@ PS_OUT PS_GLASS(PS_IN In)
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 = float2(0.5f, 0.5f);
- //CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ //CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
return Out;
}
@@ -507,7 +508,7 @@ PS_OUT PS_GLASS_CUBE(PS_IN In)
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 = float2(0.5f, 0.5f);
- //CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ //CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
return Out;
}
@@ -697,7 +698,7 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE(PS_IN_OUTLINE In)
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
AI_TEXTURE_TYPE_METALNESS, // 서페이스 파라미터
1.f);
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
return Out;
}
@@ -762,7 +763,7 @@ PS_OUT PS_LAKE(PS_IN In)
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = vSurface;
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
return Out;
}
@@ -798,7 +799,7 @@ PS_OUT PS_LAND(PS_IN In)
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = vSurface;
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
return Out;
}
@@ -826,7 +827,7 @@ PS_OUT PS_NONMRO(PS_IN In)
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = g_vSurfaceColor;
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
return Out;
}
@@ -868,7 +869,7 @@ PS_OUT PS_SPECTOR_WEAPON_MAIN(PS_IN In)
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = vSurface;
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
return Out;
}
@@ -920,7 +921,7 @@ PS_OUT PS_LEVIOSO(PS_IN In)
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = vSurface;
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
return Out;
}
@@ -1037,7 +1038,6 @@ PS_OUT_DELCAL PS_MAIN_DECAL(PS_IN_DECAL In)
return Out;
}
-
technique11 MeshTechnique11
{
pass MeshPass // 0
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl
index 7af357805..b30a62965 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl
@@ -69,10 +69,13 @@ Texture2D g_EmissiveTexture : register(t6);
Texture2D g_DepthStencilTexture : register(t7);
Texture2D g_DistortionTexture : register(t8);
Texture2D g_DepthTexture : register(t9);
+Texture2D g_SurfaceParamsTexture : register(t10);
float4 g_vCamPosition;
float g_fFar;
+float g_fUsingSurfaceParams;
+float g_fMBIntensity = 1.f;
/* 디퓨즈 */
vector g_vColor;
@@ -128,6 +131,8 @@ bool g_isDissolveMove;
bool g_isReverseDissolve;
bool g_isNomalDissolve;
+bool g_isNoDissolveSmoothStep;
+
bool g_isDissolve_B;
bool g_isDissolve_G;
@@ -243,18 +248,41 @@ struct VS_BULR_MESH_OUT
float4 vPrevProjPos : TEXCOORD5;
};
-VS_OUT VS_MAIN(VS_IN In, uint iGPUIndex : SV_InstanceID)
+struct PS_BLUR_MESH_IN
{
- VS_OUT Out = (VS_OUT) 0;
+ float4 vPosition : SV_POSITION;
+ float4 vNormal : NORMAL;
+ float3 vTangent : TANGENT;
+ float3 vBinormal : BINORMAL;
+ float2 vTexcoord : TEXCOORD0;
+ float2 vLifeTime : TEXCOORD1;
+ float4 vWorldPos : TEXCOORD2;
+ float4 vProjPos : TEXCOORD3;
+ uint iGPUIndex : TEXCOORD4;
+ float4 vPrevProjPos : TEXCOORD5;
+};
+
+VS_BULR_MESH_OUT VS_MAIN(VS_IN In, uint iGPUIndex : SV_InstanceID)
+{
+ VS_BULR_MESH_OUT Out = (VS_BULR_MESH_OUT) 0;
matrix matW, matWV, matWVP;
row_major matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation);
+ row_major matrix PreTransformMatrix = g_ParticleValue[iGPUIndex].PreWorldMatrix;
+
+
matW = mul(TransformMatrix, g_WorldMatrix);
matWV = mul(matW, g_ViewMatrix);
matWVP = mul(matWV, g_ProjMatrix);
+ matrix matPrevW, matPrevWV, matPrevWVP;
+
+ matPrevW = mul(PreTransformMatrix, g_PrevWorldMatrix);
+ matPrevWV = mul(matPrevW, g_PrevViewMatrix);
+ matPrevWVP = mul(matPrevWV, g_PrevProjMatrix);
+
@@ -269,13 +297,69 @@ VS_OUT VS_MAIN(VS_IN In, uint iGPUIndex : SV_InstanceID)
Out.vWorldPos = mul(vector(In.vPosition, 1.f), matW);
Out.iGPUIndex = iGPUIndex;
Out.vProjPos = vPosition;
-
+ Out.vPrevProjPos = mul(vector(In.vPosition, 1.f), matPrevWVP);
+
+ return Out;
+}
+
+VS_BULR_MESH_OUT VS_MAIN_NO_POS(VS_IN In, uint iGPUIndex : SV_InstanceID)
+{
+ VS_BULR_MESH_OUT Out = (VS_BULR_MESH_OUT) 0;
+
+ matrix matW, matWV, matWVP;
+
+ row_major matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation);
+
+ row_major matrix Wolrd_NonPosMatrix = g_WorldMatrix;
+
+
+ Wolrd_NonPosMatrix[3] = vector(0.f, 0.f, 0.f, 1.f);
+
+ matW = mul(TransformMatrix, Wolrd_NonPosMatrix);
+
+ matW[3] = In.vTranslation;
+
+ matWV = mul(matW, g_ViewMatrix);
+ matWVP = mul(matWV, g_ProjMatrix);
+
+ /* PRE MAT */
+
+ row_major matrix PreTransformMatrix = g_ParticleValue[iGPUIndex].PreWorldMatrix;
+
+ row_major matrix PreWolrd_NonPosMatrix = g_PrevWorldMatrix;
+
+
+ Wolrd_NonPosMatrix[3] = vector(0.f, 0.f, 0.f, 1.f);
+
+ matrix matPrevW, matPrevWV, matPrevWVP;
+
+ matPrevW = mul(PreTransformMatrix, PreWolrd_NonPosMatrix);
+
+ matPrevW[3] = g_ParticleValue[iGPUIndex].PreWorldMatrix[3];
+
+ matPrevWV = mul(matPrevW, g_PrevViewMatrix);
+ matPrevWVP = mul(matPrevWV, g_PrevProjMatrix);
+
+
+ vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
+
+ Out.vPosition = vPosition;
+ Out.vNormal = normalize(mul(vector(In.vNormal, 0.f), matW));
+ Out.vTangent = normalize(mul(vector(In.vTangent, 0.f), matW)).xyz;
+ Out.vBinormal = normalize(mul(vector(In.vBinormal, 0.f), matW)).xyz;
+ Out.vTexcoord = In.vTexcoord;
+ Out.vLifeTime = In.vLifeTime;
+ Out.vWorldPos = mul(vector(In.vPosition, 1.f), matW);
+ Out.iGPUIndex = iGPUIndex;
+ Out.vProjPos = vPosition;
+ Out.vPrevProjPos = mul(vector(In.vPosition, 1.f), matPrevWVP);
return Out;
}
VS_OUT VS_NOWORLD(VS_IN In, uint iGPUIndex : SV_InstanceID)
{
+
VS_OUT Out = (VS_OUT) 0;
matrix matW, matWV, matWVP;
@@ -390,6 +474,17 @@ struct PS_OUT
float4 vRevealage : SV_TARGET1;
};
+struct PS_NOMAL_OUT
+{
+ float4 vAlbedo : SV_TARGET0;
+ float4 vNormal : SV_TARGET1;
+ float4 vDepth : SV_TARGET2;
+ float4 vColor : SV_Target3;
+ float4 vSurface : SV_Target4;
+ float2 vVelocityUV : SV_TARGET5;
+};
+
+
float4 DrawEffect(PS_IN In)
{
vector vMtrlDiffuse = vector(0.f ,0.f ,0.f ,0.f);
@@ -659,14 +754,15 @@ float4 DrawEffect(PS_IN In)
}
- //if (vMtrlDissolve.r <= fTimeRatio + 0.1f)
- // discard;
-
-
- //fTimeRatio = 1 - pow(1 - fTimeRatio, 3);
float fFade = smoothstep(fTimeRatio - 0.1f, fTimeRatio + 0.1f, vMtrlDissolve.r);
+ if (g_isNoDissolveSmoothStep == true)
+ {
+ fFade = smoothstep(fTimeRatio, fTimeRatio, vMtrlDissolve.r);
+
+ }
+
vMtrlDiffuse.a *= fFade;
}
@@ -807,21 +903,56 @@ float4 SoftEffect(PS_IN In, float4 vMtrlDiffuse)
return vDiffuse;
}
-PS_OUT PS_MAIN(PS_IN In)
+
+PS_NOMAL_OUT PS_MAIN(PS_BLUR_MESH_IN In)
{
-
- PS_OUT Out;
+ PS_IN PS_In;
+ PS_NOMAL_OUT Out;
+
+ PS_In.vPosition = In.vPosition;
+ PS_In.vNormal = In.vNormal;
+ PS_In.vTangent = In.vTangent;
+ PS_In.vBinormal = In.vBinormal;
+ PS_In.vTexcoord = In.vTexcoord;
+ PS_In.vLifeTime = In.vLifeTime;
+ PS_In.vWorldPos = In.vWorldPos;
+ PS_In.vProjPos = In.vProjPos;
+ PS_In.iGPUIndex = In.iGPUIndex;
+
vector vMtrlDiffuse;
-
- vMtrlDiffuse = DrawEffect(In);
- vMtrlDiffuse = SoftEffect(In, vMtrlDiffuse);
+ float4 vSurface = g_SurfaceParamsTexture.Sample(DefaultSampler, In.vTexcoord);
+ float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
+
+ float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal.rgb);
+
+ float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
- vMtrlDiffuse.rgb += EmissiveDraw(In, vMtrlDiffuse).rgb;
- vMtrlDiffuse.rgb += RimLight(In).rgb;
-
- Out.vDiffuse = vMtrlDiffuse;
+ float fSurfaceParam = g_fUsingSurfaceParams;
+ if (true == AlmostEqual7(g_fUsingSurfaceParams, 0.f))
+ {
+ fSurfaceParam = 0;
+ }
+
+ vMtrlDiffuse = DrawEffect(PS_In);
+
+ vMtrlDiffuse.rgb += EmissiveDraw(PS_In, vMtrlDiffuse).rgb;
+
+ vMtrlDiffuse += RimLight(PS_In);
+
+ vSurface.b = 0.5f;
+
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
+ Out.vAlbedo = vMtrlDiffuse;
+ Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
+ Out.vSurface = vSurface;
+ Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
+ (In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
+ fSurfaceParam, // 서페이스 파라미터
+ 1.f);
+ Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
+
return Out;
}
@@ -1154,19 +1285,7 @@ PS_BLOOM_OUT PS_DISTORTION(PS_IN In)
-struct PS_BLUR_MESH_IN
-{
- float4 vPosition : SV_POSITION;
- float4 vNormal : NORMAL;
- float3 vTangent : TANGENT;
- float3 vBinormal : BINORMAL;
- float2 vTexcoord : TEXCOORD0;
- float2 vLifeTime : TEXCOORD1;
- float4 vWorldPos : TEXCOORD2;
- float4 vProjPos : TEXCOORD3;
- uint iGPUIndex : TEXCOORD4;
- float4 vPrevProjPos : TEXCOORD5;
-};
+
struct PS_BLUR_MESH_OUT
{
@@ -1217,10 +1336,10 @@ technique11 DefaultTechnique
//0
pass Model
{
- SetRasterizerState(RS_Default);
+ SetRasterizerState(RS_Nocull);
SetDepthStencilState(DSS_Default, 0);
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
- VertexShader = compile vs_5_0 VS_MAIN();
+ VertexShader = compile vs_5_0 VS_BLUR_MESH();
GeometryShader = NULL;
PixelShader = compile ps_5_0 PS_MAIN();
}
@@ -1459,6 +1578,16 @@ technique11 DefaultTechnique
GeometryShader = NULL;
PixelShader = compile ps_5_0 PS_BLOOM();
}
+//23
+ pass Default_NonPos
+ {
+ SetRasterizerState(RS_Nocull);
+ SetDepthStencilState(DSS_Default, 0);
+ SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
+ VertexShader = compile vs_5_0 VS_MAIN_NO_POS();
+ GeometryShader = NULL;
+ PixelShader = compile ps_5_0 PS_MAIN();
+ }
}
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxNorTex.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxNorTex.hlsl
index e21521de5..c1156ec94 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxNorTex.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxNorTex.hlsl
@@ -9,6 +9,7 @@ float g_fUsingSurfaceParams;
float g_fDiffuseMultiplier;
float g_fSurfaceMultiplier;
float g_fNormalMultiplier;
+float g_fMBIntensity = 1.f;
Texture2D g_DiffuseTexture;
Texture2D g_NormalTexture;
@@ -131,7 +132,7 @@ PS_OUT PS_MAIN(PS_IN In)
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = vSurface;
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
return Out;
}
@@ -190,7 +191,7 @@ PS_OUT PS_MAIN_TERRAIN_ANISO(PS_IN In)
(1.f / 255.f)); // 지형은 1
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = vSurface;
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
return Out;
}
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxWorldModelInstance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxWorldModelInstance.hlsl
index 75dc56f2d..10d6b3467 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxWorldModelInstance.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxWorldModelInstance.hlsl
@@ -10,6 +10,7 @@ Texture2D g_SurfaceParamsTexture;
float4 g_vCamPosition;
float g_fFar;
float g_fUsingSurfaceParams;
+float g_fMBIntensity = 1.f;
struct VS_IN
@@ -112,7 +113,7 @@ PS_OUT PS_MAIN(PS_IN In)
Out.vDepth = float4(In.vProjPos.z / In.vProjPos.w, In.vProjPos.w / g_fFar, g_fUsingSurfaceParams, 0.0f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(g_SurfaceParamsTexture.Sample(DefaultSampler, In.vTexcoord).xy, 1.f, 1.f);
- Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos);
+ Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
return Out;
}
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_Env_Icy_Snow_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_Env_Icy_Snow_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_Env_Icy_Snow_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_Env_Icy_Snow_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_BandRibbed01_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_BandRibbed01_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_BandRibbed01_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_BandRibbed01_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_Cloud_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_Cloud_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_Cloud_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_Cloud_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_Distortion_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_Distortion_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_Distortion_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_Distortion_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_Distortion_Ring2_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_Distortion_Ring2_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_Distortion_Ring2_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_Distortion_Ring2_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_Distortion_Ring3_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_Distortion_Ring3_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_Distortion_Ring3_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_Distortion_Ring3_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_Distortion_Ring_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_Distortion_Ring_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_Distortion_Ring_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_Distortion_Ring_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_Fly_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_Fly_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_Fly_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_Fly_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_FracturedRockPiece_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_FracturedRockPiece_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_FracturedRockPiece_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_FracturedRockPiece_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_Straw01_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_Straw01_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_Straw01_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_Straw01_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_Straw02_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_Straw02_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_Straw02_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_Straw02_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_Waterfall_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_Waterfall_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_Waterfall_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_Waterfall_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_grass_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_grass_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_grass_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_grass_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_heat_distortion_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_heat_distortion_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_heat_distortion_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_heat_distortion_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_mud_clumps_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_mud_clumps_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_mud_clumps_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_mud_clumps_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_ripples_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_ripples_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_ripples_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_ripples_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_water_drops_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_water_drops_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_FX_water_drops_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_FX_water_drops_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_VFX_Smoke_01_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_VFX_Smoke_01_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_VFX_Smoke_01_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_VFX_Smoke_01_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_WaterfallFoam_01_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_WaterfallFoam_01_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_WaterfallFoam_01_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_WaterfallFoam_01_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_Web_Net_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_Web_Net_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_Web_Net_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_Web_Net_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_waterSplashA_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_waterSplashA_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/T_waterSplashA_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/T_waterSplashA_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Blood_Goop_01_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Blood_Goop_01_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Blood_Goop_01_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Blood_Goop_01_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Blood_Goop_03_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Blood_Goop_03_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Blood_Goop_03_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Blood_Goop_03_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Blood_Goop_2_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Blood_Goop_2_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Blood_Goop_2_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Blood_Goop_2_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_BoilBubble_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_BoilBubble_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_BoilBubble_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_BoilBubble_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_BoilingRipples_Small_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_BoilingRipples_Small_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_BoilingRipples_Small_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_BoilingRipples_Small_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Burnt_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Burnt_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Burnt_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Burnt_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_ButtSlide_A_HalfRes_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_ButtSlide_A_HalfRes_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_ButtSlide_A_HalfRes_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_ButtSlide_A_HalfRes_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_CausticNoise_C_Seamless_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_CausticNoise_C_Seamless_N.png
new file mode 100644
index 000000000..02056f9e4
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_CausticNoise_C_Seamless_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Char_01_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Char_01_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Char_01_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Char_01_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_ChromaticCellNoise_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_ChromaticCellNoise_N.png
new file mode 100644
index 000000000..978a48415
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_ChromaticCellNoise_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Cloud_Noise_Tile_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Cloud_Noise_Tile_N.png
new file mode 100644
index 000000000..8971501b9
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Cloud_Noise_Tile_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Cloud_SoftWisp_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Cloud_SoftWisp_N.png
new file mode 100644
index 000000000..70ed242c2
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Cloud_SoftWisp_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_ConeCurl_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_ConeCurl_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_ConeCurl_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_ConeCurl_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Cone_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Cone_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Cone_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Cone_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_CottonFilling2x2_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_CottonFilling2x2_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_CottonFilling2x2_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_CottonFilling2x2_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Cracks01_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Cracks01_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Cracks01_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Cracks01_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Cracks04_D_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Cracks04_D_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Cracks04_D_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Cracks04_D_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_DIST_NRM2_OLD_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_DIST_NRM2_OLD_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_DIST_NRM2_OLD_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_DIST_NRM2_OLD_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Dementor_Ash_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Dementor_Ash_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Dementor_Ash_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Dementor_Ash_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_DistortionNoise_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_DistortionNoise_N.png
new file mode 100644
index 000000000..1a70cb9e6
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_DistortionNoise_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Droplets_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Droplets_N.png
new file mode 100644
index 000000000..130bcf9da
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Droplets_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Drops_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Drops_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Drops_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Drops_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Edurus_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Edurus_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Edurus_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Edurus_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_FireballCloud_Noise_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_FireballCloud_Noise_N.png
new file mode 100644
index 000000000..b7efaf028
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_FireballCloud_Noise_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_GooSoft_Noise_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_GooSoft_Noise_N.png
new file mode 100644
index 000000000..068e4cce8
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_GooSoft_Noise_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Goo_Noise_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Goo_Noise_N.png
new file mode 100644
index 000000000..0ab1cc9b2
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Goo_Noise_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Ground_ClumpySnow_2k_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Ground_ClumpySnow_2k_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Ground_ClumpySnow_2k_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Ground_ClumpySnow_2k_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Ground_Ice_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Ground_Ice_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Ground_Ice_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Ground_Ice_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_HeatTile3_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_HeatTile3_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_HeatTile3_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_HeatTile3_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_IceB_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_IceB_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_IceB_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_IceB_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Ice_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Ice_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Ice_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Ice_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_LiquidSplatter_Tiling_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_LiquidSplatter_Tiling_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_LiquidSplatter_Tiling_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_LiquidSplatter_Tiling_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_MarbleSkin_01_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_MarbleSkin_01_N.png
new file mode 100644
index 000000000..e3bb361a7
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_MarbleSkin_01_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Mud_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Mud_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Mud_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Mud_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Noise07_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Noise07_N.png
new file mode 100644
index 000000000..3c8c10f0d
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Noise07_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Noise09_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Noise09_N.png
new file mode 100644
index 000000000..c04bc6340
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Noise09_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Noise_Anisotropic2_height_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Noise_Anisotropic2_height_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Noise_Anisotropic2_height_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Noise_Anisotropic2_height_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Noise_Gchannel_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Noise_Gchannel_N.png
new file mode 100644
index 000000000..1429e2062
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Noise_Gchannel_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Noise_LowFreq_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Noise_LowFreq_N.png
new file mode 100644
index 000000000..1dde8c0fd
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Noise_LowFreq_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Noise_Plasma_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Noise_Plasma_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Noise_Plasma_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Noise_Plasma_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Paper_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Paper_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Paper_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Paper_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Petrificus_SkinFX_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Petrificus_SkinFX_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Petrificus_SkinFX_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Petrificus_SkinFX_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Raindrop_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Raindrop_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Raindrop_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Raindrop_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_RibbonOffset_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_RibbonOffset_N.png
new file mode 100644
index 000000000..db40cb0b7
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_RibbonOffset_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_SkinBurn_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_SkinBurn_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_SkinBurn_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_SkinBurn_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_SmokeRend_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_SmokeRend_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_SmokeRend_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_SmokeRend_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_SmokeTiled_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_SmokeTiled_N.png
new file mode 100644
index 000000000..df6263c18
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_SmokeTiled_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Snow_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Snow_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Snow_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Snow_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_SphereNormal_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_SphereNormal_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_SphereNormal_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_SphereNormal_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Sphere_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Sphere_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Sphere_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Sphere_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_SpiderThread_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_SpiderThread_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_SpiderThread_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_SpiderThread_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_SpiderWeb_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_SpiderWeb_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_SpiderWeb_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_SpiderWeb_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_SplashLoop_01_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_SplashLoop_01_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_SplashLoop_01_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_SplashLoop_01_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_SplashMesh_02_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_SplashMesh_02_N.png
new file mode 100644
index 000000000..f018c34cb
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_SplashMesh_02_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Splash_Goo2_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Splash_Goo2_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Splash_Goo2_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Splash_Goo2_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Splash_Goo_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Splash_Goo_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Splash_Goo_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Splash_Goo_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Splatter_Decals_3_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Splatter_Decals_3_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Splatter_Decals_3_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Splatter_Decals_3_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Voronoi_Cells_19b_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Voronoi_Cells_19b_N.png
new file mode 100644
index 000000000..bdd92aa30
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Voronoi_Cells_19b_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_WarpedRing_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_WarpedRing_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_WarpedRing_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_WarpedRing_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_WaterSurfaceFlow_01_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_WaterSurfaceFlow_01_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_WaterSurfaceFlow_01_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_WaterSurfaceFlow_01_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_WaterTurbulentTile_01_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_WaterTurbulentTile_01_N.png
new file mode 100644
index 000000000..781f2526e
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_WaterTurbulentTile_01_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_WaterfallFoam_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_WaterfallFoam_N.png
new file mode 100644
index 000000000..0fca2edec
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_WaterfallFoam_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_WaveDisplace_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_WaveDisplace_N.png
new file mode 100644
index 000000000..fad2ad04e
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_WaveDisplace_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Wavy_Low_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Wavy_Low_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Wavy_Low_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Wavy_Low_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Wavy_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Wavy_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Wavy_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Wavy_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_WindNoise_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_WindNoise_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_WindNoise_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_WindNoise_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Wisps_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Wisps_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_Wisps_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_Wisps_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_cloudsBillowy03_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_cloudsBillowy03_N.png
new file mode 100644
index 000000000..d5f74a675
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_cloudsBillowy03_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_cloudsBillowyA_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_cloudsBillowyA_N.png
new file mode 100644
index 000000000..c1fe2fef8
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_cloudsBillowyA_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_dist_noise_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_dist_noise_D.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_dist_noise_D.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_dist_noise_D.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_dist_noise_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_dist_noise_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_dist_noise_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_dist_noise_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_goo_bubbles_B_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_goo_bubbles_B_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_goo_bubbles_B_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_goo_bubbles_B_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_noise_flame_Tiled_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_noise_flame_Tiled_N.png
new file mode 100644
index 000000000..293d14c4c
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_noise_flame_Tiled_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_smokeCloud_Dal_BPF_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_smokeCloud_Dal_BPF_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_smokeCloud_Dal_BPF_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_smokeCloud_Dal_BPF_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_water_flow_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_water_flow_N.png
similarity index 100%
rename from Jusin154_Team3D/Editor/Bin/Resources/VFX/Textures/VFX_T_water_flow_N.png
rename to Jusin154_Team3D/Editor/Bin/Resources/Textures/Effect/Nomal/VFX_T_water_flow_N.png
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/base_Black_SRO.dds b/Jusin154_Team3D/Editor/Bin/Resources/Textures/base_Black_SRO.dds
new file mode 100644
index 000000000..aa93c713b
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/base_Black_SRO.dds differ
diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj
index bfb787471..62df3fcf6 100644
--- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj
+++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj
@@ -203,6 +203,8 @@ call Update_Shaders.bat
+
+
@@ -450,6 +452,8 @@ call Update_Shaders.bat
+
+
diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
index 4e94dcaf2..8b16cb5f8 100644
--- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
+++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
@@ -664,15 +664,24 @@
{ebd7a1c2-4914-4956-ad9c-a0fc2e857f56}
+
+ {8ac1faba-2669-44f3-9de3-75850d0b0fb5}
+
+
+ {4070f5a1-7f80-42da-afa0-f7f0500376f9}
+
{48e893e6-2374-44a3-b091-814ad89451c4}
-
+
{ee491ec4-bc46-48de-8cfb-396a29d2c98b}
{3b9768b5-8c85-4465-b0ad-2d14722d88ce}
+
+ {fbf574e7-159e-43c3-914d-6a200383a45c}
+
@@ -1359,6 +1368,9 @@
02.GameObjects\Dummys\DummyDecal
+
+ 02.GameObjects\Layer_Effect\Effect\Monster_Effect\Ranrok\FireBall
+
02.GameObjects\Env\08.LightSpawner
@@ -1368,6 +1380,9 @@
50.UI\Dialogue
+
+ 02.GameObjects\Layer_Effect\Effect\Monster_Effect\Ranrok\Breath
+
@@ -2059,15 +2074,21 @@
02.GameObjects\Dummys\DummyDecal
+
+ 02.GameObjects\Layer_Effect\Effect\Monster_Effect\Ranrok\FireBall
+
02.GameObjects\Env\08.LightSpawner
-
+
50.UI\GamePlay_Canvas\Action_Panel\NPCInteraction
50.UI\Dialogue
+
+ 02.GameObjects\Layer_Effect\Effect\Monster_Effect\Ranrok\Breath
+
diff --git a/Jusin154_Team3D/Editor/Private/CamPosition_Shoulder.cpp b/Jusin154_Team3D/Editor/Private/CamPosition_Shoulder.cpp
index 5909e926f..9eea44ab3 100644
--- a/Jusin154_Team3D/Editor/Private/CamPosition_Shoulder.cpp
+++ b/Jusin154_Team3D/Editor/Private/CamPosition_Shoulder.cpp
@@ -101,6 +101,13 @@ void CCamPosition_Shoulder::Update(_float fTimeDelta)
if (m_pGameInstance->Mouse_Down(DIM_MBUTTON)) {
m_pGameInstance->Toggle_MouseCenter();
}
+
+ if (true == m_bMovable) {
+ m_vAccRotDegrees.y += m_pGameInstance->Get_MouseMove().x * m_fMouseSensor;
+ m_vAccRotDegrees.x += m_pGameInstance->Get_MouseMove().y * m_fMouseSensor;
+ CMyTools::AdjustAccumulateDegreePitchYawDegree(m_vAccRotDegrees);
+ }
+
if (m_pGameInstance->Key_Up(DIK_P)) {
m_vShoulderOtherRatio = m_vShoulderPosRatio = m_vShoulderStartRatio;
m_vShoulderStartRatio.x *= -1.f;
@@ -147,6 +154,13 @@ HRESULT CCamPosition_Shoulder::Ready_Components(void* pArg)
}
return S_OK;
}
+
+void CCamPosition_Shoulder::Set_CameraShake(_float fXShock, _float fYShock)
+{
+ m_vAccRealDegrees.x = fXShock;
+ m_vAccRealDegrees.y = fYShock;
+}
+
HRESULT CCamPosition_Shoulder::Ready_SubParts()
{
{
diff --git a/Jusin154_Team3D/Editor/Private/DummyDecal.cpp b/Jusin154_Team3D/Editor/Private/DummyDecal.cpp
index adaf1ce8f..86d599461 100644
--- a/Jusin154_Team3D/Editor/Private/DummyDecal.cpp
+++ b/Jusin154_Team3D/Editor/Private/DummyDecal.cpp
@@ -18,7 +18,6 @@ CDummyDecal::CDummyDecal(const CDummyDecal& rhs)
HRESULT CDummyDecal::Initialize_Prototype()
{
-
m_fWinSizeX = g_iWinSizeX;
m_fWinSizeY = g_iWinSizeY;
@@ -33,11 +32,33 @@ HRESULT CDummyDecal::Initialize(void* pArg)
if (FAILED(Ready_Components(pArg)))
return E_FAIL;
- m_vMaskRed = _float4(1.f, 0.f, 0.f, 1.f);
- m_vMaskGreen = _float4(0.f, 0.f, 0.f, 0.f);
- m_vMaskBlue = _float4(1.f, 0.f, 0.f, 1.f);
+ _float fMaxScale = 1.f;
- m_vUVSpeed = _float2(0.1f, 0.1f);
+ if (nullptr != pArg)
+ {
+ DUMMY_DECAL_DESC* pDesc = static_cast(pArg);
+ m_pTransformCom->Set_Scale(pDesc->vScale);
+ m_pTransformCom->Rotation(XMConvertToRadians(pDesc->vRotation.x), XMConvertToRadians(pDesc->vRotation.y), XMConvertToRadians(pDesc->vRotation.z));
+ m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vPosition), 1.f));
+
+ m_fUVTiling = pDesc->fUVTiling;
+ m_vUVSpeed = pDesc->vUVSpeed;
+ m_vMaskRed = pDesc->vMaskRed;
+ m_vMaskGreen = pDesc->vMaskGreen;
+ m_vMaskBlue = pDesc->vMaskBlue;
+
+ _float fBoxRadius = 0.86f; // 1,1,1 기준
+ fMaxScale = max(pDesc->vScale.x, max(pDesc->vScale.y, pDesc->vScale.z));
+ }
+ else
+ {
+ m_vMaskRed = _float4(1.f, 0.f, 0.f, 1.f);
+ m_vMaskGreen = _float4(0.f, 0.f, 0.f, 0.f);
+ m_vMaskBlue = _float4(1.f, 0.f, 0.f, 1.f);
+ m_vUVSpeed = _float2(0.05f, 0.05f);
+ }
+
+ m_pTransformCom->Set_Radius(fMaxScale);
return S_OK;
}
@@ -52,14 +73,14 @@ void CDummyDecal::Update(_float fTimeDelta)
m_fTimeAcc.x += fTimeDelta * m_vUVSpeed.x;
m_fTimeAcc.y += fTimeDelta * m_vUVSpeed.y;
- Describe_Entity();
+ //Describe_Entity();
}
void CDummyDecal::Late_Update(_float fTimeDelta)
{
- //if (m_pGameInstance->IsIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) {
+ if (m_pGameInstance->IsIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) {
m_pGameInstance->Add_RenderGroup(RENDER::DECAL, this);
- //}
+ }
}
HRESULT CDummyDecal::Render()
@@ -270,6 +291,80 @@ void CDummyDecal::Describe_Entity()
}
}
+
GUI::End();
}
+
+HRESULT CDummyDecal::Save_XML(tinyxml2::XMLDocument& doc, tinyxml2::XMLElement* root)
+{
+ tinyxml2::XMLElement* object = doc.NewElement("Object");
+ object->SetAttribute("Type", 0);
+ root->InsertEndChild(object);
+
+
+#pragma region TRANSFORM
+ _float3 vPosition = {};
+ XMStoreFloat3(&vPosition, m_pTransformCom->Get_State(STATE::POSITION));
+
+ _float3 vScale = m_pTransformCom->Get_Scale();
+
+ _float3 vRotation = m_pTransformCom->Get_Rotation();
+
+
+ tinyxml2::XMLElement* Position = doc.NewElement("Position");
+ Position->SetAttribute("x", vPosition.x);
+ Position->SetAttribute("y", vPosition.y);
+ Position->SetAttribute("z", vPosition.z);
+ object->InsertEndChild(Position);
+
+ tinyxml2::XMLElement* Scale = doc.NewElement("Scale");
+ Scale->SetAttribute("x", vScale.x);
+ Scale->SetAttribute("y", vScale.y);
+ Scale->SetAttribute("z", vScale.z);
+ object->InsertEndChild(Scale);
+
+ tinyxml2::XMLElement* Rotation = doc.NewElement("Rotation");
+ Rotation->SetAttribute("x", vRotation.x);
+ Rotation->SetAttribute("y", vRotation.y);
+ Rotation->SetAttribute("z", vRotation.z);
+ object->InsertEndChild(Rotation);
+#pragma endregion
+
+#pragma region DECAL
+
+ /* Diffuse */
+ tinyxml2::XMLElement* Shader_Value = doc.NewElement("Shader_Value");
+ Shader_Value->SetAttribute("UVTiling", m_fUVTiling);
+ Shader_Value->SetAttribute("UVSpeedX", m_vUVSpeed.x);
+ Shader_Value->SetAttribute("UVSpeedY", m_vUVSpeed.y);
+ object->InsertEndChild(Shader_Value);
+
+ /* MaskRed */
+ tinyxml2::XMLElement* MaskRed = doc.NewElement("MaskRed");
+ MaskRed->SetAttribute("r", m_vMaskRed.x);
+ MaskRed->SetAttribute("g", m_vMaskRed.y);
+ MaskRed->SetAttribute("b", m_vMaskRed.z);
+ MaskRed->SetAttribute("a", m_vMaskRed.w);
+ object->InsertEndChild(MaskRed);
+
+ /* MaskGreen */
+ tinyxml2::XMLElement* MaskGreen = doc.NewElement("MaskGreen");
+ MaskGreen->SetAttribute("r", m_vMaskGreen.x);
+ MaskGreen->SetAttribute("g", m_vMaskGreen.y);
+ MaskGreen->SetAttribute("b", m_vMaskGreen.z);
+ MaskGreen->SetAttribute("a", m_vMaskGreen.w);
+ object->InsertEndChild(MaskGreen);
+
+ /* MaskBlue */
+ tinyxml2::XMLElement* MaskBlue = doc.NewElement("MaskBlue");
+ MaskBlue->SetAttribute("r", m_vMaskBlue.x);
+ MaskBlue->SetAttribute("g", m_vMaskBlue.y);
+ MaskBlue->SetAttribute("b", m_vMaskBlue.z);
+ MaskBlue->SetAttribute("a", m_vMaskBlue.w);
+ object->InsertEndChild(MaskBlue);
+
+#pragma endregion
+
+ return S_OK;
+}
diff --git a/Jusin154_Team3D/Editor/Private/EditEffect.cpp b/Jusin154_Team3D/Editor/Private/EditEffect.cpp
index f70a0acd4..3bc14a346 100644
--- a/Jusin154_Team3D/Editor/Private/EditEffect.cpp
+++ b/Jusin154_Team3D/Editor/Private/EditEffect.cpp
@@ -326,6 +326,23 @@ HRESULT CEditEffect::Save_Effect(const _char* pPath)
}
}
}
+
+ if (m_EffectInfo.isNomalMap)
+ {
+ size_t iComponentLength = m_strNomalMapName.length();
+ const _char* pFileComponentPath = m_strNomalMapName.c_str();
+
+ if (!WriteFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
+ return E_FAIL;
+ }
+
+ if (iComponentLength != 0)
+ {
+ if (!WriteFile(hFile, pFileComponentPath, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
+ return E_FAIL;
+ }
+ }
+ }
size_t iComponentLength = m_strModelName.length();
@@ -390,6 +407,10 @@ HRESULT CEditEffect::Ready_Components(void* pArg)
}
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Base_MRO"),
+ reinterpret_cast(&m_pSurface_TextureCom))))
+ return E_FAIL;
+
return S_OK;
}
@@ -435,7 +456,7 @@ void CEditEffect::Describe_Entity()
const char* pEffectType[] = { "EFFECT" , "TRAIL" };
const char* pShaderPass[] = { "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" ,"NONPOS" , "NONPOS_BLUR" , "BULR_MESH" , "BLUR_CULLING" ,"BLUR_CULLING_NO_EMISSIVE" , "BLOOM_CULLING"};
+ "BLUR_NO_WORLD_NO_EMISSIVE","WEIGHTBLEND_FOR_BLEND" , "DEPTH_STOP" , "WB_CULLING", "SCREEN_FX" , "DISTORTION" ,"NONPOS" , "NONPOS_BLUR" , "BULR_MESH" , "BLUR_CULLING" ,"BLUR_CULLING_NO_EMISSIVE" , "BLOOM_CULLING" , "DEFAULT_NONPOS"};
const char* pBloomType[] = { "NONE" , "BASIC" , "MUILTY"};
_int iCurrentItem = static_cast<_int>(m_EffectInfo.eRenderOrder);
@@ -491,7 +512,7 @@ void CEditEffect::Describe_Entity()
GUI::Checkbox("Bloom", &m_EffectInfo.isBloom);
GUI::Checkbox("Blur", &m_EffectInfo.isBlur);
GUI::Checkbox("RimLight", &m_EffectInfo.isRimLight);
-
+ GUI::Checkbox("Nomal", &m_EffectInfo.isNomalMap);
if (GUI::Checkbox("Billboard", &m_EffectInfo.isBillboard))
{
@@ -732,6 +753,16 @@ void CEditEffect::Describe_Entity()
if (GUI::TreeNode("DIFFUSE_TEX"))
{
+ if (m_pDiffuse_TextureCom != nullptr)
+ {
+ if (GUI::ImageButton("Current Texture", m_pDiffuse_TextureCom->Get_SRV(0), ImVec2(48, 48)))
+ {
+ }
+
+ GUI::Spacing(); GUI::Spacing();
+ }
+
+
_string strName = m_pGameInstance->Asset_Description(ENUM_CLASS(LEVEL::EFFECT), "DIFFUSE_TEXTURE", (CComponent**)&m_pDiffuse_TextureCom, nullptr, this);
if (strName != "") {
@@ -787,6 +818,15 @@ void CEditEffect::Describe_Entity()
if (GUI::TreeNode("MASKING_TEX"))
{
+ if (m_pMasking_TextureCom != nullptr)
+ {
+ if (GUI::ImageButton("Current Texture", m_pMasking_TextureCom->Get_SRV(0), ImVec2(48, 48)))
+ {
+ }
+
+ GUI::Spacing(); GUI::Spacing();
+ }
+
string strName = m_pGameInstance->Asset_Description(ENUM_CLASS(LEVEL::EFFECT), "MASKING_TEXTURE", (CComponent**)&m_pMasking_TextureCom, nullptr, this);
if (strName != "") {
@@ -806,34 +846,44 @@ void CEditEffect::Describe_Entity()
{
if (GUI::TreeNode("DISSOLVE"))
{
+ GUI::Checkbox("Dissolve G", &m_EffectInfo.isDissolve_G);
+ GUI::SameLine();
+ GUI::Checkbox("Dissolve B", &m_EffectInfo.isDissolve_B);
+
+ GUI::Checkbox("Nomal Dissolve", &m_EffectInfo.isNomalDissolve);
+ GUI::Checkbox("Reverse Dissolve", &m_EffectInfo.isReverseDissolve);
+ GUI::Checkbox("StopDissolveSmoothStep", &m_EffectInfo.isNoDissolveSmoothStep);
+
+
+ ImGui::PushItemWidth(80);
+ GUI::Spacing();
+ GUI::Checkbox("DissolveMove", &m_EffectInfo.isDissolveMove);
+ GUI::DragFloat2("DissolveUVGainAmount", (_float*)&m_EffectInfo.vDissolveUVGainAmount, 0.01f);
+
+ GUI::Spacing();
+ GUI::DragFloat("DissolveDelay", &m_EffectInfo.fDissolveDelay, 0.005f);
+ GUI::DragFloat("ReverseDissolveDelay", &m_EffectInfo.fReverseDissolveDelay, 0.005f);
+
+ GUI::Spacing();
+
+ GUI::DragFloat("DissolveMaskEdge", &m_EffectInfo.vDissolveValue.x, 0.005f);
+ GUI::DragFloat("DissolveSoftMask", &m_EffectInfo.vDissolveValue.y, 0.005f);
+ GUI::DragFloat("DissolveCutRatio", &m_EffectInfo.vDissolveValue.z, 0.005f);
+
+ GUI::Spacing();
+
+ ImGui::PopItemWidth();
+
if (GUI::TreeNode("DISSOLV_TEX"))
{
- GUI::Checkbox("Dissolve G", &m_EffectInfo.isDissolve_G);
- GUI::SameLine();
- GUI::Checkbox("Dissolve B", &m_EffectInfo.isDissolve_B);
-
- GUI::Checkbox("Nomal Dissolve", &m_EffectInfo.isNomalDissolve);
- GUI::Checkbox("Reverse Dissolve", &m_EffectInfo.isReverseDissolve);
-
- ImGui::PushItemWidth(80);
- GUI::Spacing();
- GUI::Checkbox("DissolveMove", &m_EffectInfo.isDissolveMove);
- GUI::DragFloat2("DissolveUVGainAmount", (_float*)&m_EffectInfo.vDissolveUVGainAmount, 0.01f);
-
- GUI::Spacing();
- GUI::DragFloat("DissolveDelay", &m_EffectInfo.fDissolveDelay, 0.005f);
- GUI::DragFloat("ReverseDissolveDelay", &m_EffectInfo.fReverseDissolveDelay, 0.005f);
-
- GUI::Spacing();
-
- GUI::DragFloat("DissolveMaskEdge", &m_EffectInfo.vDissolveValue.x, 0.005f);
- GUI::DragFloat("DissolveSoftMask", &m_EffectInfo.vDissolveValue.y, 0.005f);
- GUI::DragFloat("DissolveCutRatio", &m_EffectInfo.vDissolveValue.z, 0.005f);
-
- GUI::Spacing();
-
- ImGui::PopItemWidth();
+ if (m_pDissolve_TextureCom != nullptr)
+ {
+ if (GUI::ImageButton("Current Texture", m_pDissolve_TextureCom->Get_SRV(0), ImVec2(48, 48)))
+ {
+ }
+ GUI::Spacing(); GUI::Spacing();
+ }
_string strName = m_pGameInstance->Asset_Description(ENUM_CLASS(LEVEL::EFFECT), "DISSOLVE_TEXTURE", (CComponent**)&m_pDissolve_TextureCom, nullptr, this);
@@ -885,6 +935,15 @@ void CEditEffect::Describe_Entity()
if (GUI::TreeNode("DISTORTION_TEX"))
{
+ if (m_pDistortion_TextureCom != nullptr)
+ {
+ if (GUI::ImageButton("Current Texture", m_pDistortion_TextureCom->Get_SRV(0), ImVec2(48, 48)))
+ {
+ }
+
+ GUI::Spacing(); GUI::Spacing();
+ }
+
_string strName = m_pGameInstance->Asset_Description(ENUM_CLASS(LEVEL::EFFECT), "DISTORTION_TEXTURE", (CComponent**)&m_pDistortion_TextureCom, nullptr, this);
if (strName != "") {
@@ -936,6 +995,15 @@ void CEditEffect::Describe_Entity()
if (GUI::TreeNode("NOISE_TEX"))
{
+ if (m_pNoise_TextureCom != nullptr)
+ {
+ if (GUI::ImageButton("Current Texture", m_pNoise_TextureCom->Get_SRV(0), ImVec2(48, 48)))
+ {
+ }
+
+ GUI::Spacing(); GUI::Spacing();
+ }
+
_string strName = m_pGameInstance->Asset_Description(ENUM_CLASS(LEVEL::EFFECT), "NOISE_TEXTURE", (CComponent**)&m_pNoise_TextureCom, nullptr, this);
if (strName != "") {
@@ -949,6 +1017,29 @@ void CEditEffect::Describe_Entity()
}
}
+ if (m_EffectInfo.isNomalMap == true)
+ {
+ if (GUI::TreeNode("NOMAL_TEX"))
+ {
+ if (m_pNormal_TextureCom != nullptr)
+ {
+ if (GUI::ImageButton("Current Texture", m_pNormal_TextureCom->Get_SRV(0), ImVec2(48, 48)))
+ {
+ }
+
+ GUI::Spacing(); GUI::Spacing();
+ }
+
+ _string strName = m_pGameInstance->Asset_Description(ENUM_CLASS(LEVEL::EFFECT), "NOMAL_TEXTURE", (CComponent**)&m_pNormal_TextureCom, nullptr, this , L"NOMAL");
+
+ if (strName != "") {
+ m_strNomalMapName = strName;
+ }
+
+ GUI::TreePop();
+ }
+ }
+
GUI::Separator(); GUI::Spacing();
diff --git a/Jusin154_Team3D/Editor/Private/EffectObject.cpp b/Jusin154_Team3D/Editor/Private/EffectObject.cpp
index ed24da2ee..94439961f 100644
--- a/Jusin154_Team3D/Editor/Private/EffectObject.cpp
+++ b/Jusin154_Team3D/Editor/Private/EffectObject.cpp
@@ -48,7 +48,7 @@ HRESULT CEffectObject::Render()
if (FAILED(m_pInstance_ModelCom->Bind_CS_Output(5, 1)))
return E_FAIL;
- if (m_EffectInfo.eRenderOrder == RENDER::BULR_MESH)
+ if (m_EffectInfo.eRenderOrder == RENDER::BULR_MESH || m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::DEFAULT)
{
if (FAILED(m_pInstance_ModelCom->Bind_OutPut_SRV_VS(5, 1)))
return E_FAIL;
@@ -100,7 +100,7 @@ HRESULT CEffectObject::Render_Blur()
}
}
- if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NONPOS)
+ if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NONPOS || m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::DEFAULT_NONPOS)
BlurPass = SHADER_PASS_INSTANCE_MODEL::NONPOS_BLUR;
if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::WB_CULLING)
@@ -210,6 +210,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
SAFE_RELEASE(m_pMasking_TextureCom);
SAFE_RELEASE(m_pDissolve_TextureCom);
SAFE_RELEASE(m_pEmissive_TextureCom);
+ SAFE_RELEASE(m_pNormal_TextureCom);
SAFE_RELEASE(m_pInstance_ModelCom);
@@ -454,6 +455,31 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
}
+ if (m_EffectInfo.isNomalMap)
+ {
+ size_t iComponentLength = {};
+
+ if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
+ return E_FAIL;
+ }
+
+ if (iComponentLength != 0)
+ {
+ _char szName[MAX_PATH] = {};
+
+ if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
+ return E_FAIL;
+ }
+
+ m_strNomalMapName = szName;
+
+ if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strNomalMapName),
+ reinterpret_cast(&m_pNormal_TextureCom))))
+ return E_FAIL;
+ }
+ }
+
+
size_t iComponentLength = {};
@@ -483,6 +509,8 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
+
+
m_pInstance_ModelCom->Load_InstanceModel(hFile);
CloseHandle(hFile);
@@ -704,6 +732,33 @@ HRESULT CEffectObject::LoadPre(const _char* pFilePath, LEVEL eLevel)
}
+ }
+
+
+ if (m_EffectInfo.isNomalMap)
+ {
+ size_t iComponentLength = {};
+
+ if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) {
+ return E_FAIL;
+ }
+
+ if (iComponentLength != 0)
+ {
+ _char szName[MAX_PATH] = {};
+
+ if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) {
+ return E_FAIL;
+ }
+
+ m_strNomalMapName = szName;
+
+ if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strNomalMapName),
+ reinterpret_cast(&m_pNormal_TextureCom))))
+ return E_FAIL;
+ }
+
+
}
size_t iComponentLength = {};
@@ -801,7 +856,7 @@ HRESULT CEffectObject::Bind_ShaderResources()
}
- if (m_EffectInfo.isMotionBlur == true)
+ if (m_EffectInfo.isMotionBlur == true || m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::DEFAULT)
{
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
@@ -997,6 +1052,10 @@ HRESULT CEffectObject::Bind_ShaderResources()
return E_FAIL;
}
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_isNoDissolveSmoothStep", &m_EffectInfo.isNoDissolveSmoothStep, sizeof(_bool)))) {
+ return E_FAIL;
+ }
+
if (FAILED(m_pShaderCom->Bind_RawValue("g_fDissolveMaskEdge", &m_EffectInfo.vDissolveValue.x, sizeof(_float)))) {
return E_FAIL;
}
@@ -1061,6 +1120,7 @@ HRESULT CEffectObject::Bind_ShaderResources()
return E_FAIL;
}
+
if (FAILED(m_pShaderCom->Bind_RawValue("g_isMask_G", &m_EffectInfo.isMask_G, sizeof(_bool)))) {
@@ -1141,7 +1201,22 @@ HRESULT CEffectObject::Bind_ShaderResources()
}
+ if (m_pNormal_TextureCom != nullptr)
+ {
+ if (FAILED(m_pShaderCom->Bind_SRV("g_NormalTexture", m_pNormal_TextureCom->Get_SRV(0)))) {
+ return E_FAIL;
+ }
+ _float fUsingSurfaceParams = MRO_PARAMETER;
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_fUsingSurfaceParams", &fUsingSurfaceParams, sizeof(_float))))
+ return E_FAIL;
+
+ if (FAILED(m_pShaderCom->Bind_SRV("g_SurfaceParamsTexture", m_pSurface_TextureCom->Get_SRV(0)))) {
+ return E_FAIL;
+ }
+
+ }
return S_OK;
}
@@ -1192,6 +1267,8 @@ void CEffectObject::Free()
SAFE_RELEASE(m_pDissolve_TextureCom);
SAFE_RELEASE(m_pEmissive_TextureCom);
SAFE_RELEASE(m_pDistortion_TextureCom);
+ SAFE_RELEASE(m_pNormal_TextureCom);
+ SAFE_RELEASE(m_pSurface_TextureCom);
SAFE_RELEASE(m_pShaderCom);
SAFE_RELEASE(m_pInstance_ModelCom);
diff --git a/Jusin154_Team3D/Editor/Private/EffectPool.cpp b/Jusin154_Team3D/Editor/Private/EffectPool.cpp
index 2e3ca5a28..c86d0816e 100644
--- a/Jusin154_Team3D/Editor/Private/EffectPool.cpp
+++ b/Jusin154_Team3D/Editor/Private/EffectPool.cpp
@@ -21,6 +21,8 @@
#include "TrollSwing.h"
#include "StunEffect.h"
#include "Blink.h"
+#include "Ranrok_FireBall.h"
+#include "Ranrok_Breath.h"
CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CGameObject(pDevice, pContext)
@@ -55,8 +57,8 @@ HRESULT CEffectPool::Initialize(void* pArg)
m_isActiveMonsterEffectCreate = false;
#endif //
#ifdef 진우
- m_isActiveEffectCreate = true;
- m_isActiveMonsterEffectCreate = false;
+ m_isActiveEffectCreate = false;
+ m_isActiveMonsterEffectCreate = true;
#endif //
#ifdef 기무리
m_isActiveEffectCreate = false;
@@ -101,7 +103,7 @@ void CEffectPool::Priority_Update(_float fTimeDelta)
#if 진우
- (*m_EffectList[ENUM_CLASS(SKILL_TYPE::BLINK)].begin())->Describe_Entity();
+ //(*m_EffectList[ENUM_CLASS(SKILL_TYPE::BLINK)].begin())->Describe_Entity();
Describe_Entity();
@@ -302,15 +304,36 @@ HRESULT CEffectPool::Ready_MonsterEffect()
))) return E_FAIL;
- if (FAILED(Create_Effect(SKILL_TYPE::STUN, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
+ //if (FAILED(Create_Effect(SKILL_TYPE::STUN, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
+ \
+ // CStunEffect* pEffect = nullptr;
- CStunEffect* pEffect = nullptr;
+ // pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr);
- pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr);
+ // return pEffect; }
+ //))) return E_FAIL;
+
+
+ if (FAILED(Create_Effect(SKILL_TYPE::RANROK_FIREBALL, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
+
+ CRanrok_FireBall* pEffect = nullptr;
+
+ pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr);
return pEffect; }
))) return E_FAIL;
+
+ if (FAILED(Create_Effect(SKILL_TYPE::RANROK_BREATH, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
+
+ CRanrok_Breath* pEffect = nullptr;
+
+ pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr);
+
+ return pEffect; }
+ ))) return E_FAIL;
+
+
return S_OK;
}
@@ -377,6 +400,9 @@ HRESULT CEffectPool::Reset_Pool()
if (FAILED(Ready_Effect()))
return E_FAIL;
+ if (FAILED(Ready_MonsterEffect()))
+ return E_FAIL;
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/Effect_Container.cpp b/Jusin154_Team3D/Editor/Private/Effect_Container.cpp
index 27e1ba1a2..4e928fe72 100644
--- a/Jusin154_Team3D/Editor/Private/Effect_Container.cpp
+++ b/Jusin154_Team3D/Editor/Private/Effect_Container.cpp
@@ -181,6 +181,7 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath)
OPEN_EXISTING, // 기존 파일 열기
FILE_ATTRIBUTE_NORMAL,
NULL
+
);
@@ -539,6 +540,188 @@ ON_COLLISION_INFO CEffect_Container::SweepTarget(_vector StartPos, _vector EndPo
return tagCollInfo;
}
+ON_COLLISION_INFO CEffect_Container::MonsterSweepTarget(_vector StartPos, _vector EndPos, _float fRadius, _bool isTerrainCollision)
+{
+ _vector vStartPos = StartPos;
+ _vector vEndPos = EndPos;
+ _vector vDir = { vEndPos - vStartPos };
+
+ _float fDistance = XMVectorGetX(XMVector3Length(vEndPos - vStartPos));
+
+ PSX::PxSweepBuffer pxBuffer = {};
+
+ _bool bHit = m_pGameInstance->SphereCast(fRadius, vStartPos, vDir, fDistance, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eDYNAMIC, pxBuffer);
+
+ const PSX::PxSweepHit& hit = pxBuffer.block;
+ PSX::PxRigidActor* pActor = hit.actor;
+ PSX::PxShape* pShape = hit.shape;
+ ON_COLLISION_INFO tagCollInfo = {};
+
+ tagCollInfo.vWorldPos.w = 1.f;
+
+ if (bHit) {
+
+ memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &hit.position, sizeof(hit.position));
+
+ memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal));
+ XMStoreFloat4(&tagCollInfo.vHitDir, vDir);
+ tagCollInfo.fLength = fDistance;
+
+
+ if (nullptr != pActor && nullptr != pActor->userData)
+ {
+ PhsXUserData* pUserData = static_cast(pActor->userData);
+ tagCollInfo.pObject = pUserData->pOwner;
+
+ switch (pUserData->eKind)
+ {
+ case PHYSX_KIND::CCTActor:
+ {
+ switch (PXOBJECT(pUserData->iSubKind))
+ {
+
+ case PXOBJECT::PLAYER:
+ {
+ pUserData->pOwner->OnCollision(this, &tagCollInfo);
+ m_bHit = true;
+ }
+ break;
+ case PXOBJECT::SKILL_PROTEGO:
+ {
+ pUserData->pOwner->OnCollision(this, &tagCollInfo);
+ m_bHit = true;
+ }
+ }
+ }
+ }
+ }
+
+
+ }
+
+ if (isTerrainCollision == true && bHit == false)
+ {
+ memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &hit.position, sizeof(hit.position));
+ memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal));
+ XMStoreFloat4(&tagCollInfo.vHitDir, vDir);
+ tagCollInfo.fLength = fDistance;
+ tagCollInfo.pObject = m_pOwner->Get_Owner();
+
+ bHit = m_pGameInstance->SphereCast(fRadius, vStartPos, vDir, fDistance, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eSTATIC, pxBuffer);
+
+ const PSX::PxSweepHit& hit = pxBuffer.block;
+ PSX::PxRigidActor* pActor = hit.actor;
+ PSX::PxShape* pShape = hit.shape;
+
+ tagCollInfo.vWorldPos.w = 1.f;
+
+ if (bHit)
+ {
+ memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &hit.position, sizeof(hit.position));
+ memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal));
+ XMStoreFloat4(&tagCollInfo.vHitDir, vDir);
+ tagCollInfo.fLength = fDistance;
+
+ if (nullptr != pActor && nullptr != pActor->userData)
+ {
+ PhsXUserData* pUserData = static_cast(pActor->userData);
+ tagCollInfo.pObject = pUserData->pOwner;
+
+ switch (PXOBJECT(pUserData->iSubKind))
+ {
+ case PXOBJECT::TERRAIN:
+ {
+
+ m_bHit = true;
+ break;
+ }
+ }
+
+ }
+ }
+
+
+ }
+
+ return tagCollInfo;
+}
+
+ON_COLLISION_INFO CEffect_Container::MonsterRayCast(_vector StartPos, _vector _vDir, _float _fLength, _uint iMaxHitCapacity)
+{
+ _vector vStartPos = StartPos;
+ _vector vDir = _vDir;
+
+ _float fLength = _fLength;
+
+ vector Raycasts = {};
+ Raycasts.resize(iMaxHitCapacity);
+
+ _bool bHit = m_pGameInstance->RayCast(vStartPos, vDir, fLength, Raycasts.data(), iMaxHitCapacity, m_iHitCount);
+
+ ON_COLLISION_INFO tagCollInfo = {};
+
+ for (_uint i = 0; i < iMaxHitCapacity; i++)
+ {
+ PSX::PxRigidActor* pActor = Raycasts[i].actor;
+ PSX::PxShape* pShape = Raycasts[i].shape;
+
+
+ tagCollInfo.vWorldPos.w = 1.f;
+
+ if (bHit) {
+
+ memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &Raycasts[i].position, sizeof(Raycasts[i].position));
+
+ memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &Raycasts[i].normal, sizeof(Raycasts[i].normal));
+ XMStoreFloat4(&tagCollInfo.vHitDir, vDir);
+ tagCollInfo.fLength = fLength;
+
+ if (nullptr != pActor && nullptr != pActor->userData)
+ {
+ PhsXUserData* pUserData = static_cast(pActor->userData);
+ tagCollInfo.pObject = pUserData->pOwner;
+
+ switch (pUserData->eKind)
+ {
+ case PHYSX_KIND::CCTActor:
+ {
+ switch (PXOBJECT(pUserData->iSubKind))
+ {
+
+ case PXOBJECT::PLAYER:
+ {
+ pUserData->pOwner->OnCollision(this, &tagCollInfo);
+ m_bHit = true;
+ }
+ break;
+ case PXOBJECT::SKILL_PROTEGO:
+ {
+ pUserData->pOwner->OnCollision(this, &tagCollInfo);
+ m_bHit = true;
+ }
+ }
+ }
+ }
+
+
+ switch (PXOBJECT(pUserData->iSubKind))
+ {
+ case PXOBJECT::TERRAIN:
+ {
+
+ m_bHit = true;
+ break;
+ }
+ }
+ }
+
+ }
+
+ return tagCollInfo;
+ }
+
+ return tagCollInfo;
+}
_int CEffect_Container::CollisionCheck()
{
@@ -597,3 +780,5 @@ _int CEffect_Container::CollisionCheck()
return -1;
}
+
+
diff --git a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp
index 28226a082..dfadb0d07 100644
--- a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp
+++ b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp
@@ -153,7 +153,7 @@ HRESULT CEffect_Editor::Packaging(const _char* pDirectoryPath)
{
_uint iIndex = {};
- _string strPerfectFilePath = "../Bin/Resources/Data/Effect/Package/";
+ _string strPerfectFilePath = "../Bin/Resources/Data/Effect/MonsterPackage/";
_string strDirectoryPath = pDirectoryPath;
size_t pos = strDirectoryPath.rfind('/'); // 뒤에서부터 '/' 검색
diff --git a/Jusin154_Team3D/Editor/Private/InfoInstance.cpp b/Jusin154_Team3D/Editor/Private/InfoInstance.cpp
index 33a59b1d7..5c418e260 100644
--- a/Jusin154_Team3D/Editor/Private/InfoInstance.cpp
+++ b/Jusin154_Team3D/Editor/Private/InfoInstance.cpp
@@ -92,6 +92,11 @@ HRESULT CInfoInstance::Load_PointLights(const _char* pFilePath)
{
return m_pMapInfo->Load_PointLights(pFilePath);
}
+HRESULT CInfoInstance::Load_Decal(const _char* pFilePath)
+{
+ return m_pMapInfo->Load_Decal(pFilePath);
+}
+
#pragma endregion
#pragma region MAP_INFO
diff --git a/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp
index b54600172..3a68461c6 100644
--- a/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp
+++ b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp
@@ -84,11 +84,11 @@ HRESULT CLevel_EffectViewer::Initialize()
return E_FAIL;
}
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Monster"))))
- return E_FAIL;
+ //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Monster"))))
+ // return E_FAIL;
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Monster"))))
- return E_FAIL;
+ //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Monster"))))
+ // return E_FAIL;
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Monster"))))
return E_FAIL;
@@ -149,8 +149,17 @@ HRESULT CLevel_EffectViewer::Ready_Layer_Camera(const _wstring& strLayerTag)
HRESULT CLevel_EffectViewer::Ready_Layer_Light()
{
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT)))
+ CMainLight* pLight = { nullptr };
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT, nullptr, nullptr, &pLight))) {
return E_FAIL;
+ }
+
+ _float4 vDiffuse = _float4(0.745f, 0.797f, 0.8f, 0.f);
+ _float4 vAmbient = _float4(0.1f, 0.13f, 0.13f, 0.f);
+ _float4 vSpecular = _float4(0.05f, 0.05f, 0.05f, 0.f);
+
+ pLight->Get_Component()->Set_Color(vDiffuse, vAmbient, vSpecular);
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/Level_MapViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_MapViewer.cpp
index 45e452097..035887306 100644
--- a/Jusin154_Team3D/Editor/Private/Level_MapViewer.cpp
+++ b/Jusin154_Team3D/Editor/Private/Level_MapViewer.cpp
@@ -121,12 +121,11 @@ HRESULT CLevel_MapViewer::Ready_Layer_Camera(const _wstring& strLayerTag)
HRESULT CLevel_MapViewer::Ready_Layer_Background(const _wstring& strLayerTag)
{
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag)))
- return E_FAIL;
-
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag)))
return E_FAIL;
+
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp
index 3dd4f516c..c5e806319 100644
--- a/Jusin154_Team3D/Editor/Private/Loader.cpp
+++ b/Jusin154_Team3D/Editor/Private/Loader.cpp
@@ -193,6 +193,8 @@
#include "Goblin_Spector.h"
#include "StunEffect.h"
#include "Blink.h"
+#include "Ranrok_FireBall.h"
+#include "Ranrok_Breath.h"
#pragma endregion
#pragma region PHYSX_HEADER
@@ -1259,6 +1261,17 @@ HRESULT CLoader::Loading_For_Effect()
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Terrain_MRO"),
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/Terrain/Terrain_MRO_%d.dds"), 4)))) {
return E_FAIL;
+ }
+
+ /* Base_MRO */
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Base_MRO"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("C:/MeshTable/Game/Environment//MasterMaterials/BaseTextures/T_Base011_MRO.dds"), 0)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Base_SRO"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/base_Black_SRO.dds"), 0)))) {
+ return E_FAIL;
}
Asset_FileLoad("../Bin/Resources/Textures/Effect/Noises", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) {
@@ -1336,6 +1349,21 @@ HRESULT CLoader::Loading_For_Effect()
});
+ Asset_FileLoad("../Bin/Resources/Textures/Effect/Nomal", 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::EFFECT), wstrFileName,
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0 , L"NOMAL")))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+
+ });
+
m_strMessage = TEXT("Model Loading..");
@@ -1475,6 +1503,10 @@ HRESULT CLoader::Loading_For_Effect()
TEXT("Prototype_Component_Wand_Model")
));
+ futures.emplace_back(Deferred_ModelLoad(
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_Playable_Model")
+ ));
for (auto& job : futures) {
@@ -1763,6 +1795,13 @@ HRESULT CLoader::Loading_For_Effect()
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CRanrok_FireBall::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pGameInstance->Add_Prototype(NEXT_LEVEL, CRanrok_Breath::Create(m_pDevice, m_pContext)))) {
+ return E_FAIL;
+ }
/* For.Prototype_GameObject_Wand */
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CWand::Create(m_pDevice, m_pContext))))
@@ -2346,10 +2385,10 @@ HRESULT CLoader::Loading_For_ObjectViewer()
vector*>> futures = {};
- //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\\Props\\Wands\\CharacterWands\\SK_Wands_Amit.fbx", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * 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\\Environment\\BroomFlight\\Meshes\\SM_BRR_RaceRing_01.fbx", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity())))) {
+ return E_FAIL;
+ }
#pragma region MONSTER
@@ -2392,17 +2431,10 @@ HRESULT CLoader::Loading_For_ObjectViewer()
));
futures.emplace_back(Deferred_ModelLoad(
- MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig_Anim.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
- TEXT("Prototype_Component_Professor_EleazarFig_Model")
+ MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
+ TEXT("Prototype_Component_Ghost_Peeves_Model")
));
- //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_ConjuredDragon_Model"),
- // CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/ConjuredDragon/ConjuredDragon.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationZ(XMConvertToRadians(180.f))* XMMatrixIdentity()))))
- // return E_FAIL;
- futures.emplace_back(Deferred_ModelLoad(
- MODEL::ANIM, "../Bin/Resources/Models/Monster/ConjuredDragon/ConjuredDragon_Anim.bin", XMMatrixIdentity(),
- TEXT("Prototype_Component_ConjuredDragon_Anim_Model")
- ));
#pragma endregion
diff --git a/Jusin154_Team3D/Editor/Private/MainLight.cpp b/Jusin154_Team3D/Editor/Private/MainLight.cpp
index b338ce97a..ffe8a2598 100644
--- a/Jusin154_Team3D/Editor/Private/MainLight.cpp
+++ b/Jusin154_Team3D/Editor/Private/MainLight.cpp
@@ -141,8 +141,8 @@ HRESULT CMainLight::Ready_Components()
LightDesc.iLevel = NEXT_LEVEL;
#ifdef gimch
- LightDesc.vDiffuse = _float4(0.7f, 0.7f, 0.7f, 0.f);
- LightDesc.vAmbient = _float4(0.3f, 0.3f, 0.3f, 0.f);
+ LightDesc.vDiffuse = _float4(0.745f, 0.797f, 0.8f, 0.f);
+ LightDesc.vAmbient = _float4(0.417f, 0.533f, 0.544f, 0.f);
#endif // gimch
@@ -159,9 +159,9 @@ HRESULT CMainLight::Ready_Components()
m_pGameInstance->Set_Fog(5.f, 30.f);
#ifdef gimch
- //vColor = _float4(0.2f, 0.2f, 0.2f, 1.f);
- //m_pGameInstance->Set_FogColor(vColor);
- //m_pGameInstance->Set_Fog(10.f, 5.f);
+ vColor = _float4(0.2f, 0.246f, 0.256f, 1.f);
+ m_pGameInstance->Set_FogColor(vColor);
+ m_pGameInstance->Set_Fog(10.f, 10.f);
#endif // gimch
return S_OK;
diff --git a/Jusin154_Team3D/Editor/Private/MapInfo.cpp b/Jusin154_Team3D/Editor/Private/MapInfo.cpp
index ecdb8a074..1b9e1c2cc 100644
--- a/Jusin154_Team3D/Editor/Private/MapInfo.cpp
+++ b/Jusin154_Team3D/Editor/Private/MapInfo.cpp
@@ -10,6 +10,7 @@
#include "MapElement_Interactable.h"
#include "MapObject_LOD.h"
#include "LightSpawner.h"
+#include "DummyDecal.h"
CMapInfo::CMapInfo()
{
@@ -318,6 +319,77 @@ HRESULT CMapInfo::Load_PointLights(const _char* pFilePath)
return S_OK;
}
+HRESULT CMapInfo::Load_Decal(const _char* pFilePath)
+{
+ tinyxml2::XMLDocument xmlDoc;
+
+ string strPath = "../Bin/Resources/Data/Map/Decal/" + string(pFilePath) + ".xml";
+
+ if ((tinyxml2::XML_SUCCESS != xmlDoc.LoadFile(strPath.c_str())))
+ return E_FAIL;
+
+ tinyxml2::XMLElement* root = xmlDoc.FirstChildElement("Decal");
+
+ if (nullptr == root)
+ {
+ MSG_BOX("Failed to Find root");
+ return S_OK;
+ }
+
+ for (auto* Object = root->FirstChildElement("Object"); Object; Object = Object->NextSiblingElement("Object"))
+ {
+ CDummyDecal::DUMMY_DECAL_DESC Desc = {};
+
+ /* Transform */
+ auto* Rotation = Object->FirstChildElement("Scale");
+ Rotation->QueryFloatAttribute("x", &Desc.vScale.x);
+ Rotation->QueryFloatAttribute("y", &Desc.vScale.y);
+ Rotation->QueryFloatAttribute("z", &Desc.vScale.z);
+
+ auto* Scale = Object->FirstChildElement("Rotation");
+ Scale->QueryFloatAttribute("x", &Desc.vRotation.x);
+ Scale->QueryFloatAttribute("y", &Desc.vRotation.y);
+ Scale->QueryFloatAttribute("z", &Desc.vRotation.z);
+
+ auto* Position = Object->FirstChildElement("Position");
+ Position->QueryFloatAttribute("x", &Desc.vPosition.x);
+ Position->QueryFloatAttribute("y", &Desc.vPosition.y);
+ Position->QueryFloatAttribute("z", &Desc.vPosition.z);
+
+ /* Decal Desc */
+ auto* Shader_Value = Object->FirstChildElement("Shader_Value");
+ Shader_Value->QueryFloatAttribute("UVTiling", &Desc.fUVTiling);
+ Shader_Value->QueryFloatAttribute("UVSpeedX", &Desc.vUVSpeed.x);
+ Shader_Value->QueryFloatAttribute("UVSpeedY", &Desc.vUVSpeed.y);
+
+ /* MaskRed */
+ auto* MaskRed = Object->FirstChildElement("MaskRed");
+ MaskRed->QueryFloatAttribute("r", &Desc.vMaskRed.x);
+ MaskRed->QueryFloatAttribute("g", &Desc.vMaskRed.y);
+ MaskRed->QueryFloatAttribute("b", &Desc.vMaskRed.z);
+ MaskRed->QueryFloatAttribute("a", &Desc.vMaskRed.w);
+
+ /* MaskGreen */
+ auto* MaskGreen = Object->FirstChildElement("MaskGreen");
+ MaskGreen->QueryFloatAttribute("r", &Desc.vMaskGreen.x);
+ MaskGreen->QueryFloatAttribute("g", &Desc.vMaskGreen.y);
+ MaskGreen->QueryFloatAttribute("b", &Desc.vMaskGreen.z);
+ MaskGreen->QueryFloatAttribute("a", &Desc.vMaskGreen.w);
+
+ /* MaskBlue */
+ auto* MaskBlue = Object->FirstChildElement("MaskBlue");
+ MaskBlue->QueryFloatAttribute("r", &Desc.vMaskBlue.x);
+ MaskBlue->QueryFloatAttribute("g", &Desc.vMaskBlue.y);
+ MaskBlue->QueryFloatAttribute("b", &Desc.vMaskBlue.z);
+ MaskBlue->QueryFloatAttribute("a", &Desc.vMaskBlue.w);
+
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Decal"), &Desc)))
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
HRESULT CMapInfo::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex)
{
diff --git a/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp b/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp
index 629e02d9c..305c21821 100644
--- a/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp
+++ b/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp
@@ -14,6 +14,7 @@
#include "MapElement_Light.h"
#include "MapElement_Lake.h"
#include "LightSpawner.h"
+#include "DummyDecal.h"
CMapObject_Manager::CMapObject_Manager(ID3D11Device * pDevice, ID3D11DeviceContext * pContext)
@@ -87,6 +88,8 @@ HRESULT CMapObject_Manager::Initialize(void* pArg)
//if (FAILED(Load_InteractObject("E_INTER_TeaShopChair")))
// return E_FAIL;
+ m_pInfoInstance->Load_Decal("Duengon_Decal_Data");
+ m_pInfoInstance->Load_PointLights("Duengon_PointLight_Data");
#pragma region Light
m_Light_Desc.eType = LIGHT::POINT;
@@ -200,6 +203,7 @@ void CMapObject_Manager::Update(_float fTimeDelta)
Update_Edit();
Update_LightSpawer();
+ //Update_Decal();
Update_Unified();
@@ -1892,6 +1896,51 @@ HRESULT CMapObject_Manager::Save_PointLightObject(const _char* pFileName)
return S_OK;
}
+HRESULT CMapObject_Manager::Save_Decal(const _char* pFileName)
+{
+ CLayer* pLayer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Decal"));
+
+ if (nullptr == pLayer)
+ return S_OK;
+
+ tinyxml2::XMLDocument doc;
+ string strPath = "../Bin/Resources/Data/Map/Decal/" + string(pFileName) + ".xml";
+
+ tinyxml2::XMLError loadResult = doc.LoadFile(strPath.c_str());
+
+ doc.Clear();
+ doc.InsertFirstChild(doc.NewDeclaration());
+
+ tinyxml2::XMLElement* root = doc.NewElement("Decal");
+ doc.InsertEndChild(root);
+
+ if (nullptr != pLayer)
+ {
+ const list* pList = pLayer->Get_Objects();
+
+ for (auto pGamObject : *pList)
+ {
+ CDummyDecal* pLightSpawner = dynamic_cast(pGamObject);
+
+ if (nullptr == pLightSpawner)
+ return E_FAIL;
+
+ if (FAILED(pLightSpawner->Save_XML(doc, root)))
+ return E_FAIL;
+ }
+ }
+
+ if (doc.SaveFile(strPath.c_str()) != tinyxml2::XML_SUCCESS) {
+ MSG_BOX("Failed to Save File");
+ }
+ else
+ {
+ MSG_BOX("Succeed to Save DummyDecals");
+ }
+
+ return S_OK;
+}
+
void CMapObject_Manager::Update_PrototypeList()
{
GUI::Begin("Model Prototype List");
@@ -2195,6 +2244,40 @@ void CMapObject_Manager::Update_LightSpawer()
GUI::End();
}
+void CMapObject_Manager::Update_Decal()
+{
+ GUI::Begin("Map Decal");
+ if (GUI::Button("Save Decals"))
+ {
+ Save_Decal("Duengon_Decal_Data");
+ }
+ if (GUI::Button("Load Decals"))
+ {
+ m_pInfoInstance->Load_Decal("Duengon_Decal_Data");
+ }
+ if (GUI::Button("Add Decals"))
+ {
+ m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Decal"));
+ }
+
+ GUI::InputInt("Index : ", (_int*)&m_iSelectedIndex);
+ CLayer* pLayer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Decal"));
+
+ if (nullptr != pLayer)
+ {
+ _uint iIndex = {};
+ for (auto& pLightSpawner : *pLayer->Get_Objects())
+ {
+ if (m_iSelectedIndex == iIndex)
+ pLightSpawner->Describe_Entity();
+
+ ++iIndex;
+ }
+ }
+
+ GUI::End();
+}
+
void CMapObject_Manager::Create_PartObject(_wstring& strPrototypeTag)
{
vector<_uint> LodModelIndices;
diff --git a/Jusin154_Team3D/Editor/Private/Player.cpp b/Jusin154_Team3D/Editor/Private/Player.cpp
index 094a63672..c000c4921 100644
--- a/Jusin154_Team3D/Editor/Private/Player.cpp
+++ b/Jusin154_Team3D/Editor/Private/Player.cpp
@@ -84,6 +84,9 @@ HRESULT CPlayer::Initialize(void* pArg)
m_pCharacter_Controller->Set_Position(XMVectorSet(-34.f, 5, -11.4f, 1.f));
+#if 진우
+ m_pCharacter_Controller->Set_Position(XMVectorSet(-34.f, -80.f, -11.4f, 1.f));
+#endif
#ifdef _DEBUG
m_BasicEffect = make_unique(m_pDevice);
@@ -95,7 +98,7 @@ HRESULT CPlayer::Initialize(void* pArg)
#endif // _DEBUG
// UI 연동 추가
-
+ m_pModelCom->Set_Temp(true);
return S_OK;
}
@@ -184,7 +187,7 @@ HRESULT CPlayer::Render()
}
#ifdef _DEBUG
- m_pCharacter_Controller->Render();
+ //m_pCharacter_Controller->Render();
//m_pRigidBody->Render();
Render_CameraCoordinateSystem();
#endif
@@ -252,7 +255,7 @@ HRESULT CPlayer::Ready_Components()
return E_FAIL;
}
- m_strModelPrototypeTag = TEXT("Prototype_Component_Npc_Model");
+ m_strModelPrototypeTag = TEXT("Prototype_Component_Playable_Model");
/* Com_Model */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag,
@@ -309,6 +312,33 @@ HRESULT CPlayer::Ready_Components()
return S_OK;
}
+void CPlayer::Start_CameraShake(_float fTime, _float fIntense)
+{
+ m_vCameraShakeTimer.x = 0.f;
+ m_vCameraShakeTimer.y = fTime;
+ m_fCameraShakeIntense = fIntense;
+ m_bCameraShake = true;
+}
+
+void CPlayer::Update_CameraShake(_float fTimeDelta)
+{
+ if (true == m_bCameraShake) {
+ m_vCameraShakeTimer.x += fTimeDelta;
+ if (m_vCameraShakeTimer.x > m_vCameraShakeTimer.y) {
+ m_vCameraShakeTimer.x = 0.f;
+ m_pCamPosition_ShoulderPart->Set_CameraShake(0.f, 0.f);
+ m_bCameraShake = false;
+ }
+ else {
+ _float fIntense = { 1.f - m_vCameraShakeTimer.x / m_vCameraShakeTimer.y };
+ fIntense *= fIntense;
+ m_pCamPosition_ShoulderPart->Set_CameraShake(
+ fIntense * m_pGameInstance->Real_Random_Float(-m_fCameraShakeIntense, m_fCameraShakeIntense),
+ fIntense * m_pGameInstance->Real_Random_Float(-m_fCameraShakeIntense, m_fCameraShakeIntense)
+ );
+ }
+ }
+}
HRESULT CPlayer::Ready_Parts()
{
diff --git a/Jusin154_Team3D/Editor/Private/Ranrok.cpp b/Jusin154_Team3D/Editor/Private/Ranrok.cpp
index de4675161..ae6d38f6f 100644
--- a/Jusin154_Team3D/Editor/Private/Ranrok.cpp
+++ b/Jusin154_Team3D/Editor/Private/Ranrok.cpp
@@ -61,11 +61,11 @@ HRESULT CRanrok::Initialize(void* pArg)
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody);
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody,&m_bCollisionPlayer);
- //m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object();
- //SAFE_ADDREF(m_pEffectPool);
+ m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object();
+ SAFE_ADDREF(m_pEffectPool);
- m_pCharacter_Controller->Set_Position(XMVectorSet(-44.704f, -2.860f, 16.071f, 1.f));
- m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(-44.704f, -2.860f, 16.071f, 1.f));
+ m_pCharacter_Controller->Set_Position(XMVectorSet(3.f, -75.f, -15.f, 1.f));
+ m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(3.f, -75.f, -15.f, 1.f));
Load_RanrokPos("../Bin/Resources/Data/RanrokPos/RanrokPos.xml");
@@ -636,7 +636,7 @@ void CRanrok::Free()
SAFE_RELEASE(m_pCharacter_Controller);
SAFE_RELEASE(m_pRigidBody);
- //SAFE_RELEASE(m_pEffectPool);
+ SAFE_RELEASE(m_pEffectPool);
Safe_Delete(m_pCallBack_Behavior);
Safe_Delete(m_pCallBack_HitReport);
}
@@ -644,81 +644,9 @@ void CRanrok::Free()
void CRanrok::Describe_Entity()
{
- GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
- if (GUI::CollapsingHeader("Ranrak")) {
- __super::Describe_Entity();
+ __super::Describe_Entity();
- string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex());
- GUI::Text(AnimList.c_str());
-
- GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition());
- GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio());
- GUI::Text("AnimSpeed %.2f", m_pModelCom->Get_AnimSpeed());
-
- GUI::Text("CurrFlow %d", m_iCurrentFlow);
-
- _float3 Pos;
- XMStoreFloat3(&Pos, Get_WorldPostion());
-
- if (GUI::DragFloat3("Pos", (_float*)&Pos, 0.01f))
- {
- m_pCharacter_Controller->Set_Position(XMVectorSetW(XMLoadFloat3(&Pos), 1.f));
- }
-
- GUI::SameLine();
-
- if (GUI::SmallButton("Copy"))
- {
- char buf[128];
- sprintf_s(buf, "", Pos.x, Pos.y, Pos.z);
-
- GUI::SetClipboardText(buf);
-
- m_Points[0].push_back(XMVectorSet(Pos.x, Pos.y, Pos.z, 1.f));
- }
-
- GUI::SameLine();
-
- if (GUI::SmallButton("Clear"))
- {
- m_Points[0].clear();
- }
-
- GUI::Separator();
- GUI::Text("Points[0] Count : %d", (_int)m_Points[0].size());
-
- for (_uint i = 0; i < m_Points[0].size();)
- {
- _vector v = m_Points[0][i];
- XMFLOAT3 p;
- XMStoreFloat3(&p, v);
-
- GUI::PushID(i);
-
- GUI::Text("[%d] (%.2f, %.2f, %.2f)", i, p.x, p.y, p.z);
-
- GUI::SameLine();
-
- if (GUI::SmallButton("X"))
- {
- m_Points[0].erase(m_Points[0].begin() + i);
- GUI::PopID();
- continue;
- }
-
- GUI::PopID();
- i++;
- }
-
-
- if (GUI::Button("MovePos"))
- {
- m_pCharacter_Controller->Set_Position(XMVectorSet(m_pGameInstance->Get_CamPosition()->x, m_pGameInstance->Get_CamPosition()->y, m_pGameInstance->Get_CamPosition()->z,1.f));
- }
-
- m_pTransformCom->Describe_Entity();
- }
- GUI::End();
+ m_pTransformCom->Describe_Entity();
}
#endif // _DEBUG
diff --git a/Jusin154_Team3D/Editor/Private/Ranrok_Breath.cpp b/Jusin154_Team3D/Editor/Private/Ranrok_Breath.cpp
new file mode 100644
index 000000000..65bd4dde9
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/Ranrok_Breath.cpp
@@ -0,0 +1,307 @@
+#include "pch.h"
+#include "Ranrok_Breath.h"
+
+#include "GameInstance.h"
+#include "EditEffect.h"
+#include "Wand.h"
+#include "Player.h"
+#include "InfoInstance.h"
+
+CRanrok_Breath::CRanrok_Breath(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CEffect_Container{ pDevice, pContext }
+{
+}
+
+CRanrok_Breath::CRanrok_Breath(const CRanrok_Breath& rhs)
+ : CEffect_Container(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
+{
+ SAFE_ADDREF(m_pInfoInstance);
+}
+
+HRESULT CRanrok_Breath::Initialize_Prototype()
+{
+
+
+ return S_OK;
+
+}
+
+HRESULT CRanrok_Breath::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Components(pArg)))
+ return E_FAIL;
+
+
+ if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokBreath")))
+ return E_FAIL;
+
+ m_wstrEffectName = L"RanrokBreath";
+
+
+ m_pBreath = Get_PartObject("Breath");
+ m_pBreath_Black = Get_PartObject("Breath_Black");
+ m_pBreathSlog = Get_PartObject("BreathSlog");
+ m_pMouthFire = Get_PartObject("MouthFire");
+
+ SAFE_ADDREF(m_pBreath);
+ SAFE_ADDREF(m_pBreath_Black);
+ SAFE_ADDREF(m_pBreathSlog);
+ SAFE_ADDREF(m_pMouthFire);
+
+ m_fDuration = 5.f;
+
+
+ m_Events.emplace(0.5f, [&]() {
+ m_isStartRayCast = true;
+ });
+
+
+ m_Events.emplace(3.f, [&]() {
+
+ // 파티클 제어
+ m_isParticleEnd = true;
+
+ CEditEffect* pRock_PT = Get_PartObject("Rock_PT");
+ CEditEffect* pBottomFire = Get_PartObject("BottomFire");
+ CEditEffect* pSplatterBottom0 = Get_PartObject("SplatterBottom0");
+
+ m_pMouthFire->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
+
+ pRock_PT->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
+ pBottomFire->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
+ pSplatterBottom0->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
+
+ m_pBreath->Get_Component()->Set_Loop(false);
+ m_pBreath->Get_Effect_Info()->isDissolve = true;
+
+ m_pBreath_Black->Get_Component()->Set_Loop(false);
+ m_pBreath_Black->Get_Effect_Info()->isDissolve = true;
+
+ m_pBreathSlog->Set_Visible(false);
+
+ });
+ return S_OK;
+}
+
+void CRanrok_Breath::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+
+
+}
+
+void CRanrok_Breath::Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Update(fTimeDelta);
+
+ Update_Event(fTimeDelta);
+
+ _matrix BoneMat = XMLoadFloat4x4(m_pOwner->Get_Component()->Get_BoneMatrixPtr("tongue_01"));
+
+ for (int i = 0; i < 3; ++i) {
+ BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]);
+ }
+
+ _matrix WorldMat = m_pOwner->Get_Component()->Get_XMWorldMatrix() ;
+
+ _matrix CombinedMat = BoneMat * WorldMat;
+
+
+
+ m_pBreath->Get_Component()->Set_WorldMatrix(CombinedMat);
+ m_pBreath_Black->Get_Component()->Set_WorldMatrix(CombinedMat);
+ m_pBreathSlog->Get_Component()->Set_WorldMatrix(CombinedMat);
+
+ if(m_isParticleEnd == false)
+ m_pMouthFire->Get_Component()->Set_State(STATE::POSITION, CombinedMat.r[3]);
+
+
+ _vector vStartPos = CombinedMat.r[3];
+
+ XMStoreFloat4(&m_vStartPos, vStartPos);
+
+ if(m_isStartRayCast == true)
+ {
+ ON_COLLISION_INFO CollisionInfo = MonsterRayCast(XMLoadFloat4(&m_vStartPos), CombinedMat.r[2] * -1.f, 50.f, 50);
+ if (m_bHit = true)
+ OnCollision(this, &CollisionInfo);
+
+ }
+
+
+
+}
+
+void CRanrok_Breath::Late_Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Late_Update(fTimeDelta);
+
+
+}
+
+HRESULT CRanrok_Breath::Pre_Setting(CGameObject* pObject, void* pArg)
+{
+ if (FAILED(__super::Pre_Setting(pObject, nullptr)))
+ return E_FAIL;
+
+
+ /* 초기 객체 비지블*/
+
+ CEditEffect* pBlurMesh = Get_PartObject("BlurMesh");
+
+ m_pBreath->Set_Visible(true);
+ m_pBreath_Black->Set_Visible(true);
+ m_pBreathSlog->Set_Visible(true);
+ m_pMouthFire->Set_Visible(true);
+ pBlurMesh->Set_Visible(true);
+
+ /* 초기 객체 위치 초기화*/
+
+ _matrix BoneMat = XMLoadFloat4x4(m_pOwner->Get_Component()->Get_BoneMatrixPtr("tongue_01"));
+
+ for (int i = 0; i < 3; ++i) {
+ BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]);
+ }
+
+ _matrix WorldMat = m_pOwner->Get_Component()->Get_XMWorldMatrix() ;
+
+ _matrix CombinedMat = BoneMat * WorldMat;
+
+
+
+ m_pBreath->Get_Component()->Set_WorldMatrix(CombinedMat);
+ m_pBreath_Black->Get_Component()->Set_WorldMatrix(CombinedMat);
+ m_pBreathSlog->Get_Component()->Set_WorldMatrix(CombinedMat);
+
+ _vector vStartPos = CombinedMat.r[3];
+
+ XMStoreFloat4(&m_vStartPos, vStartPos);
+
+
+
+ m_pMouthFire->Get_Component()->Set_State(STATE::POSITION, CombinedMat.r[3]);
+ pBlurMesh->Get_Component()->Set_State(STATE::POSITION, CombinedMat.r[3]);
+
+ /* 브레스 디졸브를 위해 초기값 설정*/
+ m_pBreath->Get_Component()->Set_Loop(true);
+ m_pBreath->Get_Effect_Info()->isDissolve = false;
+
+ m_pBreath_Black->Get_Component()->Set_Loop(true);
+ m_pBreath_Black->Get_Effect_Info()->isDissolve = false;
+
+ m_isParticleEnd = false;
+ m_isStartRayCast = false;
+ return S_OK;
+}
+
+HRESULT CRanrok_Breath::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CRanrok_Breath::Ready_Child()
+{
+ return S_OK;
+}
+
+CRanrok_Breath* CRanrok_Breath::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CRanrok_Breath* pInstance = new CRanrok_Breath(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CRanrok_Breath");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+
+CGameObject* CRanrok_Breath::Clone(void* pArg, CGameObject* pOwner)
+{
+ CRanrok_Breath* pInstance = new CRanrok_Breath(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CRanrok_Breath");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CRanrok_Breath::OnCollision(CGameObject* pOther, void* pDesc)
+{
+ if (m_bHit == false)
+ return;
+
+ ON_COLLISION_INFO CollisionDesc = *static_cast(pDesc);
+
+ _vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos);
+
+ if (XMVectorGetX(XMVector4Length(vPos)) <= 0.f) /* 000 일때 들어오지마 */
+ return;
+
+ _vector vPrePos = XMLoadFloat4(&m_vPreCollisionPos);
+ _vector vDir = XMVector3Normalize(vPos - vPrePos);
+
+ if (m_isParticleEnd == true)
+ return;
+
+ CEditEffect* pRock_PT = Get_PartObject("Rock_PT");
+ CEditEffect* pBottomFire = Get_PartObject("BottomFire");
+ CEditEffect* pSplatterBottom0 = Get_PartObject("SplatterBottom0");
+
+ pRock_PT->Set_Visible(true);
+ pRock_PT->Get_Component()->Set_State(STATE::POSITION, vPos);
+
+ pBottomFire->Set_Visible(true);
+ pBottomFire->Get_Component()->Set_State(STATE::POSITION, vPos);
+
+ pSplatterBottom0->Set_Visible(true);
+ pSplatterBottom0->Get_Component()->Set_State(STATE::POSITION, vPos + vDir * 3.f);
+
+ XMStoreFloat4(&m_vPreCollisionPos, vPos);
+}
+
+void CRanrok_Breath::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pInfoInstance);
+
+ SAFE_RELEASE(m_pBreath);
+ SAFE_RELEASE(m_pBreath_Black);
+ SAFE_RELEASE(m_pBreathSlog);
+ SAFE_RELEASE(m_pMouthFire);
+
+ //SAFE_RELEASE(m_pFireBall_Tail);
+}
+#ifdef _DEBUG
+void CRanrok_Breath::Describe_Entity()
+{
+
+}
+#endif
+
+HRESULT CRanrok_Breath::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+
diff --git a/Jusin154_Team3D/Editor/Private/Ranrok_FireBall.cpp b/Jusin154_Team3D/Editor/Private/Ranrok_FireBall.cpp
new file mode 100644
index 000000000..77ff766de
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Private/Ranrok_FireBall.cpp
@@ -0,0 +1,266 @@
+#include "pch.h"
+#include "Ranrok_FireBall.h"
+
+#include "GameInstance.h"
+#include "EditEffect.h"
+#include "Wand.h"
+#include "Player.h"
+#include "InfoInstance.h"
+
+CRanrok_FireBall::CRanrok_FireBall(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : CEffect_Container{ pDevice, pContext }
+{
+}
+
+CRanrok_FireBall::CRanrok_FireBall(const CRanrok_FireBall& rhs)
+ : CEffect_Container(rhs),
+ m_pInfoInstance(CInfoInstance::GetInstance())
+{
+ SAFE_ADDREF(m_pInfoInstance);
+}
+
+HRESULT CRanrok_FireBall::Initialize_Prototype()
+{
+
+
+ return S_OK;
+
+}
+
+HRESULT CRanrok_FireBall::Initialize(void* pArg)
+{
+ if (FAILED(__super::Initialize(pArg)))
+ return E_FAIL;
+
+ if (FAILED(Ready_Components(pArg)))
+ return E_FAIL;
+
+
+ if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokFireBall")))
+ return E_FAIL;
+
+ m_wstrEffectName = L"RanrokFireBall";
+
+
+ m_pFireBall = Get_PartObject("FireBall");
+ m_pFireBall_PT = Get_PartObject("FireBall_PT");
+ m_pFireBall_Surface = Get_PartObject("FireBall_Surface");
+
+
+ SAFE_ADDREF(m_pFireBall);
+ SAFE_ADDREF(m_pFireBall_PT);
+ SAFE_ADDREF(m_pFireBall_Surface);
+
+ m_fDuration = 4.f;
+
+
+ return S_OK;
+}
+
+void CRanrok_FireBall::Priority_Update(_float fTimeDelta)
+{
+ __super::Priority_Update(fTimeDelta);
+
+ XMStoreFloat4(&m_vStartPos, m_pFireBall->Get_WorldPostion());
+}
+
+void CRanrok_FireBall::Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Update(fTimeDelta);
+
+ Update_Event(fTimeDelta);
+
+
+ m_pFireBall->Get_Component()->Translation(XMLoadFloat3(&m_vLook) * m_fLinearSpeed);
+ m_pFireBall_PT->Get_Component()->Translation(XMLoadFloat3(&m_vLook) * m_fLinearSpeed);
+ m_pFireBall_Surface->Get_Component()->Translation(XMLoadFloat3(&m_vLook) * m_fLinearSpeed);
+ //m_pFireBall_Tail->Get_Component()->Translation(XMLoadFloat3(&m_vLook) * m_fLinearSpeed);
+
+ if (false == m_bHit) {
+ _vector vStartPos = XMLoadFloat4(&m_vStartPos);
+ _vector vEndPos = m_pFireBall->Get_WorldPostion();
+ ON_COLLISION_INFO CollisionInfo = MonsterSweepTarget(vStartPos, vEndPos, 0.2f , true);
+
+ OnCollision(this, &CollisionInfo);
+ }
+
+}
+
+void CRanrok_FireBall::Late_Update(_float fTimeDelta)
+{
+ if (m_bVisible == false)
+ return;
+
+ __super::Late_Update(fTimeDelta);
+
+
+}
+
+HRESULT CRanrok_FireBall::Pre_Setting(CGameObject* pObject, void* pArg)
+{
+ if (FAILED(__super::Pre_Setting(pObject, nullptr)))
+ return E_FAIL;
+
+ CEditEffect* pBlack_Smoke = Get_PartObject("Black_Smoke");
+ CEditEffect* pFireBall_Ring = Get_PartObject("FireBall_Ring");
+
+ /* 초기 객체 비지블*/
+ m_pFireBall->Set_Visible(true);
+ m_pFireBall_PT->Set_Visible(true);
+ m_pFireBall_Surface->Set_Visible(true);
+
+ pBlack_Smoke->Set_Visible(true);
+ pFireBall_Ring->Set_Visible(true);
+
+ /* 초기 객체 위치 초기화*/
+
+ _matrix BoneMat = XMLoadFloat4x4(m_pOwner->Get_Component()->Get_BoneMatrixPtr("jaw"));
+
+ for (int i = 0; i < 3; ++i) {
+ BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]);
+ }
+
+ _matrix WorldMat = m_pOwner->Get_Component()->Get_XMWorldMatrix();
+
+ _matrix CombinedMat = BoneMat * WorldMat;
+
+ _vector vStartPos = CombinedMat.r[3];
+
+ XMStoreFloat4(&m_vStartPos, vStartPos);
+
+ /* 플레이어 위치 받기 */
+ CUnit* pPlayer = m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first;
+
+ if (pPlayer == nullptr)
+ return E_FAIL;
+
+ /* 초기 방향 */
+ XMStoreFloat4(&m_vTargetPos, pPlayer->Get_Component()->Get_Position());
+ XMStoreFloat3(&m_vLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos)));
+
+ m_pFireBall_PT->Get_Component()->Set_State(STATE::POSITION, vStartPos);
+ //m_pFireBall_Tail->Get_Component()->Set_State(STATE::POSITION, vStartPos - XMLoadFloat3(&m_vLook) * 5.f);
+ pBlack_Smoke->Get_Component()->Set_State(STATE::POSITION, vStartPos);
+ pFireBall_Ring->Get_Component()->Set_State(STATE::POSITION, vStartPos);
+ /* PJ 월드 구성하기 */
+
+
+ _vector vLook = XMVector3Normalize(XMLoadFloat3(&m_vLook));
+ _vector vRight = XMVector3Normalize(XMVector3Cross(XMVectorSet(0.f, 1.f, 0.f, 0.f) , vLook));
+ _vector vUp = XMVector3Normalize(XMVector3Cross(vLook, vRight));
+ _vector vPos = vStartPos;
+
+ _matrix PJ_WorldMat = { vRight , vUp ,vLook , vPos };
+
+ m_pFireBall->Get_Component()->Set_WorldMatrix(PJ_WorldMat);
+ m_pFireBall_Surface->Get_Component()->Set_WorldMatrix(PJ_WorldMat);
+
+ return S_OK;
+}
+
+HRESULT CRanrok_FireBall::Ready_Components(void* pArg)
+{
+ if (FAILED(__super::Ready_Components(pArg))) {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+HRESULT CRanrok_FireBall::Ready_Child()
+{
+ return S_OK;
+}
+
+CRanrok_FireBall* CRanrok_FireBall::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CRanrok_FireBall* pInstance = new CRanrok_FireBall(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize_Prototype()))
+ {
+ MSG_BOX("Failed to Created : CRanrok_FireBall");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+
+CGameObject* CRanrok_FireBall::Clone(void* pArg, CGameObject* pOwner)
+{
+ CRanrok_FireBall* pInstance = new CRanrok_FireBall(*this);
+ pInstance->m_pOwner = pOwner;
+ if (FAILED(pInstance->Initialize(pArg)))
+ {
+ MSG_BOX("Failed to Cloned : CRanrok_FireBall");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CRanrok_FireBall::OnCollision(CGameObject* pOther, void* pDesc)
+{
+ if (m_bHit == false)
+ return;
+
+ ON_COLLISION_INFO CollisionDesc = *static_cast(pDesc);
+
+ _vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos);
+
+
+ for (auto& pPair : m_PartObjects)
+ {
+ pPair.second->Set_Visible(true);
+ pPair.second->Get_Component()->Set_State(STATE::POSITION, vPos);
+ }
+
+
+ m_pFireBall->Set_Visible(false);
+ m_pFireBall_Surface->Set_Visible(false);
+
+ //m_pFireBall_Tail->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
+ m_pFireBall_PT->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
+
+
+ CEditEffect* pBlack_Smoke = Get_PartObject("Black_Smoke");
+
+ pBlack_Smoke->Set_Visible(false);
+
+ CPlayer* pPlayer = static_cast(m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first);
+
+
+ if (pPlayer == nullptr)
+ return;
+
+ pPlayer->Start_CameraShake(0.3f, 2.f);
+
+}
+
+void CRanrok_FireBall::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pInfoInstance);
+
+ SAFE_RELEASE(m_pFireBall);
+ SAFE_RELEASE(m_pFireBall_PT);
+ SAFE_RELEASE(m_pFireBall_Surface);
+ //SAFE_RELEASE(m_pFireBall_Tail);
+}
+#ifdef _DEBUG
+void CRanrok_FireBall::Describe_Entity()
+{
+
+}
+#endif
+
+HRESULT CRanrok_FireBall::Bind_ShaderResources()
+{
+ return S_OK;
+}
+
+
diff --git a/Jusin154_Team3D/Editor/Private/Ranrok_States.cpp b/Jusin154_Team3D/Editor/Private/Ranrok_States.cpp
index 0ecec91e6..ee2ebdbd3 100644
--- a/Jusin154_Team3D/Editor/Private/Ranrok_States.cpp
+++ b/Jusin154_Team3D/Editor/Private/Ranrok_States.cpp
@@ -289,15 +289,25 @@ void CRanrok::Behavior_FireBreathEnter()
pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_WINDUP_A];
Add_Event(pairAnimInfo.first,
- [&]() { pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_A];
+ [&]() {
+ pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_A];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
- m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)]; },
- 0.95f);
+ m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBREATH)];
+ m_bLookAt = false;
+ },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); },
- 0.95f);
+ [&]() {
+ pairAnimInfo = m_Animation[STATEANIM::FIREBREATH_COOLDOWN_A];
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ m_bLookAt = true;
+ },0.95f);
+
+ Add_Event(m_Animation[STATEANIM::FIREBREATH_A].first,
+ [this]() {
+ m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this);
+ }, 0.1f);
+
}
else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND))
{
@@ -344,18 +354,32 @@ void CRanrok::Behavior_FireSweepEnter()
Add_Event(pairAnimInfo.first,
[&]() { pairAnimInfo = m_Animation[STATEANIM::FIRESWEEP_A];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
- m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIRESWEEP)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIRESWEEP)]; },
- 0.95f);
+ m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIRESWEEP)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIRESWEEP)];
+ m_bLookAt = false;
+ },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); },
- 0.95f);
+ m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
+ m_bLookAt = true;
+ },
+ 0.94f);
+
+
+ Add_Event(m_Animation[STATEANIM::FIRESWEEP_A].first,
+ [this]() {
+ m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this);
+ }, 0.08f);
}
else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND))
{
pairAnimInfo = m_Animation[STATEANIM::FIRESWEEP_G];
m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIRESWEEP)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIRESWEEP)];
+
+ Add_Event(m_Animation[STATEANIM::FIRESWEEP_G].first,
+ [this]() {
+ m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_BREATH, this);
+ }, 0.2f);
}
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
}
@@ -398,11 +422,26 @@ void CRanrok::Behavior_FireBallEnter()
{
case 0:
pairAnimInfo = m_Animation[STATEANIM::FIREBALL1_A];
+
+ Add_Event(pairAnimInfo.first,
+ [this]() {
+ m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_FIREBALL, this);
+ }, 0.38f);
+
break;
case 1:
pairAnimInfo = m_Animation[STATEANIM::FIREBALL2_A];
+
+ Add_Event(pairAnimInfo.first,
+ [this]() {
+ m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_FIREBALL, this);
+ }, 0.5f);
+
break;
}
+
+
+
}
else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND))
{
@@ -412,11 +451,25 @@ void CRanrok::Behavior_FireBallEnter()
{
case 0:
pairAnimInfo = m_Animation[STATEANIM::FIREBALL1_G];
+
+ Add_Event(pairAnimInfo.first,
+ [this]() {
+ m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_FIREBALL, this);
+ }, 0.4f);
+
break;
case 1:
pairAnimInfo = m_Animation[STATEANIM::FIREBALL2_G];
+
+ Add_Event(pairAnimInfo.first,
+ [this]() {
+ m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_FIREBALL, this);
+ }, 0.45f);
break;
}
+
+
+
}
m_fSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBALL)] = m_fMaxSkillCoolTime[ENUM_CLASS(RANROK_SKILL::FIREBALL)];
diff --git a/Jusin154_Team3D/Editor/Public/CamPosition_Shoulder.h b/Jusin154_Team3D/Editor/Public/CamPosition_Shoulder.h
index fbaff6adb..a5b431472 100644
--- a/Jusin154_Team3D/Editor/Public/CamPosition_Shoulder.h
+++ b/Jusin154_Team3D/Editor/Public/CamPosition_Shoulder.h
@@ -28,7 +28,7 @@ class CCamPosition_Shoulder final : public CCamPosition
virtual HRESULT Render() override;
virtual _vector Get_WorldPostion() override;
-
+ void Set_CameraShake(_float fXShock, _float fYShock);
private:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
@@ -49,6 +49,8 @@ class CCamPosition_Shoulder final : public CCamPosition
_bool m_bLerp = { false };
_float2 m_vLerpTimer = { 0.f, 1.f };
+ _float2 m_vAccRotDegrees = { 0.f, 0.f };
+ _float2 m_vAccRealDegrees = { 0.f, 0.f };
CCamPosition_Target* m_pTarget_LookPart = { nullptr };
CCamPosition_Target* m_pTarget_FollowPart = { nullptr };
diff --git a/Jusin154_Team3D/Editor/Public/DummyDecal.h b/Jusin154_Team3D/Editor/Public/DummyDecal.h
index 2579b92c2..072441cb7 100644
--- a/Jusin154_Team3D/Editor/Public/DummyDecal.h
+++ b/Jusin154_Team3D/Editor/Public/DummyDecal.h
@@ -12,6 +12,18 @@ NS_BEGIN(Editor)
class CDummyDecal final : public CGameObject
{
+public:
+ typedef struct tagDummyDecalDesc
+ {
+ _float3 vPosition = {};
+ _float3 vRotation = {};
+ _float3 vScale = { 1.f, 1.f, 1.f };
+ _float fUVTiling = { 1.f };
+ _float2 vUVSpeed = {};
+ _float4 vMaskRed = {};
+ _float4 vMaskGreen = {};
+ _float4 vMaskBlue = {};
+ }DUMMY_DECAL_DESC;
private:
CDummyDecal(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CDummyDecal(const CDummyDecal& rhs);
@@ -26,6 +38,7 @@ class CDummyDecal final : public CGameObject
private:
CShader* m_pShaderCom = { nullptr };
CModel* m_pModelCom = { nullptr };
+
CTexture* m_pMaskTextureCom = { nullptr };
CTexture* m_pNormalTextureCom = { nullptr };
CTexture* m_pSurfaceTextureCom = { nullptr };
@@ -56,6 +69,7 @@ class CDummyDecal final : public CGameObject
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
virtual void Free() override;
void Describe_Entity() override;
+ HRESULT Save_XML(tinyxml2::XMLDocument& doc, tinyxml2::XMLElement* root);
};
NS_END
diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h
index c9f7a5b9e..0c933939a 100644
--- a/Jusin154_Team3D/Editor/Public/Editor_Define.h
+++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h
@@ -37,7 +37,7 @@ namespace Editor
SPELL_LEARN, SPELLLEARNCOLOR, SPELLLEARNBOOSTER, NPCINTERACTION, CANVASFADE,
ENEMY_DETECTION, INTERACTION_OBJECT, INTERACTION_NPC, 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 , NONPOS , NONPOS_BLUR, BLUR_MESH, BLUR_CULLING , BLUR_CULLING_NO_EMISSIVE, BLOOM_CULLING ,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 , NONPOS , NONPOS_BLUR, BLUR_MESH, BLUR_CULLING , BLUR_CULLING_NO_EMISSIVE, BLOOM_CULLING , DEFAULT_NONPOS , 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 };
@@ -57,7 +57,7 @@ namespace Editor
JAP_SIDE, BOMBARDA_SIDE, DESCENDO_SIDE, LEVIOSO_SIDE,
STUN,
- TROLL_ATTACK, TROLL_RUSH_HIT, TROLL_NOMAL_SMOKE, BLINK,
+ TROLL_ATTACK, TROLL_RUSH_HIT, TROLL_NOMAL_SMOKE, BLINK, RANROK_FIREBALL, RANROK_BREATH,
END
};
diff --git a/Jusin154_Team3D/Editor/Public/EffectObject.h b/Jusin154_Team3D/Editor/Public/EffectObject.h
index 1c9711cca..56e92ac57 100644
--- a/Jusin154_Team3D/Editor/Public/EffectObject.h
+++ b/Jusin154_Team3D/Editor/Public/EffectObject.h
@@ -138,9 +138,10 @@ class CEffectObject abstract : public CPartObject
_bool isBlurColor = {};
_bool isBlurDissolve = {};
- _bool isPadding1 = {};
- _bool isPadding2 = {};
+ _bool isNomalMap = {};
+ _bool isNoDissolveSmoothStep = {};
_bool isPadding3 = {};
+
_float4 vPadding5 = {};
_bool isRimLight = {};
@@ -272,7 +273,7 @@ class CEffectObject abstract : public CPartObject
#ifdef _DEBUG
HRESULT LoadPre(const _char* pFilePath, LEVEL eLevel);
#endif // DEBUG
-
+ EFFECT_INFO* Get_Effect_Info() { return &m_EffectInfo; }
protected:
virtual HRESULT Bind_ShaderResources() override;
@@ -287,6 +288,9 @@ class CEffectObject abstract : public CPartObject
CTexture* m_pDissolve_TextureCom = { nullptr };
CTexture* m_pEmissive_TextureCom = { nullptr };
CTexture* m_pDistortion_TextureCom = { nullptr };
+ CTexture* m_pNormal_TextureCom = { nullptr };
+ CTexture* m_pSurface_TextureCom = { nullptr };
+
CShader* m_pShaderCom = { nullptr };
CLight* m_pLightCom = { nullptr };
@@ -303,6 +307,7 @@ class CEffectObject abstract : public CPartObject
_string m_strModelName = {};
_string m_strEmissiveName = {};
_string m_strDistortionName = {};
+ _string m_strNomalMapName = {};
_string m_strPath = {};
_string m_strName = {};
diff --git a/Jusin154_Team3D/Editor/Public/Effect_Container.h b/Jusin154_Team3D/Editor/Public/Effect_Container.h
index 3636e71a7..b148ba8d4 100644
--- a/Jusin154_Team3D/Editor/Public/Effect_Container.h
+++ b/Jusin154_Team3D/Editor/Public/Effect_Container.h
@@ -37,12 +37,16 @@ class CEffect_Container abstract : public CContainerObject
void Update_Event(_float fTimeDelta);
_int CollisionCheck();
ON_COLLISION_INFO SweepTarget(_vector StartPos, _vector EndPos, _float fRadius, _bool isTerrainCollision = false);
+ ON_COLLISION_INFO MonsterSweepTarget(_vector StartPos, _vector EndPos, _float fRadius, _bool isTerrainCollision = false);
+ ON_COLLISION_INFO MonsterRayCast(_vector StartPos, _vector vDir, _float fLength, _uint iMaxHitCapacity);
protected:
_uint m_iSkillType = ENUM_CLASS(SKILL_TYPE::END);
_float4 m_vStartPos = {};
_float4 m_vEndPos = {};
PSX::PxSweepBufferN<12> m_Hitbuffer = {};
+ PSX::PxRaycastHit m_RayHitbuffer = {};
+ _uint m_iHitCount = {};
_bool m_bHit = { false };
protected:
_wstring m_wstrEffectName = {};
diff --git a/Jusin154_Team3D/Editor/Public/Effect_Editor.h b/Jusin154_Team3D/Editor/Public/Effect_Editor.h
index bcf0014c2..00cfaa15a 100644
--- a/Jusin154_Team3D/Editor/Public/Effect_Editor.h
+++ b/Jusin154_Team3D/Editor/Public/Effect_Editor.h
@@ -47,9 +47,9 @@ class CEffect_Editor final : public CEffect_Container
class CTrailObject* m_pTrailObject = { nullptr };
map<_wstring, vector>> m_MatFiles = {}; // map<머테리얼 이름, vector<텍스쳐이름 , 텍스쳐 경로>>
- _char m_szBuffer[MAX_PATH] = { "../Bin/Resources/Data/Effect/"};
+ _char m_szBuffer[MAX_PATH] = { "../Bin/Resources/Data/Effect/Ranrok"};
_char m_szTrailBuffer[MAX_PATH] = { "../Bin/Resources/Data/Effect/Trail/" };
- _char m_szPackageBuffer[MAX_PATH] = { "../Bin/Resources/Data/Effect/" };
+ _char m_szPackageBuffer[MAX_PATH] = { "../Bin/Resources/Data/Effect/Ranrok" };
_string m_strSavePath = {};
_string m_strTrailSavePath = {};
diff --git a/Jusin154_Team3D/Editor/Public/InfoInstance.h b/Jusin154_Team3D/Editor/Public/InfoInstance.h
index b93986d1e..bcce295ca 100644
--- a/Jusin154_Team3D/Editor/Public/InfoInstance.h
+++ b/Jusin154_Team3D/Editor/Public/InfoInstance.h
@@ -42,6 +42,7 @@ class CInfoInstance final : public CBase
#pragma region MAP_INFO
HRESULT Load_MapObjects(const _char* pFilePath);
HRESULT Load_PointLights(const _char* pFilePath);
+ HRESULT Load_Decal(const _char* pFilePath);
#pragma endregion
#pragma region Spell_INFO
HRESULT Load_SpellInfo(const _char* pFilePath);
diff --git a/Jusin154_Team3D/Editor/Public/MapInfo.h b/Jusin154_Team3D/Editor/Public/MapInfo.h
index 80b9a3bc9..b3e64343a 100644
--- a/Jusin154_Team3D/Editor/Public/MapInfo.h
+++ b/Jusin154_Team3D/Editor/Public/MapInfo.h
@@ -19,6 +19,7 @@ class CMapInfo final : public CBase
void Change_Level();
HRESULT Load_MapObjects(const _char* pFilePath);
HRESULT Load_PointLights(const _char* pFilePath);
+ HRESULT Load_Decal(const _char* pFilePath);
/*HRESULT Load_BuildingContainer(tinyxml2::XMLElement* Container, class CMapContainer** ppContainerObject);
HRESULT Load_StreetContainer(tinyxml2::XMLElement* Container, class CMapContainer** ppContainerObject);
HRESULT Load_MapRenderObjects(tinyxml2::XMLElement* Container, class CMapContainer* pContainerObject);
diff --git a/Jusin154_Team3D/Editor/Public/MapObject_Manager.h b/Jusin154_Team3D/Editor/Public/MapObject_Manager.h
index 6ef825898..b52048882 100644
--- a/Jusin154_Team3D/Editor/Public/MapObject_Manager.h
+++ b/Jusin154_Team3D/Editor/Public/MapObject_Manager.h
@@ -83,6 +83,7 @@ class CMapObject_Manager final : public CGameObject
HRESULT Load_WaterObject(const _char* pFileName);
HRESULT Save_PointLightObject(const _char* pFileName);
+ HRESULT Save_Decal(const _char* pFileName);
#pragma endregion
void Update_PrototypeList();
@@ -91,6 +92,7 @@ class CMapObject_Manager final : public CGameObject
void Update_ContainerObject();
void Update_Unified();
void Update_LightSpawer();
+ void Update_Decal();
void Create_PartObject(_wstring& strPrototypeTag);
void Create_Elemnt(_wstring& strPrototypeTag);
diff --git a/Jusin154_Team3D/Editor/Public/Player.h b/Jusin154_Team3D/Editor/Public/Player.h
index 050849905..17eb658d5 100644
--- a/Jusin154_Team3D/Editor/Public/Player.h
+++ b/Jusin154_Team3D/Editor/Public/Player.h
@@ -31,6 +31,8 @@ class CPlayer final : public CUnit
#endif // _DEBUG
_bool Set_Sprint(_bool bSprint) { m_bSprintToggle = bSprint; }
_matrix Get_WandPos();
+ void Start_CameraShake(_float fTime, _float fIntense);
+ void Update_CameraShake(_float fTimeDelta);
private:
class CInfoInstance* m_pInfoInstance = { nullptr };
CUnit* m_pLockOnMonster = { nullptr };
@@ -43,6 +45,11 @@ class CPlayer final : public CUnit
_float3 m_vCameraLookDir = { 0.f, 0.f, 1.f, };
_float3 m_vCameraRightDir = { 1.f, 0.f, 0.f };
+ _float2 m_vCameraShakeTimer = { 0.f, TIMER_SHORT_LERP };
+ _float m_fCameraShakeTime = TIMER_SHORT_LERP;
+ _float m_fCameraShakeIntense = 5.f;
+ _bool m_bCameraShake = { false };
+
class CCamPosition_Socket* m_pCamPosition_TopDown_LookPart = { nullptr };
class CCamPosition_Arm* m_pCamPosition_TopDown_FollowPart = { nullptr };
class CCamPosition_Shoulder* m_pCamPosition_ShoulderPart = { nullptr };
diff --git a/Jusin154_Team3D/Editor/Public/Ranrok_Breath.h b/Jusin154_Team3D/Editor/Public/Ranrok_Breath.h
new file mode 100644
index 000000000..86cfe5099
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/Ranrok_Breath.h
@@ -0,0 +1,63 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "Effect_Container.h"
+
+NS_BEGIN(Engine)
+NS_END
+
+NS_BEGIN(Editor)
+
+class CRanrok_Breath final : public CEffect_Container
+{
+private:
+ CRanrok_Breath(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CRanrok_Breath(const CRanrok_Breath& rhs);
+ virtual ~CRanrok_Breath() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ virtual void Late_Update(_float fTimeDelta) override;
+
+public:
+ virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override;
+
+private:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ HRESULT Ready_Child();
+ HRESULT Bind_ShaderResources() override;
+ virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
+private:
+ _wstring m_wstrEffectName = {};
+
+ class CEditEffect* m_pBreath = { nullptr };
+ class CEditEffect* m_pBreath_Black = { nullptr };
+ class CEditEffect* m_pBreathSlog = { nullptr };
+ class CEditEffect* m_pMouthFire = { nullptr };
+
+ _float3 m_vLook = {};
+ _float m_fLinearSpeed = 0.8f;
+
+ _float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f };
+ _float4 m_vPreCollisionPos = {};
+ _float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f };
+
+ _bool m_isParticleEnd = {};
+ _bool m_isStartRayCast = {};
+private:
+ class CInfoInstance* m_pInfoInstance = { nullptr };
+public:
+ static CRanrok_Breath* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual void Free() override;
+ CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
+#ifdef _DEBUG
+ void Describe_Entity() override;
+#endif // DEBUG
+
+
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/Ranrok_FireBall.h b/Jusin154_Team3D/Editor/Public/Ranrok_FireBall.h
new file mode 100644
index 000000000..d1fa055a5
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Public/Ranrok_FireBall.h
@@ -0,0 +1,58 @@
+#pragma once
+
+#include "Editor_Define.h"
+#include "Effect_Container.h"
+
+NS_BEGIN(Engine)
+NS_END
+
+NS_BEGIN(Editor)
+
+class CRanrok_FireBall final : public CEffect_Container
+{
+private:
+ CRanrok_FireBall(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CRanrok_FireBall(const CRanrok_FireBall& rhs);
+ virtual ~CRanrok_FireBall() = default;
+
+public:
+ virtual void Priority_Update(_float fTimeDelta) override;
+ virtual void Update(_float fTimeDelta) override;
+ virtual void Late_Update(_float fTimeDelta) override;
+
+public:
+ virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override;
+
+private:
+ virtual HRESULT Initialize_Prototype() override;
+ virtual HRESULT Initialize(void* pArg) override;
+ virtual HRESULT Ready_Components(void* pArg) override;
+ HRESULT Ready_Child();
+ HRESULT Bind_ShaderResources() override;
+ virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
+private:
+ _wstring m_wstrEffectName = {};
+
+ class CEditEffect* m_pFireBall = { nullptr };
+ class CEditEffect* m_pFireBall_PT = { nullptr };
+ class CEditEffect* m_pFireBall_Surface = { nullptr };
+
+ _float3 m_vLook = {};
+ _float m_fLinearSpeed = 0.8f;
+
+ _float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f };
+ _float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f };
+private:
+ class CInfoInstance* m_pInfoInstance = { nullptr };
+public:
+ static CRanrok_FireBall* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual void Free() override;
+ CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
+#ifdef _DEBUG
+ void Describe_Entity() override;
+#endif // DEBUG
+
+
+};
+
+NS_END
diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Blur.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Blur.hlsl
index bbd7c9266..d160873e0 100644
--- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Blur.hlsl
+++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Blur.hlsl
@@ -4,6 +4,7 @@ matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
Texture2D g_BlurTexture;
Texture2D g_BlurXTexture;
+Texture2D g_BlurYTexture;
float2 g_vResolution;
@@ -79,6 +80,11 @@ struct PS_OUT_BLUR_Y
float4 vBlurY : SV_TARGET0;
};
+struct PS_OUT_COMBINED
+{
+ float4 vBackBuffer : SV_TARGET0;
+};
+
PS_OUT_BLUR_X PS_MAIN_BLUR_X(PS_IN In)
{
PS_OUT_BLUR_X Out;
@@ -120,10 +126,25 @@ PS_OUT_BLUR_Y PS_MAIN_BLUR_Y(PS_IN In)
vColor += g_fWeights_32[i + 15] * g_BlurXTexture.Sample(BorderZeroSampler, vTexcoord);
}
+ Out.vBlurY = vColor;
+
+ return Out;
+}
+
+PS_OUT_COMBINED PS_COMBINED(PS_IN In)
+{
+ PS_OUT_COMBINED Out;
+
+
+ float4 vColor = { 0.f, 0.f, 0.f, 0.f };
+
+
+ vColor = g_BlurYTexture.Sample(DefaultSampler, In.vTexcoord);
+
if (vColor.a <= FLT_EPSILON5)
discard;
- Out.vBlurY = vColor;
+ Out.vBackBuffer = vColor;
return Out;
}
@@ -131,7 +152,7 @@ PS_OUT_BLUR_Y PS_MAIN_BLUR_Y(PS_IN In)
technique11 DefaultTechnique
{
- pass BlurXPass// 4
+ pass BlurXPass// 0
{
SetRasterizerState(RS_Default);
SetDepthStencilState(DSS_None, 0);
@@ -141,7 +162,7 @@ technique11 DefaultTechnique
PixelShader = compile ps_5_0 PS_MAIN_BLUR_X();
}
- pass BlurYPass // 4
+ pass BlurYPass // 1
{
SetRasterizerState(RS_Default);
SetDepthStencilState(DSS_None, 0);
@@ -151,5 +172,14 @@ technique11 DefaultTechnique
PixelShader = compile ps_5_0 PS_MAIN_BLUR_Y();
}
+ pass Combined // 2
+ {
+ SetRasterizerState(RS_Default);
+ SetDepthStencilState(DSS_None, 0);
+ SetBlendState(BS_Blend, 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_COMBINED();
+ }
}
diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl
index 0d14ceee3..12a0a6da9 100644
--- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl
+++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl
@@ -94,6 +94,9 @@ float g_fFogPow;
float g_fFogHeightValue;
bool g_bFogVisible;
vector g_vFogColor;
+float g_fDepthPackExponent;
+
+Texture3D g_VolumeTexture;
float g_fWeights_32[32] =
{
@@ -1142,6 +1145,8 @@ PS_OUT_FLT4_SINGLE PS_MAIN_FOG(PS_IN In)
vector vColor = g_OriginalTexture.Sample(DefaultSampler, In.vTexcoord);
vector vDepthDesc = g_DepthTexture.Sample(DefaultSampler, In.vTexcoord);
+ float3 vVolumeUV = float3(In.vTexcoord.xy, pow(vDepthDesc.y, g_fDepthPackExponent));
+
if (0.f == g_fFogPow)
{
if (1 == vDepthDesc.y)
@@ -1151,9 +1156,10 @@ PS_OUT_FLT4_SINGLE PS_MAIN_FOG(PS_IN In)
return Out;
}
+ float4 vVolumeValue = g_VolumeTexture.Sample(DefaultSampler, vVolumeUV);
float fViewZ = vDepthDesc.y * g_fFar;
- float4 vPosition, vPreShadowPosition;
+ float4 vPosition;
vPosition.x = In.vTexcoord.x * 2.f - 1.f;
vPosition.y = In.vTexcoord.y * -2.f + 1.f;
vPosition.z = vDepthDesc.x;
@@ -1174,14 +1180,19 @@ PS_OUT_FLT4_SINGLE PS_MAIN_FOG(PS_IN In)
fRatio = pow(1.f - saturate(exp(-1.f * vDepthDesc.y * g_fFogDensity)), g_fFogPow);
- vFinalColor = lerp(vColor, g_vFogColor, fRatio);
- vFinalColor.a = 1.f;
+ vVolumeValue.r = vVolumeValue.r < 1.413f ? pow(abs(vVolumeValue.r * 0.38317f), 1.f / 2.2f) : 1.f - exp(-vVolumeValue.r);
+ vVolumeValue.g = vVolumeValue.g < 1.413f ? pow(abs(vVolumeValue.g * 0.38317f), 1.f / 2.2f) : 1.f - exp(-vVolumeValue.g);
+ vVolumeValue.b = vVolumeValue.b < 1.413f ? pow(abs(vVolumeValue.b * 0.38317f), 1.f / 2.2f) : 1.f - exp(-vVolumeValue.b);
+ vVolumeValue.a = saturate(1.f - vVolumeValue.a);
+ vFinalColor = float4(lerp(vColor.rgb, vVolumeValue.rgb, vVolumeValue.a), 1.f);
if (1.f == vDepthDesc.y)
{
- vFinalColor = float4(g_vFogColor);
+ vFinalColor = float4(vVolumeValue.rgb, 1.f);
}
- Out.vFirstTarget = vFinalColor;
+
+
+ Out.vFirstTarget = vVolumeValue;
return Out;
}
diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl
index e859e4d1d..a8ac33933 100644
--- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl
+++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl
@@ -317,7 +317,7 @@ row_major float4x4 SampleBlendedLocal(uint bone)
- SampleLocalTRS_Prev(bone, PrevTime, sA, rA, tA);
+ SampleLocalTRS_Prev(bone, prevT, sA, rA, tA);
SampleLocalTRS_Cur(bone, CurrentTime, sB, rB, tB);
float3 S = lerp(sA, sB, br);
diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Volumetric_Accumulate.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Volumetric_Accumulate.hlsl
new file mode 100644
index 000000000..aa5694dfa
--- /dev/null
+++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Volumetric_Accumulate.hlsl
@@ -0,0 +1,88 @@
+#include "Engine_Shader_Functions.hlsli"
+#include "Engine_Shader_Defines.hlsli"
+
+static const float DensityScale = 0.01f;
+
+Texture3D g_VolumeSRV : register(t0);
+
+RWTexture3D g_AccVolumeUAV : register(u0);
+
+cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐이더 바인딩할때 인덱스가 동일해야함
+{
+ uint3 VolumeSize;
+ float fDepthPackExponent;
+
+ float fTemporalAccum;
+ float fFrameIndex;
+ float fNear;
+ float fFar;
+
+ float3 vCameraPosition;
+ float fDensity;
+
+ float fLightIntensity;
+ float3 vLightDirection;
+
+ float4 vLightColor;
+
+ row_major matrix InvProjMatrix;
+ row_major matrix InvViewMatrix;
+
+ float fAsymmetryParameter;
+ float padding0;
+ float padding1;
+ float padding2;
+}
+
+float ConvertNdcZToDepth(float ndcZ);
+float SliceTickness(float ndcZ, uint dimZ);
+float4 ScatterStep(float3 accumulatedLight, float accumulatedTransmittance, float3 sliceLight, float sliceDensity, float tickness);
+// 볼륨 텍스쳐 밀도, 산란 누적 계산
+[numthreads(8, 8, 4)]
+void CS_MAIN( uint3 DispatchThreadID : SV_DispatchThreadID)
+{
+ uint3 dims;
+ g_AccVolumeUAV.GetDimensions(dims.x, dims.y, dims.z);
+ if (!all(DispatchThreadID < dims))
+ return;
+
+ float4 accumulatedColor = float4(0.f, 0.f, 0.f, 1.f);
+ uint3 Position = uint3(DispatchThreadID.xy, 0);
+
+ [loop]
+ for (uint i = 0; i < dims.z; ++i)
+ {
+ Position.z = i;
+ float4 slice = g_VolumeSRV[Position];
+ float tickness = SliceTickness((float)i / dims.z, dims.z);
+
+ accumulatedColor = ScatterStep(accumulatedColor.rgb, accumulatedColor.a, slice.rgb, slice.a, tickness);
+ g_AccVolumeUAV[Position] = accumulatedColor;
+ }
+}
+
+float SliceTickness (float ndcZ, uint dimZ)
+{
+ return ConvertNdcZToDepth(ndcZ + 1.f / float(dimZ)) - ConvertNdcZToDepth(ndcZ);
+}
+
+float ConvertNdcZToDepth(float ndcZ)
+{
+ float t = pow(ndcZ, fDepthPackExponent);
+ return t * (fFar - fNear) + fNear;
+}
+
+float4 ScatterStep(float3 accumulatedLight, float accumulatedTransmittance, float3 sliceLight, float sliceDensity, float tickness)
+{
+ sliceDensity = max(sliceDensity, 0.000001f);
+ sliceDensity *= DensityScale;
+ float sliceTransmittance = exp(-sliceDensity * tickness);
+
+ // Frostbite의 누적 방식
+ float3 sliceLightIntegral = sliceLight * (1.f - sliceTransmittance) / sliceDensity;
+
+ accumulatedLight += sliceLightIntegral * accumulatedTransmittance;
+ accumulatedTransmittance *= sliceTransmittance;
+
+ return float4(accumulatedLight, accumulatedTransmittance);
+}
diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Volumetric_Compute.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Volumetric_Compute.hlsl
new file mode 100644
index 000000000..b602fc1e4
--- /dev/null
+++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Volumetric_Compute.hlsl
@@ -0,0 +1,111 @@
+#include "Engine_Shader_Functions.hlsli"
+#include "Engine_Shader_Defines.hlsli"
+
+static const float EPSILON = 1e-6f;
+
+struct LightData
+{
+ uint itype;
+ float3 vDirection;
+
+ float3 vPosition;
+ float fRange;
+
+ float4 vColor;
+};
+
+//StructuredBuffer g_LightBuffer : register(t1);
+
+RWTexture3D g_VolumeUAV : register(u0);
+
+cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐이더 바인딩할때 인덱스가 동일해야함
+{
+ uint3 VolumeSize;
+ float fDepthPackExponent;
+
+ float fTemporalAccum;
+ float fFrameIndex;
+ float fNear;
+ float fFar;
+
+ float3 vCameraPosition;
+ float fDensity;
+
+ float fLightIntensity;
+ float3 vLightDirection;
+
+ float4 vLightColor;
+
+ row_major matrix InvProjMatrix;
+ row_major matrix InvViewMatrix;
+
+ float fAsymmetryParameter;
+ float padding0;
+ float padding1;
+ float padding2;
+}
+
+float3 ConvertThreadIdToNdc(uint3 id, uint3 dims);
+float ConvertNdcZToDepth(float ndcZ);
+float3 ConvertToWorldPosition(float3 ndc, float depth);
+float3 ConvertThreadIdToWorldPosition(uint3 id, uint3 dims);
+float HenyeyGreensteinPhaseFunction(float3 vInputDir, float3 vOutputDir, float fAnisotropy);
+
+// 볼륨 텍스쳐 밀도, 산란 계산
+[numthreads(8, 8, 4)]
+void CS_MAIN( uint3 DispatchThreadID : SV_DispatchThreadID)
+{
+ uint3 dims;
+ g_VolumeUAV.GetDimensions(dims.x, dims.y, dims.z);
+ if (!all(DispatchThreadID < dims))
+ return;
+
+ float3 worldPosition = ConvertThreadIdToWorldPosition(DispatchThreadID, dims);
+ float3 toCamera = normalize(vCameraPosition - worldPosition);
+
+ float3 lighting = vLightColor.rgb * vLightColor.a;
+ float3 lightDir = normalize(vLightDirection);
+ float3 toLight = -lightDir;
+
+ float phase = HenyeyGreensteinPhaseFunction(lightDir, toCamera, fAsymmetryParameter);
+
+ lighting += vLightColor.rgb * vLightColor.rgb * phase;
+
+ g_VolumeUAV[DispatchThreadID] = float4(lighting * fLightIntensity * fDensity, fDensity);
+}
+
+float3 ConvertThreadIdToNdc(uint3 id, uint3 dims)
+{
+ float3 ndc = id + 0.5f;
+
+ ndc *= float3(2.0f / dims.x, -2.0f / dims.y, 1.0f / dims.z);
+ ndc += float3(-1.0f, 1.0f, 0.0f);
+
+ return ndc;
+}
+float ConvertNdcZToDepth(float ndcZ)
+{
+ float t = pow(ndcZ, fDepthPackExponent);
+ return t * (fFar - fNear) + fNear;
+}
+float3 ConvertToWorldPosition(float3 ndc, float depth)
+{
+ float4 vViewRay = mul(float4(ndc, 1.f), InvProjMatrix);
+ vViewRay /= vViewRay.w;
+ vViewRay /= vViewRay.z;
+ float4 worldPosition = mul(float4(vViewRay.xyz * depth, 1.f), InvViewMatrix);
+ return worldPosition.xyz;
+}
+float3 ConvertThreadIdToWorldPosition(uint3 id, uint3 dims)
+{
+ float3 ndc = ConvertThreadIdToNdc(id, dims);
+ float depth = ConvertNdcZToDepth(ndc.z);
+ return ConvertToWorldPosition(ndc, depth);
+}
+float HenyeyGreensteinPhaseFunction(float3 vInputDir, float3 vOutputDir, float fAsymmetryParameter)
+{
+ float cosTheta = dot(vInputDir, vOutputDir);
+
+ float denom = pow(1.f + (fAsymmetryParameter * fAsymmetryParameter) - 2.f * fAsymmetryParameter * cosTheta, 3.f / 2.f);
+ return (1.f / (4.f * PI)) * ((1.f - (fAsymmetryParameter * fAsymmetryParameter)) / max(denom, EPSILON));
+}
diff --git a/Jusin154_Team3D/Engine/Default/Engine.vcxproj b/Jusin154_Team3D/Engine/Default/Engine.vcxproj
index 7b2c71af3..1d215d3c5 100644
--- a/Jusin154_Team3D/Engine/Default/Engine.vcxproj
+++ b/Jusin154_Team3D/Engine/Default/Engine.vcxproj
@@ -331,6 +331,7 @@ call Update_Lib.bat
+
@@ -570,6 +571,7 @@ call Update_Lib.bat
+
@@ -647,6 +649,8 @@ call Update_Lib.bat
Effect
5.0
+
+
Effect
5.0
diff --git a/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters b/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters
index d3601b1e1..f09c9f9a1 100644
--- a/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters
+++ b/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters
@@ -313,6 +313,9 @@
{a564976c-cade-4f34-85c8-891b28d96b93}
+
+ {950977f0-f3c9-42f1-83f1-270b4bebf7ef}
+
@@ -597,6 +600,9 @@
02.Element\02.Component\13.NPCStat
+
+ 01.Utility\08.Volumetric
+
@@ -1247,6 +1253,9 @@
02.Element\02.Component\13.NPCStat
+
+ 01.Utility\08.Volumetric
+
@@ -1341,5 +1350,11 @@
99.Define\01.SHADER
+
+ 99.Define\01.SHADER
+
+
+ 99.Define\01.SHADER
+
\ No newline at end of file
diff --git a/Jusin154_Team3D/Engine/Private/ComputeShader.cpp b/Jusin154_Team3D/Engine/Private/ComputeShader.cpp
index 8a6d629df..9c5ea8a5c 100644
--- a/Jusin154_Team3D/Engine/Private/ComputeShader.cpp
+++ b/Jusin154_Team3D/Engine/Private/ComputeShader.cpp
@@ -173,8 +173,6 @@ ID3D11UnorderedAccessView* CComputeShader::GetOutputUAV(_uint iIndex) const
return m_pOutputUAV[iIndex];
}
-
-
void CComputeShader::Reset()
{
//다음 랜더링 패스에 연관되지 않도록 초기화
diff --git a/Jusin154_Team3D/Engine/Private/Fog.cpp b/Jusin154_Team3D/Engine/Private/Fog.cpp
index 0f655776f..fb9b6a6a3 100644
--- a/Jusin154_Team3D/Engine/Private/Fog.cpp
+++ b/Jusin154_Team3D/Engine/Private/Fog.cpp
@@ -33,6 +33,7 @@ HRESULT CFog::Bind_FogValue(CShader* pShader)
pShader->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_bool));
pShader->Bind_Matrix("g_invMatView", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW_INV));
pShader->Bind_Matrix("g_invmatProj", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ_INV));
+ pShader->Bind_SRV("g_VolumeTexture", m_pGameInstance->Get_VolumeSRV());
}
else
{
diff --git a/Jusin154_Team3D/Engine/Private/GameInstance.cpp b/Jusin154_Team3D/Engine/Private/GameInstance.cpp
index 3a53bfa8f..da6d0ab70 100644
--- a/Jusin154_Team3D/Engine/Private/GameInstance.cpp
+++ b/Jusin154_Team3D/Engine/Private/GameInstance.cpp
@@ -19,6 +19,7 @@
#include "Fog.h"
#include "Resource_Manager.h"
#include "Font_Manager.h"
+#include "Volumetric.h"
IMPLEMENT_SINGLETON(CGameInstance)
@@ -115,6 +116,11 @@ HRESULT CGameInstance::Initialize_Engine(const ENGINE_DESC& EngineDesc, ID3D11De
return E_FAIL;
}
+ m_pVolumetric = CVolumetric::Create(*ppDevice, *ppContext);
+ if (nullptr == m_pVolumetric) {
+ return E_FAIL;
+ }
+
m_pFont_Manager = CFont_Manager::Create(*ppDevice, *ppContext);
if (nullptr == m_pFont_Manager) {
return E_FAIL;
@@ -150,6 +156,8 @@ void CGameInstance::Update_Engine(_float fTimeDelta)
m_pObject_Manager->Late_Update(fExcuteTimeDelta);
+ m_pVolumetric->Dispatch();
+
m_pLevel_Manager->Update(fExcuteTimeDelta);
m_pObject_Manager->Clear_DeadObj();
@@ -939,6 +947,10 @@ _float CGameInstance::Get_CameraFov()
{
return m_pCamera_Manager->Get_CameraFov();
}
+_float CGameInstance::Get_CameraNear()
+{
+ return m_pCamera_Manager->Get_CameraNear();
+}
const _float* CGameInstance::Get_CurrentCameraFar()
{
return m_pCamera_Manager->Get_CurrentCameraFar();
@@ -1284,6 +1296,16 @@ _float CGameInstance::FontSizeX(const _wstring& strFontTag, const _tchar* pText)
return m_pFont_Manager->FontSizeX(strFontTag, pText);
}
+ID3D11ShaderResourceView* CGameInstance::Get_VolumeSRV()
+{
+ return m_pVolumetric->Get_VolumeSRV();
+}
+
+_float* CGameInstance::Get_DepthPackExponentPtr()
+{
+ return m_pVolumetric->Get_DepthPackExponentPtr();
+}
+
#pragma endregion
void CGameInstance::Release_Engine()
@@ -1302,6 +1324,7 @@ void CGameInstance::Release_Engine()
SAFE_RELEASE(m_pKey_Manager);
SAFE_RELEASE(m_pMouse_Manager);
SAFE_RELEASE(m_pTimer_Manager);
+ SAFE_RELEASE(m_pVolumetric);
SAFE_RELEASE(m_pRenderer);
SAFE_RELEASE(m_pObject_Manager);
SAFE_RELEASE(m_pPhysX_Manager);
diff --git a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp
index 8f7788514..2012fe477 100644
--- a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp
+++ b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp
@@ -988,6 +988,11 @@ void CInstance_Model::Describe_Entity()
if (GUI::TreeNode("Pivot Move"))
{
+ if (GUI::Checkbox("ExcludePos From PibotMove", &m_InstanceDesc.isExcludePos))
+ {
+ Instane_Buffer_ReStruct();
+ }
+
if (GUI::Checkbox("PivotMove", &m_InstanceDesc.isPivotMove))
{
Instane_Buffer_ReStruct();
@@ -1080,12 +1085,6 @@ void CInstance_Model::Describe_Entity()
}
- if (GUI::Checkbox("ExcludePos From PibotMove", &m_InstanceDesc.isExcludePos))
- {
- Instane_Buffer_ReStruct();
- }
-
-
if (ImGui::DragFloat3("DeltaAxisAngleMin", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAxisAngleMin)))
diff --git a/Jusin154_Team3D/Engine/Private/Model.cpp b/Jusin154_Team3D/Engine/Private/Model.cpp
index 783dc145d..7a42d8cb7 100644
--- a/Jusin154_Team3D/Engine/Private/Model.cpp
+++ b/Jusin154_Team3D/Engine/Private/Model.cpp
@@ -1405,7 +1405,7 @@ HRESULT CModel::Create_ComputeShader()
CS_Desc.iInputStructStride = CS_InputStrides;
CS_Desc.iOutputStructStride = CS_OutputStrides;
- m_pComputeShader = (CComputeShader*)m_pGameInstance->Clone_Asset_Prototype(g_iStaticLevel, TEXT("CS_Model"), &CS_Desc, nullptr);
+ m_pComputeShader = (CComputeShader*)m_pGameInstance->Clone_Asset_Prototype(g_iStaticLevel, CS_MODEL, &CS_Desc, nullptr);
if (nullptr == m_pComputeShader) {
return E_FAIL;
@@ -1439,7 +1439,7 @@ HRESULT CModel::Create_ComputeShaderLocal()
CS_Desc.iInputStructStride = CS_InputStrides;
CS_Desc.iOutputStructStride = CS_OutputStrides;
- m_pCS_AnimLocal = (CComputeShader*)m_pGameInstance->Clone_Asset_Prototype(g_iStaticLevel, TEXT("CS_Local"), &CS_Desc, nullptr);
+ m_pCS_AnimLocal = (CComputeShader*)m_pGameInstance->Clone_Asset_Prototype(g_iStaticLevel, CS_LOCAL, &CS_Desc, nullptr);
if (nullptr == m_pCS_AnimLocal) {
return E_FAIL;
diff --git a/Jusin154_Team3D/Engine/Private/NPCStat.cpp b/Jusin154_Team3D/Engine/Private/NPCStat.cpp
index 3dc6fd29a..fcb9499a4 100644
--- a/Jusin154_Team3D/Engine/Private/NPCStat.cpp
+++ b/Jusin154_Team3D/Engine/Private/NPCStat.cpp
@@ -63,9 +63,9 @@ void CNPCStat::Free()
void CNPCStat::Describe_Entity()
{
}
-
+#endif // _DEBUG
CNPCStat::NPCINFO CNPCStat::Get_Stat()
{
return m_NpcInfo;
}
-#endif // _DEBUG
+
diff --git a/Jusin154_Team3D/Engine/Private/Prototype_Manager.cpp b/Jusin154_Team3D/Engine/Private/Prototype_Manager.cpp
index bff3804c3..9c22da455 100644
--- a/Jusin154_Team3D/Engine/Private/Prototype_Manager.cpp
+++ b/Jusin154_Team3D/Engine/Private/Prototype_Manager.cpp
@@ -150,14 +150,14 @@ HRESULT CPrototype_Manager::Ready_EngineAssets()
}
- if (FAILED(Add_Asset_Prototype(g_iStaticLevel, TEXT("CS_Model"),
+ if (FAILED(Add_Asset_Prototype(g_iStaticLevel, CS_MODEL,
CComputeShader::Create(m_pDevice, m_pContext,
L"../Bin/Resources/ShaderFiles/Shader_Mesh_Compute.hlsl", "CS_MAIN")))) {
return E_FAIL;
}
- if (FAILED(Add_Asset_Prototype(g_iStaticLevel, TEXT("CS_Local"),
+ if (FAILED(Add_Asset_Prototype(g_iStaticLevel, CS_LOCAL,
CComputeShader::Create(m_pDevice, m_pContext,
L"../Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl", "CS_LOCAL")))) {
return E_FAIL;
diff --git a/Jusin154_Team3D/Engine/Private/Renderer.cpp b/Jusin154_Team3D/Engine/Private/Renderer.cpp
index 8e6085a7d..011ef2521 100644
--- a/Jusin154_Team3D/Engine/Private/Renderer.cpp
+++ b/Jusin154_Team3D/Engine/Private/Renderer.cpp
@@ -563,16 +563,23 @@ void CRenderer::Render_Fog()
{
COMPUTE_TIMEDELTA("Timer_Render_Fog");
EVENTSCOPE_("Render_Fog");
+
+
+ if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Fog"), m_pShader, "g_Texture"))) {
+ return;
+ }
+ m_pShader->Begin(ENUM_CLASS(SHADER_PASS_DEFERRED::DEBUG));
+
+ m_pVIBuffer->Bind_Resources();
+ m_pVIBuffer->Render();
+
m_pShader->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float));
+ m_pShader->Bind_RawValue("g_fDepthPackExponent", m_pGameInstance->Get_DepthPackExponentPtr(), sizeof(_float));
if (FAILED(m_pGameInstance->Bind_FogValue(m_pShader))) { // 여기서 포그에서 쓰는 상수들 바인딩 해줌
assert(false);
}
- if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Fog"), m_pShader, "g_OriginalTexture"))) {
- return;
- }
-
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Depth"), m_pShader, "g_DepthTexture"))) {
return;
}
@@ -657,6 +664,7 @@ void CRenderer::Render_Blur()
COMPUTE_TIMEDELTA("Timer_Render_Blur");
EVENTSCOPE_("Render_Blur");
m_eType = RENDER::BLUR;
+
if (FAILED(m_pGameInstance->Begin_MRT(TEXT("MRT_Blur")))) {
return;
}
@@ -700,6 +708,29 @@ void CRenderer::Render_Blur()
return;
}
+ if (FAILED(m_pGameInstance->Begin_MRT(TEXT("MRT_Blur_Y")))) {
+ return;
+ }
+
+ m_pBlurShader->Bind_Matrix("g_WorldMatrix", &m_ScreenWorldMatrix);
+ m_pBlurShader->Bind_Matrix("g_ViewMatrix", &m_ScreenViewMatrix);
+ m_pBlurShader->Bind_Matrix("g_ProjMatrix", &m_ScreenProjMatrix);
+
+ if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Blur_X"), m_pBlurShader, "g_BlurXTexture"))) {
+ return;
+ }
+
+ m_pBlurShader->Begin(ENUM_CLASS(SHADER_PASS_BLUR::BLUR_Y));
+
+ m_pVIBuffer->Bind_Resources();
+
+ m_pVIBuffer->Render();
+
+ if (FAILED(m_pGameInstance->End_MRT()))
+ {
+ return;
+ }
+
COMPUTE_TIMEDELTA("Timer_Render_Blur");
}
@@ -708,7 +739,7 @@ void CRenderer::Combine_Blur()
COMPUTE_TIMEDELTA("Timer_Combine_Blur");
EVENTSCOPE_("Combine_Blur");
- if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Blur_X"), m_pBlurShader, "g_BlurXTexture"))) {
+ if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Blur_Y"), m_pBlurShader, "g_BlurYTexture"))) {
return;
}
@@ -726,7 +757,7 @@ void CRenderer::Combine_Blur()
m_pBlurShader->Bind_Matrix("g_ProjMatrix", &m_ScreenProjMatrix);
- m_pBlurShader->Begin(ENUM_CLASS(SHADER_PASS_BLUR::BLUR_Y));
+ m_pBlurShader->Begin(ENUM_CLASS(SHADER_PASS_BLUR::COMBINED));
m_pVIBuffer->Bind_Resources();
m_pVIBuffer->Render();
diff --git a/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp b/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp
index d4b5c2004..a84634d63 100644
--- a/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp
+++ b/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp
@@ -221,6 +221,12 @@ HRESULT CRenderer::Initialize()
return E_FAIL;
}
+ /* Target_Blur_Y */
+ if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Blur_Y"), (_uint)Viewport.Width, (_uint)Viewport.Height,
+ DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) {
+ return E_FAIL;
+ }
+
/* Target_ENV_Blur_X */
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_ENV_Blur_X"), (_uint)Viewport.Width, (_uint)Viewport.Height,
@@ -458,6 +464,10 @@ HRESULT CRenderer::Initialize()
return E_FAIL;
}
+ /* MRT_Blur_Y*/
+ if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Blur_Y"), TEXT("Target_Blur_Y")))) {
+ return E_FAIL;
+ }
/* MRT_ENV_Blur_X */
if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_ENV_Blur_X"), TEXT("Target_ENV_Blur_X")))) {
diff --git a/Jusin154_Team3D/Engine/Private/Transform.cpp b/Jusin154_Team3D/Engine/Private/Transform.cpp
index bd080710c..f3f4b2c26 100644
--- a/Jusin154_Team3D/Engine/Private/Transform.cpp
+++ b/Jusin154_Team3D/Engine/Private/Transform.cpp
@@ -112,6 +112,11 @@ HRESULT CTransform::Initialize(void* pArg)
m_fRotationPerSec = pDesc->fRotationPerSec;
m_fRadius = pDesc->fRadius;
+#ifdef _DEBUG
+ m_vRotation = _float3(0.f, 0.f, 0.f);
+#endif // _DEBUG
+
+
return S_OK;
}
@@ -554,9 +559,6 @@ void CTransform::Describe_Entity()
Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&vPosition), 1.f));
- XMStoreFloat3(&m_vRotation, Get_RollPitchYawVector());
-
-
GUI::Text("----- Rotation ----");
GUI::InputFloat("X##Rotation", &m_vRotation.x, 1.f, 15.f);
GUI::InputFloat("Y##Rotation", &m_vRotation.y, 1.f, 15.f);
diff --git a/Jusin154_Team3D/Engine/Private/Volumetric.cpp b/Jusin154_Team3D/Engine/Private/Volumetric.cpp
new file mode 100644
index 000000000..4d3b982db
--- /dev/null
+++ b/Jusin154_Team3D/Engine/Private/Volumetric.cpp
@@ -0,0 +1,355 @@
+#include "pch.h"
+#include "Volumetric.h"
+#include "GameInstance.h"
+#include "RenderEventDebugger.h"
+
+CVolumetric::CVolumetric(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+ : m_pDevice{ pDevice }
+ , m_pContext{ pContext }
+ , m_pGameInstance{ CGameInstance::GetInstance() }
+{
+ SAFE_ADDREF(m_pDevice);
+ SAFE_ADDREF(m_pContext);
+ SAFE_ADDREF(m_pGameInstance);
+}
+
+HRESULT CVolumetric::Initialize()
+{
+ if (FAILED(CreateBlob()))
+ return E_FAIL;
+
+ if (FAILED(CreateComputeShader()))
+ return E_FAIL;
+
+ if (FAILED(CreateBuffers()))
+ return E_FAIL;
+
+ if(FAILED(CreateResourceViews()))
+ return E_FAIL;
+
+ return S_OK;
+}
+
+void CVolumetric::Update()
+{
+
+}
+
+void CVolumetric::Cumpute_Volume()
+{
+ EVENTSCOPE_("Render_Cumpute_Volume");
+
+ D3D11_MAPPED_SUBRESOURCE ConstantSubResource = {};
+
+ if (FAILED(m_pContext->Map(m_pConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &ConstantSubResource)))
+ {
+ MSG_BOX("Failed to Map : CVolumetric");
+ }
+ else
+ {
+ CS_VOLUME_CONSTANT_DESC* pDesc = static_cast(ConstantSubResource.pData);
+
+ pDesc->VolumeSize = { 160, 90, 128 };
+ pDesc->fDepthPackExponent = m_fDepthPackExponent;
+
+ pDesc->fTemporalAccum = 0.f;
+ pDesc->fFrameIndex = 0.f;
+
+ pDesc->fNear = m_pGameInstance->Get_CameraNear();
+ pDesc->fFar = *(m_pGameInstance->Get_CurrentCameraFar());
+
+ memcpy(&pDesc->vCameraPosition, m_pGameInstance->Get_CamPosition(), sizeof(_float3));
+ pDesc->fDensity = m_fDensity;
+ pDesc->fLightIntensity = m_fLightIntensity;
+
+ const LIGHT_DESC* pLightDesc = m_pGameInstance->Get_Light_Info(m_pGameInstance->Get_CurrentLevelID(), 0);
+ if(nullptr != pLightDesc)
+ {
+ memcpy(&pDesc->vLightDirection, pLightDesc->pDirection, sizeof(_float3));
+ pDesc->vLightColor = pLightDesc->vDiffuse;
+ }
+ else
+ pDesc->vLightDirection = _float3(-0.5f, -0.5f, 0.f);
+
+ XMStoreFloat4x4(&pDesc->InvProjMatrix, m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ_INV));
+ XMStoreFloat4x4(&pDesc->InvViewMatrix, m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW_INV));
+
+ pDesc->fAsymmetryParameter = m_fAsymmetryParameter;
+ pDesc->padding0 = 0.f;
+ pDesc->padding1 = 0.f;
+ pDesc->padding2 = 0.f;
+
+ m_pContext->Unmap(m_pConstantBuffer, 0);
+ }
+
+ //컴퓨트 쉐이더 바인딩
+ m_pContext->CSSetShader(m_pCSVolumeCalculate, nullptr, 0);
+ m_pContext->CSSetConstantBuffers(0, 1, &m_pConstantBuffer);
+
+ //SRV, UAV 바인딩
+ m_pContext->CSSetUnorderedAccessViews(0, 1, &m_pVolumeUAV, nullptr);
+
+ //컴퓨트 쉐이더 실행
+ XMUINT3 vGroupCount = { (160 + 7) / 8, (90 + 7) / 8, (128 + 3) / 4 };
+ m_pContext->Dispatch((_uint)vGroupCount.x, (_uint)vGroupCount.y, (_uint)vGroupCount.z);
+
+ //m_pContext->CopyResource(ppBuffers[i], m_pOutputBuffer[i]);
+
+
+ ID3D11ShaderResourceView* nullSRV = { nullptr };
+ ID3D11UnorderedAccessView* nullUAV = { nullptr };
+ // Reset
+ //m_pContext->CSSetShaderResources(0, 1, &nullSRV);
+ m_pContext->CSSetUnorderedAccessViews(0, 1, &nullUAV, nullptr);
+ m_pContext->CSSetShader(nullptr, nullptr, 0);
+}
+
+void CVolumetric::Accumulate_Volume()
+{
+ EVENTSCOPE_("Render_Accumulate_Volume");
+
+ //컴퓨트 쉐이더 바인딩
+ m_pContext->CSSetShader(m_pCSVolumeAccumulate, nullptr, 0);
+ m_pContext->CSSetConstantBuffers(0, 1, &m_pConstantBuffer);
+
+ //SRV, UAV 바인딩
+ m_pContext->CSSetShaderResources(0, 1, &m_pVolumeSRV);
+ m_pContext->CSSetUnorderedAccessViews(0, 1, &m_pAccVolumeUAV, nullptr);
+
+ //컴퓨트 쉐이더 실행
+ XMUINT3 vGroupCount = { (160 + 7) / 8, (90 + 7) / 8, (128 + 3) / 4 };
+ m_pContext->Dispatch((_uint)vGroupCount.x, (_uint)vGroupCount.y, (_uint)vGroupCount.z);
+
+ ID3D11ShaderResourceView* nullSRV = { nullptr };
+ ID3D11UnorderedAccessView* nullUAV = { nullptr };
+ // Reset
+ m_pContext->CSSetShaderResources(0, 1, &nullSRV);
+ m_pContext->CSSetUnorderedAccessViews(0, 1, &nullUAV, nullptr);
+ m_pContext->CSSetShader(nullptr, nullptr, 0);
+}
+
+HRESULT CVolumetric::Dispatch()
+{
+#ifdef _DEBUG
+ Describe_Entity();
+#endif // _DEBUG
+
+ Cumpute_Volume();
+
+ Accumulate_Volume();
+
+ return S_OK;
+
+}
+
+CVolumetric* CVolumetric::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+{
+ CVolumetric* pInstance = new CVolumetric(pDevice, pContext);
+
+ if (FAILED(pInstance->Initialize()))
+ {
+ MSG_BOX("Failed to Created : CVolumetric");
+ SAFE_RELEASE(pInstance);
+ }
+
+ return pInstance;
+}
+
+void CVolumetric::Free()
+{
+ __super::Free();
+
+ SAFE_RELEASE(m_pConstantBuffer);
+ SAFE_RELEASE(m_pLightInfoBuffer);
+
+ SAFE_RELEASE(m_pAccVolumeUAV);
+ SAFE_RELEASE(m_pAccVolumeSRV);
+ SAFE_RELEASE(m_pVolumeUAV);
+ SAFE_RELEASE(m_pVolumeSRV);
+ SAFE_RELEASE(m_pTexture3D);
+ SAFE_RELEASE(m_pAccumulateTexture3D);
+
+ SAFE_RELEASE(m_pCSBlobCalculate);
+ SAFE_RELEASE(m_pCSVolumeCalculate);
+ SAFE_RELEASE(m_pCSVolumeAccumulate);
+ SAFE_RELEASE(m_pCSBlobAccumulate);
+
+ SAFE_RELEASE(m_pDevice);
+ SAFE_RELEASE(m_pContext);
+ SAFE_RELEASE(m_pGameInstance);
+}
+
+#ifdef _DEBUG
+void CVolumetric::Describe_Entity()
+{
+ _bool open = true;
+ GUI::Begin("SYSTEM", &open, IMGUI_GLOBAL_BEGIN_FLAG);
+ if (GUI::CollapsingHeader("VOLUMETRIC")) {
+ GUI::SliderFloat("Density", &m_fDensity,0.01f, 5.f);
+ GUI::SliderFloat("LightIntensity", &m_fLightIntensity, 0.01f, 5.f);
+ GUI::SliderFloat("AsymmetryParameter", &m_fAsymmetryParameter, 0.01f, 5.f);
+ GUI::SliderFloat("DepthPackExponent", &m_fDepthPackExponent, 0.01f, 5.f);
+ }
+ GUI::End();
+
+
+}
+#endif // _DEBUG
+
+HRESULT CVolumetric::CreateComputeShader()
+{
+ if (FAILED(m_pDevice->CreateComputeShader(
+ m_pCSBlobCalculate->GetBufferPointer(), // 컴파일된 쉐이더 코드
+ m_pCSBlobCalculate->GetBufferSize(), // 코드 길이
+ nullptr, // 클래스 인스턴스 (없음)
+ &m_pCSVolumeCalculate // 컴퓨트 쉐이더 객체
+ )))
+ return E_FAIL;
+
+ if (FAILED(m_pDevice->CreateComputeShader(
+ m_pCSBlobAccumulate->GetBufferPointer(),
+ m_pCSBlobAccumulate->GetBufferSize(),
+ nullptr,
+ &m_pCSVolumeAccumulate
+ )))
+ return E_FAIL;
+
+ return S_OK;
+}
+
+HRESULT CVolumetric::CreateBlob()
+{
+ UINT HLSLFlags = {};
+#ifdef _DEBUG
+ HLSLFlags |= D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION;
+#else
+ HLSLFlags = D3DCOMPILE_OPTIMIZATION_LEVEL1;
+#endif // _DEBUG
+
+ if(FAILED(D3DCompileFromFile(TEXT("../Bin/Resources/ShaderFiles/Shader_Volumetric_Compute.hlsl"),
+ nullptr,
+ D3D_COMPILE_STANDARD_FILE_INCLUDE,
+ "CS_MAIN",
+ "cs_5_0",
+ HLSLFlags,
+ 0,
+ &m_pCSBlobCalculate,
+ nullptr)))
+ return E_FAIL;
+
+ if (FAILED(D3DCompileFromFile(TEXT("../Bin/Resources/ShaderFiles/Shader_Volumetric_Accumulate.hlsl"),
+ nullptr,
+ D3D_COMPILE_STANDARD_FILE_INCLUDE,
+ "CS_MAIN",
+ "cs_5_0",
+ HLSLFlags,
+ 0,
+ &m_pCSBlobAccumulate,
+ nullptr)))
+ return E_FAIL;
+
+ return S_OK;
+}
+
+HRESULT CVolumetric::CreateBuffers()
+{
+ //컨스턴트 버퍼 생성
+ D3D11_BUFFER_DESC cbDesc = {};
+ cbDesc.Usage = D3D11_USAGE_DYNAMIC;
+ cbDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
+ cbDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
+ cbDesc.ByteWidth = sizeof(CS_VOLUME_CONSTANT_DESC);
+
+ D3D11_SUBRESOURCE_DATA CBInitialDesc = {};
+
+ if (FAILED(m_pDevice->CreateBuffer(&cbDesc, nullptr, &m_pConstantBuffer)))
+ return E_FAIL;
+
+ D3D11_MAPPED_SUBRESOURCE ConstantSubResource = {};
+
+ if (FAILED(m_pContext->Map(m_pConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &ConstantSubResource)))
+ {
+ MSG_BOX("Failed to Map : CVolumetric");
+ }
+ else
+ {
+ CS_VOLUME_CONSTANT_DESC* pDesc = static_cast(ConstantSubResource.pData);
+
+ pDesc->VolumeSize = { 160, 90, 128 };
+ pDesc->fDepthPackExponent = m_fDepthPackExponent;
+
+ pDesc->fTemporalAccum = 0.f;
+ pDesc->fFrameIndex = 0.f;
+
+ pDesc->fNear = m_pGameInstance->Get_CameraNear();
+ pDesc->fFar = *(m_pGameInstance->Get_CurrentCameraFar());
+
+ memcpy(&pDesc->vCameraPosition, m_pGameInstance->Get_CamPosition(), sizeof(_float3));
+ pDesc->fDensity = m_fDensity;
+ pDesc->fLightIntensity = m_fLightIntensity;
+
+ // GetLingtInfo ....................
+ pDesc->vLightDirection = _float3(0.f, 0.577f, 0.f);
+ pDesc->vLightColor = _float4(1.f, 1.f, 1.f, 1.f);
+
+ XMStoreFloat4x4(&pDesc->InvProjMatrix, m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ_INV));
+ XMStoreFloat4x4(&pDesc->InvViewMatrix, m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW_INV));
+
+ pDesc->fAsymmetryParameter = 0.0f;
+ pDesc->padding0 = 0.f;
+ pDesc->padding1 = 0.f;
+ pDesc->padding2 = 0.f;
+
+ m_pContext->Unmap(m_pConstantBuffer, 0);
+ }
+
+ return S_OK;
+}
+
+HRESULT CVolumetric::CreateResourceViews()
+{
+ D3D11_TEXTURE3D_DESC TextureDesc{};
+
+ TextureDesc.Width = 160;
+ TextureDesc.Height = 90;
+ TextureDesc.Depth = 128; // 64 or 128
+ TextureDesc.MipLevels = 1;
+ TextureDesc.Format = DXGI_FORMAT_R16G16B16A16_FLOAT;
+ TextureDesc.Usage = D3D11_USAGE_DEFAULT;
+ TextureDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_UNORDERED_ACCESS;
+ TextureDesc.CPUAccessFlags = 0;
+ TextureDesc.MiscFlags = 0;
+
+ if (FAILED(m_pDevice->CreateTexture3D(&TextureDesc, nullptr, &m_pTexture3D))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pDevice->CreateTexture3D(&TextureDesc, nullptr, &m_pAccumulateTexture3D))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pDevice->CreateShaderResourceView(m_pTexture3D, nullptr, &m_pVolumeSRV))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pDevice->CreateShaderResourceView(m_pAccumulateTexture3D, nullptr, &m_pAccVolumeSRV))) {
+ return E_FAIL;
+ }
+
+ D3D11_UNORDERED_ACCESS_VIEW_DESC UAV_Decs{};
+
+ UAV_Decs.ViewDimension = D3D11_UAV_DIMENSION_TEXTURE3D;
+ UAV_Decs.Format = DXGI_FORMAT_R16G16B16A16_FLOAT;
+ UAV_Decs.Texture3D.FirstWSlice = 0;
+ UAV_Decs.Texture3D.MipSlice = 0;
+ UAV_Decs.Texture3D.WSize = TextureDesc.Depth;
+
+ if (FAILED(m_pDevice->CreateUnorderedAccessView(m_pTexture3D, &UAV_Decs, &m_pVolumeUAV)))
+ return E_FAIL;
+
+ if (FAILED(m_pDevice->CreateUnorderedAccessView(m_pAccumulateTexture3D, &UAV_Decs, &m_pAccVolumeUAV)))
+ return E_FAIL;
+
+ return S_OK;
+}
+
diff --git a/Jusin154_Team3D/Engine/Public/Camera_Manager.h b/Jusin154_Team3D/Engine/Public/Camera_Manager.h
index c992083e1..e599912ee 100644
--- a/Jusin154_Team3D/Engine/Public/Camera_Manager.h
+++ b/Jusin154_Team3D/Engine/Public/Camera_Manager.h
@@ -18,6 +18,7 @@ class CCamera_Manager final : public CBase
HRESULT IsBinded_Camera(const _wstring& wstrCameraKey);
_vector Get_CameraLook();
_float Get_CameraFov();
+ _float Get_CameraNear() const { return m_fNear; }
void Force_CamPosition(_fvector vPos);
@@ -35,6 +36,7 @@ class CCamera_Manager final : public CBase
_wstring m_wstrCurrentCameraKey = {};
_float m_fFar = 500.f;
+ _float m_fNear = 0.1f;
private:
HRESULT Initialize(_uint iLevelNumber);
diff --git a/Jusin154_Team3D/Engine/Public/Engine_Enum.h b/Jusin154_Team3D/Engine/Public/Engine_Enum.h
index cd00e7d01..422570c33 100644
--- a/Jusin154_Team3D/Engine/Public/Engine_Enum.h
+++ b/Jusin154_Team3D/Engine/Public/Engine_Enum.h
@@ -51,7 +51,7 @@ enum class SHADER_PASS_DEFERRED { DEBUG, DIRECTIONAL, POINT, COMBINED, BLUR, SPO
POSTCOMBINED, FOG, TONE_MAPPING, SSAO_OCCLUSION, SSAO_BLUR, MOTIONBLUR, DOWNSAMPLE, MOTIONBLURTILE, MOTIONBLURTENT,
END };
-enum class SHADER_PASS_BLUR { BLUR_X , BLUR_Y , END};
+enum class SHADER_PASS_BLUR { BLUR_X , BLUR_Y , COMBINED, END};
enum class TEXTURE_MOUNT_SLOT0 { NOT_DEFINED, METALLIC, SPECULAR, HEIGHT, END };
enum class TEXTURE_MOUNT_SLOT1 { NOT_DEFINED, ROUGHNESS, END };
@@ -124,6 +124,7 @@ enum class PXOBJECT : _uint {
#pragma endregion
#pragma region PLAYER
PLAYER = 10,
+ AI,
#pragma endregion
#pragma region MONSTER
MONSTER = 30,
@@ -183,6 +184,7 @@ enum class PXOBJECT : _uint {
DOOR,
BUILDING,
BOX,
+ RACERING,
#pragma endregion
#pragma region NPC
NPC = 500,
diff --git a/Jusin154_Team3D/Engine/Public/Engine_Macro.h b/Jusin154_Team3D/Engine/Public/Engine_Macro.h
index 142b201d4..b4c869e2e 100644
--- a/Jusin154_Team3D/Engine/Public/Engine_Macro.h
+++ b/Jusin154_Team3D/Engine/Public/Engine_Macro.h
@@ -96,6 +96,9 @@
#define CS_EFFECT TEXT("CS_EFFECT")
#define CS_INSTANCE_MODEL TEXT("CS_INSTANCE_MODEL")
+#define CS_MODEL TEXT("CS_MODEL")
+#define CS_LOCAL TEXT("CS_LOCAL")
+
#define SAFE_ADDREF(pInstance) Safe_AddRef(pInstance)
#define SAFE_RELEASE(pInstance) Safe_Release(pInstance)
@@ -112,7 +115,8 @@
#define SSAO_SAMPLE_NUMBER 64
#define TIMER_SHORT_LERP 0.16f
-
+#define MRO_PARAMETER 2.f/ 27.f
+#define SRO_PARAMETER 15.f/ 27.f
constexpr unsigned int g_iNearShadowWidth = 8192;
constexpr unsigned int g_iNearShadowHeight = 4096;
diff --git a/Jusin154_Team3D/Engine/Public/GameInstance.h b/Jusin154_Team3D/Engine/Public/GameInstance.h
index 978624970..f85551935 100644
--- a/Jusin154_Team3D/Engine/Public/GameInstance.h
+++ b/Jusin154_Team3D/Engine/Public/GameInstance.h
@@ -196,6 +196,7 @@ class ENGINE_DLL CGameInstance final : public CBase
HRESULT IsBinded_Camera(const _wstring& strCameraKey);
_vector Get_CameraLook();
_float Get_CameraFov();
+ _float Get_CameraNear();
const _float* Get_CurrentCameraFar();
void Force_CamPosition(_fvector vPos);
#pragma endregion
@@ -265,6 +266,11 @@ class ENGINE_DLL CGameInstance final : public CBase
_float FontSizeX(const _wstring& strFontTag, const _tchar* pText);
#pragma endregion
+#pragma region VOLUMETRIC
+ ID3D11ShaderResourceView* Get_VolumeSRV();
+ _float* Get_DepthPackExponentPtr();
+#pragma endregion
+
public:
void Add_ModelToMap(const _char* filePath, CModel* pModel);
@@ -304,6 +310,7 @@ class ENGINE_DLL CGameInstance final : public CBase
class CFog* m_pFog = { nullptr };
class CResource_Manager* m_pResource_Manager = { nullptr };
class CFont_Manager* m_pFont_Manager = { nullptr };
+ class CVolumetric* m_pVolumetric = { nullptr };
mt19937 m_Rng{ random_device{}() };
_float2 m_vViewPortSize = {};
diff --git a/Jusin154_Team3D/Engine/Public/Instance_Model.h b/Jusin154_Team3D/Engine/Public/Instance_Model.h
index 9eac36571..50fe8e1a0 100644
--- a/Jusin154_Team3D/Engine/Public/Instance_Model.h
+++ b/Jusin154_Team3D/Engine/Public/Instance_Model.h
@@ -275,6 +275,7 @@ class ENGINE_DLL CInstance_Model final : public CComponent
HRESULT Bind_CS_Output(_uint Index, _uint iBufferIndex);
public:
void Set_TimeMult(_float fTimeMult) { m_InstanceDesc.fTimeMult = fTimeMult; }
+ void Set_Loop(_bool isLoop) { m_InstanceDesc.isLoop = isLoop; }
private:
bool LoadData(const _char* filename);
diff --git a/Jusin154_Team3D/Engine/Public/Model.h b/Jusin154_Team3D/Engine/Public/Model.h
index f35f45a51..ad89d1f19 100644
--- a/Jusin154_Team3D/Engine/Public/Model.h
+++ b/Jusin154_Team3D/Engine/Public/Model.h
@@ -169,32 +169,32 @@ class ENGINE_DLL CModel final : public CComponent
vector<_bool> m_CPUBoneMask;
// 바이너리
- SaveModel* m_pSaveModel = { nullptr };
+ SaveModel* m_pSaveModel = { nullptr };
//
- vector<_float4x4> m_BoneMatrix;
+ vector<_float4x4> m_BoneMatrix;
- _float3 m_vPrevRootPos = { 0.f, 0.f, 0.f };
- _float4 m_vPrevRootRot = { 0.f, 0.f, 0.f,0.f };
- _matrix m_BoneTransformationMatrix = {};
- _float4 m_vInitialRootRot = {};
+ _float3 m_vPrevRootPos = { 0.f, 0.f, 0.f };
+ _float4 m_vPrevRootRot = { 0.f, 0.f, 0.f,0.f };
+ _matrix m_BoneTransformationMatrix = {};
+ _float4 m_vInitialRootRot = {};
- _float m_fRadius = { 0.f }; // 컬링용 Radius
- _int m_iRootBoneIndex = { -1 }; // 루트본의 인덱스
- _int m_iIndexAnimPlayableMesh = { -1 };
- _vector m_vector[3];
+ _float m_fRadius = { 0.f }; // 컬링용 Radius
+ _int m_iRootBoneIndex = { -1 }; // 루트본의 인덱스
+ _int m_iIndexAnimPlayableMesh = { -1 };
+ _vector m_vector[3];
- vector<_uint> m_iBoneMask;
- _bool m_bInitialRootPos = { false };
- _bool m_bInitialRootRotSaved = { false };
- _bool m_bLoopRestarted = false;
- _bool m_bIsSecondFinishedAnim = { false };
- _bool m_bIsSecondLoop = { false };
- _bool m_bRatio = { false };
- _bool m_bRootBone = {};
- _float4x4 m_RootMatrix = {};
- _bool m_bTemp = {false};
+ vector<_uint> m_iBoneMask;
+ _bool m_bInitialRootPos = { false };
+ _bool m_bInitialRootRotSaved = { false };
+ _bool m_bLoopRestarted = false;
+ _bool m_bIsSecondFinishedAnim = { false };
+ _bool m_bIsSecondLoop = { false };
+ _bool m_bRatio = { false };
+ _bool m_bRootBone = {};
+ _float4x4 m_RootMatrix = {};
+ _bool m_bTemp = {false};
private:
diff --git a/Jusin154_Team3D/Engine/Public/PhysX_Manager.h b/Jusin154_Team3D/Engine/Public/PhysX_Manager.h
index a5897fa25..bdfb0cc60 100644
--- a/Jusin154_Team3D/Engine/Public/PhysX_Manager.h
+++ b/Jusin154_Team3D/Engine/Public/PhysX_Manager.h
@@ -31,6 +31,7 @@ class CPhysX_Manager final : public CBase
_bool SphereCast(_float fRadius, _float3 vStartPos, _float3 vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer);
_bool SphereCast(_float fRadius, _fvector vStartPos, _gvector vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer);
+ // _bool Overlap(_float fRadius, _fvector vStartPos, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer);
_bool RayCast(_float3 _vStartPos, _float3 _vDir, _float fDistance, PSX::PxRaycastHit* pRayHitArray, _uint iMaxHitCapacity, _uint& iOutHitCount);
_bool RayCast(_fvector _vStartPos, _fvector _vDir, _float fDistance, PSX::PxRaycastHit* pRayHitArray, _uint iMaxHitCapacity, _uint& iOutHitCount);
diff --git a/Jusin154_Team3D/Engine/Public/Transform.h b/Jusin154_Team3D/Engine/Public/Transform.h
index a6bafbad2..10a39b46a 100644
--- a/Jusin154_Team3D/Engine/Public/Transform.h
+++ b/Jusin154_Team3D/Engine/Public/Transform.h
@@ -21,6 +21,7 @@ class ENGINE_DLL CTransform final :
public:
HRESULT Bind_ShaderResource(class CShader* pShader, const _char* pConstantName) const;
+ void Set_Radius(_float& fRadius) { m_fRadius = fRadius; }
void Set_Scale(_float3& vScale);
void Mult_Scale(_float3& vScale);
void Set_State(STATE eState, _fvector vState) { XMStoreFloat4(reinterpret_cast<_float4*>(&m_WorldMatrix.m[ENUM_CLASS(eState)]), vState); }
@@ -83,9 +84,12 @@ class ENGINE_DLL CTransform final :
void LookAt_Horizontal(_fvector vAt);
_float TargetDis(_fvector vTarget);
-
void Add_SpeedPerSec(_float fSpeedPerSec);
+#ifdef _DEBUG
+ _float3& Get_Rotation() { return m_vRotation; }
+#endif // _DEBUG
+
private:
_float m_fSpeedPerSec = {};
_float m_fRotationPerSec = {};
@@ -97,7 +101,7 @@ class ENGINE_DLL CTransform final :
_float3 m_vBackMomentum = {}; // 다음 프레임에 계산될 이동량
#ifdef _DEBUG
- _float3 m_vRotation = {};
+ _float3 m_vRotation = {0.f, 0.f, 0.f};
#endif // _DEBUG
@@ -105,7 +109,6 @@ class ENGINE_DLL CTransform final :
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
-
public:
static CTransform* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;
diff --git a/Jusin154_Team3D/Engine/Public/Volumetric.h b/Jusin154_Team3D/Engine/Public/Volumetric.h
new file mode 100644
index 000000000..dcf75c0d0
--- /dev/null
+++ b/Jusin154_Team3D/Engine/Public/Volumetric.h
@@ -0,0 +1,99 @@
+#pragma once
+
+#include "Base.h"
+#include "RenderEventDebugger.h"
+NS_BEGIN(Engine)
+
+class CVolumetric final : public CBase
+{
+ typedef struct tagCSVolumeConstantDesc
+ {
+ XMUINT3 VolumeSize;
+ _float fDepthPackExponent; // 깊이 비선형 분포 지수 2.0 정도
+
+ _float fTemporalAccum; // Temporal 사용 여부 off :0 /On: 1
+ _float fFrameIndex;
+ _float fNear;
+ _float fFar;
+
+ _float3 vCameraPosition;
+ _float fDensity;
+
+ _float fLightIntensity;
+ _float3 vLightDirection;
+
+ _float4 vLightColor;
+
+ _float4x4 InvProjMatrix;
+ _float4x4 InvViewMatrix;
+
+ _float fAsymmetryParameter;
+ _float padding0;
+ _float padding1;
+ _float padding2;
+ }CS_VOLUME_CONSTANT_DESC;
+
+
+private:
+ CVolumetric(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual ~CVolumetric() = default;
+
+public:
+ HRESULT Initialize();
+ void Update();
+ void Cumpute_Volume();
+ void Accumulate_Volume();
+ HRESULT Dispatch();
+
+ ID3D11ShaderResourceView* Get_VolumeSRV() { return m_pAccVolumeSRV; }
+ _float* Get_DepthPackExponentPtr() { return &m_fDepthPackExponent; }
+private:
+ class CGameInstance* m_pGameInstance = { nullptr };
+ ID3D11Device* m_pDevice = { nullptr };
+ ID3D11DeviceContext* m_pContext = { nullptr };
+ ID3D11Texture3D* m_pTexture3D = { nullptr };
+ ID3D11Texture3D* m_pAccumulateTexture3D = { nullptr };
+
+ ID3D11ShaderResourceView* m_pVolumeSRV = {nullptr};
+ ID3D11UnorderedAccessView* m_pVolumeUAV = { nullptr };
+
+ ID3D11ShaderResourceView* m_pAccVolumeSRV = {nullptr};
+ ID3D11UnorderedAccessView* m_pAccVolumeUAV = { nullptr };
+
+ ID3D11Buffer* m_pConstantBuffer = { nullptr };
+ ID3D11Buffer* m_pLightInfoBuffer = { nullptr };
+
+ ID3D11ComputeShader* m_pCSVolumeCalculate = { nullptr };
+ ID3DBlob* m_pCSBlobCalculate = { nullptr };
+
+ ID3D11ComputeShader* m_pCSVolumeAccumulate = { nullptr };
+ ID3DBlob* m_pCSBlobAccumulate = { nullptr };
+
+ _float m_fDensity = { 0.5f };
+ _float m_fLightIntensity = { 1.f };
+ _float m_fAsymmetryParameter = { 0.2f };
+ _float m_fDepthPackExponent = { 2.f };
+
+#ifdef _DEBUG
+ class CRenderEventDebugger m_AnnotationHelper = {};
+
+#endif // _DEBUG
+
+
+private:
+ HRESULT CreateComputeShader();
+ HRESULT CreateBlob();
+ HRESULT CreateBuffers();
+ HRESULT CreateResourceViews();
+
+public:
+ static CVolumetric* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ virtual void Free();
+
+#ifdef _DEBUG
+ void Describe_Entity();
+#endif // _DEBUG
+
+};
+
+NS_END