@@ -49,6 +49,10 @@ HRESULT CAccio::Initialize(void* pArg)
|
||||
m_pRope_Trail = Get_PartObject<CTrailObject>("Accio_Trail");
|
||||
m_pWandLight = Get_PartObject<CEffectParts>("Wand_Light");
|
||||
m_pRotate0 = Get_PartObject<CEffectParts>("Rotate0");
|
||||
m_pRotate1 = Get_PartObject<CEffectParts>("Rotate1");
|
||||
|
||||
m_pAccio_PT = Get_PartObject<CEffectParts>("Accio_PT");
|
||||
m_pAccio_Distortion = Get_PartObject<CEffectParts>("Accio_Distortion");
|
||||
|
||||
if (m_pRope_Trail == nullptr)
|
||||
return E_FAIL;
|
||||
@@ -56,10 +60,13 @@ HRESULT CAccio::Initialize(void* pArg)
|
||||
SAFE_ADDREF(m_pRope_Trail);
|
||||
SAFE_ADDREF(m_pWandLight);
|
||||
SAFE_ADDREF(m_pRotate0);
|
||||
SAFE_ADDREF(m_pRotate1);
|
||||
SAFE_ADDREF(m_pAccio_PT);
|
||||
SAFE_ADDREF(m_pAccio_Distortion);
|
||||
|
||||
XMStoreFloat4x4(&m_TrailWorld, XMMatrixIdentity());
|
||||
|
||||
m_fDuration = 5.f;
|
||||
m_fDuration = 6.f;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -97,14 +104,17 @@ void CAccio::Update(_float fTimeDelta)
|
||||
TrailPos.r[3] += XMLoadFloat3(&m_vCameraLook) * m_fLinearSpeed;
|
||||
|
||||
|
||||
|
||||
|
||||
if (m_bHit == true && m_pEnemyCCT != nullptr)
|
||||
{
|
||||
/* 특정 대상과 충돌 했다면*/
|
||||
TrailPos.r[3] = m_pEnemyCCT->Get_Position();
|
||||
|
||||
m_pRotate0->Get_Component<CTransform>()->Set_State(STATE::POSITION, m_pEnemyCCT->Get_FootPosition());
|
||||
_vector vPos = m_pEnemyCCT->Get_FootPosition();
|
||||
|
||||
m_pRotate0->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
m_pRotate1->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
m_pAccio_PT->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
m_pAccio_Distortion->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
}
|
||||
|
||||
XMStoreFloat4x4(&m_TrailWorld, TrailPos);
|
||||
@@ -164,12 +174,15 @@ HRESULT CAccio::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
_vector WandPos = pPlayer->Get_WandPos().r[3];
|
||||
|
||||
CEffectParts* pCircle = Get_PartObject<CEffectParts>("Accio_Circle");
|
||||
|
||||
CEffectParts* pSpread_Circle = Get_PartObject<CEffectParts>("Spread_Circle");
|
||||
|
||||
m_pRope_Trail->Set_Visible(true);
|
||||
pCircle->Set_Visible(true);
|
||||
|
||||
m_pWandLight->Set_Visible(true);
|
||||
m_pWandLight->Get_Effect_Info()->isDissolve = false;
|
||||
m_pWandLight->Get_Effect_Info()->isLightDissolve = false;
|
||||
|
||||
pSpread_Circle->Set_Visible(true);
|
||||
|
||||
m_pRope_Trail->Get_Component<CTrail>()->Reset_Trail();
|
||||
@@ -209,6 +222,8 @@ HRESULT CAccio::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
|
||||
m_fAccRotateTime = 0.f;
|
||||
|
||||
m_pRope_Trail->Get_TrailInfo()->fMass = 0.05f;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -269,31 +284,42 @@ void CAccio::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
|
||||
|
||||
CEffectParts* pHit = Get_PartObject<CEffectParts>("Accio_Hit");
|
||||
CEffectParts* pHit0 = Get_PartObject<CEffectParts>("Accio_Hit0");
|
||||
|
||||
|
||||
pHit->Set_Visible(true);
|
||||
pHit->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
|
||||
pHit0->Set_Visible(true);
|
||||
pHit0->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
|
||||
m_pAccio_Distortion->Set_Visible(true);
|
||||
|
||||
|
||||
|
||||
CEffectParts* pCircle = Get_PartObject<CEffectParts>("Accio_Circle");
|
||||
CEffectParts* pWandLight = Get_PartObject<CEffectParts>("Wand_Light");
|
||||
CEffectParts* pSpread_Circle = Get_PartObject<CEffectParts>("Spread_Circle");
|
||||
CEffectParts* pAccio_PT = Get_PartObject<CEffectParts>("Accio_PT");
|
||||
|
||||
|
||||
pCircle->Set_Visible(false);
|
||||
pWandLight->Set_Visible(false);
|
||||
pSpread_Circle->Set_Visible(false);
|
||||
|
||||
m_pWandLight->Get_Effect_Info()->isDissolve = true;
|
||||
m_pWandLight->Get_Effect_Info()->isLightDissolve = true;
|
||||
|
||||
m_pRotate0->Set_Visible(true);
|
||||
pAccio_PT->Set_Visible(true);
|
||||
m_pRotate1->Set_Visible(true);
|
||||
|
||||
pAccio_PT->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
m_pAccio_PT->Set_Visible(true);
|
||||
m_pAccio_PT->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
|
||||
m_pRope_Trail->Get_Component<CTrail>()->Rope_Fix(true);
|
||||
|
||||
if(m_isDissolve)
|
||||
m_pRope_Trail->SetDissolve(true);
|
||||
|
||||
m_pRope_Trail->Get_TrailInfo()->fMass = 0.1f;
|
||||
|
||||
}
|
||||
|
||||
void CAccio::Free()
|
||||
@@ -303,6 +329,9 @@ void CAccio::Free()
|
||||
SAFE_RELEASE(m_pRope_Trail);
|
||||
SAFE_RELEASE(m_pWandLight);
|
||||
SAFE_RELEASE(m_pRotate0);
|
||||
SAFE_RELEASE(m_pRotate1);
|
||||
SAFE_RELEASE(m_pAccio_PT);
|
||||
SAFE_RELEASE(m_pAccio_Distortion);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
|
||||
@@ -931,6 +931,11 @@ HRESULT CEffectObject::Bind_ShaderResources()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fModelDistortIntensity", &m_EffectInfo.fModelDistortIntensity, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (m_pDiffuse_TextureCom != nullptr)
|
||||
{
|
||||
|
||||
@@ -1780,6 +1780,15 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
|
||||
});
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Models/Effect/Lightning", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) {
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, wstrFileName,
|
||||
CInstance_Model::Create(m_pDevice, m_pContext, pFilePath, MODEL::NONANIM, XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixIdentity(), 0))))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
});
|
||||
|
||||
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
|
||||
|
||||
#pragma region UI
|
||||
|
||||
@@ -40,6 +40,9 @@ class CAccio final : public CEffect_Container
|
||||
class CTrailObject* m_pRope_Trail = { nullptr };
|
||||
class CEffectParts* m_pWandLight = { nullptr };
|
||||
class CEffectParts* m_pRotate0 = { nullptr };
|
||||
class CEffectParts* m_pRotate1 = { nullptr };
|
||||
class CEffectParts* m_pAccio_PT = { nullptr };
|
||||
class CEffectParts* m_pAccio_Distortion = { nullptr };
|
||||
|
||||
_float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f }; // 현재 발사 된 위치
|
||||
_float4 m_vTargetPos = { 0.f, 0.f, 0.f, 1.f }; // 현재 타게팅 된 위치
|
||||
@@ -50,9 +53,9 @@ class CAccio final : public CEffect_Container
|
||||
CCharacter_Controller* m_pEnemyCCT = { nullptr };
|
||||
|
||||
_float m_fAccRotateTime = {};
|
||||
_float m_fTurnSpeed = { 65.f };
|
||||
_float m_fRange = { 1.f };
|
||||
_float m_fAttenuation = { 65.f };
|
||||
_float m_fTurnSpeed = { 55.f };
|
||||
_float m_fRange = { 0.7f };
|
||||
_float m_fAttenuation = { 85.f };
|
||||
_bool m_isDissolve = { true };
|
||||
_bool m_isReverse = { false };
|
||||
_int m_iLoopTime = { 5 };
|
||||
|
||||
@@ -181,8 +181,8 @@ namespace Client
|
||||
|
||||
_float3 vDissolveValue = {};
|
||||
|
||||
|
||||
_float2 vPadding0 = {};
|
||||
_float fModelDistortIntensity = {};
|
||||
_float vPadding0 = {};
|
||||
|
||||
_float fLightDeley = {};
|
||||
_float fLightIntensity = {};
|
||||
@@ -209,6 +209,7 @@ namespace Client
|
||||
_bool isPadding2 = {};
|
||||
_bool isPadding3 = {};
|
||||
_bool isPadding4 = {};
|
||||
|
||||
}EFFECT_INFO;
|
||||
|
||||
typedef struct tagTrailInfo
|
||||
|
||||
@@ -34,6 +34,7 @@ class CTrailObject final : public CPartObject
|
||||
HRESULT Load_Trail(const _char* pPath, LEVEL eLevel);
|
||||
|
||||
void SetDissolve(_bool isDissolve) { m_TrailInfo.isDissolve = true; }
|
||||
TRAIL_INFO* Get_TrailInfo() { return &m_TrailInfo; }
|
||||
|
||||
private:
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
|
||||
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.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -794,7 +794,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_EMBOSS(PS_IN In)
|
||||
{
|
||||
PS_OUT_FLT4_SINGLE Out;
|
||||
float2 uv = In.vTexcoord;
|
||||
float fSrcAlpha = g_DiffuseTexture.Sample(PointSampler, uv).a;
|
||||
float4 fSrcAlpha = g_DiffuseTexture.Sample(PointSampler, uv);
|
||||
float2 vSrcTexelSize = float2(1.f / g_vResolution.x, 1.f / g_vResolution.y);
|
||||
float3 vColor = (0.f, 0.f, 0.f);
|
||||
|
||||
@@ -806,7 +806,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_EMBOSS(PS_IN In)
|
||||
|
||||
float fBloomIntensity = GetBloomCurve(fIntensity, g_fBloomThreshold, g_iBloomEmbossingPass);
|
||||
float3 bloomColor = (vColor * fBloomIntensity) / fIntensity;
|
||||
Out.vFirstTarget = float4(bloomColor, fSrcAlpha);
|
||||
Out.vFirstTarget = fSrcAlpha;
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -1299,7 +1299,7 @@ technique11 DefaultTechnique
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_Blend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_CAPTURE();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN_EMBOSS();
|
||||
|
||||
@@ -209,6 +209,9 @@ void CS_MAIN(
|
||||
|
||||
float fDrag = particleValue.fDrag;
|
||||
|
||||
if (fMoveLerpOption != 0.f)
|
||||
fDrag = SelectLerpUV(float2(particleValue.fDrag, 0.f), fTime, fMoveLerpOption).x;
|
||||
|
||||
if (particleValue.fDrag < FLT_EPSILON5)
|
||||
fDrag = 1;
|
||||
|
||||
@@ -230,6 +233,9 @@ void CS_MAIN(
|
||||
|
||||
float fDrag = particleValue.fDrag;
|
||||
|
||||
if (fMoveLerpOption != 0.f)
|
||||
fDrag = SelectLerpUV(float2(particleValue.fDrag, 0.f), fTime, fMoveLerpOption).x;
|
||||
|
||||
if (particleValue.fDrag < FLT_EPSILON5)
|
||||
fDrag = 1;
|
||||
|
||||
@@ -251,6 +257,9 @@ void CS_MAIN(
|
||||
|
||||
float fDrag = particleValue.fDrag;
|
||||
|
||||
if (fMoveLerpOption != 0.f)
|
||||
fDrag = SelectLerpUV(float2(particleValue.fDrag, 0.f), fTime, fMoveLerpOption).x;
|
||||
|
||||
if (particleValue.fDrag < FLT_EPSILON5)
|
||||
fDrag = 1;
|
||||
|
||||
|
||||
@@ -872,10 +872,8 @@ PS_BLOOM_OUT PS_BLOOM(PS_IN In)
|
||||
fBloomStrength = g_fBloomStrength * ((In.vLifeTime.x / In.vLifeTime.y));
|
||||
}
|
||||
|
||||
if (vMtrlDiffuse.a <= 0.1f)
|
||||
discard;
|
||||
|
||||
Out.vDiffuse = vector(vMtrlDiffuse.rgb * fBloomStrength, (float) g_iBloomType / 255.f);
|
||||
|
||||
Out.vDiffuse = vMtrlDiffuse * fBloomStrength;
|
||||
|
||||
return Out;
|
||||
|
||||
@@ -944,15 +942,18 @@ PS_BLOOM_OUT PS_DISTORTION(PS_IN In)
|
||||
vector vMtrlDiffuse;
|
||||
|
||||
|
||||
Out.vDiffuse = DrawEffect(In);
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
if (Out.vDiffuse.a == 0.f)
|
||||
vMtrlDiffuse = SoftEffect(In, vMtrlDiffuse);
|
||||
|
||||
if (vMtrlDiffuse.a == 0.f)
|
||||
discard;
|
||||
|
||||
|
||||
Out.vDiffuse = vMtrlDiffuse;
|
||||
|
||||
/* b,a 성분은 0으로 밀어준다. */
|
||||
|
||||
|
||||
|
||||
/* 거리 기반으로 디스토션 할 객체 중점으로부터의 거리 구해냄. */
|
||||
/* 중점이라면 r은 1, 중점에서의 거리가 멀수록 1에서 r 성분의 크기가 줄어드는 형태. */
|
||||
Out.vDiffuse.r = 1 - length(In.vTexcoord - float2(0.5f, 0.5f));
|
||||
@@ -1054,7 +1055,7 @@ technique11 DefaultTechnique
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_Blend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_BLOOM();
|
||||
@@ -1064,7 +1065,7 @@ technique11 DefaultTechnique
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_Blend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_NOWORLD();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_BLOOM();
|
||||
|
||||
@@ -1408,6 +1408,17 @@ HRESULT CLoader::Loading_For_Effect()
|
||||
|
||||
});
|
||||
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Models/Effect/Lightning", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) {
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::EFFECT), wstrFileName,
|
||||
CInstance_Model::Create(m_pDevice, m_pContext, pFilePath, MODEL::NONANIM, XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixIdentity(), 0))))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
|
||||
});
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Desc_Box"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Box/Box.bin", XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
@@ -794,7 +794,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_EMBOSS(PS_IN In)
|
||||
{
|
||||
PS_OUT_FLT4_SINGLE Out;
|
||||
float2 uv = In.vTexcoord;
|
||||
float fSrcAlpha = g_DiffuseTexture.Sample(PointSampler, uv).a;
|
||||
float4 fSrcAlpha = g_DiffuseTexture.Sample(PointSampler, uv);
|
||||
float2 vSrcTexelSize = float2(1.f / g_vResolution.x, 1.f / g_vResolution.y);
|
||||
float3 vColor = (0.f, 0.f, 0.f);
|
||||
|
||||
@@ -806,7 +806,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_EMBOSS(PS_IN In)
|
||||
|
||||
float fBloomIntensity = GetBloomCurve(fIntensity, g_fBloomThreshold, g_iBloomEmbossingPass);
|
||||
float3 bloomColor = (vColor * fBloomIntensity) / fIntensity;
|
||||
Out.vFirstTarget = float4(bloomColor, fSrcAlpha);
|
||||
Out.vFirstTarget = fSrcAlpha;
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -1299,7 +1299,7 @@ technique11 DefaultTechnique
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_Blend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_CAPTURE();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN_EMBOSS();
|
||||
|
||||
@@ -209,6 +209,9 @@ void CS_MAIN(
|
||||
|
||||
float fDrag = particleValue.fDrag;
|
||||
|
||||
if (fMoveLerpOption != 0.f)
|
||||
fDrag = SelectLerpUV(float2(particleValue.fDrag, 0.f), fTime, fMoveLerpOption).x;
|
||||
|
||||
if (particleValue.fDrag < FLT_EPSILON5)
|
||||
fDrag = 1;
|
||||
|
||||
@@ -230,6 +233,9 @@ void CS_MAIN(
|
||||
|
||||
float fDrag = particleValue.fDrag;
|
||||
|
||||
if (fMoveLerpOption != 0.f)
|
||||
fDrag = SelectLerpUV(float2(particleValue.fDrag, 0.f), fTime, fMoveLerpOption).x;
|
||||
|
||||
if (particleValue.fDrag < FLT_EPSILON5)
|
||||
fDrag = 1;
|
||||
|
||||
@@ -251,6 +257,9 @@ void CS_MAIN(
|
||||
|
||||
float fDrag = particleValue.fDrag;
|
||||
|
||||
if (fMoveLerpOption != 0.f)
|
||||
fDrag = SelectLerpUV(float2(particleValue.fDrag, 0.f), fTime, fMoveLerpOption).x;
|
||||
|
||||
if (particleValue.fDrag < FLT_EPSILON5)
|
||||
fDrag = 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user