diff --git a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp index 410b62f2c..d5d77cfbf 100644 --- a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp +++ b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp @@ -88,7 +88,7 @@ void CCamPosition_Shoulder::Priority_Update(_float fTimeDelta) void CCamPosition_Shoulder::Update(_float fTimeDelta) { - if (m_pGameInstance->Key_Up(DIK_O)) { + if (m_pGameInstance->Key_Up(DIK_INSERT)) { m_pBinded_Camera->Toggle_Priority(); } if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_SHOULDER))) { diff --git a/Jusin154_Team3D/Client/Private/EffectParts.cpp b/Jusin154_Team3D/Client/Private/EffectParts.cpp index 7baa44447..c94f801eb 100644 --- a/Jusin154_Team3D/Client/Private/EffectParts.cpp +++ b/Jusin154_Team3D/Client/Private/EffectParts.cpp @@ -47,10 +47,7 @@ void CEffectParts::Update(_float fTimeDelta) if (m_pInstance_ModelCom == nullptr) return; - m_pInstance_ModelCom->Drop(fTimeDelta); - if (m_EffectInfo.isBillboard) - m_pGameInstance->BillBoard(m_pTransformCom); } @@ -64,6 +61,9 @@ void CEffectParts::Late_Update(_float fTimeDelta) if (m_pInstance_ModelCom == nullptr) return; + m_pInstance_ModelCom->Drop(fTimeDelta); + + if (m_EffectInfo.isBillboard) m_pGameInstance->BillBoard(m_pTransformCom); diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp index 2113dc2ea..b2c8c68d4 100644 --- a/Jusin154_Team3D/Client/Private/Player_States.cpp +++ b/Jusin154_Team3D/Client/Private/Player_States.cpp @@ -628,6 +628,7 @@ void CPlayer::Behavior_CombatEnter() case STATEANIM::DEPULSO: pairAnimInfo = m_Animation[STATEANIM::DEPULSO]; m_eSpell = STATEANIM::END; + break; case STATEANIM::DIFFINDO: pairAnimInfo = m_Animation[STATEANIM::DIFFINDO]; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle1.bin index b10f481a1..245479070 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle1.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle1.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:553a743d2dec286f4a8e60f16234ee60a649ba11db65ce57d0a581076f51d46b +oid sha256:6d20b4f1e88798301e3cf0c99b841d1d29b6aa6001aa90196e5204470e7aff46 size 792 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_0.bin index 323ba9e67..795379321 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a7fe1f3eb2344e68a1e04d5a12b47e4cd6b34e132a94975a7ec57ea06630f4ce +oid sha256:b634351811718a4303a72b3467f33d655ef11852655a68d9254b9bd10a16a33d size 794 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_1.bin index 3e51743f6..c26a138e7 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_1.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_1.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:70670ea59ce71ddd5f8ed30d2685f21faf4dcb2ad060c2fc6e51d232eb1f0be3 +oid sha256:6efb883040983da9842d0d63d33d0beb1ac52c723a3341d2339e433eea0cf1a1 size 794 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_2.bin index 47b18c707..1c8ad4c1a 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_2.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_2.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3e717285622cd1a36fdc9434e8109aad9b83f11a753cf1cd811d836fe656ec2d +oid sha256:955eef7ca633e7f2fdbc15fd7c9fa790597514261ee6251e9b223188db2a088c size 786 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_3.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_3.bin index 6cbcb4034..428236f32 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_3.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_3.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:71a50a5ab505d00b25c12abb86e883f2ef928bc2bc0fa43175aceb30d5b3d390 +oid sha256:60262a4c7b411a60a94f8d8ecb462c823392843a76b05cc45e60c2635f58dd1a size 786 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Smoke.bin index 22fab4b9b..befd7ad57 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Smoke.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Smoke.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c0f0445b81bf913674d0a1c930e5a41c2f79559c2e72e479abb40fe1091fa34b -size 741 +oid sha256:eb72212ab3646a4c810c7e09a336ca47a6602bab438a008bcd06da9378b886cd +size 752 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_PT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_PT0.bin index 22cce70c5..836af987e 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_PT0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_PT0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4159ecd17d8841b5e4c65e68eeeb0ee1d6c5f8ea54f66197557fde5278cb7100 +oid sha256:833d0014fe0a82a96e996d9dc0cec076235b299b49d3900abc878cd1834c0449 size 790 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Smoke.bin index 203a6608e..a69543fd8 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Smoke.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Smoke.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1337e4494de24daa6fe06b8f1199ea2dd79117d57f18a2c547bf20f106bc36bf -size 743 +oid sha256:d3b8c8e33e690b492532fb02dab25682a7f88460c5667404fb3c59925498e529 +size 750 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapPT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapPT0.bin index 160a6ebab..bd668f84f 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapPT0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Jap/JapPT0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:af517ebb169ff53865ede7d92fd067b9dcf957a065be6033e616feb32c11e94b +oid sha256:5a10c067013027c37e167061cb20fc6695c280fb058fa12f200acf8c9013c059 size 751 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_PJ0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_PJ0.bin new file mode 100644 index 000000000..2cdbb8912 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_PJ0.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19370f1908385dba9f60b5b1051cbd627cf61a606bc156baf92fa3dc1169c9d1 +size 706 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_PJ1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_PJ1.bin new file mode 100644 index 000000000..0f5ffaf6e --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_PJ1.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:344c68bb24620faea30fa50ae96f09823913b139e2d33134831d480f10180295 +size 706 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Trail.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Trail.trail new file mode 100644 index 000000000..996b51af6 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Levioso_Trail.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Trail_PT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Trail_PT0.bin new file mode 100644 index 000000000..cb42d5a41 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Levioso/Trail_PT0.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bd33f0220332dd3e3d1757bd84f9431c1b765231cd712ebf52a62fabf88b92ca +size 767 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Levioso.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Levioso.bin new file mode 100644 index 000000000..15d72f328 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Levioso.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df3c185b85b6beb78e13d90806d8330b3249b1613edf96ace5be5e4135ddfcca +size 250 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Revelio.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Revelio.bin index 21c824fa4..4c8852970 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Revelio.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Revelio.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7a28c04c8fbea5b4cceead3a958fa8526f9bcd814f6b3f336adaf0d30d10a955 -size 178 +oid sha256:361c1b52fd37940363fcd6713e1d77401a655af5c27d3b9f4f47ea116cb5379d +size 240 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/Revelio_Ring.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/Revelio_Ring.bin new file mode 100644 index 000000000..517f86b0c --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/Revelio_Ring.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cabd9577d7053ac437a4132bdffdb7b6d89606aa6f6ab38eebf04ecc94f27e44 +size 821 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_B.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_B.bin index d2cc3bcac..30c3774c1 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_B.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_B.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f89a970d7d98c25da797fafd66c660e0ae2c9f086a19e5ab4f2825ca9a900ad6 -size 759 +oid sha256:e7a71800b39699fa672419fa5c43899cca1661fe54968afbab03e10df6bf5d71 +size 767 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_R.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_R.bin index 4cd2e9f0c..acf55c7c4 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_R.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_R.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7434f5ee0de306ca830ddf9c5fd06c8590dfa6ec57f782ca32d4abe5b5551817 -size 759 +oid sha256:cbd63053318fdc5dfbc052728618c89bb398b8b0c6a8e83b6139e2f653f2f769 +size 767 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_Y.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_Y.bin index 0c3bccba9..8f9738e55 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_Y.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Revelio/WandPT_Y.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5140bea34862e8b1fb73c6d874c22b7c6429d6f08c8a33d0b114343b96605483 -size 759 +oid sha256:6b9594eb0d4d3f79df97e87c611a682c3f5c7be2fee0c0474a2e44a36e71f702 +size 767 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl index 91a72f9db..b669d3285 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl @@ -39,6 +39,7 @@ struct ParticleValue float fSizeDrag; float3 vDeltaSize; float2 vDelay; + }; @@ -101,7 +102,7 @@ void CS_MAIN( { if (isNoWorld) { - float4x4 CurMat = { particle.vRight, particle.vUp, particle.vLook, particle.vTranslation }; + row_major float4x4 CurMat = { particle.vRight, particle.vUp, particle.vLook, particle.vTranslation }; CurMat = mul(CurMat, WorldMatrix); @@ -112,6 +113,7 @@ void CS_MAIN( particle.vTranslation = CurMat[3].xyzw; } } + // 라이프타임 움직임 particle.vLifeTime.x += fTimeDelta; @@ -151,21 +153,26 @@ void CS_MAIN( if (particleValue.fDrag < FLT_EPSILON5) fDrag = 1; - float4 vVelocity = vector(normalize(particle.vLook.xyz) * particleValue.fSpeed, 1.f); + float4 vVelocity = vector(normalize(particle.vLook.xyz) * particleValue.fSpeed, 0.f); particle.vTranslation += vVelocity * fTimeDelta * fDrag; } if (isPivotMove) { + float fTime = (particle.vLifeTime.x / particle.vLifeTime.y); + float3 vDir = normalize(particleValue.vPivot - particleValue.vOriginTranslation.xyz); - float fDrag = particleValue.fDrag; + float fRatio = (1 - fTime * fTime); + float fDrag = particleValue.fDrag * fRatio; + + if (particleValue.fDrag < FLT_EPSILON5) fDrag = 1; - float4 vVelocity = vector(vDir * particleValue.fSpeed, 1.f); + float4 vVelocity = vector(vDir * particleValue.fSpeed , 0.f); particle.vTranslation += vVelocity * fTimeDelta * fDrag; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl index ed2c87af2..5176ac68b 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl @@ -255,10 +255,14 @@ float4 DrawEffect(PS_IN In) float2 vDistortionUVMoveTime = g_ParticleValue[In.iGPUIndex].vDistortionUVMoveTime; float2 vDelay = g_ParticleValue[In.iGPUIndex].vDelay; - if (vDelay.x < vDelay.y) + if (vDelay.y > FLT_EPSILON5) { - discard; + if (vDelay.x <= vDelay.y) + { + discard; + } } + if (g_isDiffuse == true) { @@ -740,6 +744,8 @@ PS_BLOOM_OUT PS_BLEND(PS_IN In) vMtrlDiffuse = DrawEffect(In); + + //int2 iTexel = int2(In.vPosition.xy); //float fDepthStencilValue = g_DepthStencilTexture.Load(int3(iTexel, 0)).r; @@ -751,7 +757,9 @@ PS_BLOOM_OUT PS_BLEND(PS_IN In) //// 색깔 추가할 처리 (이미시브) - Out.vDiffuse = vMtrlDiffuse + EmissiveDraw(In); + vMtrlDiffuse.rgb += EmissiveDraw(In).rgb; + + Out.vDiffuse = vMtrlDiffuse; return Out; } @@ -781,7 +789,7 @@ technique11 DefaultTechnique pass Blur { SetRasterizerState(RS_Nocull); - SetDepthStencilState(DSS_None, 0); + SetDepthStencilState(DSS_Effect, 0); SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); VertexShader = compile vs_5_0 VS_BLUR(); GeometryShader = NULL; @@ -811,7 +819,7 @@ technique11 DefaultTechnique pass BLUR_NO_WORLD { SetRasterizerState(RS_Nocull); - SetDepthStencilState(DSS_None, 0); + SetDepthStencilState(DSS_Effect, 0); SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); VertexShader = compile vs_5_0 VS_BLUR_NOWORLD(); GeometryShader = NULL; @@ -822,8 +830,8 @@ technique11 DefaultTechnique pass BLEND { SetRasterizerState(RS_Nocull); - SetDepthStencilState(DSS_None, 0); - SetBlendState(BS_Blend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + SetDepthStencilState(DSS_Effect, 0); + 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_BLEND(); @@ -832,8 +840,8 @@ technique11 DefaultTechnique pass BLEND_NOWORLD { SetRasterizerState(RS_Nocull); - SetDepthStencilState(DSS_None, 0); - SetBlendState(BS_Blend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + SetDepthStencilState(DSS_Effect, 0); + 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_BLEND(); diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj index 00b1e2b88..3dc64a4aa 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj @@ -249,6 +249,7 @@ + @@ -391,6 +392,7 @@ + diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters index 56845ca50..616da9539 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters @@ -394,6 +394,9 @@ {03dca491-c8d3-4204-b450-b6089287aa3d} + + {c87ea325-8242-4bc4-aec7-b102a5b1c847} + @@ -768,6 +771,9 @@ 02.GameObjects\Layer_Effect\Effect\09.Revelio + + 02.GameObjects\Layer_Effect\Effect\10.Levioso + @@ -1141,6 +1147,9 @@ 02.GameObjects\Layer_Effect\Effect\09.Revelio + + 02.GameObjects\Layer_Effect\Effect\10.Levioso + diff --git a/Jusin154_Team3D/Editor/Private/Bombard.cpp b/Jusin154_Team3D/Editor/Private/Bombard.cpp index d2bbb1e23..55e19134d 100644 --- a/Jusin154_Team3D/Editor/Private/Bombard.cpp +++ b/Jusin154_Team3D/Editor/Private/Bombard.cpp @@ -73,7 +73,6 @@ void CBombard::Late_Update(_float fTimeDelta) __super::Late_Update(fTimeDelta); - } HRESULT CBombard::Pre_Setting(CGameObject* pObject) diff --git a/Jusin154_Team3D/Editor/Private/CamPosition_Shoulder.cpp b/Jusin154_Team3D/Editor/Private/CamPosition_Shoulder.cpp index 4dd3224c1..af9f8046e 100644 --- a/Jusin154_Team3D/Editor/Private/CamPosition_Shoulder.cpp +++ b/Jusin154_Team3D/Editor/Private/CamPosition_Shoulder.cpp @@ -88,7 +88,7 @@ void CCamPosition_Shoulder::Priority_Update(_float fTimeDelta) void CCamPosition_Shoulder::Update(_float fTimeDelta) { - if (m_pGameInstance->Key_Up(DIK_O)) { + if (m_pGameInstance->Key_Up(DIK_INSERT)) { m_pBinded_Camera->Toggle_Priority(); } if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_SHOULDER))) { diff --git a/Jusin154_Team3D/Editor/Private/EditEffect.cpp b/Jusin154_Team3D/Editor/Private/EditEffect.cpp index 33e2553ed..8ac88db84 100644 --- a/Jusin154_Team3D/Editor/Private/EditEffect.cpp +++ b/Jusin154_Team3D/Editor/Private/EditEffect.cpp @@ -46,7 +46,6 @@ void CEditEffect::Update(_float fTimeDelta) if (m_pInstance_ModelCom == nullptr) return; - m_pInstance_ModelCom->Drop(fTimeDelta); } @@ -60,6 +59,9 @@ void CEditEffect::Late_Update(_float fTimeDelta) if (m_pInstance_ModelCom == nullptr) return; + + m_pInstance_ModelCom->Drop(fTimeDelta); + if (m_EffectInfo.isBillboard) m_pGameInstance->BillBoard(m_pTransformCom); diff --git a/Jusin154_Team3D/Editor/Private/EffectObject.cpp b/Jusin154_Team3D/Editor/Private/EffectObject.cpp index 6d249efa8..e534a89a7 100644 --- a/Jusin154_Team3D/Editor/Private/EffectObject.cpp +++ b/Jusin154_Team3D/Editor/Private/EffectObject.cpp @@ -75,7 +75,7 @@ HRESULT CEffectObject::Render_Blur() SHADER_PASS_INSTANCE_MODEL BlurPass = {}; - if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NON_WORLD) + if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NON_WORLD || m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::BLEND_NOWORLD) { BlurPass = SHADER_PASS_INSTANCE_MODEL::NON_WORLD_BLUR; } @@ -132,10 +132,21 @@ HRESULT CEffectObject::Render_Bloom() return E_FAIL; } + SHADER_PASS_INSTANCE_MODEL BloomPass = {}; + + if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NON_WORLD || m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::BLEND_NOWORLD) + { + BloomPass = SHADER_PASS_INSTANCE_MODEL::BLOOM_NOWORLD; + } + else + { + BloomPass = SHADER_PASS_INSTANCE_MODEL::BLOOM; + } + for (_uint i = 0; i < m_pInstance_ModelCom->Get_NumMeshes(); i++) { - if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_INSTANCE_MODEL::BLOOM)))) { + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(BloomPass)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Editor/Private/EffectPool.cpp b/Jusin154_Team3D/Editor/Private/EffectPool.cpp index fb1e5fe8d..801906097 100644 --- a/Jusin154_Team3D/Editor/Private/EffectPool.cpp +++ b/Jusin154_Team3D/Editor/Private/EffectPool.cpp @@ -9,6 +9,7 @@ #include "Decendo.h" #include "Protego.h" #include "Revelio.h" +#include "Levioso.h" CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) @@ -38,6 +39,7 @@ HRESULT CEffectPool::Initialize(void* pArg) if (FAILED(Ready_Effect())) return E_FAIL; + return S_OK; } @@ -163,6 +165,16 @@ HRESULT CEffectPool::Ready_Effect() ))) return E_FAIL; + if (FAILED(Create_Effect(SKILL_TYPE::LEVIOSO, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel)-> CEffect_Container* { + + CLevioso* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + ))) return E_FAIL; + + return S_OK; } @@ -204,6 +216,33 @@ HRESULT CEffectPool::Use_Skill(SKILL_TYPE eType, CGameObject* pOwner) return S_OK; } +HRESULT CEffectPool::Reset_Pool() +{ + for (size_t i = 0; i < ENUM_CLASS(SKILL_TYPE::END); i++) + { + for (auto& pEffect : m_EffectList[i]) + { + SAFE_RELEASE(pEffect); + } + + m_EffectList[i].clear(); + } + + for (auto& pEffect : m_ActiveEffectList) + { + SAFE_RELEASE(pEffect); + } + + + m_ActiveEffectList.clear(); + + + if (FAILED(Ready_Effect())) + return E_FAIL; + + return S_OK; +} + CEffectPool* CEffectPool::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { @@ -243,14 +282,25 @@ void CEffectPool::Free() { SAFE_RELEASE(pEffect); } + + m_EffectList[i].clear(); } for (auto& pEffect : m_ActiveEffectList) { SAFE_RELEASE(pEffect); + + } + + m_ActiveEffectList.clear(); } void CEffectPool::Describe_Entity() { + if(GUI::Button("Reset Pool")) + { + Reset_Pool(); + } + } diff --git a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp index b3271422f..b0e42dc62 100644 --- a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp +++ b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp @@ -4,6 +4,8 @@ #include "GameInstance.h" #include "EditEffect.h" #include "TrailObject.h" +#include "EffectPool.h" +#include "Layer.h" #include @@ -55,6 +57,8 @@ HRESULT CEffect_Editor::Initialize(void* pArg) return E_FAIL; + m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object(); + SAFE_ADDREF(m_pEffectPool); return S_OK; } @@ -521,6 +525,7 @@ void CEffect_Editor::Free() SAFE_RELEASE(m_pEditEffect); SAFE_RELEASE(m_pTrailObject); + SAFE_RELEASE(m_pEffectPool); } void CEffect_Editor::Describe_Entity() @@ -770,6 +775,11 @@ void CEffect_Editor::Describe_Entity() } } + + + + m_pEffectPool->Describe_Entity(); + ImGui::End(); } diff --git a/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp index 1af33ee51..09ecf51ac 100644 --- a/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp @@ -42,14 +42,16 @@ HRESULT CLevel_EffectViewer::Initialize() return E_FAIL; } + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_EffectPool")))) //플레이어보다 먼저 생성해야함! + return E_FAIL; + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::EFFECT), NEXT_LEVEL, TEXT("Layer_Editor")))) return E_FAIL; if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::EFFECT), NEXT_LEVEL, LAYER_CUBE))) return E_FAIL; - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_EffectPool")))) //플레이어보다 먼저 생성해야함! - return E_FAIL; if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_PLAYER))) return E_FAIL; diff --git a/Jusin154_Team3D/Editor/Private/Levioso.cpp b/Jusin154_Team3D/Editor/Private/Levioso.cpp new file mode 100644 index 000000000..38a2f1cb8 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Levioso.cpp @@ -0,0 +1,262 @@ +#include "pch.h" +#include "Levioso.h" + +#include "GameInstance.h" +#include "EditEffect.h" +#include "Player.h" +#include "TrailObject.h" +#include "Dummy_PhysXEffectHitBox.h" + + +CLevioso::CLevioso(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CLevioso::CLevioso(const CLevioso& rhs) + : CEffect_Container(rhs) +{ +} + +HRESULT CLevioso::Initialize_Prototype() +{ + + return S_OK; + +} + +HRESULT CLevioso::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + if (FAILED(Ready_Components(pArg))) + return E_FAIL; + + + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/Levioso"))) + return E_FAIL; + + m_pLeviosoPJ_0 = Get_PartObject("Levioso_PJ0"); + m_pLeviosoPJ_1 = Get_PartObject("Levioso_PJ1"); + m_pLeviosoTrail = Get_PartObject("Levioso_Trail"); + m_pTrail_PT_0 = Get_PartObject("Trail_PT0"); + + SAFE_ADDREF(m_pLeviosoPJ_0); + SAFE_ADDREF(m_pLeviosoPJ_1); + SAFE_ADDREF(m_pLeviosoTrail); + SAFE_ADDREF(m_pTrail_PT_0); + + m_wstrEffectName = L"Levioso"; + + m_fDuration = 1.5f; + + return S_OK; +} + +void CLevioso::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + + if (nullptr != m_pPhysHitBox) { + m_pPhysHitBox->Get_Component()->RewindMomentum(); + } +} + +void CLevioso::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + + + m_pLeviosoPJ_0->Get_Component()->Translation(m_vOwnerLook * 0.5f); + m_pLeviosoPJ_1->Get_Component()->Translation(m_vOwnerLook * 0.5f); + + + m_pTrail_PT_0->Get_Component()->Translation(m_vOwnerLook * 0.5f); + + + + if (nullptr != m_pPhysHitBox) { + m_pPhysHitBox->Get_Component()->AccumulateMomentum(m_vOwnerLook * 0.5f); + } + +} + +void CLevioso::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + CPlayer* pPlayer = static_cast(m_pOwner); + + if (pPlayer == nullptr) + return; + + _matrix WandWorld = pPlayer->Get_WandPos(); + + m_pLeviosoTrail->Get_Component()->Fixed_Trail(WandWorld); + + m_pLeviosoTrail->Trail_Update(m_pTrail_PT_0->Get_Component()->Get_XMWorldMatrix(), fTimeDelta); + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CLevioso::Pre_Setting(CGameObject* pObject) +{ + if (pObject == nullptr) + return E_FAIL; + + m_pOwner = pObject; + + + Reset_EffectParts(); + + m_fAccTime = 0.f; + __super::m_fAccTime = 0.f; + m_fPreAccTime = 0.f; + + + + + CPlayer* pPlayer = static_cast(m_pOwner); + + if (pPlayer == nullptr) + return E_FAIL; + + _vector WandPos = pPlayer->Get_WandPos().r[3]; + + m_pLeviosoPJ_0->Get_Component()->Set_WorldMatrix(m_pOwner->Get_Component()->Get_XMWorldMatrix()); + m_pLeviosoPJ_1->Get_Component()->Set_WorldMatrix(m_pOwner->Get_Component()->Get_XMWorldMatrix()); + m_pTrail_PT_0->Get_Component()->Set_WorldMatrix(m_pOwner->Get_Component()->Get_XMWorldMatrix()); + + m_pLeviosoPJ_0->Get_Component()->Set_State(STATE::POSITION, WandPos); + m_pLeviosoPJ_1->Get_Component()->Set_State(STATE::POSITION, WandPos); + m_pTrail_PT_0->Get_Component()->Set_State(STATE::POSITION, WandPos); + + + m_pLeviosoPJ_0 ->Set_Visible(true); + m_pLeviosoPJ_1->Set_Visible(true); + m_pTrail_PT_0->Set_Visible(true); + + m_pLeviosoTrail->Set_Visible(true); + m_pLeviosoTrail->Get_Component()->Reset_Trail(); + + m_vOwnerLook = XMVector3Normalize(m_pOwner->Get_Component()->Get_State(STATE::LOOK)); + + m_bVisible = true; + + return S_OK; +} + +HRESULT CLevioso::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CLevioso::Ready_Child() +{ + CDummy_PhysXEffectHitBox::PHYSXDUMMY_DESC Desc{}; + + m_pTransformCom->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); + + XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f)); + + + Desc.vRotRPY = { 0.f, 0.f, 0.f }; + Desc.iSubKind = 70; + Desc.vDeltaPos = _float3(0.f, 0.f, 0.f); + Desc.vLifeTime = { 0.f, 1.5f }; + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this, &m_pPhysHitBox))) { + assert(false); + return E_FAIL; + } + + SAFE_ADDREF(m_pPhysHitBox); + + return S_OK; +} + +CLevioso* CLevioso::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CLevioso* pInstance = new CLevioso(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CLevioso"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CLevioso::Clone(void* pArg, CGameObject* pOwner) +{ + CLevioso* pInstance = new CLevioso(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CLevioso"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CLevioso::OnCollision(CGameObject* pOther, void* pDesc) +{ + //CTransform* pOtherTransform = p + ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + + + + m_pLeviosoPJ_0->Set_Visible(false); + m_pLeviosoPJ_1->Set_Visible(false); + m_pTrail_PT_0->Set_Visible(false); + m_pLeviosoTrail->Set_Visible(false); + + m_pPhysHitBox->Set_Dead(); + SAFE_RELEASE(m_pPhysHitBox); + +} + +void CLevioso::Free() +{ + __super::Free(); + + if(m_pPhysHitBox != nullptr) + SAFE_RELEASE(m_pPhysHitBox); + + SAFE_RELEASE(m_pLeviosoPJ_0); + SAFE_RELEASE(m_pLeviosoPJ_1); + SAFE_RELEASE(m_pLeviosoTrail); + SAFE_RELEASE(m_pTrail_PT_0); +} +#ifdef _DEBUG + +void CLevioso::Describe_Entity() +{ + +} + +#endif // _DEBUG + +HRESULT CLevioso::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index 54ebd17b0..e14f81e7c 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -101,7 +101,7 @@ #include "Protego.h" #include "EffectPool.h" #include "Revelio.h" - +#include "Levioso.h" #pragma endregion #pragma region PHYSX_HEADER @@ -941,6 +941,9 @@ HRESULT CLoader::Loading_For_Effect() if (FAILED(m_pGameInstance->Add_Prototype(ENUM_CLASS(LEVEL::EFFECT), CRevelio::Create(m_pDevice, m_pContext)))) return E_FAIL; + if (FAILED(m_pGameInstance->Add_Prototype(ENUM_CLASS(LEVEL::EFFECT), CLevioso::Create(m_pDevice, m_pContext)))) + return E_FAIL; + /* For.Prototype_GameObject_Wand */ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CWand::Create(m_pDevice, m_pContext)))) diff --git a/Jusin154_Team3D/Editor/Private/Player_States.cpp b/Jusin154_Team3D/Editor/Private/Player_States.cpp index 8f20cd727..e1c38638e 100644 --- a/Jusin154_Team3D/Editor/Private/Player_States.cpp +++ b/Jusin154_Team3D/Editor/Private/Player_States.cpp @@ -21,7 +21,6 @@ #pragma endregion #include "EffectPool.h" -#include "Protego.h" #pragma region States void CPlayer::TestKeyInput(_float fTimeDelta) @@ -459,6 +458,10 @@ void CPlayer::Behavior_CombatEnter() case STATEANIM::DEPULSO: pairAnimInfo = m_Animation[STATEANIM::DEPULSO]; m_eSpell = STATEANIM::END; + + + m_pEffectPool->Use_Skill(SKILL_TYPE::LEVIOSO, this); + break; case STATEANIM::DIFFINDO: pairAnimInfo = m_Animation[STATEANIM::DIFFINDO]; diff --git a/Jusin154_Team3D/Editor/Private/Revelio.cpp b/Jusin154_Team3D/Editor/Private/Revelio.cpp index be28d8da7..b58b010f7 100644 --- a/Jusin154_Team3D/Editor/Private/Revelio.cpp +++ b/Jusin154_Team3D/Editor/Private/Revelio.cpp @@ -47,7 +47,7 @@ HRESULT CRevelio::Initialize(void* pArg) - m_fDuration = 1.5f; + m_fDuration = 3.f; return S_OK; } @@ -67,16 +67,18 @@ void CRevelio::Update(_float fTimeDelta) Update_Event(fTimeDelta); - CPlayer* pPlayer = static_cast(m_pOwner); + CPlayer* pPlayer = static_cast(m_pOwner); if (pPlayer == nullptr) return; - _vector pPos = pPlayer->Get_WandPos().r[3]; + _matrix WandWorld = pPlayer->Get_WandPos(); - m_pRevelioPT_Y->Get_Component()->Set_State(STATE::POSITION, pPos); - m_pRevelioPT_R->Get_Component()->Set_State(STATE::POSITION, pPos); - m_pRevelioPT_B->Get_Component()->Set_State(STATE::POSITION, pPos); + /*_vector pPos = pPlayer->Get_WandPos().r[3];*/ + + m_pRevelioPT_Y->Get_Component()->Set_WorldMatrix(WandWorld); + m_pRevelioPT_R->Get_Component()->Set_WorldMatrix(WandWorld); + m_pRevelioPT_B->Get_Component()->Set_WorldMatrix(WandWorld); } @@ -97,6 +99,7 @@ HRESULT CRevelio::Pre_Setting(CGameObject* pObject) m_pOwner = pObject; + Reset_EffectParts(); m_fAccTime = 0.f; @@ -109,16 +112,22 @@ HRESULT CRevelio::Pre_Setting(CGameObject* pObject) if (pPlayer == nullptr) return E_FAIL; - _vector pPos = pPlayer->Get_WandPos().r[3]; + _matrix WandWorld = pPlayer->Get_WandPos(); - m_pRevelioPT_Y->Get_Component()->Set_State(STATE::POSITION, pPos); - m_pRevelioPT_R->Get_Component()->Set_State(STATE::POSITION, pPos); - m_pRevelioPT_B->Get_Component()->Set_State(STATE::POSITION, pPos); + /*_vector pPos = pPlayer->Get_WandPos().r[3];*/ + + m_pRevelioPT_Y->Get_Component()->Set_WorldMatrix(WandWorld); + m_pRevelioPT_R->Get_Component()->Set_WorldMatrix(WandWorld); + m_pRevelioPT_B->Get_Component()->Set_WorldMatrix(WandWorld); m_pRevelioPT_Y->Set_Visible(true); m_pRevelioPT_R->Set_Visible(true); m_pRevelioPT_B->Set_Visible(true); + + Get_PartObject("Revelio_Ring")->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); + Get_PartObject("Revelio_Ring")->Set_Visible(true); + m_bVisible = true; return S_OK; diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h index 22b10e475..5e8d6dae0 100644 --- a/Jusin154_Team3D/Editor/Public/Editor_Define.h +++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h @@ -31,7 +31,7 @@ namespace Editor enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, MAGIC_METER, END }; enum class EFFECT_TYPE { EFFECT, TRAIL, END }; - enum class SKILL_TYPE{ JAP , BOMBARD , DECENDO , PROTEGO , REVELIO ,END }; + enum class SKILL_TYPE{ JAP , BOMBARD , DECENDO , PROTEGO , REVELIO , LEVIOSO ,END }; enum class BLOOM_TYPE { NONE , BASIC , MULTIPLY , END}; } diff --git a/Jusin154_Team3D/Editor/Public/EffectPool.h b/Jusin154_Team3D/Editor/Public/EffectPool.h index 2d74d706b..0a555cb30 100644 --- a/Jusin154_Team3D/Editor/Public/EffectPool.h +++ b/Jusin154_Team3D/Editor/Public/EffectPool.h @@ -27,6 +27,10 @@ class CEffectPool final : public CGameObject public: HRESULT Create_Effect(SKILL_TYPE eType, _uint iNumEffect, _uint iPrototypeLevel, _uint iCloneLevel , function AddPrototypeEvent); HRESULT Use_Skill(SKILL_TYPE eType , CGameObject* pOwner); +public: +#ifdef _DEBUG + HRESULT Reset_Pool(); +#endif private: list m_EffectList[ENUM_CLASS(SKILL_TYPE::END)] = {}; list m_ActiveEffectList = {}; diff --git a/Jusin154_Team3D/Editor/Public/Effect_Editor.h b/Jusin154_Team3D/Editor/Public/Effect_Editor.h index f0358252f..a0375761c 100644 --- a/Jusin154_Team3D/Editor/Public/Effect_Editor.h +++ b/Jusin154_Team3D/Editor/Public/Effect_Editor.h @@ -54,6 +54,9 @@ class CEffect_Editor final : public CEffect_Container _string m_strTrailSavePath = {}; _string m_strPackageSavePath = {}; +private: + class CEffectPool* m_pEffectPool = nullptr; + public: static CEffect_Editor* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/Levioso.h b/Jusin154_Team3D/Editor/Public/Levioso.h new file mode 100644 index 000000000..583998121 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Levioso.h @@ -0,0 +1,52 @@ +#pragma once + +#include "Editor_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Editor) + +class CLevioso final : public CEffect_Container +{ +private: + CLevioso(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CLevioso(const CLevioso& rhs); + virtual ~CLevioso() = default; + +public: + virtual void Priority_Update(_float fTimeDelta) override; + virtual void Update(_float fTimeDelta) override; + virtual void Late_Update(_float fTimeDelta) override; + +public: + virtual HRESULT Pre_Setting(CGameObject* pObject) override; + +private: + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual HRESULT Ready_Components(void* pArg) override; + HRESULT Ready_Child(); + HRESULT Bind_ShaderResources() override; + virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override; +private: + _wstring m_wstrEffectName = {}; + class CPlayer* m_pPlayer = {}; + + class CEditEffect* m_pLeviosoPJ_0 = { nullptr }; + class CEditEffect* m_pLeviosoPJ_1 = { nullptr }; + class CTrailObject* m_pLeviosoTrail = { nullptr }; + class CEditEffect* m_pTrail_PT_0 = { nullptr }; + + _vector m_vOwnerLook = {}; +public: + static CLevioso* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG +}; + +NS_END diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl index 13ae04b0d..b669d3285 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl @@ -102,7 +102,7 @@ void CS_MAIN( { if (isNoWorld) { - float4x4 CurMat = { particle.vRight, particle.vUp, particle.vLook, particle.vTranslation }; + row_major float4x4 CurMat = { particle.vRight, particle.vUp, particle.vLook, particle.vTranslation }; CurMat = mul(CurMat, WorldMatrix); @@ -153,21 +153,26 @@ void CS_MAIN( if (particleValue.fDrag < FLT_EPSILON5) fDrag = 1; - float4 vVelocity = vector(normalize(particle.vLook.xyz) * particleValue.fSpeed, 1.f); + float4 vVelocity = vector(normalize(particle.vLook.xyz) * particleValue.fSpeed, 0.f); particle.vTranslation += vVelocity * fTimeDelta * fDrag; } if (isPivotMove) { + float fTime = (particle.vLifeTime.x / particle.vLifeTime.y); + float3 vDir = normalize(particleValue.vPivot - particleValue.vOriginTranslation.xyz); - float fDrag = particleValue.fDrag; + float fRatio = (1 - fTime * fTime); + float fDrag = particleValue.fDrag * fRatio; + + if (particleValue.fDrag < FLT_EPSILON5) fDrag = 1; - float4 vVelocity = vector(vDir * particleValue.fSpeed, 1.f); + float4 vVelocity = vector(vDir * particleValue.fSpeed , 0.f); particle.vTranslation += vVelocity * fTimeDelta * fDrag; diff --git a/Jusin154_Team3D/Engine/Private/Trail.cpp b/Jusin154_Team3D/Engine/Private/Trail.cpp index ae78708f1..c65895507 100644 --- a/Jusin154_Team3D/Engine/Private/Trail.cpp +++ b/Jusin154_Team3D/Engine/Private/Trail.cpp @@ -149,6 +149,18 @@ void CTrail::Trail_Update(_float fDeltaTime, _fmatrix WorldMatrix) } + if (m_isFixedTrail == true) + { + //만약 고정된 트레일을 켰다면 가장 첫번째 부분을 항상 내 위치로 고정함 + + _vector vLow = XMVector3TransformCoord(XMLoadFloat3(&m_TrailDesc.vLow), m_FixedMat); + _vector vHigh = XMVector3TransformCoord(XMLoadFloat3(&m_TrailDesc.vHigh), m_FixedMat); + + XMStoreFloat3(&m_pVertices[m_iNumCount - 2].vPosition, vLow); + XMStoreFloat3(&m_pVertices[m_iNumCount -1].vPosition, vHigh); + + } + //XMStoreFloat3(&m_pVertices[0].vPosition, vLow); //XMStoreFloat3(&m_pVertices[1].vPosition, vHigh); @@ -211,6 +223,14 @@ HRESULT CTrail::Load_Trail(HANDLE hFile) return S_OK; } +void CTrail::Fixed_Trail(_fmatrix WorldMatrix) +{ + m_isFixedTrail = true; + m_FixedMat = WorldMatrix; +} + + + HRESULT CTrail::Render() { if (m_iNumCount < 4) diff --git a/Jusin154_Team3D/Engine/Public/Trail.h b/Jusin154_Team3D/Engine/Public/Trail.h index c578d7ec5..a413fe088 100644 --- a/Jusin154_Team3D/Engine/Public/Trail.h +++ b/Jusin154_Team3D/Engine/Public/Trail.h @@ -26,6 +26,9 @@ class ENGINE_DLL CTrail final : #endif HRESULT Load_Trail(HANDLE hFile); +public: + void Fixed_Trail(_fmatrix WorldMatrix); + private: virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; @@ -52,6 +55,9 @@ class ENGINE_DLL CTrail final : _float m_fTrailUpdateTime = {}; _uint m_iNumVerticesPerInstance = {}; + + _matrix m_FixedMat = {}; + _bool m_isFixedTrail = {}; }; NS_END