@@ -166,6 +166,7 @@ call Update_Resources.bat
|
|||||||
<ClInclude Include="..\Public\CallBack_NonPlayable_Behavior.h" />
|
<ClInclude Include="..\Public\CallBack_NonPlayable_Behavior.h" />
|
||||||
<ClInclude Include="..\Public\CallBack_NonPlayable_HitReport.h" />
|
<ClInclude Include="..\Public\CallBack_NonPlayable_HitReport.h" />
|
||||||
<ClInclude Include="..\Public\CallBack_Ranrok_HitReport.h" />
|
<ClInclude Include="..\Public\CallBack_Ranrok_HitReport.h" />
|
||||||
|
<ClInclude Include="..\Public\Ranrok_FireBall.h" />
|
||||||
<ClInclude Include="..\public\Dialogue.h" />
|
<ClInclude Include="..\public\Dialogue.h" />
|
||||||
<ClInclude Include="..\public\Dialogue_Font.h" />
|
<ClInclude Include="..\public\Dialogue_Font.h" />
|
||||||
<ClInclude Include="..\public\NPCInteraction.h" />
|
<ClInclude Include="..\public\NPCInteraction.h" />
|
||||||
@@ -405,6 +406,7 @@ call Update_Resources.bat
|
|||||||
<ClCompile Include="..\Private\CallBack_NonPlayable_Behavior.cpp" />
|
<ClCompile Include="..\Private\CallBack_NonPlayable_Behavior.cpp" />
|
||||||
<ClCompile Include="..\Private\CallBack_NonPlayable_HitReport.cpp" />
|
<ClCompile Include="..\Private\CallBack_NonPlayable_HitReport.cpp" />
|
||||||
<ClCompile Include="..\Private\CallBack_Ranrok_HitReport.cpp" />
|
<ClCompile Include="..\Private\CallBack_Ranrok_HitReport.cpp" />
|
||||||
|
<ClCompile Include="..\Private\Ranrok_FireBall.cpp" />
|
||||||
<ClCompile Include="..\private\Dialogue.cpp" />
|
<ClCompile Include="..\private\Dialogue.cpp" />
|
||||||
<ClCompile Include="..\private\Dialogue_Font.cpp" />
|
<ClCompile Include="..\private\Dialogue_Font.cpp" />
|
||||||
<ClCompile Include="..\private\NPCInteraction.cpp" />
|
<ClCompile Include="..\private\NPCInteraction.cpp" />
|
||||||
|
|||||||
@@ -722,6 +722,9 @@
|
|||||||
<ClInclude Include="..\Public\State_FireBall.h">
|
<ClInclude Include="..\Public\State_FireBall.h">
|
||||||
<Filter>04.Mechanic\State\State_Combat\State_FireBall</Filter>
|
<Filter>04.Mechanic\State\State_Combat\State_FireBall</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Public\Ranrok_FireBall.h">
|
||||||
|
<Filter>02.GameObjects\Effect\MonsterEffect\Ranrok</Filter>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="..\public\NPCInteraction.h">
|
<ClInclude Include="..\public\NPCInteraction.h">
|
||||||
<Filter>02.GameObjects\UI\NPCInteraction</Filter>
|
<Filter>02.GameObjects\UI\NPCInteraction</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -1512,6 +1515,9 @@
|
|||||||
<Filter Include="02.GameObjects\PhysX\CallBack\HitReport\Monster\Ranrok">
|
<Filter Include="02.GameObjects\PhysX\CallBack\HitReport\Monster\Ranrok">
|
||||||
<UniqueIdentifier>{93545681-c4c5-4a6a-9496-7b2e7b8a9302}</UniqueIdentifier>
|
<UniqueIdentifier>{93545681-c4c5-4a6a-9496-7b2e7b8a9302}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter Include="02.GameObjects\Effect\MonsterEffect\Ranrok">
|
||||||
|
<UniqueIdentifier>{087ad9ea-445d-4bf7-8ec4-0f29a0c2dd53}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
<Filter Include="02.GameObjects\UI\NPCInteraction">
|
<Filter Include="02.GameObjects\UI\NPCInteraction">
|
||||||
<UniqueIdentifier>{09764279-bf54-48e4-853a-45b5a65c92a7}</UniqueIdentifier>
|
<UniqueIdentifier>{09764279-bf54-48e4-853a-45b5a65c92a7}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
@@ -2199,6 +2205,9 @@
|
|||||||
<ClCompile Include="..\Private\CallBack_Ranrok_HitReport.cpp">
|
<ClCompile Include="..\Private\CallBack_Ranrok_HitReport.cpp">
|
||||||
<Filter>02.GameObjects\PhysX\CallBack\HitReport\Monster\Ranrok</Filter>
|
<Filter>02.GameObjects\PhysX\CallBack\HitReport\Monster\Ranrok</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Private\Ranrok_FireBall.cpp">
|
||||||
|
<Filter>02.GameObjects\Effect\MonsterEffect\Ranrok</Filter>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="..\private\NPCInteraction.cpp">
|
<ClCompile Include="..\private\NPCInteraction.cpp">
|
||||||
<Filter>02.GameObjects\UI\NPCInteraction</Filter>
|
<Filter>02.GameObjects\UI\NPCInteraction</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
|||||||
@@ -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<CComponent**>(&m_pNormal_TextureCom))))
|
||||||
|
{
|
||||||
|
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_strModelName = EffectSaveInfo.wstrModelName;
|
m_strModelName = EffectSaveInfo.wstrModelName;
|
||||||
|
|
||||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), m_strModelName,
|
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<CComponent**>(&m_pNormal_TextureCom))))
|
||||||
|
{
|
||||||
|
CloseHandle(hFile);
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t iComponentLength = {};
|
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))) {
|
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||||
@@ -1053,7 +1101,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;
|
return S_OK;
|
||||||
@@ -1106,6 +1169,8 @@ void CEffectObject::Free()
|
|||||||
SAFE_RELEASE(m_pDissolve_TextureCom);
|
SAFE_RELEASE(m_pDissolve_TextureCom);
|
||||||
SAFE_RELEASE(m_pEmissive_TextureCom);
|
SAFE_RELEASE(m_pEmissive_TextureCom);
|
||||||
SAFE_RELEASE(m_pDistortion_TextureCom);
|
SAFE_RELEASE(m_pDistortion_TextureCom);
|
||||||
|
SAFE_RELEASE(m_pNormal_TextureCom);
|
||||||
|
SAFE_RELEASE(m_pSurface_TextureCom);
|
||||||
|
|
||||||
SAFE_RELEASE(m_pShaderCom);
|
SAFE_RELEASE(m_pShaderCom);
|
||||||
SAFE_RELEASE(m_pInstance_ModelCom);
|
SAFE_RELEASE(m_pInstance_ModelCom);
|
||||||
|
|||||||
@@ -119,6 +119,12 @@ HRESULT CEffectParts::Ready_Components(void* pArg)
|
|||||||
{
|
{
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Base_MRO"),
|
||||||
|
reinterpret_cast<CComponent**>(&m_pSurface_TextureCom))))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
#include "Blink.h"
|
#include "Blink.h"
|
||||||
#include "Transformation.h"
|
#include "Transformation.h"
|
||||||
#include "Avadakedavra.h"
|
#include "Avadakedavra.h"
|
||||||
|
#include "Ranrok_FireBall.h"
|
||||||
|
|
||||||
CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
: CGameObject(pDevice, pContext)
|
: CGameObject(pDevice, pContext)
|
||||||
@@ -560,6 +560,17 @@ HRESULT CEffectPool::Ready_MonsterEffect()
|
|||||||
|
|
||||||
))) return E_FAIL;
|
))) 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<CRanrok_FireBall>(iPrototypeLevel, nullptr);
|
||||||
|
|
||||||
|
return pEffect; }
|
||||||
|
|
||||||
|
))) return E_FAIL;
|
||||||
|
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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 = {};
|
size_t iComponentLength = {};
|
||||||
|
|||||||
@@ -180,6 +180,7 @@
|
|||||||
#include "Mage_Down_Attack.h"
|
#include "Mage_Down_Attack.h"
|
||||||
#include "Mage_Nomal_Attack.h"
|
#include "Mage_Nomal_Attack.h"
|
||||||
#include "MageSide.h"
|
#include "MageSide.h"
|
||||||
|
#include "Ranrok_FireBall.h"
|
||||||
|
|
||||||
#include "StunEffect.h"
|
#include "StunEffect.h"
|
||||||
#include "Box_Splesh.h"
|
#include "Box_Splesh.h"
|
||||||
@@ -1419,6 +1420,11 @@ HRESULT CLoader::Loading_For_GamePlay()
|
|||||||
return E_FAIL;
|
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
|
#pragma region EFFECT
|
||||||
|
|
||||||
Asset_FileLoad("../Bin/Resources/Textures/Effect/Trails", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) {
|
Asset_FileLoad("../Bin/Resources/Textures/Effect/Trails", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) {
|
||||||
@@ -1981,6 +1987,10 @@ HRESULT CLoader::Loading_For_GamePlay()
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FAILED(m_pGameInstance->Add_Prototype<CRanrok_FireBall>(g_iStaticLevel, CRanrok_FireBall::Create(m_pDevice, m_pContext)))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Teleport>(g_iStaticLevel, CGoblin_Teleport::Create(m_pDevice, m_pContext)))) {
|
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Teleport>(g_iStaticLevel, CGoblin_Teleport::Create(m_pDevice, m_pContext)))) {
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ CMage_Nomal_Attack::CMage_Nomal_Attack(const CMage_Nomal_Attack& rhs)
|
|||||||
|
|
||||||
HRESULT CMage_Nomal_Attack::Initialize_Prototype()
|
HRESULT CMage_Nomal_Attack::Initialize_Prototype()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/NomalAttack")))
|
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/GoblinMage/NomalAttack")))
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
|
|||||||
@@ -62,8 +62,8 @@ HRESULT CRanrok::Initialize(void* pArg)
|
|||||||
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||||
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody,&m_bCollisionPlayer);
|
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody,&m_bCollisionPlayer);
|
||||||
|
|
||||||
//m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object<CEffectPool>();
|
m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object<CEffectPool>();
|
||||||
//SAFE_ADDREF(m_pEffectPool);
|
SAFE_ADDREF(m_pEffectPool);
|
||||||
|
|
||||||
if (NEXT_LEVEL == ENUM_CLASS(LEVEL::FIELD))
|
if (NEXT_LEVEL == ENUM_CLASS(LEVEL::FIELD))
|
||||||
{
|
{
|
||||||
@@ -646,7 +646,7 @@ void CRanrok::Free()
|
|||||||
|
|
||||||
SAFE_RELEASE(m_pCharacter_Controller);
|
SAFE_RELEASE(m_pCharacter_Controller);
|
||||||
SAFE_RELEASE(m_pRigidBody);
|
SAFE_RELEASE(m_pRigidBody);
|
||||||
//SAFE_RELEASE(m_pEffectPool);
|
SAFE_RELEASE(m_pEffectPool);
|
||||||
Safe_Delete(m_pCallBack_Behavior);
|
Safe_Delete(m_pCallBack_Behavior);
|
||||||
Safe_Delete(m_pCallBack_HitReport);
|
Safe_Delete(m_pCallBack_HitReport);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,249 @@
|
|||||||
|
#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<CEffectParts>("FireBall");
|
||||||
|
m_pFireBall_PT = Get_PartObject<CEffectParts>("FireBall_PT");
|
||||||
|
m_pFireBall_Surface = Get_PartObject<CEffectParts>("FireBall_Surface");
|
||||||
|
m_pFireBall_Tail = Get_PartObject<CEffectParts>("FireBall_Tail");
|
||||||
|
|
||||||
|
SAFE_ADDREF(m_pFireBall);
|
||||||
|
SAFE_ADDREF(m_pFireBall_PT);
|
||||||
|
SAFE_ADDREF(m_pFireBall_Surface);
|
||||||
|
SAFE_ADDREF(m_pFireBall_Tail);
|
||||||
|
|
||||||
|
m_fDuration = 3.2f;
|
||||||
|
|
||||||
|
|
||||||
|
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<CTransform>()->Translation(XMLoadFloat3(&m_vLook) * m_fLinearSpeed);
|
||||||
|
m_pFireBall_PT->Get_Component<CTransform>()->Translation(XMLoadFloat3(&m_vLook) * m_fLinearSpeed);
|
||||||
|
m_pFireBall_Surface->Get_Component<CTransform>()->Translation(XMLoadFloat3(&m_vLook) * m_fLinearSpeed);
|
||||||
|
m_pFireBall_Tail->Get_Component<CTransform>()->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;
|
||||||
|
|
||||||
|
|
||||||
|
/* 초기 객체 비지블*/
|
||||||
|
m_pFireBall->Set_Visible(true);
|
||||||
|
m_pFireBall_PT->Set_Visible(true);
|
||||||
|
m_pFireBall_Surface->Set_Visible(true);
|
||||||
|
m_pFireBall_Tail->Set_Visible(true);
|
||||||
|
|
||||||
|
/* 초기 객체 위치 초기화*/
|
||||||
|
|
||||||
|
_matrix BoneMat = XMLoadFloat4x4(m_pOwner->Get_Component<CModel>()->Get_BoneMatrixPtr("tongue_01_end"));
|
||||||
|
|
||||||
|
for (int i = 0; i < 3; ++i) {
|
||||||
|
BoneMat.r[i] = XMVector3Normalize(BoneMat.r[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
_matrix WorldMat = m_pOwner->Get_Component<CTransform>()->Get_XMWorldMatrix();
|
||||||
|
|
||||||
|
_matrix CombinedMat = BoneMat * WorldMat;
|
||||||
|
|
||||||
|
_vector vStartPos = CombinedMat.r[3];
|
||||||
|
|
||||||
|
XMStoreFloat4(&m_vStartPos, vStartPos);
|
||||||
|
|
||||||
|
m_pFireBall->Get_Component<CTransform>()->Set_State(STATE::POSITION, vStartPos);
|
||||||
|
m_pFireBall_PT->Get_Component<CTransform>()->Set_State(STATE::POSITION, vStartPos);
|
||||||
|
m_pFireBall_Surface->Get_Component<CTransform>()->Set_State(STATE::POSITION, vStartPos);
|
||||||
|
m_pFireBall_Tail->Get_Component<CTransform>()->Set_State(STATE::POSITION, vStartPos);
|
||||||
|
|
||||||
|
|
||||||
|
/* 플레이어 위치 받기 */
|
||||||
|
CUnit* pPlayer = m_pInfoInstance->Get_NearestPlayerAlly(m_pOwner->Get_WorldPostion()).first;
|
||||||
|
|
||||||
|
if (pPlayer == nullptr)
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
/* 초기 방향 */
|
||||||
|
XMStoreFloat4(&m_vTargetPos, pPlayer->Get_Component<CCharacter_Controller>()->Get_Position());
|
||||||
|
XMStoreFloat3(&m_vLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos)));
|
||||||
|
|
||||||
|
|
||||||
|
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<ON_COLLISION_INFO*>(pDesc);
|
||||||
|
|
||||||
|
_vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos);
|
||||||
|
|
||||||
|
|
||||||
|
for (auto& pPair : m_PartObjects)
|
||||||
|
{
|
||||||
|
pPair.second->Set_Visible(true);
|
||||||
|
pPair.second->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
m_pFireBall->Set_Visible(false);
|
||||||
|
m_pFireBall_Surface->Set_Visible(false);
|
||||||
|
|
||||||
|
m_pFireBall_Tail->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
|
||||||
|
m_pFireBall_PT->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f));
|
||||||
|
|
||||||
|
CPlayer* pPlayer = static_cast<CPlayer*>(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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -404,6 +404,12 @@ void CRanrok::Behavior_FireBallEnter()
|
|||||||
pairAnimInfo = m_Animation[STATEANIM::FIREBALL2_A];
|
pairAnimInfo = m_Animation[STATEANIM::FIREBALL2_A];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Add_Event(pairAnimInfo.first,
|
||||||
|
[this]() {
|
||||||
|
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_FIREBALL, this);
|
||||||
|
}, 0.1f);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND))
|
else if (m_ePhase == ENUM_CLASS(RANROK_PHASE::PHASE_GROUND))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -67,6 +67,11 @@ namespace Client
|
|||||||
|
|
||||||
/*고블린 메이지*/
|
/*고블린 메이지*/
|
||||||
GOBLIN_MAGE_ATTACK , GOBLIN_MAGE_DOWN , GOBLIN_MAGE_SIDE,
|
GOBLIN_MAGE_ATTACK , GOBLIN_MAGE_DOWN , GOBLIN_MAGE_SIDE,
|
||||||
|
|
||||||
|
/*란록*/
|
||||||
|
|
||||||
|
RANROK_FIREBALL,
|
||||||
|
|
||||||
END
|
END
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -203,10 +203,10 @@ namespace Client
|
|||||||
_float2 vDissolveUVGainAmount = {};
|
_float2 vDissolveUVGainAmount = {};
|
||||||
_bool isDissolveMove = {};
|
_bool isDissolveMove = {};
|
||||||
|
|
||||||
_float3 vDissolveValue = {};
|
_float3 vDissolveValue = {}; /* Soft Mask , Cut Ratio*/
|
||||||
|
|
||||||
_float fModelDistortIntensity = {};
|
_float fModelDistortIntensity = {};
|
||||||
_float vPadding0 = {};
|
_float fPadding0 = {};
|
||||||
|
|
||||||
_float fLightDeley = {};
|
_float fLightDeley = {};
|
||||||
_float fLightIntensity = {};
|
_float fLightIntensity = {};
|
||||||
@@ -233,7 +233,11 @@ namespace Client
|
|||||||
_bool isDiffuse_B = {};
|
_bool isDiffuse_B = {};
|
||||||
_bool isBlurColor = {};
|
_bool isBlurColor = {};
|
||||||
|
|
||||||
_float vPadding4 = {};
|
_bool isBlurDissolve = {};
|
||||||
|
_bool isNomalMap = {};
|
||||||
|
_bool isPadding2 = {};
|
||||||
|
_bool isPadding3 = {};
|
||||||
|
|
||||||
_float4 vPadding5 = {};
|
_float4 vPadding5 = {};
|
||||||
|
|
||||||
_bool isRimLight = {};
|
_bool isRimLight = {};
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ class CEffectObject abstract : public CPartObject
|
|||||||
CTexture* m_pDissolve_TextureCom = { nullptr };
|
CTexture* m_pDissolve_TextureCom = { nullptr };
|
||||||
CTexture* m_pEmissive_TextureCom = { nullptr };
|
CTexture* m_pEmissive_TextureCom = { nullptr };
|
||||||
CTexture* m_pDistortion_TextureCom = { nullptr };
|
CTexture* m_pDistortion_TextureCom = { nullptr };
|
||||||
|
CTexture* m_pNormal_TextureCom = { nullptr };
|
||||||
|
CTexture* m_pSurface_TextureCom = { nullptr };
|
||||||
|
|
||||||
CShader* m_pShaderCom = { nullptr };
|
CShader* m_pShaderCom = { nullptr };
|
||||||
CLight* m_pLightCom = { nullptr };
|
CLight* m_pLightCom = { nullptr };
|
||||||
@@ -66,6 +68,7 @@ class CEffectObject abstract : public CPartObject
|
|||||||
_wstring m_strModelName = {};
|
_wstring m_strModelName = {};
|
||||||
_wstring m_strEmissiveName = {};
|
_wstring m_strEmissiveName = {};
|
||||||
_wstring m_strDistortionName = {};
|
_wstring m_strDistortionName = {};
|
||||||
|
_wstring m_strNomalMapName = {};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual void Free() override;
|
virtual void Free() override;
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ class CEffect_Container abstract : public CContainerObject
|
|||||||
_wstring wstrDissolveName = {};
|
_wstring wstrDissolveName = {};
|
||||||
_wstring wstrEmissiveName = {};
|
_wstring wstrEmissiveName = {};
|
||||||
_wstring wstrDistortionName = {};
|
_wstring wstrDistortionName = {};
|
||||||
|
_wstring wstrNomalName = {};
|
||||||
_wstring wstrModelName = {};
|
_wstring wstrModelName = {};
|
||||||
|
|
||||||
_wstring wstrEffectName = {};
|
_wstring wstrEffectName = {};
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -4,6 +4,7 @@ matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
|||||||
|
|
||||||
Texture2D g_BlurTexture;
|
Texture2D g_BlurTexture;
|
||||||
Texture2D g_BlurXTexture;
|
Texture2D g_BlurXTexture;
|
||||||
|
Texture2D g_BlurYTexture;
|
||||||
|
|
||||||
float2 g_vResolution;
|
float2 g_vResolution;
|
||||||
|
|
||||||
@@ -79,6 +80,11 @@ struct PS_OUT_BLUR_Y
|
|||||||
float4 vBlurY : SV_TARGET0;
|
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 PS_MAIN_BLUR_X(PS_IN In)
|
||||||
{
|
{
|
||||||
PS_OUT_BLUR_X Out;
|
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);
|
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)
|
if (vColor.a <= FLT_EPSILON5)
|
||||||
discard;
|
discard;
|
||||||
|
|
||||||
Out.vBlurY = vColor;
|
Out.vBackBuffer = vColor;
|
||||||
|
|
||||||
return Out;
|
return Out;
|
||||||
}
|
}
|
||||||
@@ -131,7 +152,7 @@ PS_OUT_BLUR_Y PS_MAIN_BLUR_Y(PS_IN In)
|
|||||||
|
|
||||||
technique11 DefaultTechnique
|
technique11 DefaultTechnique
|
||||||
{
|
{
|
||||||
pass BlurXPass// 4
|
pass BlurXPass// 0
|
||||||
{
|
{
|
||||||
SetRasterizerState(RS_Default);
|
SetRasterizerState(RS_Default);
|
||||||
SetDepthStencilState(DSS_None, 0);
|
SetDepthStencilState(DSS_None, 0);
|
||||||
@@ -141,7 +162,7 @@ technique11 DefaultTechnique
|
|||||||
PixelShader = compile ps_5_0 PS_MAIN_BLUR_X();
|
PixelShader = compile ps_5_0 PS_MAIN_BLUR_X();
|
||||||
}
|
}
|
||||||
|
|
||||||
pass BlurYPass // 4
|
pass BlurYPass // 1
|
||||||
{
|
{
|
||||||
SetRasterizerState(RS_Default);
|
SetRasterizerState(RS_Default);
|
||||||
SetDepthStencilState(DSS_None, 0);
|
SetDepthStencilState(DSS_None, 0);
|
||||||
@@ -151,5 +172,14 @@ technique11 DefaultTechnique
|
|||||||
PixelShader = compile ps_5_0 PS_MAIN_BLUR_Y();
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -404,6 +404,7 @@ PS_OUT PS_MAIN(PS_IN In)
|
|||||||
|
|
||||||
Out.vAlbedo = vMtrlDiffuse;
|
Out.vAlbedo = vMtrlDiffuse;
|
||||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||||
|
|
||||||
float fSurfaceParam = g_fUsingSurfaceParams;
|
float fSurfaceParam = g_fUsingSurfaceParams;
|
||||||
if (true == AlmostEqual7(g_fUsingSurfaceParams, 0.f))
|
if (true == AlmostEqual7(g_fUsingSurfaceParams, 0.f))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -69,10 +69,12 @@ Texture2D g_EmissiveTexture : register(t6);
|
|||||||
Texture2D g_DepthStencilTexture : register(t7);
|
Texture2D g_DepthStencilTexture : register(t7);
|
||||||
Texture2D g_DistortionTexture : register(t8);
|
Texture2D g_DistortionTexture : register(t8);
|
||||||
Texture2D g_DepthTexture : register(t9);
|
Texture2D g_DepthTexture : register(t9);
|
||||||
|
Texture2D g_SurfaceParamsTexture : register(t10);
|
||||||
|
|
||||||
|
|
||||||
float4 g_vCamPosition;
|
float4 g_vCamPosition;
|
||||||
float g_fFar;
|
float g_fFar;
|
||||||
|
float g_fUsingSurfaceParams;
|
||||||
|
|
||||||
/* 디퓨즈 */
|
/* 디퓨즈 */
|
||||||
vector g_vColor;
|
vector g_vColor;
|
||||||
@@ -243,18 +245,41 @@ struct VS_BULR_MESH_OUT
|
|||||||
float4 vPrevProjPos : TEXCOORD5;
|
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;
|
matrix matW, matWV, matWVP;
|
||||||
|
|
||||||
row_major matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation);
|
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);
|
matW = mul(TransformMatrix, g_WorldMatrix);
|
||||||
matWV = mul(matW, g_ViewMatrix);
|
matWV = mul(matW, g_ViewMatrix);
|
||||||
matWVP = mul(matWV, g_ProjMatrix);
|
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,7 +294,7 @@ VS_OUT VS_MAIN(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
|||||||
Out.vWorldPos = mul(vector(In.vPosition, 1.f), matW);
|
Out.vWorldPos = mul(vector(In.vPosition, 1.f), matW);
|
||||||
Out.iGPUIndex = iGPUIndex;
|
Out.iGPUIndex = iGPUIndex;
|
||||||
Out.vProjPos = vPosition;
|
Out.vProjPos = vPosition;
|
||||||
|
Out.vPrevProjPos = mul(vector(In.vPosition, 1.f), matPrevWVP);
|
||||||
|
|
||||||
return Out;
|
return Out;
|
||||||
}
|
}
|
||||||
@@ -390,6 +415,17 @@ struct PS_OUT
|
|||||||
float4 vRevealage : SV_TARGET1;
|
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)
|
float4 DrawEffect(PS_IN In)
|
||||||
{
|
{
|
||||||
vector vMtrlDiffuse = vector(0.f ,0.f ,0.f ,0.f);
|
vector vMtrlDiffuse = vector(0.f ,0.f ,0.f ,0.f);
|
||||||
@@ -807,21 +843,56 @@ float4 SoftEffect(PS_IN In, float4 vMtrlDiffuse)
|
|||||||
return vDiffuse;
|
return vDiffuse;
|
||||||
|
|
||||||
}
|
}
|
||||||
PS_OUT PS_MAIN(PS_IN In)
|
|
||||||
|
PS_NOMAL_OUT PS_MAIN(PS_BLUR_MESH_IN In)
|
||||||
{
|
{
|
||||||
|
PS_IN PS_In;
|
||||||
PS_OUT Out;
|
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;
|
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;
|
float fSurfaceParam = g_fUsingSurfaceParams;
|
||||||
|
if (true == AlmostEqual7(g_fUsingSurfaceParams, 0.f))
|
||||||
Out.vDiffuse = vMtrlDiffuse;
|
{
|
||||||
|
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);
|
||||||
|
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;
|
return Out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1154,19 +1225,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
|
struct PS_BLUR_MESH_OUT
|
||||||
{
|
{
|
||||||
@@ -1217,10 +1276,10 @@ technique11 DefaultTechnique
|
|||||||
//0
|
//0
|
||||||
pass Model
|
pass Model
|
||||||
{
|
{
|
||||||
SetRasterizerState(RS_Default);
|
SetRasterizerState(RS_Nocull);
|
||||||
SetDepthStencilState(DSS_Default, 0);
|
SetDepthStencilState(DSS_Default, 0);
|
||||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
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;
|
GeometryShader = NULL;
|
||||||
PixelShader = compile ps_5_0 PS_MAIN();
|
PixelShader = compile ps_5_0 PS_MAIN();
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 8.4 MiB After Width: | Height: | Size: 8.4 MiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 163 KiB After Width: | Height: | Size: 163 KiB |
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 218 KiB After Width: | Height: | Size: 218 KiB |
|
Before Width: | Height: | Size: 157 KiB After Width: | Height: | Size: 157 KiB |
|
Before Width: | Height: | Size: 234 KiB After Width: | Height: | Size: 234 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 240 KiB After Width: | Height: | Size: 240 KiB |
|
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 109 KiB |
|
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 144 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 3.3 MiB After Width: | Height: | Size: 3.3 MiB |
|
Before Width: | Height: | Size: 671 KiB After Width: | Height: | Size: 671 KiB |
|
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 93 KiB |
|
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 410 KiB After Width: | Height: | Size: 410 KiB |
|
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 154 KiB |
|
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 111 KiB |
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 690 KiB After Width: | Height: | Size: 690 KiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 488 KiB After Width: | Height: | Size: 488 KiB |
|
After Width: | Height: | Size: 1007 KiB |
|
After Width: | Height: | Size: 1.6 MiB |
|
After Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 124 KiB |
|
Before Width: | Height: | Size: 218 KiB After Width: | Height: | Size: 218 KiB |
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 246 KiB After Width: | Height: | Size: 246 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 619 KiB After Width: | Height: | Size: 619 KiB |
|
After Width: | Height: | Size: 219 KiB |
|
After Width: | Height: | Size: 932 KiB |
|
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 6.6 MiB After Width: | Height: | Size: 6.6 MiB |
|
After Width: | Height: | Size: 214 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 6.0 MiB After Width: | Height: | Size: 6.0 MiB |
|
Before Width: | Height: | Size: 2.5 MiB After Width: | Height: | Size: 2.5 MiB |
|
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 2.2 MiB After Width: | Height: | Size: 2.2 MiB |
|
Before Width: | Height: | Size: 549 KiB After Width: | Height: | Size: 549 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 1.7 MiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 779 KiB |
|
After Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 4.6 MiB After Width: | Height: | Size: 4.6 MiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 458 KiB |
|
Before Width: | Height: | Size: 2.1 MiB After Width: | Height: | Size: 2.1 MiB |
|
Before Width: | Height: | Size: 980 KiB After Width: | Height: | Size: 980 KiB |
|
Before Width: | Height: | Size: 9.3 MiB After Width: | Height: | Size: 9.3 MiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 274 KiB |
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |