commit
push
This commit is contained in:
@@ -53,6 +53,11 @@ void CDecendo::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->RewindMomentum();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CDecendo::Update(_float fTimeDelta)
|
||||
@@ -68,6 +73,10 @@ void CDecendo::Update(_float fTimeDelta)
|
||||
m_pProjectile->Get_Component<CTransform>()->Translation(m_vOwnerLook * 0.5f);
|
||||
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->AccumulateMomentum(m_vOwnerLook * 0.5f);
|
||||
}
|
||||
|
||||
|
||||
if (m_fAccTime > XM_2PI)
|
||||
return;
|
||||
@@ -76,6 +85,10 @@ void CDecendo::Update(_float fTimeDelta)
|
||||
|
||||
m_pProjectile_Blur->Get_Component<CTransform>()->Translation(m_vRotateUp * 0.2f * sinf(m_fAccTime));
|
||||
m_pProjectile->Get_Component<CTransform>()->Translation(m_vRotateUp * 0.2f * sinf(m_fAccTime));
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->AccumulateMomentum(m_vRotateUp * 0.2f * sinf(m_fAccTime));
|
||||
}
|
||||
}
|
||||
|
||||
void CDecendo::Late_Update(_float fTimeDelta)
|
||||
@@ -107,7 +120,7 @@ HRESULT CDecendo::Pre_Setting(CGameObject* pObject)
|
||||
m_fPreAccTime = 0.f;
|
||||
|
||||
|
||||
CPartObject* pCircle0 = m_PartObjects.begin()->second;
|
||||
CPartObject* pCircle0 = Get_PartObject<CEffectParts>();
|
||||
|
||||
/* 초기 객체 위치 초기화 */
|
||||
pCircle0->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
@@ -118,7 +131,7 @@ HRESULT CDecendo::Pre_Setting(CGameObject* pObject)
|
||||
pCircle0->Set_Visible(true);
|
||||
m_pProjectile->Set_Visible(true);
|
||||
m_pProjectile_Blur->Set_Visible(true);
|
||||
|
||||
|
||||
/*트레일 초기화 */
|
||||
Get_PartObject<CTrailObject>()->Set_Visible(true);
|
||||
Get_PartObject<CTrailObject>()->Get_Component<CTrail>()->Reset_Trail();
|
||||
@@ -132,7 +145,6 @@ HRESULT CDecendo::Pre_Setting(CGameObject* pObject)
|
||||
_vector vQuaternion = XMQuaternionRotationAxis(m_vOwnerLook, m_pGameInstance->Random_Float(0.f, XM_PIDIV2));
|
||||
|
||||
m_vRotateUp = XMVector3Rotate(vUp, vQuaternion);
|
||||
|
||||
m_vRotateUp = XMVector3Normalize(m_vRotateUp);
|
||||
|
||||
m_bVisible = true;
|
||||
@@ -157,24 +169,18 @@ HRESULT CDecendo::Ready_Child()
|
||||
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
_vector vOwnerLook = m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
|
||||
_float3 vDir = {};
|
||||
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
XMStoreFloat3(&vDir , vOwnerLook * 0.5f);
|
||||
|
||||
Desc.vRotRPY = { 0.f, 0.f, 0.f };
|
||||
Desc.iSubKind = 70;
|
||||
Desc.vDeltaPos = vDir ;
|
||||
Desc.vDeltaPos = _float3(0.f, 0.f, 0.f);
|
||||
Desc.vLifeTime = { 0.f, 1.f };
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPhysXEffectHitBox>(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this , &m_pPhysHitBox))) {
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPhysXEffectHitBox>(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this, &m_pPhysHitBox))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
SAFE_ADDREF(m_pPhysHitBox);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -205,10 +211,10 @@ CGameObject* CDecendo::Clone(void* pArg, CGameObject* pOwner)
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CDecendo::OnCollision(CGameObject* pOther , void* pDesc)
|
||||
void CDecendo::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
//CTransform* pOtherTransform = p
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
|
||||
for (auto& pPair : m_PartObjects)
|
||||
@@ -229,27 +235,28 @@ void CDecendo::OnCollision(CGameObject* pOther , void* pDesc)
|
||||
Get_PartObject<CEffectParts>("Decendo_Down")->Get_Component<CTransform>()->LookAt(vPlayerPos);
|
||||
Get_PartObject<CEffectParts>("Decendo_Smoke")->Get_Component<CTransform>()->LookAt(vPlayerPos);
|
||||
|
||||
m_PartObjects.begin()->second->Set_Visible(false);
|
||||
Get_PartObject<CEffectParts>()->Set_Visible(false);
|
||||
|
||||
Get_PartObject<CTrailObject>()->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f));
|
||||
Get_PartObject<CTrailObject>()->Set_Visible(false);
|
||||
|
||||
|
||||
m_pPhysHitBox->Set_Dead();
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
}
|
||||
|
||||
void CDecendo::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
//if(m_pPhysHitBox != nullptr)
|
||||
// if (m_pPhysHitBox->Get_Depth() == false)
|
||||
// SAFE_RELEASE(m_pPhysHitBox);
|
||||
if (m_pPhysHitBox != nullptr)
|
||||
if (m_pPhysHitBox->isDead() == false)
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
|
||||
SAFE_RELEASE(m_pProjectile_Blur);
|
||||
SAFE_RELEASE(m_pProjectile);
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CDecendo::Describe_Entity()
|
||||
{
|
||||
@@ -263,8 +270,6 @@ void CDecendo::Describe_Entity()
|
||||
|
||||
GUI::End();
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
HRESULT CDecendo::Bind_ShaderResources()
|
||||
{
|
||||
|
||||
@@ -36,14 +36,14 @@ HRESULT CEffectObject::Render()
|
||||
for (_uint i = 0; i < m_pInstance_ModelCom->Get_NumMeshes(); i++)
|
||||
{
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_DepthStencil(m_pShaderCom, "g_DepthStencilTexture")))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(m_EffectInfo.eShaderPass)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_DepthStencil(m_pShaderCom, "g_DepthStencilTexture")))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pInstance_ModelCom->Bind_CS_Output(5, 1)))
|
||||
return E_FAIL;
|
||||
|
||||
@@ -102,12 +102,55 @@ HRESULT CEffectObject::Render_Blur()
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffectObject::Render_Bloom()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fBloomStrength", &m_EffectInfo.fBloomStrength, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iBloomType", &m_EffectInfo.eBloomType, sizeof(_int)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isBloomDissolve", &m_EffectInfo.isBloomDissolve, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isBloomReverseDissolve", &m_EffectInfo.isBloomReverseDissolve, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < m_pInstance_ModelCom->Get_NumMeshes(); i++)
|
||||
{
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_INSTANCE_MODEL::BLOOM)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pInstance_ModelCom->Render(i)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
||||
HRESULT CEffectObject::Load(const _char* pFilePath, LEVEL eLevel)
|
||||
{
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pNoise_TextureCom);
|
||||
@@ -119,7 +162,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
||||
|
||||
if (m_pLightCom != nullptr)
|
||||
SAFE_RELEASE(m_pLightCom);
|
||||
|
||||
|
||||
_string strPerfectFilePath = pFilePath;
|
||||
|
||||
strPerfectFilePath += ".bin";
|
||||
@@ -161,7 +204,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (m_EffectInfo.isDiffuse)
|
||||
{
|
||||
@@ -253,7 +296,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (m_EffectInfo.isDissolve)
|
||||
@@ -286,7 +329,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (m_EffectInfo.isEmissive)
|
||||
@@ -317,7 +360,7 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (m_EffectInfo.isDistortion)
|
||||
@@ -390,8 +433,6 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
HRESULT CEffectObject::Bind_ShaderResources()
|
||||
{
|
||||
|
||||
@@ -637,7 +678,6 @@ HRESULT CEffectObject::Bind_ShaderResources()
|
||||
|
||||
|
||||
return S_OK;
|
||||
|
||||
}
|
||||
|
||||
HRESULT CEffectObject::Ready_Components(void* pArg)
|
||||
@@ -652,7 +692,7 @@ HRESULT CEffectObject::Ready_Components(void* pArg)
|
||||
if (FAILED(__super::Ready_Components(&TransformDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//나중에 로드할 때 라이트를 값을 입력받아서 생성 하자
|
||||
return S_OK;
|
||||
@@ -690,7 +730,7 @@ void CEffectObject::Free()
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pInstance_ModelCom);
|
||||
|
||||
if(m_pLightCom != nullptr)
|
||||
if (m_pLightCom != nullptr)
|
||||
SAFE_RELEASE(m_pLightCom);
|
||||
}
|
||||
|
||||
|
||||
@@ -68,6 +68,11 @@ void CEffectParts::Late_Update(_float fTimeDelta)
|
||||
m_pGameInstance->BillBoard(m_pTransformCom);
|
||||
|
||||
|
||||
if (m_EffectInfo.isBloom == true)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLOOM, this);
|
||||
}
|
||||
|
||||
if (m_EffectInfo.isBlur == true)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLUR, this);
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "EffectParts.h"
|
||||
#include "TrailObject.h"
|
||||
|
||||
#include "PhysXEffectHitBox.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
@@ -175,6 +176,7 @@ HRESULT CEffect_Container::Bind_ShaderResources()
|
||||
void CEffect_Container::Update_Event(_float fTimeDelta)
|
||||
{
|
||||
|
||||
|
||||
m_fPreAccTime = m_fAccTime;
|
||||
m_fAccTime += fTimeDelta;
|
||||
|
||||
@@ -198,12 +200,18 @@ void CEffect_Container::Update_Event(_float fTimeDelta)
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bVisible = false;
|
||||
|
||||
for (auto& pPart : m_PartObjects)
|
||||
{
|
||||
pPart.second->Set_Visible(false);
|
||||
}
|
||||
|
||||
m_bVisible = false;
|
||||
if (m_pPhysHitBox != nullptr && m_pPhysHitBox->isDead() == false)
|
||||
{
|
||||
m_pPhysHitBox->Set_Dead();
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,11 @@ HRESULT CNomalJap::Initialize(void* pArg)
|
||||
void CNomalJap::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->RewindMomentum();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CNomalJap::Update(_float fTimeDelta)
|
||||
@@ -70,6 +75,10 @@ void CNomalJap::Update(_float fTimeDelta)
|
||||
m_pProjectile->Get_Component<CTransform>()->Translation(m_vOwnerLook * 1.2f);
|
||||
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->AccumulateMomentum(m_vOwnerLook * 1.2f);
|
||||
}
|
||||
|
||||
|
||||
if (m_fAccTime > XM_2PI)
|
||||
return;
|
||||
@@ -78,6 +87,12 @@ void CNomalJap::Update(_float fTimeDelta)
|
||||
|
||||
m_pProjectile_Side->Get_Component<CTransform>()->Translation(m_vRotateUp * 0.6f * sinf(m_fAccTime));
|
||||
m_pProjectile->Get_Component<CTransform>()->Translation(m_vRotateUp * 0.6f * sinf(m_fAccTime));
|
||||
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->AccumulateMomentum(m_vRotateUp * 0.6f * sinf(m_fAccTime));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CNomalJap::Late_Update(_float fTimeDelta)
|
||||
@@ -156,19 +171,9 @@ HRESULT CNomalJap::Ready_Child()
|
||||
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
|
||||
_vector vOwnerLook = m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
|
||||
_float3 vDir = {};
|
||||
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
XMStoreFloat3(&vDir, vOwnerLook * 0.6f);
|
||||
|
||||
|
||||
Desc.vRotRPY = { 0.f, 0.f, 0.f };
|
||||
Desc.iSubKind = 70;
|
||||
Desc.vDeltaPos = vDir;
|
||||
Desc.vDeltaPos = _float3(0.f, 0.f, 0.f);
|
||||
Desc.vLifeTime = { 0.f, 1.f };
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPhysXEffectHitBox>(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this, &m_pPhysHitBox))) {
|
||||
@@ -176,6 +181,7 @@ HRESULT CNomalJap::Ready_Child()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
SAFE_ADDREF(m_pPhysHitBox);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -227,29 +233,27 @@ void CNomalJap::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
Get_PartObject<CTrailObject>()->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f));
|
||||
|
||||
m_pPhysHitBox->Set_Dead();
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
}
|
||||
|
||||
void CNomalJap::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
//if(m_pPhysHitBox != nullptr)
|
||||
// if (m_pPhysHitBox->Get_Depth() == false)
|
||||
// SAFE_RELEASE(m_pPhysHitBox);
|
||||
if (m_pPhysHitBox != nullptr)
|
||||
if (m_pPhysHitBox->isDead() == false)
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
|
||||
Safe_Release(m_pProjectile);
|
||||
Safe_Release(m_pProjectile_Side);
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CNomalJap::Describe_Entity()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
HRESULT CNomalJap::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
|
||||
@@ -39,10 +39,7 @@ void CPhysXEffectHitBox::Priority_Update(_float fTimeDelta)
|
||||
void CPhysXEffectHitBox::Update(_float fTimeDelta)
|
||||
{
|
||||
m_pTransformCom->AccumulateMomentum(XMLoadFloat3(&m_vDeltaPos));
|
||||
m_vLifeTime.x += fTimeDelta;
|
||||
if (m_vLifeTime.x > m_vLifeTime.y) {
|
||||
m_bDead = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CPhysXEffectHitBox::Late_Update(_float fTimeDelta)
|
||||
@@ -91,6 +88,9 @@ HRESULT CPhysXEffectHitBox::Ready_Components(void* pArg)
|
||||
m_pTransformCom->Rotation(pDesc->vRotRPY.x, pDesc->vRotRPY.y, pDesc->vRotRPY.z);
|
||||
m_vDeltaPos = pDesc->vDeltaPos;
|
||||
m_vLifeTime = pDesc->vLifeTime;
|
||||
|
||||
|
||||
|
||||
{ // CCT
|
||||
CCharacter_Controller::Character_Controller_DESC Desc{};
|
||||
|
||||
@@ -109,6 +109,8 @@ HRESULT CPhysXEffectHitBox::Ready_Components(void* pArg)
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pCharacter_Controller->SetGravity(pDesc->bGravity);
|
||||
}
|
||||
m_pCharacter_Controller->Set_Position(m_pTransformCom->Get_State(STATE::POSITION));
|
||||
/* Com_Shader */
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "EffectParts.h"
|
||||
#include "PhysXEffectHitBox.h"
|
||||
|
||||
|
||||
CProtego::CProtego(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -46,6 +45,18 @@ HRESULT CProtego::Initialize(void* pArg)
|
||||
m_wstrEffectName = L"Protego";
|
||||
|
||||
|
||||
m_Events.emplace(1.3f, [&]() {
|
||||
|
||||
m_pSphere->Set_Dissolve(true);
|
||||
m_pBottom->Set_Dissolve(true);
|
||||
m_pCircle->Set_Dissolve(true);
|
||||
|
||||
});
|
||||
|
||||
|
||||
m_fAmountSize = 0.1f;
|
||||
m_fSpeed = 5.f;
|
||||
|
||||
m_fDuration = 2.5f;
|
||||
|
||||
return S_OK;
|
||||
@@ -64,11 +75,25 @@ void CProtego::Update(_float fTimeDelta)
|
||||
|
||||
m_pSphere->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pBottom->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pCircle-> Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pCircle->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
|
||||
|
||||
/* 시작 사이즈 러프 */
|
||||
if (m_fSizeAccTime > XM_PIDIV2)
|
||||
return;
|
||||
|
||||
m_fSizeAccTime += fTimeDelta * m_fSpeed;
|
||||
|
||||
_float fSize = 1 + sinf(m_fSizeAccTime) * m_fAmountSize;
|
||||
_float3 vSize = _float3(fSize, fSize, fSize);
|
||||
|
||||
m_pSphere->Get_Component<CTransform>()->Set_Scale(vSize);
|
||||
m_pCircle->Get_Component<CTransform>()->Set_Scale(vSize);
|
||||
}
|
||||
|
||||
void CProtego::Late_Update(_float fTimeDelta)
|
||||
@@ -94,10 +119,26 @@ HRESULT CProtego::Pre_Setting(CGameObject* pObject)
|
||||
__super::m_fAccTime = 0.f;
|
||||
m_fPreAccTime = 0.f;
|
||||
|
||||
|
||||
m_pSphere->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pBottom->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
m_pCircle->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
|
||||
m_pSphere->Set_Visible(true);
|
||||
m_pCircle->Set_Visible(true);
|
||||
m_pBottom->Set_Visible(true);
|
||||
|
||||
|
||||
_float3 vSize = _float3(1.f, 1.f, 1.f);
|
||||
m_pSphere->Get_Component<CTransform>()->Set_Scale(vSize);
|
||||
m_pCircle->Get_Component<CTransform>()->Set_Scale(vSize);
|
||||
|
||||
m_fSizeAccTime = 0.f;
|
||||
|
||||
m_pSphere->Set_Dissolve(false);
|
||||
m_pBottom->Set_Dissolve(false);
|
||||
m_pCircle->Set_Dissolve(false);
|
||||
|
||||
m_bVisible = true;
|
||||
|
||||
return S_OK;
|
||||
@@ -168,7 +209,12 @@ void CProtego::Free()
|
||||
|
||||
void CProtego::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("PROTEGO");
|
||||
|
||||
GUI::DragFloat("fAmountSize", &m_fAmountSize);
|
||||
GUI::DragFloat("fSpeed", &m_fSpeed);
|
||||
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -51,6 +51,18 @@ void CTrailObject::Update(_float fTimeDelta)
|
||||
{
|
||||
m_TrailInfo.vDistortionTime.x = 0.f;
|
||||
}
|
||||
|
||||
/* 블룸 타임*/
|
||||
|
||||
if (m_TrailInfo.vBloomTime.y != 0)
|
||||
{
|
||||
m_TrailInfo.vBloomTime.x += fTimeDelta;
|
||||
|
||||
if (m_TrailInfo.vBloomTime.x > m_TrailInfo.vBloomTime.y)
|
||||
{
|
||||
m_TrailInfo.vBloomTime.x = 0.f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CTrailObject::Late_Update(_float fTimeDelta)
|
||||
@@ -59,6 +71,11 @@ void CTrailObject::Late_Update(_float fTimeDelta)
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
if (m_TrailInfo.isBloom == true)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLOOM, this);
|
||||
}
|
||||
|
||||
if (m_TrailInfo.isBlur == true)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLUR, this);
|
||||
@@ -310,6 +327,44 @@ void CTrailObject::Describe_Entity()
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
HRESULT CTrailObject::Render_Bloom()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fBloomStrength", &m_TrailInfo.fBloomStrength, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iBloomType", &m_TrailInfo.eBloomType, sizeof(_int)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isBloomDissolve", &m_TrailInfo.isBloomDissolve, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isBloomReverseDissolve", &m_TrailInfo.isBloomReverseDissolve, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vBloomTime", &m_TrailInfo.vBloomTime, sizeof(_float2)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_POSTEX::TRAIL_BLOOM))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
|
||||
if (FAILED(m_pTrailCom->Render()))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
HRESULT CTrailObject::Bind_ShaderResources()
|
||||
{
|
||||
|
||||
@@ -57,6 +57,8 @@ HRESULT CWand::Initialize(void* pArg)
|
||||
|
||||
m_pEffectParts->Set_Visible(true);
|
||||
|
||||
m_vOffset = _float3(0.f, -0.27f, -0.32f);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,10 +12,12 @@ namespace Client
|
||||
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, END };
|
||||
enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, END };
|
||||
enum class SHADER_PASS_PARTICLE { EXPLOSION, END };
|
||||
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLUR, END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, ALPHA_BLEND, END };
|
||||
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLUR, TRAIL_BLOOM, END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, ALPHA_BLEND, BLOOM, END };
|
||||
enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, END };
|
||||
|
||||
enum class EFFECT_TYPE { EFFECT, TRAIL, END };
|
||||
enum class SKILL_TYPE { JAP, BOMBARD, DESCENDO, PROTEGO, END };
|
||||
enum class SKILL_TYPE { JAP, BOMBARD, DESCENDO, PROTEGO, END };
|
||||
enum class BLOOM_TYPE { NONE, BASIC, MULTIPLY, END };
|
||||
|
||||
}
|
||||
|
||||
@@ -93,6 +93,17 @@ class CEffectObject abstract : public CPartObject
|
||||
|
||||
_float fBluringStrength = { 0.01f };
|
||||
|
||||
|
||||
|
||||
_bool isBloom = {};
|
||||
|
||||
_bool isBloomDissolve = {};
|
||||
_bool isBloomReverseDissolve = {};
|
||||
|
||||
_float fBloomStrength = {};
|
||||
|
||||
BLOOM_TYPE eBloomType = {};
|
||||
|
||||
}EFFECT_INFO;
|
||||
|
||||
|
||||
@@ -107,9 +118,14 @@ class CEffectObject abstract : public CPartObject
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual HRESULT Render_Blur() override;
|
||||
virtual HRESULT Render_Bloom() override;
|
||||
public:
|
||||
HRESULT Load(const _char* pFilePath, LEVEL eLevel);
|
||||
|
||||
void Set_Dissolve(_bool isDissolve)
|
||||
{
|
||||
m_EffectInfo.isDissolve = isDissolve;
|
||||
}
|
||||
protected:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
|
||||
@@ -34,6 +34,9 @@ class CEffect_Container abstract : public CContainerObject
|
||||
|
||||
void Update_Event(_float fTimeDelta);
|
||||
HRESULT Reset_EffectParts();
|
||||
protected:
|
||||
class CPhysXEffectHitBox* m_pPhysHitBox = {};
|
||||
|
||||
protected:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ class CPhysXEffectHitBox final : public CGameObject
|
||||
_uint iSubKind = {};
|
||||
_float3 vDeltaPos = {};
|
||||
_float2 vLifeTime = {};
|
||||
_bool bGravity = {};
|
||||
}PHYSXDUMMY_DESC;
|
||||
private:
|
||||
CPhysXEffectHitBox(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -33,9 +33,13 @@ class CProtego final : public CEffect_Container
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
CPartObject* m_pSphere = { nullptr };
|
||||
CPartObject* m_pBottom = { nullptr };
|
||||
CPartObject* m_pCircle = { nullptr };
|
||||
class CEffectParts* m_pSphere = { nullptr };
|
||||
class CEffectParts* m_pBottom = { nullptr };
|
||||
class CEffectParts* m_pCircle = { nullptr };
|
||||
|
||||
_float m_fSizeAccTime = {};
|
||||
_float m_fAmountSize = {};
|
||||
_float m_fSpeed = {};
|
||||
public:
|
||||
static CProtego* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
|
||||
@@ -56,6 +56,17 @@ class CTrailObject final : public CPartObject
|
||||
_float fBlurIntensity = {};
|
||||
_int iBlurWeight = {};
|
||||
|
||||
/* 블룸 */
|
||||
_bool isBloom = {};
|
||||
|
||||
_bool isBloomDissolve = {};
|
||||
_bool isBloomReverseDissolve = {};
|
||||
|
||||
_float fBloomStrength = {};
|
||||
|
||||
BLOOM_TYPE eBloomType = {};
|
||||
_float2 vBloomTime = {};
|
||||
|
||||
}TRAIL_INFO;
|
||||
private:
|
||||
CTrailObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
@@ -79,7 +90,7 @@ class CTrailObject final : public CPartObject
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Render() override;
|
||||
virtual HRESULT Render_Blur() override;
|
||||
|
||||
virtual HRESULT Render_Bloom() override;
|
||||
|
||||
public:
|
||||
static CTrailObject* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
@@ -123,6 +123,12 @@ bool g_isBlurReverseDissolve;
|
||||
|
||||
float g_fBluringStrength;
|
||||
|
||||
bool g_isBloomDissolve;
|
||||
bool g_isBloomReverseDissolve;
|
||||
|
||||
float g_fBloomStrength;
|
||||
int g_iBloomType;
|
||||
|
||||
float g_fFar;
|
||||
|
||||
|
||||
@@ -234,74 +240,8 @@ struct PS_OUT
|
||||
float4 vColorTarget : SV_TARGET2;
|
||||
};
|
||||
|
||||
|
||||
PS_OUT BlendedWeight(vector fDiffuse, float fLinearZ)
|
||||
float4 DrawEffect(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
float3 vColor = fDiffuse.rgb;
|
||||
float fAlpha = fDiffuse.a;
|
||||
|
||||
|
||||
// float fWeight =
|
||||
//max(
|
||||
// min(1.0, max(max(vColor.r, vColor.g), vColor.b) * fAlpha), fAlpha)
|
||||
// *
|
||||
// clamp(0.01 / (1e-4 + pow(fLinearZ / 200, 4.0)), 0.01f, 1000);
|
||||
|
||||
|
||||
|
||||
//float fWeight = clamp(0.03f / (1e-5 + pow(fLinearZ, 4.0f)), 0.01, 3e3);
|
||||
//fWeight = max(fWeight, 1.0);
|
||||
|
||||
//이게 오리지널 웨이트 함수
|
||||
|
||||
//float fWeight = pow(fLinearZ, -2.5);
|
||||
|
||||
float fWeight = clamp(pow(fLinearZ, -2.5f), 1.0f, 1000.0f);
|
||||
|
||||
|
||||
|
||||
Out.vDiffuse = vector(vColor.rgb * fAlpha, fAlpha) * fWeight;
|
||||
|
||||
Out.vRevealage.r = fAlpha;
|
||||
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
|
||||
PS_OUT Out;
|
||||
vector vMtrlDiffuse;
|
||||
|
||||
vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
vector vMtrlNormal = g_NormalTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
float3x3 NormalMap_WorldMatrix = float3x3(In.vTangent, In.vBinormal, In.vNormal.xyz);
|
||||
|
||||
float3 vNormal = mul(vMtrlNormal.xyz * 2.f - 1.f, NormalMap_WorldMatrix);
|
||||
|
||||
|
||||
//Out.vNormal = float4(vNormal.xyz * 0.5f + 0.5f, 0.f);
|
||||
//Out.vDepth = float4(In.vProjPos.z / In.vProjPos.w, In.vProjPos.w / g_fFar, 0.0f, 0.0f);
|
||||
|
||||
if (vMtrlDiffuse.a < 0.3f)
|
||||
discard;
|
||||
|
||||
Out.vDiffuse.a = saturate(In.vLifeTime.y - In.vLifeTime.x);
|
||||
Out.vDiffuse = vMtrlDiffuse;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
{
|
||||
|
||||
PS_OUT Out;
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
vector vMtrlMask;
|
||||
vector vMtrlNoise;
|
||||
@@ -327,7 +267,7 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
UV = UV_Cutting(In.vTexcoord, g_vUVCutting, int(fAnimIndex));
|
||||
|
||||
if (g_isDiffuseUVMove)
|
||||
{
|
||||
{
|
||||
UV += SelectLerpUV((g_vDiffuseUVGainAmount / g_vUVCutting), (vDiffuseTime.x / vDiffuseTime.y), g_iDiffuseMoveLerpOption);
|
||||
}
|
||||
|
||||
@@ -399,336 +339,6 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
}
|
||||
|
||||
|
||||
/* 노이즈 */
|
||||
|
||||
if(g_isNoise)
|
||||
{
|
||||
float2 vNoiseUV = In.vTexcoord;
|
||||
|
||||
if (g_isNoiseUVMove == true)
|
||||
vNoiseUV = In.vTexcoord + SelectLerpUV(g_vNoiseUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iNoiseMoveLerpOption);
|
||||
|
||||
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vNoiseUV);
|
||||
|
||||
if (g_isNoiseAlpha)
|
||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlNoise.r);
|
||||
|
||||
if (g_isNoiseColor)
|
||||
vMtrlDiffuse.rgb *= vMtrlNoise.rgb;
|
||||
|
||||
}
|
||||
|
||||
/* 마스크 */
|
||||
if (g_isMasking == true)
|
||||
{
|
||||
float2 vMaskTexcoord = In.vTexcoord;
|
||||
|
||||
vMaskTexcoord = UV_Cutting(In.vTexcoord, g_vUVMaskCutting, int(fAnimIndex));
|
||||
|
||||
// 마스크 디스토션
|
||||
if (g_isDistortion == true)
|
||||
{
|
||||
|
||||
float2 vDistortionUV = In.vTexcoord + SelectLerpUV(g_vMaskDistortionUVGainAmount, (vDistortionUVMoveTime.x / vDistortionUVMoveTime.y), g_iMaskDistortionMoveLerpOption);
|
||||
|
||||
vMtrlDistortion = g_DistortionTexture.Sample(DefaultSampler, vDistortionUV);
|
||||
|
||||
//디스토션(노이즈) 텍스쳐로 uv를 왜곡함
|
||||
vMaskTexcoord = vMaskTexcoord + (vMtrlDistortion - 0.5f).r * g_fNoiseDistortionIntensity;
|
||||
|
||||
}
|
||||
|
||||
if (g_isMaskUVMove)
|
||||
{
|
||||
if (vMaskingTime.y > 0)
|
||||
vMaskTexcoord += SelectLerpUV(g_vMaskingUVGainAmount / g_vUVMaskCutting, (vMaskingTime.x / vMaskingTime.y), g_iMaskMoveLerpOption);
|
||||
}
|
||||
|
||||
if (g_isMaskClampSample == true)
|
||||
vMtrlMask = g_MaskingTexture.Sample(ClampSampler, vMaskTexcoord);
|
||||
else
|
||||
vMtrlMask = g_MaskingTexture.Sample(DefaultSampler, vMaskTexcoord);
|
||||
|
||||
|
||||
if (g_isMaskBlur)
|
||||
{
|
||||
float4 fAccMask;
|
||||
|
||||
|
||||
float fTexel = g_fBluringStrength;
|
||||
|
||||
if (g_isBlurDissolve)
|
||||
{
|
||||
fTexel = saturate(g_fBluringStrength * (In.vLifeTime.x / In.vLifeTime.y));
|
||||
}
|
||||
|
||||
if (g_isBlurReverseDissolve)
|
||||
{
|
||||
fTexel = saturate(g_fBluringStrength * (1 - (In.vLifeTime.x / In.vLifeTime.y)));
|
||||
}
|
||||
|
||||
for (int x = -2; x <= 2; x++)
|
||||
{
|
||||
for (int y = -2; y <= 2; y++)
|
||||
{
|
||||
fAccMask += g_MaskingTexture.Sample(DefaultSampler, vMaskTexcoord + float2(x * fTexel, y * fTexel));
|
||||
}
|
||||
}
|
||||
|
||||
fAccMask = fAccMask / 9.0;
|
||||
|
||||
/* 연산 마스크 대입*/
|
||||
vMtrlMask.r = fAccMask;
|
||||
}
|
||||
|
||||
|
||||
float fSoftMask;
|
||||
|
||||
if (g_fSoftMask > FLT_EPSILON5)
|
||||
fSoftMask = saturate((vMtrlMask.r - g_fSoftMaskEdge) * g_fSoftMask);
|
||||
else
|
||||
fSoftMask = vMtrlMask.r;
|
||||
|
||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * fSoftMask);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
vMtrlMask.r = 1.f;
|
||||
}
|
||||
|
||||
|
||||
vMtrlDiffuse.a *= g_fDiffuseAlpha;
|
||||
|
||||
if (vMtrlDiffuse.a <= FLT_EPSILON5)
|
||||
discard;
|
||||
|
||||
|
||||
|
||||
if (g_isDissolve == true)
|
||||
{
|
||||
if (g_isNomalDissolve)
|
||||
{
|
||||
vMtrlDiffuse.a *= (0.95f - In.vLifeTime.x / In.vLifeTime.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (g_isReverseDissolve == true)
|
||||
{
|
||||
if (vMtrlDissolve.r >= (In.vLifeTime.x / In.vLifeTime.y))
|
||||
discard;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (vMtrlDissolve.r < (In.vLifeTime.x / In.vLifeTime.y))
|
||||
discard;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
int2 iTexel = int2(In.vPosition.xy);
|
||||
|
||||
float fDepthStencilValue = g_DepthStencilTexture.Load(int3(iTexel, 0)).r;
|
||||
|
||||
float fbias = 0.000005f;
|
||||
|
||||
if (fDepthStencilValue <= In.vProjPos.z / In.vProjPos.w + fbias)
|
||||
discard;
|
||||
|
||||
|
||||
//// 색깔 추가할 처리 (이미시브)
|
||||
|
||||
float4 vEmissiveMtrl = vector(0.f, 0.f, 0.f, 0.f);
|
||||
float2 CenteredUV = In.vTexcoord - 0.5f;
|
||||
|
||||
Out = BlendedWeight(vMtrlDiffuse, In.vProjPos.w);
|
||||
|
||||
if (g_fRadius >= FLT_EPSILON5)
|
||||
{
|
||||
float fDistance = saturate(length(CenteredUV) / g_fRadius); // 마스크의 크기를 어느정도할지
|
||||
|
||||
float fSoftEdge = pow(saturate(1.0f - fDistance), g_fSoftenExp) * g_fSoftStrength; //SoftenExp 엣지감쇠지수 , Strength
|
||||
|
||||
float fCore = pow(saturate(1.0 - fDistance * 2.f), max(0.001, g_fCoreBoost)) * g_fCoreBoost; // CoreBust 중심강조
|
||||
|
||||
float fEmissive = fSoftEdge + fCore;
|
||||
|
||||
if (g_isEmissive == true)
|
||||
{
|
||||
vEmissiveMtrl = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
}
|
||||
else
|
||||
{
|
||||
vEmissiveMtrl = g_vEmissive;
|
||||
}
|
||||
|
||||
float fEmissiveStrength = g_fEmissiveStrength;
|
||||
|
||||
if (g_isEmissiveDissolve == true)
|
||||
{
|
||||
fEmissiveStrength *= (1.f - In.vLifeTime.x / In.vLifeTime.y);
|
||||
|
||||
if (fEmissiveStrength <= 0.05f)
|
||||
fEmissiveStrength = 0;
|
||||
|
||||
}
|
||||
|
||||
if (g_isEmissiveDissolveReverse == true)
|
||||
{
|
||||
fEmissiveStrength *= (In.vLifeTime.x / In.vLifeTime.y);
|
||||
|
||||
}
|
||||
|
||||
Out.vDiffuse += vEmissiveMtrl * fEmissive * fEmissiveStrength; // 이미시브 스트랭스
|
||||
}
|
||||
|
||||
|
||||
Out.vColorTarget = vector(0.f, 0.f, 0.f, 0.f);
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct VS_BLUR_OUT
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
float2 vLifeTime : TEXCOORD1;
|
||||
uint iGPUIndex : TEXCOORD2;
|
||||
float4 vProjPos : TEXCOORD3;
|
||||
};
|
||||
|
||||
VS_BLUR_OUT VS_BLUR(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
{
|
||||
VS_BLUR_OUT Out = (VS_BLUR_OUT) 0;
|
||||
|
||||
row_major matrix matW, matWV, matWVP;
|
||||
|
||||
row_major matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation);
|
||||
|
||||
matW = mul(TransformMatrix, g_WorldMatrix);
|
||||
matWV = mul(matW, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
|
||||
Out.vPosition = vPosition;
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vLifeTime = In.vLifeTime;
|
||||
Out.iGPUIndex = iGPUIndex;
|
||||
Out.vProjPos = vPosition;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
VS_BLUR_OUT VS_BLUR_NOWORLD(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
{
|
||||
VS_BLUR_OUT Out = (VS_BLUR_OUT) 0;
|
||||
|
||||
row_major matrix matW, matWV, matWVP;
|
||||
|
||||
row_major matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation);
|
||||
|
||||
matW = TransformMatrix;
|
||||
matWV = mul(matW, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
|
||||
Out.vPosition = vPosition;
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vLifeTime = In.vLifeTime;
|
||||
Out.iGPUIndex = iGPUIndex;
|
||||
Out.vProjPos = vPosition;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_BLUR_IN
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
float2 vLifeTime : TEXCOORD1;
|
||||
uint iGPUIndex : TEXCOORD2;
|
||||
float4 vProjPos : TEXCOORD3;
|
||||
};
|
||||
|
||||
struct PS_BLUR_OUT
|
||||
{
|
||||
float4 vDiffuse : SV_TARGET0;
|
||||
float4 vBlurWeight : SV_TARGET1;
|
||||
};
|
||||
|
||||
|
||||
PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
{
|
||||
PS_BLUR_OUT Out;
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
vector vMtrlMask;
|
||||
vector vMtrlNoise;
|
||||
vector vMtrlDissolve;
|
||||
vector vMtrlDistortion;
|
||||
|
||||
float fAnimIndex = g_ParticleValue[In.iGPUIndex].vAniIndex.x;
|
||||
float2 vDiffuseTime = g_ParticleValue[In.iGPUIndex].vDiffuseUVMoveTime;
|
||||
float2 vMaskingTime = g_ParticleValue[In.iGPUIndex].vMaskingUVMoveTime;
|
||||
float2 vNoiseUVMoveTime = g_ParticleValue[In.iGPUIndex].vNoiseUVMoveTime;
|
||||
float2 vDistortionUVMoveTime = g_ParticleValue[In.iGPUIndex].vDistortionUVMoveTime;
|
||||
float2 vDelay = g_ParticleValue[In.iGPUIndex].vDelay;
|
||||
|
||||
if (vDelay.x < vDelay.y)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
|
||||
if (g_isDiffuse == true)
|
||||
{
|
||||
float2 UV; // 이미지의 UV값
|
||||
|
||||
UV = UV_Cutting(In.vTexcoord, g_vUVCutting, int(fAnimIndex));
|
||||
|
||||
if (g_isDiffuseUVMove)
|
||||
{
|
||||
UV += SelectLerpUV((g_vDiffuseUVGainAmount / g_vUVCutting), (vDiffuseTime.x / vDiffuseTime.y), g_iDiffuseMoveLerpOption);
|
||||
}
|
||||
|
||||
/* 디퓨즈 디스토션 */
|
||||
if (g_isDistortion == true)
|
||||
{
|
||||
|
||||
float2 vDistortion = In.vTexcoord + SelectLerpUV(g_vDiffuseDistortionUVGainAmount, (vDistortionUVMoveTime.x / vDistortionUVMoveTime.y), g_iDiffuseDistortionMoveLerpOption);
|
||||
|
||||
vMtrlDistortion = g_DistortionTexture.Sample(DefaultSampler, vDistortion);
|
||||
|
||||
//0.5f를 빼는 이유는 중심을 0으로 옮겨서 양음수 방향으로 offset을 줄수 있다.
|
||||
vMtrlDistortion.rg -= 0.5f;
|
||||
|
||||
//아마 분할되었다면 noise도 분할해야할듯
|
||||
vMtrlDistortion.rg /= g_vUVCutting;
|
||||
|
||||
//디스토션(노이즈) 텍스쳐로 uv를 왜곡함
|
||||
|
||||
UV = UV + (vMtrlDistortion).rg * g_fNoiseDistortionIntensity;
|
||||
|
||||
}
|
||||
|
||||
/* 최종 색깔 */
|
||||
vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, UV);
|
||||
|
||||
if (g_vColor.a > 0)
|
||||
vMtrlDiffuse = saturate(g_vColor + vMtrlDiffuse);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
vMtrlDiffuse = g_vColor;
|
||||
}
|
||||
|
||||
|
||||
/* 노이즈 */
|
||||
|
||||
if (g_isNoise)
|
||||
@@ -859,58 +469,263 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
}
|
||||
}
|
||||
|
||||
return vMtrlDiffuse;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
float4 EmissiveDraw(PS_IN In)
|
||||
{
|
||||
float4 vEmissiveMtrl = vector(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
|
||||
float2 CenteredUV = In.vTexcoord - 0.5f;
|
||||
float fEmissive = 0.f;
|
||||
float fEmissiveStrength = g_fEmissiveStrength;
|
||||
|
||||
float fDistance = saturate(length(CenteredUV) / g_fRadius); // 마스크의 크기를 어느정도할지
|
||||
if (g_fRadius >= FLT_EPSILON5)
|
||||
{
|
||||
float fDistance = saturate(length(CenteredUV) / g_fRadius); // 마스크의 크기를 어느정도할지
|
||||
|
||||
float fMaskAlpha = vMtrlMask.a;
|
||||
|
||||
float fSoftEdge = pow(saturate(1.0f - fDistance), g_fSoftenExp) * g_fSoftStrength; //SoftenExp 엣지감쇠지수 , Strength
|
||||
float fSoftEdge = pow(saturate(1.0f - fDistance), g_fSoftenExp) * g_fSoftStrength; //SoftenExp 엣지감쇠지수 , Strength
|
||||
|
||||
float fCore = pow(saturate(1.0 - fDistance * 2.f), max(0.001, g_fCoreBoost)) * g_fCoreBoost; // CoreBust 중심강조
|
||||
float fCore = pow(saturate(1.0 - fDistance * 2.f), max(0.001, g_fCoreBoost)) * g_fCoreBoost; // CoreBust 중심강조
|
||||
|
||||
float fEmissive = fSoftEdge + fCore;
|
||||
fEmissive = fSoftEdge + fCore;
|
||||
|
||||
if (g_isEmissive == true)
|
||||
{
|
||||
vEmissiveMtrl = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
}
|
||||
else
|
||||
{
|
||||
vEmissiveMtrl = g_vEmissive;
|
||||
}
|
||||
if (g_isEmissive == true)
|
||||
{
|
||||
vEmissiveMtrl = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
}
|
||||
else
|
||||
{
|
||||
vEmissiveMtrl = g_vEmissive;
|
||||
}
|
||||
|
||||
float fEmissiveStrength = g_fEmissiveStrength;
|
||||
|
||||
if (g_isEmissiveDissolve == true)
|
||||
{
|
||||
fEmissiveStrength *= (1.f - In.vLifeTime.x / In.vLifeTime.y);
|
||||
if (g_isEmissiveDissolve == true)
|
||||
{
|
||||
fEmissiveStrength *= (1.f - In.vLifeTime.x / In.vLifeTime.y);
|
||||
|
||||
if (fEmissiveStrength <= 0)
|
||||
fEmissiveStrength = 0;
|
||||
if (fEmissiveStrength <= 0.05f)
|
||||
fEmissiveStrength = 0;
|
||||
|
||||
}
|
||||
|
||||
if (g_isEmissiveDissolveReverse == true)
|
||||
{
|
||||
fEmissiveStrength *= (In.vLifeTime.x / In.vLifeTime.y);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return vEmissiveMtrl * fEmissive * fEmissiveStrength;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
PS_OUT BlendedWeight(vector fDiffuse, float fLinearZ)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
if (g_isEmissiveDissolveReverse == true)
|
||||
{
|
||||
fEmissiveStrength *= (In.vLifeTime.x / In.vLifeTime.y);
|
||||
|
||||
}
|
||||
float3 vColor = fDiffuse.rgb;
|
||||
float fAlpha = fDiffuse.a;
|
||||
|
||||
|
||||
// float fWeight =
|
||||
//max(
|
||||
// min(1.0, max(max(vColor.r, vColor.g), vColor.b) * fAlpha), fAlpha)
|
||||
// *
|
||||
// clamp(0.01 / (1e-4 + pow(fLinearZ / 200, 4.0)), 0.01f, 1000);
|
||||
|
||||
|
||||
|
||||
//float fWeight = clamp(0.03f / (1e-5 + pow(fLinearZ, 4.0f)), 0.01, 3e3);
|
||||
//fWeight = max(fWeight, 1.0);
|
||||
|
||||
//이게 오리지널 웨이트 함수
|
||||
|
||||
//float fWeight = pow(fLinearZ, -2.5);
|
||||
|
||||
float fWeight = clamp(pow(fLinearZ, -2.5f), 1.0f, 1000.0f);
|
||||
|
||||
|
||||
Out.vDiffuse = vector(vMtrlDiffuse.rgb * g_fBlurIntensity + vEmissiveMtrl.rgb, vMtrlDiffuse.a); /** vector(vEmissiveColor * fSmoothAlpha, vMtrlDiffuse.a);*/
|
||||
|
||||
Out.vDiffuse = vector(vColor.rgb * fAlpha, fAlpha) * fWeight;
|
||||
|
||||
Out.vRevealage.r = fAlpha;
|
||||
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
|
||||
PS_OUT Out;
|
||||
vector vMtrlDiffuse;
|
||||
|
||||
vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
vector vMtrlNormal = g_NormalTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
float3x3 NormalMap_WorldMatrix = float3x3(In.vTangent, In.vBinormal, In.vNormal.xyz);
|
||||
|
||||
float3 vNormal = mul(vMtrlNormal.xyz * 2.f - 1.f, NormalMap_WorldMatrix);
|
||||
|
||||
|
||||
//Out.vNormal = float4(vNormal.xyz * 0.5f + 0.5f, 0.f);
|
||||
//Out.vDepth = float4(In.vProjPos.z / In.vProjPos.w, In.vProjPos.w / g_fFar, 0.0f, 0.0f);
|
||||
|
||||
if (vMtrlDiffuse.a < 0.3f)
|
||||
discard;
|
||||
|
||||
Out.vDiffuse.a = saturate(In.vLifeTime.y - In.vLifeTime.x);
|
||||
Out.vDiffuse = vMtrlDiffuse;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
int2 iTexel = int2(In.vPosition.xy);
|
||||
|
||||
float fDepthStencilValue = g_DepthStencilTexture.Load(int3(iTexel, 0)).r;
|
||||
|
||||
float fbias = 0.000005f;
|
||||
|
||||
if (fDepthStencilValue <= In.vProjPos.z / In.vProjPos.w + fbias)
|
||||
discard;
|
||||
|
||||
Out = BlendedWeight(vMtrlDiffuse, In.vProjPos.w);
|
||||
|
||||
//// 색깔 추가할 처리 (이미시브)
|
||||
|
||||
Out.vDiffuse += EmissiveDraw(In); // 이미시브 스트랭스
|
||||
Out.vColorTarget = vector(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
VS_OUT VS_BLUR(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
{
|
||||
VS_OUT Out = (VS_OUT) 0;
|
||||
|
||||
row_major matrix matW, matWV, matWVP;
|
||||
|
||||
row_major matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation);
|
||||
|
||||
matW = mul(TransformMatrix, g_WorldMatrix);
|
||||
matWV = mul(matW, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
|
||||
Out.vPosition = vPosition;
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vLifeTime = In.vLifeTime;
|
||||
Out.iGPUIndex = iGPUIndex;
|
||||
Out.vProjPos = vPosition;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
VS_OUT VS_BLUR_NOWORLD(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
{
|
||||
VS_OUT Out = (VS_OUT) 0;
|
||||
|
||||
row_major matrix matW, matWV, matWVP;
|
||||
|
||||
row_major matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation);
|
||||
|
||||
matW = TransformMatrix;
|
||||
matWV = mul(matW, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
|
||||
Out.vPosition = vPosition;
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vLifeTime = In.vLifeTime;
|
||||
Out.iGPUIndex = iGPUIndex;
|
||||
Out.vProjPos = vPosition;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
struct PS_BLUR_OUT
|
||||
{
|
||||
float4 vDiffuse : SV_TARGET0;
|
||||
float4 vBlurWeight : SV_TARGET1;
|
||||
};
|
||||
|
||||
struct PS_BLOOM_OUT
|
||||
{
|
||||
float4 vDiffuse : SV_TARGET0;
|
||||
};
|
||||
|
||||
PS_BLUR_OUT PS_BLUR(PS_IN In)
|
||||
{
|
||||
PS_BLUR_OUT Out;
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
//// 색깔 추가할 처리 (이미시브)
|
||||
|
||||
vMtrlDiffuse += EmissiveDraw(In);
|
||||
|
||||
if (g_isDissolve == true)
|
||||
{
|
||||
if (g_isNomalDissolve)
|
||||
{
|
||||
vMtrlDiffuse.a *= (0.95f - In.vLifeTime.x / In.vLifeTime.y);
|
||||
}
|
||||
}
|
||||
|
||||
Out.vDiffuse = vector(vMtrlDiffuse.rgb * g_fBlurIntensity , vMtrlDiffuse.a);
|
||||
Out.vBlurWeight = g_iBlurWeight / 128.f;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_BLOOM_OUT PS_BLOOM(PS_IN In)
|
||||
{
|
||||
PS_BLOOM_OUT Out;
|
||||
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
//// 색깔 추가할 처리 (이미시브)
|
||||
|
||||
vMtrlDiffuse += EmissiveDraw(In);
|
||||
|
||||
float fBloomStrength = g_fBloomStrength;
|
||||
|
||||
if (g_isBloomDissolve == true)
|
||||
{
|
||||
fBloomStrength = g_fBloomStrength * (1.f - (In.vLifeTime.x / In.vLifeTime.y));
|
||||
}
|
||||
|
||||
|
||||
if (g_isBloomReverseDissolve == true)
|
||||
{
|
||||
fBloomStrength = g_fBloomStrength * ((In.vLifeTime.x / In.vLifeTime.y));
|
||||
}
|
||||
|
||||
Out.vDiffuse = vector(vMtrlDiffuse.rgb * fBloomStrength, (float) g_iBloomType / 255.f);
|
||||
|
||||
return Out;
|
||||
|
||||
}
|
||||
|
||||
|
||||
technique11 DefaultTechnique
|
||||
{
|
||||
@@ -985,6 +800,15 @@ technique11 DefaultTechnique
|
||||
PixelShader = compile ps_5_0 PS_BLUR();
|
||||
}
|
||||
|
||||
pass BLOOM
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Default, 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_BLOOM();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,15 @@ float g_fRadius;
|
||||
float g_fBlurIntensity;
|
||||
float g_iBlurWeight;
|
||||
|
||||
/* 블룸 */
|
||||
bool g_isBloomDissolve;
|
||||
bool g_isBloomReverseDissolve;
|
||||
|
||||
float g_fBloomStrength;
|
||||
int g_iBloomType;
|
||||
|
||||
float2 g_vBloomTime;
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
@@ -147,10 +156,9 @@ struct PS_TRAILOUT
|
||||
float4 vColorTarget : SV_TARGET2;
|
||||
};
|
||||
|
||||
PS_TRAILOUT PS_Trail(PS_IN In)
|
||||
|
||||
vector Draw_Trail(PS_IN In)
|
||||
{
|
||||
PS_TRAILOUT Out;
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
vector vMtrlMask;
|
||||
vector vMtrlNoise;
|
||||
@@ -234,7 +242,7 @@ PS_TRAILOUT PS_Trail(PS_IN In)
|
||||
fSoftMask = vMtrlMask.r;
|
||||
|
||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * fSoftMask);
|
||||
}
|
||||
}
|
||||
else
|
||||
vMtrlMask.r = 1.f;
|
||||
|
||||
@@ -245,9 +253,38 @@ PS_TRAILOUT PS_Trail(PS_IN In)
|
||||
if (vMtrlDiffuse.a <= FLT_EPSILON5)
|
||||
discard;
|
||||
|
||||
return vMtrlDiffuse;
|
||||
|
||||
}
|
||||
|
||||
|
||||
float4 EmissiveDraw(PS_IN In)
|
||||
{
|
||||
float4 vEmissiveMtrl = g_vEmissive;
|
||||
float2 CenteredUV = In.vTexcoord - 0.5f;
|
||||
float fEmissive = 0.f;
|
||||
float fEmissiveStrength = g_fEmissiveStrength;
|
||||
|
||||
if (g_fRadius >= FLT_EPSILON5)
|
||||
{
|
||||
float fDistance = saturate(length(CenteredUV) / g_fRadius); // 마스크의 크기를 어느정도할지
|
||||
|
||||
float fSoftEdge = pow(saturate(1.0f - fDistance), g_fSoftenExp) * g_fSoftStrength; //SoftenExp 엣지감쇠지수 , Strength
|
||||
|
||||
float fCore = pow(saturate(1.0 - fDistance * 2.f), max(0.001, g_fCoreBoost)) * g_fCoreBoost; // CoreBust 중심강조
|
||||
|
||||
fEmissive = fSoftEdge + fCore;
|
||||
}
|
||||
|
||||
return vEmissiveMtrl * fEmissive * fEmissiveStrength;
|
||||
}
|
||||
|
||||
PS_TRAILOUT PS_Trail(PS_IN In)
|
||||
{
|
||||
PS_TRAILOUT Out;
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
|
||||
vMtrlDiffuse = Draw_Trail(In);
|
||||
|
||||
/* 웨이트 블랜드 */
|
||||
|
||||
@@ -255,27 +292,11 @@ PS_TRAILOUT PS_Trail(PS_IN In)
|
||||
|
||||
Out.vDiffuse = vector(vMtrlDiffuse.rgb, vMtrlDiffuse.a) * fWeight;
|
||||
Out.vRevealage.r = vMtrlDiffuse.a;
|
||||
|
||||
|
||||
/* 이미시브 */
|
||||
|
||||
float4 vEmissiveMtrl = vector(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
float2 CenteredUV = In.vTexcoord - 0.5f;
|
||||
|
||||
float fDistance = saturate(length(CenteredUV) / g_fRadius); // 마스크의 크기를 어느정도할지
|
||||
|
||||
float fMaskAlpha = vMtrlMask.a;
|
||||
|
||||
float fSoftEdge = pow(saturate(1.0f - fDistance), g_fSoftenExp) * g_fSoftStrength; //SoftenExp 엣지감쇠지수 , Strength
|
||||
|
||||
float fCore = pow(saturate(1.0 - fDistance * 2.f), max(0.001, g_fCoreBoost)) * g_fCoreBoost; // CoreBust 중심강조
|
||||
|
||||
float fEmissive = fSoftEdge + fCore;
|
||||
|
||||
vEmissiveMtrl = g_vEmissive;
|
||||
|
||||
Out.vColorTarget = vEmissiveMtrl * fEmissive * g_fEmissiveStrength; // 이미시브 스트랭스
|
||||
|
||||
Out.vDiffuse = saturate(Out.vDiffuse + EmissiveDraw(In)); // 이미시브 스트랭스
|
||||
Out.vColorTarget = vector(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -292,127 +313,59 @@ struct PS_BLUR_OUT
|
||||
float4 vBlurWeight : SV_TARGET1;
|
||||
};
|
||||
|
||||
PS_BLUR_OUT PS_TRAIL_BLUR(PS_BLUR_IN In)
|
||||
PS_BLUR_OUT PS_TRAIL_BLUR(PS_IN In)
|
||||
{
|
||||
PS_BLUR_OUT Out;
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
vector vMtrlMask;
|
||||
vector vMtrlNoise;
|
||||
vector vMtrlDistortion;
|
||||
|
||||
vMtrlDiffuse = Draw_Trail(In);
|
||||
|
||||
/* 디퓨즈 */
|
||||
|
||||
if (g_isDiffuse == true)
|
||||
{
|
||||
float2 vDiffuseTexcoord = In.vTexcoord;
|
||||
|
||||
/* 디퓨즈 디스토션 */
|
||||
if (g_isDistortion == true)
|
||||
{
|
||||
float2 vDistortion = In.vTexcoord + SelectLerpUV(g_vDiffuseDistortionUVGainAmount, (g_vDistortionTime.x / g_vDistortionTime.y), 0);
|
||||
|
||||
vMtrlDistortion = g_DistortionTexture.Sample(DefaultSampler, vDistortion);
|
||||
|
||||
//0.5f를 빼는 이유는 중심을 0으로 옮겨서 양음수 방향으로 offset을 줄수 있다.
|
||||
vMtrlDistortion.rg -= 0.5f;
|
||||
|
||||
|
||||
//디스토션(노이즈) 텍스쳐로 uv를 왜곡함
|
||||
|
||||
vDiffuseTexcoord = vDiffuseTexcoord + (vMtrlDistortion).rg * g_fDistortionIntensity;
|
||||
|
||||
}
|
||||
|
||||
vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, vDiffuseTexcoord);
|
||||
|
||||
|
||||
vMtrlDiffuse.a *= g_fDiffuseAlpha;
|
||||
|
||||
if (g_vColor.a > 0)
|
||||
vMtrlDiffuse += g_vColor;
|
||||
}
|
||||
else
|
||||
vMtrlDiffuse = g_vColor;
|
||||
|
||||
/* 노이즈 */
|
||||
|
||||
if (g_isNoise == true)
|
||||
{
|
||||
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (g_isNoiseAlpha)
|
||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlNoise.r) * g_fNoiseStrength;
|
||||
|
||||
if (g_isNoiseColor)
|
||||
vMtrlDiffuse.rgb *= vMtrlNoise.rgb * g_fNoiseStrength;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* 마스크 */
|
||||
|
||||
if (g_isMask == true)
|
||||
{
|
||||
float2 vMaskTexcoord = In.vTexcoord;
|
||||
|
||||
// 마스크 디스토션
|
||||
if (g_isDistortion == true)
|
||||
{
|
||||
float2 vDistortionUV = In.vTexcoord + SelectLerpUV(g_vMaskDistortionUVGainAmount, (g_vDistortionTime.x / g_vDistortionTime.y), 0);
|
||||
|
||||
vMtrlDistortion = g_DistortionTexture.Sample(DefaultSampler, vDistortionUV);
|
||||
|
||||
//디스토션(노이즈) 텍스쳐로 uv를 왜곡함
|
||||
vMaskTexcoord = vMaskTexcoord + (vMtrlDistortion - 0.5f).r * g_fDistortionIntensity;
|
||||
|
||||
vMaskTexcoord = saturate(vMaskTexcoord);
|
||||
}
|
||||
|
||||
vMtrlMask = g_MaskingTexture.Sample(DefaultSampler, vMaskTexcoord);
|
||||
|
||||
float fSoftMask;
|
||||
|
||||
if (g_fSoftMask > FLT_EPSILON5)
|
||||
fSoftMask = saturate((vMtrlMask.r - g_fSoftMaskEdge) * g_fSoftMask);
|
||||
else
|
||||
fSoftMask = vMtrlMask.r;
|
||||
|
||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * fSoftMask);
|
||||
}
|
||||
else
|
||||
vMtrlMask.r = 1.f;
|
||||
|
||||
|
||||
/* 디퓨즈 알파 컷*/
|
||||
if (vMtrlDiffuse.a <= FLT_EPSILON5)
|
||||
discard;
|
||||
|
||||
|
||||
///* 이미시브 */
|
||||
|
||||
//float4 vEmissiveMtrl = vector(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
//float2 CenteredUV = In.vTexcoord - 0.5f;
|
||||
|
||||
//float fDistance = saturate(length(CenteredUV) / g_fRadius); // 마스크의 크기를 어느정도할지
|
||||
|
||||
//float fMaskAlpha = vMtrlMask.a;
|
||||
|
||||
//float fSoftEdge = pow(saturate(1.0f - fDistance), g_fSoftenExp) * g_fSoftStrength; //SoftenExp 엣지감쇠지수 , Strength
|
||||
//// 색깔 추가할 처리 (이미시브)
|
||||
|
||||
//float fCore = pow(saturate(1.0 - fDistance * 2.f), max(0.001, g_fCoreBoost)) * g_fCoreBoost; // CoreBust 중심강조
|
||||
vMtrlDiffuse += EmissiveDraw(In);
|
||||
|
||||
//float fEmissive = fSoftEdge + fCore;
|
||||
|
||||
//vEmissiveMtrl = g_vEmissive;
|
||||
|
||||
Out.vDiffuse = vector(vMtrlDiffuse.rgb * g_fBlurIntensity, vMtrlDiffuse.a); // 이미시브 스트랭스
|
||||
Out.vDiffuse = vector(vMtrlDiffuse.rgb * g_fBlurIntensity, vMtrlDiffuse.a);
|
||||
Out.vBlurWeight = g_iBlurWeight / 128.f;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_BLOOM_OUT
|
||||
{
|
||||
float4 vDiffuse : SV_TARGET0;
|
||||
};
|
||||
|
||||
|
||||
PS_BLUR_OUT PS_TRAIL_BLOOM(PS_IN In)
|
||||
{
|
||||
PS_BLUR_OUT Out;
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
|
||||
vMtrlDiffuse = Draw_Trail(In);
|
||||
|
||||
//// 색깔 추가할 처리 (이미시브)
|
||||
|
||||
vMtrlDiffuse += EmissiveDraw(In);
|
||||
|
||||
float fBloomStrength = g_fBloomStrength;
|
||||
|
||||
if (g_isBloomDissolve == true)
|
||||
{
|
||||
fBloomStrength = g_fBloomStrength * (1.f - (g_vBloomTime.x / g_vBloomTime.y));
|
||||
}
|
||||
|
||||
|
||||
if (g_isBloomReverseDissolve == true)
|
||||
{
|
||||
fBloomStrength = g_fBloomStrength * ((g_vBloomTime.x / g_vBloomTime.y));
|
||||
}
|
||||
|
||||
Out.vDiffuse = vector(vMtrlDiffuse.rgb * g_fBloomStrength, (float) g_iBloomType / 255.f);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 PosTexTechnique11
|
||||
{
|
||||
@@ -476,4 +429,15 @@ technique11 PosTexTechnique11
|
||||
PixelShader = compile ps_5_0 PS_TRAIL_BLUR();
|
||||
}
|
||||
|
||||
|
||||
pass TrailBloom
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Default, 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_TRAIL_BLOOM();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -248,6 +248,7 @@
|
||||
<ClInclude Include="..\public\NoMountIcon.h" />
|
||||
<ClInclude Include="..\Public\Player.h" />
|
||||
<ClInclude Include="..\public\Potion.h" />
|
||||
<ClInclude Include="..\Public\Protego.h" />
|
||||
<ClInclude Include="..\public\Slot_Number.h" />
|
||||
<ClInclude Include="..\public\Spell_Slot_Preview.h" />
|
||||
<ClInclude Include="..\public\Spell_UI.h" />
|
||||
@@ -388,6 +389,7 @@
|
||||
<ClCompile Include="..\Private\Player.cpp" />
|
||||
<ClCompile Include="..\Private\Player_States.cpp" />
|
||||
<ClCompile Include="..\private\Potion.cpp" />
|
||||
<ClCompile Include="..\Private\Protego.cpp" />
|
||||
<ClCompile Include="..\private\Slot_Number.cpp" />
|
||||
<ClCompile Include="..\private\Spell_Slot_Preview.cpp" />
|
||||
<ClCompile Include="..\private\Spell_UI.cpp" />
|
||||
|
||||
@@ -388,6 +388,9 @@
|
||||
<Filter Include="02.GameObjects\Layer_Effect\EffectPool">
|
||||
<UniqueIdentifier>{c0589f6e-ed9c-4e76-8df2-4f95ce3c7b9a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Layer_Effect\Effect\08.Protego">
|
||||
<UniqueIdentifier>{8bb21e5b-933f-4930-8d49-1093e0c3ea77}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Editor.h">
|
||||
@@ -756,6 +759,9 @@
|
||||
<ClInclude Include="..\Public\EffectPool.h">
|
||||
<Filter>02.GameObjects\Layer_Effect\EffectPool</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Protego.h">
|
||||
<Filter>02.GameObjects\Layer_Effect\Effect\08.Protego</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Editor.ico">
|
||||
@@ -1123,6 +1129,9 @@
|
||||
<ClCompile Include="..\Private\EffectPool.cpp">
|
||||
<Filter>02.GameObjects\Layer_Effect\EffectPool</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Protego.cpp">
|
||||
<Filter>02.GameObjects\Layer_Effect\Effect\08.Protego</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Editor.rc">
|
||||
|
||||
@@ -150,6 +150,7 @@ HRESULT CBombard::Ready_Child()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
SAFE_ADDREF(m_pPhysHitBox);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -200,16 +201,18 @@ void CBombard::OnCollision(CGameObject* pOther , void* pDesc)
|
||||
|
||||
Get_PartObject<CEditEffect>("Bombard_Circle0")->Set_Visible(false);
|
||||
|
||||
|
||||
m_pPhysHitBox->Set_Dead();
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
}
|
||||
|
||||
void CBombard::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
//if(m_pPhysHitBox != nullptr)
|
||||
// if (m_pPhysHitBox->Get_Depth() == false)
|
||||
// SAFE_RELEASE(m_pPhysHitBox);
|
||||
if(m_pPhysHitBox != nullptr)
|
||||
if (m_pPhysHitBox->isDead() == false)
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
|
||||
SAFE_RELEASE(m_pLight_Projectile);
|
||||
|
||||
|
||||
@@ -53,6 +53,11 @@ void CDecendo::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->RewindMomentum();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CDecendo::Update(_float fTimeDelta)
|
||||
@@ -68,6 +73,10 @@ void CDecendo::Update(_float fTimeDelta)
|
||||
m_pProjectile->Get_Component<CTransform>()->Translation(m_vOwnerLook * 0.5f);
|
||||
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->AccumulateMomentum(m_vOwnerLook * 0.5f);
|
||||
}
|
||||
|
||||
|
||||
if (m_fAccTime > XM_2PI)
|
||||
return;
|
||||
@@ -76,6 +85,10 @@ void CDecendo::Update(_float fTimeDelta)
|
||||
|
||||
m_pProjectile_Blur->Get_Component<CTransform>()->Translation(m_vRotateUp * 0.2f * sinf(m_fAccTime));
|
||||
m_pProjectile->Get_Component<CTransform>()->Translation(m_vRotateUp * 0.2f * sinf(m_fAccTime));
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->AccumulateMomentum(m_vRotateUp * 0.2f * sinf(m_fAccTime));
|
||||
}
|
||||
}
|
||||
|
||||
void CDecendo::Late_Update(_float fTimeDelta)
|
||||
@@ -107,7 +120,7 @@ HRESULT CDecendo::Pre_Setting(CGameObject* pObject)
|
||||
m_fPreAccTime = 0.f;
|
||||
|
||||
|
||||
CPartObject* pCircle0 = Get_PartObject<CEditEffect>("Decendo_Cricle_S");
|
||||
CPartObject* pCircle0 = Get_PartObject<CEditEffect>();
|
||||
|
||||
/* 초기 객체 위치 초기화 */
|
||||
pCircle0->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion());
|
||||
@@ -132,7 +145,6 @@ HRESULT CDecendo::Pre_Setting(CGameObject* pObject)
|
||||
_vector vQuaternion = XMQuaternionRotationAxis(m_vOwnerLook, m_pGameInstance->Random_Float(0.f, XM_PIDIV2));
|
||||
|
||||
m_vRotateUp = XMVector3Rotate(vUp, vQuaternion);
|
||||
|
||||
m_vRotateUp = XMVector3Normalize(m_vRotateUp);
|
||||
|
||||
m_bVisible = true;
|
||||
@@ -157,17 +169,10 @@ HRESULT CDecendo::Ready_Child()
|
||||
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
_vector vOwnerLook = m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
|
||||
_float3 vDir = {};
|
||||
|
||||
XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
|
||||
XMStoreFloat3(&vDir , vOwnerLook * 0.5f);
|
||||
|
||||
Desc.vRotRPY = { 0.f, 0.f, 0.f };
|
||||
Desc.iSubKind = 70;
|
||||
Desc.vDeltaPos = vDir ;
|
||||
Desc.vDeltaPos = _float3(0.f ,0.f ,0.f) ;
|
||||
Desc.vLifeTime = { 0.f, 1.f };
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummy_PhysXEffectHitBox>(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this , &m_pPhysHitBox))) {
|
||||
@@ -175,6 +180,7 @@ HRESULT CDecendo::Ready_Child()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
SAFE_ADDREF(m_pPhysHitBox);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -229,21 +235,23 @@ void CDecendo::OnCollision(CGameObject* pOther , void* pDesc)
|
||||
Get_PartObject<CEditEffect>("Decendo_Down")->Get_Component<CTransform>()->LookAt(vPlayerPos);
|
||||
Get_PartObject<CEditEffect>("Decendo_Smoke")->Get_Component<CTransform>()->LookAt(vPlayerPos);
|
||||
|
||||
Get_PartObject<CEditEffect>("Decendo_Cricle_S")->Set_Visible(false);
|
||||
Get_PartObject<CEditEffect>()->Set_Visible(false);
|
||||
|
||||
Get_PartObject<CTrailObject>()->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f));
|
||||
Get_PartObject<CTrailObject>()->Set_Visible(false);
|
||||
|
||||
|
||||
m_pPhysHitBox->Set_Dead();
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
}
|
||||
|
||||
void CDecendo::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
//if(m_pPhysHitBox != nullptr)
|
||||
// if (m_pPhysHitBox->Get_Depth() == false)
|
||||
// SAFE_RELEASE(m_pPhysHitBox);
|
||||
if(m_pPhysHitBox != nullptr)
|
||||
if (m_pPhysHitBox->isDead() == false)
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
|
||||
SAFE_RELEASE(m_pProjectile_Blur);
|
||||
SAFE_RELEASE(m_pProjectile);
|
||||
|
||||
@@ -40,10 +40,6 @@ void CDummy_PhysXEffectHitBox::Priority_Update(_float fTimeDelta)
|
||||
void CDummy_PhysXEffectHitBox::Update(_float fTimeDelta)
|
||||
{
|
||||
m_pTransformCom->AccumulateMomentum(XMLoadFloat3(&m_vDeltaPos));
|
||||
m_vLifeTime.x += fTimeDelta;
|
||||
if (m_vLifeTime.x > m_vLifeTime.y) {
|
||||
m_bDead = true;
|
||||
}
|
||||
}
|
||||
|
||||
void CDummy_PhysXEffectHitBox::Late_Update(_float fTimeDelta)
|
||||
@@ -110,6 +106,8 @@ HRESULT CDummy_PhysXEffectHitBox::Ready_Components(void* pArg)
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pCharacter_Controller->SetGravity(pDesc->bGravity);
|
||||
}
|
||||
m_pCharacter_Controller->Set_Position(m_pTransformCom->Get_State(STATE::POSITION));
|
||||
/* Com_Shader */
|
||||
|
||||
@@ -79,6 +79,12 @@ void CEditEffect::Late_Update(_float fTimeDelta)
|
||||
}
|
||||
|
||||
|
||||
if (m_EffectInfo.isBloom == true)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLOOM, this);
|
||||
}
|
||||
|
||||
|
||||
if (m_EffectInfo.isBlur == true)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLUR, this);
|
||||
@@ -401,9 +407,12 @@ void CEditEffect::Describe_Entity()
|
||||
const char* pLerp[] = { "Linear" , "EaseInQuad", "EaseOutQuad", "EaseInCubic" , "EaseOutCubic" , "EaseInOutSin" , "EaseInBack" , "Expo" , "Circle" };
|
||||
const char* pRenderNames[] = { "PRIORITY" , "SHADOW", "NONBLEND", "DECAL", "BLUR" , "NONLIGHT" ,"EFFECT", "BLEND" , "UI" };
|
||||
const char* pEffectType[] = { "EFFECT" , "TRAIL" };
|
||||
const char* pShaderPass[] = { "DEFAULT" , "NON_NOMALMAP" , "BLUR" , "WEIGHTBLEND" , "NON_WORLD" , "NON_WORLD_BLUR", "ALPHA_BLEND"};
|
||||
const char* pShaderPass[] = { "DEFAULT" , "NON_NOMALMAP" , "BLUR" , "WEIGHTBLEND" , "NON_WORLD" , "NON_WORLD_BLUR", "ALPHA_BLEND", "BLOOM"};
|
||||
const char* pBloomType[] = { "NONE" , "BASIC" , "MUILTY"};
|
||||
|
||||
_int iCurrentItem = static_cast<_int>(m_EffectInfo.eRenderOrder);
|
||||
_int iCurrentType = static_cast<_int>(m_EffectInfo.eEffectType);
|
||||
_int iCurrentBloomType = static_cast<_int>(m_EffectInfo.eBloomType);
|
||||
_int iCurrentPass = static_cast<_int>(m_EffectInfo.eShaderPass);
|
||||
|
||||
if (ImGui::Combo("Render Order", &iCurrentItem, pRenderNames, ENUM_CLASS(RENDER::END)))
|
||||
@@ -422,6 +431,7 @@ void CEditEffect::Describe_Entity()
|
||||
}
|
||||
|
||||
|
||||
|
||||
GUI::Checkbox("Visible", &m_bVisible);
|
||||
GUI::Checkbox("GO", &m_isGoStraight);
|
||||
|
||||
@@ -432,6 +442,8 @@ void CEditEffect::Describe_Entity()
|
||||
GUI::Checkbox("Dissolve", &m_EffectInfo.isDissolve);
|
||||
GUI::Checkbox("Distortion", &m_EffectInfo.isDistortion);
|
||||
GUI::Checkbox("Noise", &m_EffectInfo.isNoise);
|
||||
GUI::Checkbox("Bloom", &m_EffectInfo.isBloom);
|
||||
GUI::Checkbox("Blur", &m_EffectInfo.isBlur);
|
||||
|
||||
if (GUI::Checkbox("Billboard", &m_EffectInfo.isBillboard))
|
||||
{
|
||||
@@ -446,20 +458,24 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
if (GUI::TreeNode("BLUR"))
|
||||
if (m_EffectInfo.isBlur)
|
||||
{
|
||||
GUI::Checkbox("Blur", &m_EffectInfo.isBlur);
|
||||
GUI::Checkbox("OnlyBlur", &m_EffectInfo.isOnlyBlur);
|
||||
if (GUI::TreeNode("BLUR"))
|
||||
{
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::DragFloat("BlurIntensity", &m_EffectInfo.fBlurIntensity, 0.005f, 0.f, 1.f);
|
||||
GUI::DragInt("BlurWeight", &m_EffectInfo.iBlurWeight, 2.f, 0, 128);
|
||||
GUI::Checkbox("OnlyBlur", &m_EffectInfo.isOnlyBlur);
|
||||
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::DragFloat("BlurIntensity", &m_EffectInfo.fBlurIntensity, 0.005f, 0.f, 1.f);
|
||||
GUI::DragInt("BlurWeight", &m_EffectInfo.iBlurWeight, 2.f, 0, 128);
|
||||
|
||||
GUI::TreePop();
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
GUI::TreePop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (GUI::TreeNode("TEX BLUR"))
|
||||
{
|
||||
@@ -474,8 +490,26 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
GUI::TreePop();
|
||||
}
|
||||
if (m_EffectInfo.isBloom)
|
||||
{
|
||||
if (GUI::TreeNode("BLOOM"))
|
||||
{
|
||||
if (ImGui::Combo("Bloom Type", &iCurrentBloomType, pBloomType, ENUM_CLASS(BLOOM_TYPE::END)))
|
||||
{
|
||||
m_EffectInfo.eBloomType = static_cast<BLOOM_TYPE>(iCurrentBloomType);
|
||||
}
|
||||
|
||||
GUI::Checkbox("BloomDissolve", &m_EffectInfo.isBloomDissolve);
|
||||
GUI::Checkbox("BloomReverseDissolve", &m_EffectInfo.isBloomReverseDissolve);
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::DragFloat("fBloomStrength", &m_EffectInfo.fBloomStrength, 0.001f, 0.f);
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
GUI::TreePop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (GUI::TreeNode("EMISSIVE"))
|
||||
{
|
||||
|
||||
@@ -109,6 +109,46 @@ HRESULT CEffectObject::Render_Blur()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffectObject::Render_Bloom()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fBloomStrength", &m_EffectInfo.fBloomStrength, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iBloomType", &m_EffectInfo.eBloomType, sizeof(_int)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isBloomDissolve", &m_EffectInfo.isBloomDissolve, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isBloomReverseDissolve", &m_EffectInfo.isBloomReverseDissolve, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < m_pInstance_ModelCom->Get_NumMeshes(); i++)
|
||||
{
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_INSTANCE_MODEL::BLOOM)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pInstance_ModelCom->Render(i)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
||||
@@ -440,6 +480,9 @@ HRESULT CEffectObject::LoadPre(const _char* pFilePath, LEVEL eLevel)
|
||||
|
||||
memcpy(&m_EffectInfo, &PreEffectInfo, sizeof(PRE_EFFECT_INFO));
|
||||
|
||||
|
||||
|
||||
|
||||
m_EffectInfo.LightDesc.pPosition = m_pTransformCom->Get_StatePtr(STATE::POSITION);
|
||||
m_EffectInfo.LightDesc.iLevel = ENUM_CLASS(eLevel);
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "Bombard.h"
|
||||
#include "NomalJap.h"
|
||||
#include "Decendo.h"
|
||||
#include "Protego.h"
|
||||
|
||||
|
||||
CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -54,6 +55,10 @@ void CEffectPool::Priority_Update(_float fTimeDelta)
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
(*m_EffectList[ENUM_CLASS(SKILL_TYPE::PROTEGO)].begin())->Describe_Entity();
|
||||
|
||||
}
|
||||
|
||||
void CEffectPool::Update(_float fTimeDelta)
|
||||
@@ -140,6 +145,16 @@ HRESULT CEffectPool::Ready_Effect()
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::PROTEGO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* {
|
||||
|
||||
CProtego* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CProtego>(iPrototypeLevel, nullptr);
|
||||
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user