push
This commit is contained in:
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.
@@ -64,7 +64,7 @@ int g_iDiffuseMoveLerpOption;
|
||||
int g_iNoiseMoveLerpOption;
|
||||
|
||||
//
|
||||
float2 g_vDiffuseDistortionUVGainAmount;
|
||||
float2 g_vDistortionTime;
|
||||
float2 g_vMaskDistortionUVGainAmount;
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@ float4 DrawEffect(PS_IN In)
|
||||
float2 vDelay = g_ParticleValue[In.iGPUIndex].vDelay;
|
||||
|
||||
|
||||
if (vDelay.x <= vDelay.y)
|
||||
if (vDelay.x < vDelay.y)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
@@ -272,26 +272,6 @@ float4 DrawEffect(PS_IN In)
|
||||
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;
|
||||
|
||||
}
|
||||
|
||||
if (g_isDiffuseBlur)
|
||||
{
|
||||
float4 fAccDiffuse;
|
||||
@@ -374,8 +354,17 @@ float4 DrawEffect(PS_IN In)
|
||||
|
||||
vMtrlDistortion = g_DistortionTexture.Sample(DefaultSampler, vDistortionUV);
|
||||
|
||||
|
||||
|
||||
float fDistortionIntensity = g_fNoiseDistortionIntensity;
|
||||
|
||||
if (g_vDistortionTime.y != 0)
|
||||
{
|
||||
fDistortionIntensity = g_fNoiseDistortionIntensity * ((In.vLifeTime.x / In.vLifeTime.y));
|
||||
}
|
||||
|
||||
//디스토션(노이즈) 텍스쳐로 uv를 왜곡함
|
||||
vMaskTexcoord = vMaskTexcoord + (vMtrlDistortion - 0.5f).r * g_fNoiseDistortionIntensity;
|
||||
vMaskTexcoord = vMaskTexcoord + (vMtrlDistortion - 0.5f).r * fDistortionIntensity;
|
||||
|
||||
}
|
||||
|
||||
@@ -707,7 +696,7 @@ PS_BLOOM_OUT PS_BLOOM(PS_IN In)
|
||||
|
||||
//// 색깔 추가할 처리 (이미시브)
|
||||
|
||||
vMtrlDiffuse += EmissiveDraw(In);
|
||||
vMtrlDiffuse += EmissiveDraw(In);
|
||||
|
||||
float fBloomStrength = g_fBloomStrength;
|
||||
|
||||
@@ -736,8 +725,7 @@ PS_BLOOM_OUT PS_BLEND(PS_IN In)
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
|
||||
|
||||
|
||||
//int2 iTexel = int2(In.vPosition.xy);
|
||||
|
||||
//float fDepthStencilValue = g_DepthStencilTexture.Load(int3(iTex el, 0)).r;
|
||||
|
||||
@@ -407,7 +407,7 @@ 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" ,"BLOOM" , "UI" };
|
||||
const char* pRenderNames[] = { "PRIORITY" , "SHADOW", "NONBLEND", "DECAL", "BLUR" , "NONLIGHT" ,"EFFECT", "BLEND" ,"BLOOM" , "UI", "OCCLUSION"};
|
||||
const char* pEffectType[] = { "EFFECT" , "TRAIL" };
|
||||
const char* pShaderPass[] = { "DEFAULT" , "NON_NOMALMAP" , "BLUR" , "WEIGHTBLEND" , "NON_WORLD" , "NON_WORLD_BLUR", "BLEND", "BLEND_NOWORLD", "BLOOM" ,"BLOOM_NOWORLD" };
|
||||
const char* pBloomType[] = { "NONE" , "BASIC" , "MUILTY"};
|
||||
@@ -737,7 +737,7 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
GUI::Spacing();
|
||||
|
||||
GUI::DragFloat2("DiffuseDistortionUVGainAmount", (_float*)&m_EffectInfo.vDiffuseDistortionUVGainAmount, 0.01f);
|
||||
GUI::DragFloat2("vDistortionTime", (_float*)&m_EffectInfo.vDistortionTime, 0.01f);
|
||||
|
||||
_int iDiffuseNoiseMoveLerpOption = (_int)m_EffectInfo.iDiffuseDistortionMoveLerpOption;
|
||||
|
||||
|
||||
@@ -819,7 +819,7 @@ HRESULT CEffectObject::Bind_ShaderResources()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vDiffuseDistortionUVGainAmount", &m_EffectInfo.vDiffuseDistortionUVGainAmount, sizeof(_float2)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vDistortionTime", &m_EffectInfo.vDistortionTime, sizeof(_float2)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,8 +49,7 @@ void CEffectPool::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (false == (*iter)->Get_Visible())
|
||||
{
|
||||
//SAFE_RELEASE(*iter);
|
||||
//iter = m_ActiveEffectList.erase(iter);
|
||||
++iter;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -59,6 +58,8 @@ void CEffectPool::Priority_Update(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
|
||||
(*m_EffectList[ENUM_CLASS(SKILL_TYPE::LEVIOSO)].begin())->Describe_Entity();
|
||||
|
||||
}
|
||||
|
||||
void CEffectPool::Update(_float fTimeDelta)
|
||||
@@ -67,8 +68,7 @@ void CEffectPool::Update(_float fTimeDelta)
|
||||
{
|
||||
if (false == (*iter)->Get_Visible())
|
||||
{
|
||||
//SAFE_RELEASE(*iter);
|
||||
//iter = m_ActiveEffectList.erase(iter);
|
||||
++iter;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -49,7 +49,10 @@ HRESULT CLevioso::Initialize(void* pArg)
|
||||
|
||||
m_wstrEffectName = L"Levioso";
|
||||
|
||||
m_fDuration = 3.5f;
|
||||
m_fTurnSpeed = 10.f;
|
||||
m_fRange = 1.f;
|
||||
|
||||
m_fDuration = 1.5f;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -74,18 +77,23 @@ void CLevioso::Update(_float fTimeDelta)
|
||||
|
||||
|
||||
|
||||
m_pLeviosoPJ_0->Get_Component<CTransform>()->Translation(m_vOwnerLook * 0.5f);
|
||||
m_pLeviosoPJ_1->Get_Component<CTransform>()->Translation(m_vOwnerLook * 0.5f);
|
||||
m_pLeviosoPJ_0->Get_Component<CTransform>()->Translation(m_vOwnerLook * 0.25f);
|
||||
m_pLeviosoPJ_1->Get_Component<CTransform>()->Translation(m_vOwnerLook * 0.25f);
|
||||
|
||||
|
||||
m_pTrail_PT_0->Get_Component<CTransform>()->Translation(m_vOwnerLook * 0.5f);
|
||||
m_pTrail_PT_0->Get_Component<CTransform>()->Translation(m_vOwnerLook * 0.25f);
|
||||
|
||||
|
||||
|
||||
if (nullptr != m_pPhysHitBox) {
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->AccumulateMomentum(m_vOwnerLook * 0.5f);
|
||||
m_pPhysHitBox->Get_Component<CTransform>()->AccumulateMomentum(m_vOwnerLook * 0.25f);
|
||||
}
|
||||
|
||||
|
||||
_matrix WorldMat = m_pTrail_PT_0->Get_Component<CTransform>()->Get_XMWorldMatrix();
|
||||
|
||||
m_pLeviosoTrail->Trail_Update(WorldMat, fTimeDelta);
|
||||
|
||||
}
|
||||
|
||||
void CLevioso::Late_Update(_float fTimeDelta)
|
||||
@@ -102,7 +110,7 @@ void CLevioso::Late_Update(_float fTimeDelta)
|
||||
|
||||
//m_pLeviosoTrail->Get_Component<CTrail>()->Fixed_Trail(WandWorld);
|
||||
|
||||
m_pLeviosoTrail->Trail_Update(m_pTrail_PT_0->Get_Component<CTransform>()->Get_XMWorldMatrix(), fTimeDelta);
|
||||
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
@@ -119,10 +127,10 @@ HRESULT CLevioso::Pre_Setting(CGameObject* pObject)
|
||||
|
||||
Reset_EffectParts();
|
||||
|
||||
m_fAccTime = 0.f;
|
||||
__super::m_fAccTime = 0.f;
|
||||
m_fPreAccTime = 0.f;
|
||||
|
||||
m_fAccRotateTime = 0.f;
|
||||
|
||||
|
||||
|
||||
@@ -249,6 +257,11 @@ void CLevioso::Free()
|
||||
|
||||
void CLevioso::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("LEVIOSO");
|
||||
|
||||
GUI::DragFloat("TURN SPEED", &m_fTurnSpeed);
|
||||
GUI::DragFloat("RANGE", &m_fRange);
|
||||
GUI::End();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -232,8 +232,12 @@ void CNomalJap::OnCollision(CGameObject* pOther , void* pDesc)
|
||||
Get_PartObject<CTrailObject>()->Set_Visible(false);
|
||||
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);
|
||||
if (m_pPhysHitBox != nullptr)
|
||||
{
|
||||
m_pPhysHitBox->Set_Dead();
|
||||
SAFE_RELEASE(m_pPhysHitBox);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CNomalJap::Free()
|
||||
|
||||
@@ -326,6 +326,8 @@ HRESULT CTrailObject::Load_Trail(const _char* pPath, LEVEL eLevel)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pTrailCom->ReStructVB(m_TrailInfo.iNumVertex);
|
||||
|
||||
CloseHandle(hFile);
|
||||
|
||||
return S_OK;
|
||||
@@ -486,6 +488,12 @@ void CTrailObject::Describe_Entity()
|
||||
|
||||
m_pShaderCom->Describe_Entity();
|
||||
|
||||
if(GUI::InputInt("NumVertex", &m_TrailInfo.iNumVertex))
|
||||
{
|
||||
m_pTrailCom->Reset_Trail();
|
||||
m_pTrailCom->ReStructVB(m_TrailInfo.iNumVertex);
|
||||
}
|
||||
|
||||
GUI::Checkbox("Diffuse", &m_TrailInfo.isDiffuse);
|
||||
GUI::Checkbox("Masking", &m_TrailInfo.isMask);
|
||||
GUI::Checkbox("Noise", &m_TrailInfo.isNoise);
|
||||
|
||||
@@ -24,7 +24,7 @@ class CEffectObject abstract : public CPartObject
|
||||
_float2 vMaskingUVGainAmount = {};
|
||||
_float2 vNoiseUVGainAmount = {};
|
||||
|
||||
_float2 vDiffuseDistortionUVGainAmount = {};
|
||||
_float2 vDistortionTime = {};
|
||||
_float2 vMaskDistortionUVGainAmount = {};
|
||||
|
||||
_float2 vUVCutting = { 1.f ,1.f };
|
||||
|
||||
@@ -40,6 +40,9 @@ class CLevioso final : public CEffect_Container
|
||||
class CEditEffect* m_pTrail_PT_0 = { nullptr };
|
||||
|
||||
_vector m_vOwnerLook = {};
|
||||
_float m_fAccRotateTime = {};
|
||||
_float m_fTurnSpeed = {};
|
||||
_float m_fRange = {};
|
||||
public:
|
||||
static CLevioso* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
|
||||
@@ -68,6 +68,8 @@ class CTrailObject final : public CPartObject
|
||||
BLOOM_TYPE eBloomType = {};
|
||||
_float2 vBloomTime = {};
|
||||
|
||||
_int iNumVertex = {};
|
||||
|
||||
}TRAIL_INFO;
|
||||
private:
|
||||
CTrailObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -37,24 +37,8 @@ HRESULT CTrail::Initialize(void* pArg)
|
||||
|
||||
m_pVertices = new VTXPOSTEX[m_iNumVertices];
|
||||
|
||||
#pragma region VTX_BUFFER
|
||||
D3D11_BUFFER_DESC VBDesc{};
|
||||
VBDesc.ByteWidth = m_iVertexStride * m_iNumVertices;
|
||||
VBDesc.Usage = D3D11_USAGE_DYNAMIC;
|
||||
VBDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
|
||||
VBDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
||||
VBDesc.MiscFlags = 0;
|
||||
VBDesc.StructureByteStride = m_iVertexStride;
|
||||
|
||||
VTXPOSTEX* pVertices = new VTXPOSTEX[m_iNumVertices]{};
|
||||
|
||||
D3D11_SUBRESOURCE_DATA InitialVBDate{};
|
||||
InitialVBDate.pSysMem = pVertices;
|
||||
|
||||
if (FAILED(m_pDevice->CreateBuffer(&VBDesc, &InitialVBDate, &m_pVB))) {
|
||||
if (FAILED(Create_VB()))
|
||||
return E_FAIL;
|
||||
}
|
||||
Safe_Delete_Array(pVertices);
|
||||
|
||||
#pragma endregion
|
||||
|
||||
@@ -106,6 +90,34 @@ HRESULT CTrail::Initialize(void* pArg)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CTrail::Create_VB()
|
||||
{
|
||||
|
||||
if (m_pVB != nullptr)
|
||||
SAFE_RELEASE(m_pVB);
|
||||
|
||||
#pragma region VTX_BUFFER
|
||||
D3D11_BUFFER_DESC VBDesc{};
|
||||
VBDesc.ByteWidth = m_iVertexStride * m_iNumVertices;
|
||||
VBDesc.Usage = D3D11_USAGE_DYNAMIC;
|
||||
VBDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
|
||||
VBDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
||||
VBDesc.MiscFlags = 0;
|
||||
VBDesc.StructureByteStride = m_iVertexStride;
|
||||
|
||||
VTXPOSTEX* pVertices = new VTXPOSTEX[m_iNumVertices]{};
|
||||
|
||||
D3D11_SUBRESOURCE_DATA InitialVBDate{};
|
||||
InitialVBDate.pSysMem = pVertices;
|
||||
|
||||
if (FAILED(m_pDevice->CreateBuffer(&VBDesc, &InitialVBDate, &m_pVB))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
Safe_Delete_Array(pVertices);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CTrail::Trail_Update(_float fDeltaTime, _fmatrix WorldMatrix)
|
||||
{
|
||||
|
||||
@@ -214,6 +226,16 @@ void CTrail::Reset_Trail()
|
||||
m_fAccTime = 0.f;
|
||||
}
|
||||
|
||||
HRESULT CTrail::ReStructVB(_uint iNumVertices)
|
||||
{
|
||||
m_iNumVertices = iNumVertices;
|
||||
|
||||
if (FAILED(Create_VB()))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
HRESULT CTrail::Save_Trail(HANDLE hFile)
|
||||
{
|
||||
@@ -300,13 +322,10 @@ void CTrail::Free()
|
||||
void CTrail::Describe_Entity()
|
||||
{
|
||||
|
||||
GUI::Begin("TRAIL");
|
||||
|
||||
|
||||
GUI::InputFloat3("FIRST", (_float*)&m_pVertices[0]);
|
||||
GUI::InputFloat3("SECOND", (_float*)&m_pVertices[1]);
|
||||
GUI::InputFloat3("Low", (_float*)&m_TrailDesc.vLow);
|
||||
GUI::InputFloat3("High", (_float*)&m_TrailDesc.vHigh);
|
||||
|
||||
GUI::End();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ class ENGINE_DLL CTrail final :
|
||||
public:
|
||||
void Trail_Update(_float fDeltaTime, _fmatrix WorldMatrix);
|
||||
void Reset_Trail();
|
||||
HRESULT ReStructVB(_uint iNumVertices);
|
||||
|
||||
#ifdef _DEBUG
|
||||
HRESULT Save_Trail(HANDLE hFile);
|
||||
@@ -32,6 +33,7 @@ class ENGINE_DLL CTrail final :
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
HRESULT Create_VB();
|
||||
|
||||
public:
|
||||
static CTrail* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
Reference in New Issue
Block a user