diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli index 3ddc2f1e7..077fa26d2 100644 --- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli +++ b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli @@ -174,8 +174,8 @@ BlendState BS_WB_Acc DestBlend[0] = one; BlendOp[0] = Add; - SrcBlend[1] = Zero; - DestBlend[1] = Inv_Src_Alpha; + SrcBlend[1] = Inv_Src_Alpha; + DestBlend[1] = Zero; BlendOp[1] = Add; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BaiscParticle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BaiscParticle.bin index 73974c53a..918c30892 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BaiscParticle.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BaiscParticle.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:697362b584679afac0be6f7707b10367030e6ccaec5f93fbc4d301ad80bd7c35 -size 598 +oid sha256:5f97e1272ef22cebdc2bbc672b1267c98c6433aa7ffdf77ce3c34f71bd7c4cbd +size 606 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle.bin index ccc57faa2..4ea0d36a9 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:60c069d147060437e1c362b41fade1ef56556b6d0e5038606601acdb0572a5f3 -size 598 +oid sha256:97fe8d6e4c7c1b2461a92639a4683f746ff55dc7a821ce119ebe0d8a09373bfd +size 606 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle2.bin index 20916c601..c9b54ca60 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle2.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BasicParticle2.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bd8016c2c3a1a081c1d2774e6fc678a326ce813d853fda18e08a48100692f33c -size 598 +oid sha256:11bdf139c24c2065b691be072e6483f68870ab3a0a980f7c10aaf012a5ac75a0 +size 606 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BlustParticle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BlustParticle.bin index e5d34d8e0..11d068b9d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BlustParticle.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/BlustParticle.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b6f198111876e32cb27a8f6341053be4c761fa923545c5c821cd89f64e2f7ad4 -size 598 +oid sha256:632fe36b935690a2838c92bb8be312d5d763a171423cae41e99dcfd8ba0bd445 +size 606 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/FireProjectile.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/FireProjectile.bin index 32435023b..382829e76 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/FireProjectile.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/FireProjectile.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:25abe6ca6cd125734f2a7eadc17c2e4e8b022c8e4c3b48cd95275f414a6387f1 -size 628 +oid sha256:7ded4807087aa32efaf780f2466e9bcd25dbf771c61e58eeb30b4ec1fbc9f451 +size 636 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ice.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ice.bin index 55beced3f..7523b1838 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ice.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ice.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:82c1cd8f66bbeaa2828aec08a7fcf85eb8138f57fe7ef34d7ab05465ce3346c8 -size 521 +oid sha256:ba8f4656956e753b0378a2d8f6ce2f8dfa73014e885a59e8890cdedfd28daad2 +size 529 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LP.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LP.bin deleted file mode 100644 index 590f2b74a..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LP.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:385b4684f3ed82cd63e843f2f75a8f07c797708d4423556dfbd1c993ced7ac5d -size 264 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectile1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectile1.bin new file mode 100644 index 000000000..c15925e85 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectile1.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:937ae454ea27b326ccc519afd84314adab8c658009e609f8217c525d26cdfb72 +size 595 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectile2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectile2.bin new file mode 100644 index 000000000..5225655a0 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectile2.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:51af73356e47c2cfed59bd5d09728335e3cee1311e0790610c68cf86d8f32f83 +size 605 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectileCircle1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectileCircle1.bin new file mode 100644 index 000000000..759a4f369 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectileCircle1.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d81d1f57e021bd726103dbc896bca49c1cfcadac7366ca055b1067b9361132c1 +size 550 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectileMiddle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectileMiddle.bin new file mode 100644 index 000000000..68b463e39 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/LightProjectileMiddle.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26f5717dbfd5055a0b606134b5dd343e3f77bc02c3acfb3bbf50d3ecc1015bfd +size 607 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MagicProjectile.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MagicProjectile.bin index 530ff611f..ce9742895 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MagicProjectile.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/MagicProjectile.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:04321afa62b3e9aaca6036e249e8fa7ef9f8cb765e25088a4430b5883df3f70d -size 626 +oid sha256:7806c0cc6f06d1b5dde93aeb8da7b7e36ead2684b56d9697d445c4e1781bd975 +size 634 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/1.bin new file mode 100644 index 000000000..be9aa71f0 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/1.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dafba43009b3809b1cf3b2886f9453f1fba5ad7c1c6551afd1dfc5634a4a245a +size 262 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Light.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Light.bin new file mode 100644 index 000000000..df0e49ab1 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Light.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3610476d496d331ec27dd61739b2928f352629b4d904dcb1b79242dc8924f3a +size 201 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Projectile0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Projectile0.bin index c171516eb..9119bfe76 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Projectile0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Projectile0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:46eb4b43cb9d9f79c087008082e8874983231357fe05aa3354d0c8bf8dc08117 +oid sha256:1b72b06e1ce45740d09f46a051b0f99a4aaa53f057af0bc8ffbd74b78cd18b6f size 633 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/SpreadRing.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/SpreadRing.bin index 0a3554ab6..b74cb9d5d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/SpreadRing.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/SpreadRing.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c5bfe527d29c9e72248e1ba60487d7ff030e97008206097177c2ff33e3b663f2 +oid sha256:23ceeb532383f6a0506647edb2497de4827ac9d931e14be41ded9e5a77064dc6 size 644 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Trail/TestTrail.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Trail/TestTrail.bin new file mode 100644 index 000000000..6414c221c --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Trail/TestTrail.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18d4d2843900a6643f7d2a1170271828e7153c309687b64054ef363a7aaa5107 +size 138 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/TrailTest.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/TrailTest.bin new file mode 100644 index 000000000..a727116fa --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/TrailTest.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a855f032a53ad0b5a1efd023bb02e4ffa10df3deeced2e5fd049a15615adfefc +size 550 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BaiscParticle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BaiscParticle.bin new file mode 100644 index 000000000..64103f049 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BaiscParticle.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e51157f496aa53487d5ff04f60d1b871a4be3773ddc43cf36895d79f4ba2f27e +size 598 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BasicParticle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BasicParticle.bin new file mode 100644 index 000000000..1b1e9059f --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BasicParticle.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99cde9fe783c6e2c4cad26263ae72294e0c87784961cdc69953467ae08ace0de +size 598 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BasicParticle2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BasicParticle2.bin new file mode 100644 index 000000000..0e4cd0d00 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BasicParticle2.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c047e6c3570b1d26e85ebdd12617172b050be798fb4ed1ec40b9335fff94e769 +size 598 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BlustParticle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BlustParticle.bin new file mode 100644 index 000000000..396ed3956 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/BlustParticle.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f640193ab520cf9c49e9c987cbe0f506d353d27e8a01a67a7e2c049af32cb421 +size 598 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/FireProjectile.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/FireProjectile.bin new file mode 100644 index 000000000..96653610c --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/FireProjectile.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59daade7d260f4a7cf9af81a3f09b2a00f6155b786ac7d30552a6d8376fdf5de +size 628 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Ice.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Ice.bin new file mode 100644 index 000000000..5708bf8d4 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Ice.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:448d9913e85573500e2b86c046b8711a342f28597b9fa63048adf92cf7e458b1 +size 521 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectile1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectile1.bin new file mode 100644 index 000000000..3e9ac4786 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectile1.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:82890f11a1561ca32e8504d5dec11a18ef3dae00f490f70a9581a529b0ca2304 +size 587 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectile2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectile2.bin new file mode 100644 index 000000000..55291ea6b --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectile2.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69c6354c06138ef2b34377e13964d14412600eb5b0f88b21d55e6571b34890c1 +size 597 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectileCircle1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectileCircle1.bin new file mode 100644 index 000000000..cd81664d3 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectileCircle1.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:022d6dcae155a8a1c369aa275ed56e533d5a3afb417b5fed9d6b9345ec05b008 +size 542 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectileMiddle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectileMiddle.bin new file mode 100644 index 000000000..41a49338d --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/LightProjectileMiddle.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cab580f863401e8351fda8c05e5accb6c02b0424d678d65de802b7827ebdad5d +size 599 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/MagicProjectile.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/MagicProjectile.bin new file mode 100644 index 000000000..2bdbb53ff --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/MagicProjectile.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44e2ce0bc50ae9ef56e8b48444ee2d3795925e1776086701f9be47b9cb09ad0f +size 626 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Projectile0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Projectile0.bin new file mode 100644 index 000000000..9119bfe76 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/Projectile0.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b72b06e1ce45740d09f46a051b0f99a4aaa53f057af0bc8ffbd74b78cd18b6f +size 633 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/SpreadRing.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/SpreadRing.bin new file mode 100644 index 000000000..b74cb9d5d --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/SpreadRing.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23ceeb532383f6a0506647edb2497de4827ac9d931e14be41ded9e5a77064dc6 +size 644 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/TrailTest.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/TrailTest.bin new file mode 100644 index 000000000..a727116fa --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/임시공간/TrailTest.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a855f032a53ad0b5a1efd023bb02e4ffa10df3deeced2e5fd049a15615adfefc +size 550 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/BasicParticle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/BasicParticle.bin deleted file mode 100644 index d3c6667ba..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/BasicParticle.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2781b48e3f8d8510a338e650e00660ed853345901eb0e8eb693e64765bd284a3 -size 566 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/ConfingoTest.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/ConfingoTest.bin deleted file mode 100644 index bc239d5c1..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/ConfingoTest.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:016da9c4fc0e164f3914a6d45abfaf0a45f2a421e90b8c360c0581fa5be78023 -size 555 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/FireProjectile.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/FireProjectile.bin deleted file mode 100644 index 33a13070d..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/FireProjectile.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c6446751f95f98d233e9ee3054f8bb8cfb7e6163e9bc1fc7c506d89b119f599f -size 596 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/Flared.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/Flared.bin deleted file mode 100644 index 30cd5d21d..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/Flared.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2d3673f63af9789fdac33dc723b742e3040ad9cd27b420b2b00b6971f3f2120c -size 620 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/Ice.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/Ice.bin deleted file mode 100644 index 17365dced..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/Ice.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d282d160be4081ea02cba70fdfa0587d4ae2818cfb2c0ad3ca76274f43d715e9 -size 489 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/LP.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/LP.bin deleted file mode 100644 index 590f2b74a..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/LP.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:385b4684f3ed82cd63e843f2f75a8f07c797708d4423556dfbd1c993ced7ac5d -size 264 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/LightProjectile1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/LightProjectile1.bin deleted file mode 100644 index e9f1f1b9f..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/LightProjectile1.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:22cb188973c1268a590daf37b1b990de8b83436f40800ffe0b075a8a5b8a3047 -size 547 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/LightProjectile2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/LightProjectile2.bin deleted file mode 100644 index 5f43a8cab..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/LightProjectile2.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5daa02fb61ea067ca7f8c892856ddf83e82aa8da51251e425a88ae014923a3d1 -size 557 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/LightProjectileCircle1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/LightProjectileCircle1.bin deleted file mode 100644 index 53a553cfb..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/LightProjectileCircle1.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:81e7ac152b6a78bea83531c1ceabbfd3880465fd833c9fd14484603f5ee73965 -size 502 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/LightProjectileMiddle.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/LightProjectileMiddle.bin deleted file mode 100644 index 2d75b0aac..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/LightProjectileMiddle.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:628ec29f1188b972973cd6338e5840fbcefe663b19204275b85a78268f1301c6 -size 559 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/MagicProjectile.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/MagicProjectile.bin deleted file mode 100644 index 02ebb834b..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/MagicProjectile.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2fe361015c7d0d0dc213bc6d5f149759298f18f3e1183d19e8e43f38d7ee7baa -size 594 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/ParticleTest.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/ParticleTest.bin deleted file mode 100644 index b0057f6bd..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/ParticleTest.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c1b2254a9f76ef1c627149e881269b2570ff4c80e664cf4ab4e2a8878f7bd349 -size 558 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/Projectile0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/Projectile0.bin deleted file mode 100644 index 81dd8cb25..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/Projectile0.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b9fdb6d34c1ff4fffb0f91e7ecac07dea75919239991ab53468adfdc909f6c90 -size 601 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/SpreadRing.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/SpreadRing.bin deleted file mode 100644 index 879f4706d..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/SpreadRing.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b238b2b412d5cdb251e90f7806b473f56373499b67f48472d6dca68784015e9b -size 612 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/Test.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/Test.bin deleted file mode 100644 index ea52d381c..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/Test.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b80f4d457c7d8ce25daf73aa960db5d1a46b491d700a40f35e91a253546b0407 -size 588 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/Test2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/Test2.bin deleted file mode 100644 index 74e029c11..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/Test2.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b7e9b058b855b5c589651bd350a4af99b30664bd1ff684d4d2a96d34e683d36f -size 586 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/Wand.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/Wand.bin deleted file mode 100644 index 22cbd08e4..000000000 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/해오라기/Wand.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a53acc13222138968a56dffabad667d007e31f0d46bb2a52dd5e972c5867bd41 -size 585 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli index 3ddc2f1e7..077fa26d2 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli @@ -174,8 +174,8 @@ BlendState BS_WB_Acc DestBlend[0] = one; BlendOp[0] = Add; - SrcBlend[1] = Zero; - DestBlend[1] = Inv_Src_Alpha; + SrcBlend[1] = Inv_Src_Alpha; + DestBlend[1] = Zero; BlendOp[1] = Add; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl index 61c092ba3..59f96a378 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl @@ -333,16 +333,16 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In) if(g_isNoise) { + float2 vNoiseUV = In.vTexcoord + SelectLerpUV(g_vNoiseUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iNoiseMoveLerpOption); - vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, In.vTexcoord); + vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vNoiseUV); - vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlNoise.r); vMtrlDiffuse *= vMtrlNoise; - } + /* 마스크 */ if (g_isMasking == true) { float2 vMaskTexcoord = In.vTexcoord; @@ -361,8 +361,6 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In) //디스토션(노이즈) 텍스쳐로 uv를 왜곡함 vMaskTexcoord = vMaskTexcoord + (vMtrlDistortion - 0.5f).r * g_fNoiseDistortionIntensity; - - } if (g_isMaskUVMove) @@ -529,19 +527,19 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In) //0.5f를 빼는 이유는 중심을 0으로 옮겨서 양음수 방향으로 offset을 줄수 있다. vMtrlDistortion.rg -= 0.5f; - ////아마 분할되었다면 noise도 분할해야할듯 - //vMtrlDistortion.rg /= g_vUVCutting; + //아마 분할되었다면 noise도 분할해야할듯 + vMtrlDistortion.rg /= g_vUVCutting; //디스토션(노이즈) 텍스쳐로 uv를 왜곡함 UV = UV + (vMtrlDistortion).rg * g_fNoiseDistortionIntensity; + } /* 최종 색깔 */ vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, UV); - if (g_vColor.a > 0) vMtrlDiffuse += g_vColor; @@ -556,12 +554,16 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In) if (g_isNoise) { - vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, In.vTexcoord); + float2 vNoiseUV = In.vTexcoord + SelectLerpUV(g_vNoiseUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iNoiseMoveLerpOption); + + vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vNoiseUV); + + vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlNoise.r); vMtrlDiffuse *= vMtrlNoise; - } + /* 마스크 */ if (g_isMasking == true) { float2 vMaskTexcoord = In.vTexcoord; @@ -578,8 +580,9 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In) vMtrlDistortion = g_DistortionTexture.Sample(DefaultSampler, vDistortionUV); //디스토션(노이즈) 텍스쳐로 uv를 왜곡함 - vMaskTexcoord = vMaskTexcoord + (vMtrlDistortion - 0.5f).r * g_fNoiseDistortionIntensity; - + vMaskTexcoord = vMaskTexcoord + (vMtrlDistortion - 0.5f).r * g_fNoiseDistortionIntensity; + + } @@ -596,13 +599,9 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In) { vMtrlMask.r = 1.f; } - - vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlMask.r); - - if (vMtrlDiffuse.a <= 0.f) discard; @@ -610,7 +609,7 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In) { vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, In.vTexcoord); - if(g_isReverseDissolve == true) + if (g_isReverseDissolve == true) { if (vMtrlDissolve.r >= (In.vLifeTime.x / In.vLifeTime.y)) discard; @@ -620,7 +619,6 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In) if (vMtrlDissolve.r < (In.vLifeTime.x / In.vLifeTime.y)) discard; } - } vMtrlDiffuse.a *= g_fDiffuseAlpha; @@ -634,6 +632,7 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In) vEmissiveMtrl = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord); } + Out.vDiffuse = vMtrlDiffuse * g_fBlurIntensity; Out.vBlurWeight.r = g_iBlurWeight / 32.f; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxPosTex.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxPosTex.hlsl index 6b9fcb9b8..926473fa9 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxPosTex.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxPosTex.hlsl @@ -11,9 +11,14 @@ uint g_iIndexU; uint g_iIndexV; Texture2D g_Texture; + Texture2D g_DiffuseTexture; Texture2D g_MaskingTexture; +Texture2D g_NoiseTexture; +bool g_isDiffuse; +bool g_isNoise; +bool g_isMask; struct VS_IN { @@ -25,27 +30,55 @@ struct VS_OUT { float4 vPosition : SV_Position; float2 vTexcoord : TEXCOORD0; + float4 vProjPos : TEXCOORD1; }; VS_OUT VS_MAIN(VS_IN In) { VS_OUT Out; - + + matrix matWV, matWVP; matWV = mul(g_WorldMatrix, g_ViewMatrix); matWVP = mul(matWV, g_ProjMatrix); + + vector vPosition = mul(vector(In.vPosition, 1.f), matWVP); + Out.vPosition = mul(vector(In.vPosition, 1.f), matWVP); Out.vTexcoord = In.vTexcoord; + Out.vProjPos = vPosition; return Out; } +VS_OUT VS_TRAIL(VS_IN In) +{ + VS_OUT Out; + + + matrix matWVP; + + matWVP = mul(g_ViewMatrix , g_ProjMatrix); //월드행렬 곱해져서 오기때문에 월드 곱하지 않음 + + + vector vPosition = mul(vector(In.vPosition, 1.f), matWVP); + + Out.vPosition = mul(vector(In.vPosition, 1.f), matWVP); + Out.vTexcoord = In.vTexcoord; + Out.vProjPos = vPosition; + + + return Out; + +} + struct PS_IN { float4 vPosition : SV_Position; float2 vTexcoord : TEXCOORD0; + float4 vProjPos : TEXCOORD1; }; struct PS_OUT @@ -72,17 +105,54 @@ PS_OUT PS_UVMove(PS_IN In) return Out; } -PS_OUT PS_Trail(PS_IN In) + + +struct PS_TRAILOUT { - PS_OUT Out; + float4 vDiffuse : SV_TARGET0; + float4 vRevealage : SV_TARGET1; + float4 vColorTarget : SV_TARGET2; +}; + +PS_TRAILOUT PS_Trail(PS_IN In) +{ + PS_TRAILOUT Out; - vector vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord); - vector vMasking = g_MaskingTexture.Sample(DefaultSampler, In.vTexcoord); + vector vMtrlDiffuse; + vector vMtrlMask; + vector vMtrlNoise; + + if (g_isDiffuse == true) + vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord); + else + vMtrlDiffuse = vector(0.f, 0.f, 0.f, 1.f); + + if (g_isMask == true) + vMtrlMask = g_MaskingTexture.Sample(PointSampler, In.vTexcoord); + else + vMtrlMask = vector(1.f, 1.f, 1.f, 1.f); + + if (g_isNoise == true) + { + vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, In.vTexcoord); + + //vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlNoise.r); + + vMtrlDiffuse *= vMtrlNoise; + } + + + vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlMask.r); + + + float fWeight = clamp(pow(In.vProjPos.w, -2.5f), 1.0f, 1000.0f); + + + Out.vDiffuse = vector(vMtrlDiffuse.rgb * vMtrlDiffuse.a, vMtrlDiffuse.a) * fWeight; + + Out.vRevealage.r = vMtrlDiffuse.a; + Out.vColorTarget = vector(0.f, 0.f, 0.f, 0.f); - vDiffuse.a = vDiffuse.a * vMasking.r; - Out.vColor = vDiffuse; - Out.vColor.a *= In.vTexcoord.x; - clip(Out.vColor.a - 0.01f); return Out; } diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj index c13a4f901..ba301c6cc 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj @@ -192,6 +192,8 @@ + + @@ -237,6 +239,7 @@ + @@ -303,6 +306,8 @@ + + @@ -348,6 +353,7 @@ + diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters index db22f9b55..6708485f7 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters @@ -301,6 +301,15 @@ {b017e167-f48d-4417-a924-765ab802cff5} + + {f5cd19e8-186b-418f-b7fa-af73046a80d1} + + + {a193f87a-e222-4dd8-9766-cb32bb368ccb} + + + {8882358e-c8eb-4222-a87e-01d902533b8f} + @@ -591,6 +600,15 @@ 80.State\State_Combat + + 02.GameObjects\Layer_Effect\Effect\03.TrailObject + + + 02.GameObjects\Layer_Effect\Effect\04.Effect_Container + + + 02.GameObjects\Layer_Effect\Effect\05.NomalJap + @@ -877,6 +895,15 @@ 80.State\State_Combat + + 02.GameObjects\Layer_Effect\Effect\03.TrailObject + + + 02.GameObjects\Layer_Effect\Effect\04.Effect_Container + + + 02.GameObjects\Layer_Effect\Effect\05.NomalJap + diff --git a/Jusin154_Team3D/Editor/Private/EditEffect.cpp b/Jusin154_Team3D/Editor/Private/EditEffect.cpp index 050f192f7..84e573507 100644 --- a/Jusin154_Team3D/Editor/Private/EditEffect.cpp +++ b/Jusin154_Team3D/Editor/Private/EditEffect.cpp @@ -39,10 +39,6 @@ void CEditEffect::Priority_Update(_float fTimeDelta) void CEditEffect::Update(_float fTimeDelta) { - - - - if (m_pInstance_ModelCom == nullptr) return; @@ -51,6 +47,7 @@ void CEditEffect::Update(_float fTimeDelta) if (m_EffectInfo.isBillboard) m_pGameInstance->BillBoard(m_pTransformCom); + } void CEditEffect::Late_Update(_float fTimeDelta) @@ -60,6 +57,9 @@ void CEditEffect::Late_Update(_float fTimeDelta) return; + XMStoreFloat4x4(&m_CombinedWorldMatrix , m_pTransformCom->Get_XMWorldMatrix() * m_pParentTransformCom->Get_XMWorldMatrix()); + + if (m_EffectInfo.isBlur == true) { m_pGameInstance->Add_RenderGroup(RENDER::BLUR, this); @@ -141,7 +141,6 @@ void CEditEffect::Reference_Mat_For_EditEffect() HRESULT CEditEffect::Save_Effect(const _char* pPath) { - _string strPerfectFilePath = pPath; strPerfectFilePath += ".bin"; @@ -154,12 +153,12 @@ HRESULT CEditEffect::Save_Effect(const _char* pPath) if (hFile == INVALID_HANDLE_VALUE) { - MessageBox(NULL, L"오브젝트 저장 실패", L"System Message", MB_OK); + MessageBox(NULL, L"이펙트 오브젝트 저장 실패", L"System Message", MB_OK); return E_FAIL; } + m_strPath = strPerfectFilePath; - DWORD dwByte(0); if (m_pLightCom != nullptr) @@ -291,11 +290,39 @@ HRESULT CEditEffect::Save_Effect(const _char* pPath) m_pInstance_ModelCom->Save_InstanceModel(hFile); + + MessageBox(NULL, L"이펙트 저장 성공", L"System Message", MB_OK); + CloseHandle(hFile); return S_OK; } +HRESULT CEditEffect::Save_Path(HANDLE hFile) +{ + DWORD dwByte; + + size_t iObjectLength = m_strPath.length(); + const _char* pFilePath = m_strPath.c_str(); + + if (!WriteFile(hFile, &m_EffectInfo.eEffectType, sizeof(EFFECT_TYPE), &dwByte, nullptr)) { + return E_FAIL; + } + + if (!WriteFile(hFile, &iObjectLength, sizeof(size_t), &dwByte, nullptr)) { + return E_FAIL; + } + + if (pFilePath != 0) + { + if (!WriteFile(hFile, pFilePath, sizeof(_char) * ((DWORD)iObjectLength + 1), &dwByte, nullptr)) { + return E_FAIL; + } + } + + return S_OK; +} + HRESULT CEditEffect::Ready_Components(void* pArg) { if (FAILED(__super::Ready_Components(pArg))) @@ -308,6 +335,7 @@ HRESULT CEditEffect::Ready_Components(void* pArg) return E_FAIL; } + return S_OK; } @@ -341,6 +369,7 @@ CGameObject* CEditEffect::Clone(void* pArg, CGameObject* pOwner) void CEditEffect::Free() { __super::Free(); + } void CEditEffect::Describe_Entity() @@ -365,7 +394,6 @@ void CEditEffect::Describe_Entity() GUI::Checkbox("Distortion", &m_EffectInfo.isDistortion); GUI::Checkbox("Noise", &m_EffectInfo.isNoise); - if (GUI::Checkbox("Billboard", &m_EffectInfo.isBillboard)) { m_pTransformCom->Rotation(0.f, 0.f, 0.f); diff --git a/Jusin154_Team3D/Editor/Private/EffectObject.cpp b/Jusin154_Team3D/Editor/Private/EffectObject.cpp index 47ad19e1a..230246b42 100644 --- a/Jusin154_Team3D/Editor/Private/EffectObject.cpp +++ b/Jusin154_Team3D/Editor/Private/EffectObject.cpp @@ -53,6 +53,7 @@ HRESULT CEffectObject::Render() } } + return S_OK; } @@ -93,12 +94,14 @@ HRESULT CEffectObject::Render_Blur() + return S_OK; } + + HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel) { - SAFE_RELEASE(m_pDiffuse_TextureCom); SAFE_RELEASE(m_pNoise_TextureCom); SAFE_RELEASE(m_pMasking_TextureCom); @@ -130,6 +133,8 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel) return E_FAIL; } + // 나중에 패키징할때 패스를 저장할거임 + m_strPath = strPerfectFilePath; DWORD dwByte(0); @@ -323,13 +328,14 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel) CloseHandle(hFile); + + MessageBox(NULL, L"이펙트 로드 성공", L"System Message", MB_OK); + return S_OK; } #ifdef _DEBUG - - HRESULT CEffectObject::LoadPre(const _char* pFilePath, LEVEL eLevel) { @@ -555,7 +561,7 @@ HRESULT CEffectObject::LoadPre(const _char* pFilePath, LEVEL eLevel) HRESULT CEffectObject::Bind_ShaderResources() { - if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { + if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", &m_CombinedWorldMatrix))) { return E_FAIL; } @@ -637,7 +643,6 @@ HRESULT CEffectObject::Bind_ShaderResources() return E_FAIL; } - if (FAILED(m_pShaderCom->Bind_RawValue("g_vDiffuseDistortionUVGainAmount", &m_EffectInfo.vDiffuseDistortionUVGainAmount, sizeof(_float2)))) { return E_FAIL; } @@ -735,7 +740,14 @@ HRESULT CEffectObject::Bind_ShaderResources() HRESULT CEffectObject::Ready_Components(void* pArg) { - if (FAILED(__super::Ready_Components(pArg))) { + CTransform::TRANSFORM_DESC TransformDesc = {}; + + TransformDesc.fRadius = 20.f; + TransformDesc.fRotationPerSec = 10.f; + TransformDesc.fSpeedPerSec = 10.f; + + + if (FAILED(__super::Ready_Components(&TransformDesc))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Editor/Private/Effect_Container.cpp b/Jusin154_Team3D/Editor/Private/Effect_Container.cpp new file mode 100644 index 000000000..bfe1d9cb2 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Effect_Container.cpp @@ -0,0 +1,298 @@ +#include "pch.h" +#include "Effect_Container.h" + +#include "GameInstance.h" +#include "EditEffect.h" +#include "TrailObject.h" + + +#include + +CEffect_Container::CEffect_Container(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CContainerObject{ pDevice, pContext } +{ +} + +CEffect_Container::CEffect_Container(const CEffect_Container& rhs) + : CContainerObject(rhs) +{ + +} + +HRESULT CEffect_Container::Initialize_Prototype() +{ + + return S_OK; + +} + +HRESULT CEffect_Container::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + if (FAILED(Ready_Child())) + return E_FAIL; + + + + return S_OK; +} + +void CEffect_Container::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); +} + +void CEffect_Container::Update(_float fTimeDelta) +{ + __super::Update(fTimeDelta); + +} + +void CEffect_Container::Late_Update(_float fTimeDelta) +{ + __super::Late_Update(fTimeDelta); +} + +#ifdef _DEBUG + +HRESULT CEffect_Container::Save_Package(const _char* pPath) +{ + _string strPerfectFilePath = pPath; + strPerfectFilePath += ".bin"; + + HANDLE hFile = CreateFile(CMyTools::ToWstring(strPerfectFilePath).c_str(), + GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL, NULL + ); + + + if (hFile == INVALID_HANDLE_VALUE) { + MessageBox(NULL, L"패키징 저장 실패", L"System Message", MB_OK); + return E_FAIL; + } + + ; + + DWORD dwByte(0); + + _int iObjectCount = (_int)m_PartObjects.size(); + + if (!WriteFile(hFile, &iObjectCount, sizeof(_int), &dwByte, nullptr)) { + return E_FAIL; + } + + // 자식 개수 저장 + + for (auto& pPartObejct : m_PartObjects) + { + CEditEffect* pEffectObject = dynamic_cast(pPartObejct.second); + CTrailObject* pTrailObject = {}; + + if (pEffectObject == nullptr) // 이펙트 오브젝트가 아닐 경우 + { + pTrailObject = dynamic_cast(pPartObejct.second); + + pTrailObject->Save_Path(hFile); + } + else + { + pEffectObject->Save_Path(hFile); + } + } + + + CloseHandle(hFile); + + + MessageBox(NULL, L"패키징 성공", L"System Message", MB_OK); + + return S_OK; +} + +#endif + +HRESULT CEffect_Container::Load_Package(const _char* pPath) +{ + _string strPerfectFilePath = pPath; + + strPerfectFilePath += ".bin"; + + DWORD dwByte(0); + + HANDLE hFile = CreateFileW( + CMyTools::ToWstring(strPerfectFilePath).c_str(), // 파일 이름 + GENERIC_READ, // 읽기 모드 + FILE_SHARE_READ, // 다른 프로세스도 읽기 가능 + NULL, + OPEN_EXISTING, // 기존 파일 열기 + FILE_ATTRIBUTE_NORMAL, + NULL + ); + + if (hFile == INVALID_HANDLE_VALUE) { + MessageBox(NULL, L"패키징 읽기 실패", L"System Message", MB_OK); + return E_FAIL; + } + + _int iObjectCount = {}; + + if (!ReadFile(hFile, &iObjectCount, sizeof(_int), &dwByte, nullptr)) { + return E_FAIL; + } + + for (size_t i = 0; i < iObjectCount; i++) + { + EFFECT_TYPE eEffectType = {}; + + if (!ReadFile(hFile, &eEffectType, sizeof(EFFECT_TYPE), &dwByte, nullptr)) { + return E_FAIL; + } + + size_t iFilePathLength = {}; + + if (!ReadFile(hFile, &iFilePathLength, sizeof(size_t), &dwByte, nullptr)) { + return E_FAIL; + } + + _char szFilePath[MAX_PATH] = {}; + + if (iFilePathLength != 0) + { + if (!ReadFile(hFile, szFilePath, sizeof(_char) * ((DWORD)iFilePathLength + 1), &dwByte, nullptr)) { + return E_FAIL; + } + } + + _string strPath = szFilePath; + size_t iPos; + + while ((iPos = strPath.find(".bin")) != std::string::npos) { + strPath.erase(iPos, 4); + }; + + + CPartObject::PARTOBJECT_DESC PartsDesc{}; + CEditEffect* pEditEffect = {}; + CTrailObject* pTrailEffect = {}; + switch (eEffectType) + { + case EFFECT_TYPE::EFFECT: + + + PartsDesc.pParentTransform = m_pTransformCom; + + + if (FAILED(Add_PartObject("EffectObject" + i, ENUM_CLASS(LEVEL::EFFECT), &pEditEffect, &PartsDesc))) + { + return E_FAIL; + } + + pEditEffect->Load(strPath.c_str(), LEVEL::EFFECT); + + SAFE_RELEASE(pEditEffect); + + break; + + case EFFECT_TYPE::TRAIL: + + PartsDesc.pParentTransform = m_pTransformCom; + + + if (FAILED(Add_PartObject("TrailObject" + i, ENUM_CLASS(LEVEL::EFFECT), &pTrailEffect, &PartsDesc))) + { + return E_FAIL; + } + + pTrailEffect->Load_Trail(strPath.c_str(), LEVEL::EFFECT); + + SAFE_RELEASE(pTrailEffect); + + break; + case EFFECT_TYPE::END: + break; + default: + break; + } + + } + + CloseHandle(hFile); + + MessageBox(NULL, L"패키징 로드 성공", L"System Message", MB_OK); + + return S_OK; +} + +HRESULT CEffect_Container::Ready_Components(void* pArg) +{ + CTransform::TRANSFORM_DESC TransformDesc = {}; + + TransformDesc.fRadius = 20.f; + TransformDesc.fRotationPerSec = 10.f; + TransformDesc.fSpeedPerSec = 10.f; + + if (FAILED(__super::Ready_Components(&TransformDesc))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CEffect_Container::Ready_Child() +{ + + return S_OK; +} + +void CEffect_Container::Free() +{ + __super::Free(); + +} + +HRESULT CEffect_Container::Bind_ShaderResources() +{ + return S_OK; +} + +void CEffect_Container::Update_Event(_float fTimeDelta) +{ + + m_fPreAccTime = m_fAccTime; + m_fAccTime += fTimeDelta; + + if (m_fAccTime >= m_fDelay && m_isDelayed == false) // 아직 딜레이되지 않았고 딜레이를 넘어섰다면 + { + m_isDelayed = true; + } + else + { + return; + } + + + if (m_fAccTime >= m_fDuration) // 듀레이션을 넘어섰다면 + { + if (m_isLoop) + { + m_fAccTime = 0.f; + m_fPreAccTime = 0.f; + m_isDelayed = false; + } + } + + + for (auto& pPair : m_Events) // 이벤트들을 비교하면서 실행함 + { + if (pPair.first >= m_fPreAccTime && pPair.first <= m_fAccTime) + { + pPair.second(); + } + } + + +} diff --git a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp index 59dd9abdb..90fc4eb93 100644 --- a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp +++ b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp @@ -3,17 +3,18 @@ #include "GameInstance.h" #include "EditEffect.h" +#include "TrailObject.h" #include CEffect_Editor::CEffect_Editor(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) - : CContainerObject{ pDevice, pContext } + : CEffect_Container{ pDevice, pContext } { } CEffect_Editor::CEffect_Editor(const CEffect_Editor& rhs) - : CContainerObject(rhs) + : CEffect_Container(rhs) , m_MatFiles(rhs.m_MatFiles) { @@ -22,8 +23,6 @@ CEffect_Editor::CEffect_Editor(const CEffect_Editor& rhs) HRESULT CEffect_Editor::Initialize_Prototype() { - - ReadMaterials("../Bin/Resources/VFX/Particles/Magic/Glacius"); @@ -70,6 +69,18 @@ void CEffect_Editor::Update(_float fTimeDelta) Describe_Entity(); __super::Update(fTimeDelta); + if (m_pGameInstance->Key_Pressing(DIK_UP)) + m_pTransformCom->Go_Straight(fTimeDelta); + if (m_pGameInstance->Key_Pressing(DIK_DOWN)) + m_pTransformCom->Go_Backward(fTimeDelta); + if (m_pGameInstance->Key_Pressing(DIK_RIGHT)) + m_pTransformCom->Go_Right(fTimeDelta); + if (m_pGameInstance->Key_Pressing(DIK_LEFT)) + m_pTransformCom->Go_Left(fTimeDelta); + + if (m_pGameInstance->Key_Pressing(DIK_Z)) + m_pTransformCom->Turn(XMVectorSet(0.f, 1.f, 0.f, 0.f), fTimeDelta); + } void CEffect_Editor::Late_Update(_float fTimeDelta) @@ -79,7 +90,13 @@ void CEffect_Editor::Late_Update(_float fTimeDelta) HRESULT CEffect_Editor::Ready_Components(void* pArg) { - if (FAILED(__super::Ready_Components(pArg))) { + CTransform::TRANSFORM_DESC TransformDesc = {}; + + TransformDesc.fRadius = 20.f; + TransformDesc.fRotationPerSec = 10.f; + TransformDesc.fSpeedPerSec = 10.f; + + if (FAILED(__super::Ready_Components(&TransformDesc))) { return E_FAIL; } @@ -90,15 +107,15 @@ HRESULT CEffect_Editor::Ready_Child() { - CPartObject::PARTOBJECT_DESC PartsDesc{}; + //CPartObject::PARTOBJECT_DESC PartsDesc{}; - PartsDesc.pParentTransform = m_pTransformCom; + //PartsDesc.pParentTransform = m_pTransformCom; - if (FAILED(Add_PartObject("EffectObject" + to_string(m_iNumPart++), ENUM_CLASS(LEVEL::EFFECT), &m_pEditEffect, &PartsDesc))) - return E_FAIL; + //if (FAILED(Add_PartObject("EffectObject" + to_string(m_iNumPart++), ENUM_CLASS(LEVEL::EFFECT), nullptr, &PartsDesc))) + // return E_FAIL; + + //m_strCurrentEffectName = "EffectObject0" ; - m_strCurrentEffectName = "EffectObject0"; - SAFE_RELEASE(m_pEditEffect); @@ -388,12 +405,14 @@ CEffect_Editor* CEffect_Editor::Create(ID3D11Device* pDevice, ID3D11DeviceContex } return pInstance; + } CGameObject* CEffect_Editor::Clone(void* pArg, CGameObject* pOwner) { CEffect_Editor* pInstance = new CEffect_Editor(*this); pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) { MSG_BOX("Failed to Cloned : CEffect_Editor"); @@ -408,6 +427,7 @@ void CEffect_Editor::Free() __super::Free(); SAFE_RELEASE(m_pEditEffect); + SAFE_RELEASE(m_pTrailObject); } void CEffect_Editor::Describe_Entity() @@ -417,29 +437,15 @@ void CEffect_Editor::Describe_Entity() GUI::TextColored(ImVec4(1.f, 0.f, 1.f, 1.f), m_strCurrentEffectName.c_str()); if (m_pEditEffect != nullptr) + { m_pEditEffect->Describe_Entity(); - - GUI::InputTextMultiline("FILE PATH", m_szBuffer, sizeof(m_szBuffer), ImVec2(250, 25)); - - m_strSavePath = m_szBuffer; - - if (GUI::Button("SAVE")) - { - m_pEditEffect->Save_Effect(m_strSavePath.c_str()); - } - - GUI::SameLine(); - - if (GUI::Button("LOAD")) - { - Load_Edit(m_strSavePath.c_str()); } - if (GUI::Button("RESAVE")) + if (m_pTrailObject != nullptr) { - ReSaveFile(m_strSavePath.c_str()); + m_pTrailObject->Describe_Entity(); } - + ImGui::End(); ImGui::Begin("Reference Material"); @@ -467,10 +473,32 @@ void CEffect_Editor::Describe_Entity() PartsDesc.pParentTransform = m_pTransformCom; if (FAILED(Add_PartObject("EffectObject" + to_string(m_iNumPart++), ENUM_CLASS(LEVEL::EFFECT), nullptr, &PartsDesc))) + { + ImGui::EndPopup(); return; + } + } + if (ImGui::MenuItem("Create Trail")) + { + if (m_pTrailObject == nullptr) + { + CPartObject::PARTOBJECT_DESC PartsDesc{}; + + PartsDesc.pParentTransform = m_pTransformCom; + + if (FAILED(Add_PartObject("TrailObject", ENUM_CLASS(LEVEL::EFFECT), &m_pTrailObject, &PartsDesc))) + { + ImGui::EndPopup(); + } + + CTrailObject* pTrailObject = m_pTrailObject; + + SAFE_RELEASE(pTrailObject); + + } } ImGui::EndPopup(); @@ -482,7 +510,12 @@ void CEffect_Editor::Describe_Entity() for (auto& pPartObject : m_PartObjects) { - _string strName = "EffectObject" + to_string(iIndex); + _string strName = {}; + + if( nullptr != dynamic_cast(pPartObject.second)) + strName = "TrailObject" + to_string(iIndex); + else + strName = "EffectObject" + to_string(iIndex); if (GUI::TreeNode(strName.c_str())) { @@ -555,6 +588,74 @@ void CEffect_Editor::Describe_Entity() ImGui::End(); + + ImGui::Begin("Effect Save"); + + GUI::InputTextMultiline("FILE PATH", m_szBuffer, sizeof(m_szBuffer), ImVec2(250, 25)); + + m_strSavePath = m_szBuffer; + + if (GUI::Button("SAVE")) + { + m_pEditEffect->Save_Effect(m_strSavePath.c_str()); + } + + GUI::SameLine(); + + if (GUI::Button("LOAD")) + { + Load_Edit(m_strSavePath.c_str()); + } + + GUI::SameLine(); + + if (GUI::Button("RESAVE")) + { + ReSaveFile(m_strSavePath.c_str()); + } + + + + GUI::InputTextMultiline("PACKAGE FILE PATH", m_szPackageBuffer, sizeof(m_szPackageBuffer), ImVec2(250, 25)); + + m_strPackageSavePath = m_szPackageBuffer; + + if (GUI::Button("PACKAING")) + { + Save_Package(m_strPackageSavePath.c_str()); + } + + GUI::SameLine(); + + if (GUI::Button("LOAD PACKAGE")) + { + Load_Package(m_strPackageSavePath.c_str()); + } + + GUI::InputTextMultiline("TRAIL FILE PATH", m_szTrailBuffer, sizeof(m_szTrailBuffer), ImVec2(250, 25)); + + m_strTrailSavePath = m_szTrailBuffer; + + if (GUI::Button("TRAIL SAVE")) + { + if (m_pTrailObject != nullptr) + { + m_pTrailObject->Save_Trail(m_strTrailSavePath.c_str()); + } + } + + GUI::SameLine(); + + if (GUI::Button("TRAIL LOAD")) + { + if (m_pTrailObject != nullptr) + { + m_pTrailObject->Load_Trail(m_strTrailSavePath.c_str(), LEVEL::EFFECT); + } + } + + ImGui::End(); + } HRESULT CEffect_Editor::Bind_ShaderResources() diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index 67838c4a6..d7616c473 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -75,6 +75,8 @@ #include "EditEffect.h" #include "Effect_Editor.h" #include "Dummy_Plane.h" +#include "TrailObject.h" +#include "NomalJap.h" #pragma endregion @@ -644,6 +646,15 @@ HRESULT CLoader::Loading_For_Effect() if (FAILED(m_pGameInstance->Add_Prototype(ENUM_CLASS(LEVEL::EFFECT), CDummy_Plane::Create(m_pDevice, m_pContext)))) return E_FAIL; + if (FAILED(m_pGameInstance->Add_Prototype(ENUM_CLASS(LEVEL::EFFECT), CTrail::Create(m_pDevice, m_pContext)))) + return E_FAIL; + + if (FAILED(m_pGameInstance->Add_Prototype(ENUM_CLASS(LEVEL::EFFECT), CTrailObject::Create(m_pDevice, m_pContext)))) + return E_FAIL; + + if (FAILED(m_pGameInstance->Add_Prototype(ENUM_CLASS(LEVEL::EFFECT), CNomalJap::Create(m_pDevice, m_pContext)))) + return E_FAIL; + m_strMessage = TEXT("Loading Success!"); diff --git a/Jusin154_Team3D/Editor/Private/NomalJap.cpp b/Jusin154_Team3D/Editor/Private/NomalJap.cpp new file mode 100644 index 000000000..959be1168 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/NomalJap.cpp @@ -0,0 +1,122 @@ +#include "pch.h" +#include "NomalJap.h" + +#include "GameInstance.h" +#include "EditEffect.h" + + +CNomalJap::CNomalJap(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CNomalJap::CNomalJap(const CNomalJap& rhs) + : CEffect_Container(rhs) +{ + +} + +HRESULT CNomalJap::Initialize_Prototype() +{ + + return S_OK; + +} + +HRESULT CNomalJap::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + if (FAILED(Ready_Components(pArg))) + return E_FAIL; + + if (FAILED(Ready_Child())) + return E_FAIL; + + + m_wstrEffectName = L"Nomal_Jap"; + + + return S_OK; +} + +void CNomalJap::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); +} + +void CNomalJap::Update(_float fTimeDelta) +{ + __super::Update(fTimeDelta); + +} + +void CNomalJap::Late_Update(_float fTimeDelta) +{ + __super::Late_Update(fTimeDelta); +} + +HRESULT CNomalJap::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CNomalJap::Ready_Child() +{ + + //CPartObject::PARTOBJECT_DESC PartsDesc{}; + + //PartsDesc.pParentTransform = m_pTransformCom; + + //if (FAILED(Add_PartObject("EffectObject" + to_string(m_iNumPart++), ENUM_CLASS(LEVEL::EFFECT), &m_pEditEffect, &PartsDesc))) + // return E_FAIL; + + return S_OK; +} + +CNomalJap* CNomalJap::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CNomalJap* pInstance = new CNomalJap(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CNomalJap"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CNomalJap::Free() +{ + __super::Free(); + +} + +CGameObject* CNomalJap::Clone(void* pArg, CGameObject* pOwner) +{ + CNomalJap* pInstance = new CNomalJap(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CNomalJap"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CNomalJap::Describe_Entity() +{ + +} + +HRESULT CNomalJap::Bind_ShaderResources() +{ + return S_OK; +} diff --git a/Jusin154_Team3D/Editor/Private/TrailObject.cpp b/Jusin154_Team3D/Editor/Private/TrailObject.cpp new file mode 100644 index 000000000..720c3702b --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/TrailObject.cpp @@ -0,0 +1,463 @@ +#include "pch.h" +#include "TrailObject.h" + +#include "GameInstance.h" +#include "Trail.h" + + +CTrailObject::CTrailObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CPartObject{ pDevice, pContext } +{ +} + +CTrailObject::CTrailObject(const CTrailObject& rhs) + : CPartObject(rhs) +{ +} + +HRESULT CTrailObject::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CTrailObject::Initialize(void* pArg) +{ + if (FAILED(__super::Initialize(pArg))) + return E_FAIL; + + if (FAILED(Ready_Components(pArg))) + return E_FAIL; + + + return S_OK; +} + +void CTrailObject::Priority_Update(_float fTimeDelta) +{ + +} + +void CTrailObject::Update(_float fTimeDelta) +{ + m_pTrailCom->Trail_Update(fTimeDelta, m_pParentTransformCom->Get_XMWorldMatrix()); +} + +void CTrailObject::Late_Update(_float fTimeDelta) +{ + if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) { + m_pGameInstance->Add_RenderGroup(RENDER::EFFECT, this); + } + +} + +#ifdef _DEBUG + +HRESULT CTrailObject::Save_Path(HANDLE hFile) +{ + DWORD dwByte; + + size_t iObjectLength = m_strPath.length(); + const _char* pFilePath = m_strPath.c_str(); + + if (!WriteFile(hFile, &m_eEffectType, sizeof(EFFECT_TYPE), &dwByte, nullptr)) { + return E_FAIL; + } + + if (!WriteFile(hFile, &iObjectLength, sizeof(size_t), &dwByte, nullptr)) { + return E_FAIL; + } + + if (pFilePath != 0) + { + if (!WriteFile(hFile, pFilePath, sizeof(_char) * ((DWORD)iObjectLength + 1), &dwByte, nullptr)) { + return E_FAIL; + } + } + + return S_OK; +} + +HRESULT CTrailObject::Save_Trail(const _char* pPath) +{ + _string strPerfectFilePath = pPath; + strPerfectFilePath += ".bin"; + + HANDLE hFile = CreateFile(CMyTools::ToWstring(strPerfectFilePath).c_str(), + GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL, NULL + ); + + + if (hFile == INVALID_HANDLE_VALUE) { + MessageBox(NULL, L"트레일 오브젝트 저장 실패", L"System Message", MB_OK); + return E_FAIL; + } + + m_strPath = strPerfectFilePath; + + DWORD dwByte(0); + + if (!WriteFile(hFile, &m_eEffectType, sizeof(EFFECT_TYPE), &dwByte, nullptr)) { + return E_FAIL; + } + + + + size_t iComponentLength = m_strTrailDiffuseName.length(); + const _char* pFileComponentPath = m_strTrailDiffuseName.c_str(); + + if (!WriteFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) { + return E_FAIL; + } + + if (iComponentLength != 0) + { + if (!WriteFile(hFile, pFileComponentPath, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) { + return E_FAIL; + } + } + + iComponentLength = m_strTrailNoiseName.length(); + pFileComponentPath = m_strTrailNoiseName.c_str(); + + if (!WriteFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) { + return E_FAIL; + } + + if (iComponentLength != 0) + { + if (!WriteFile(hFile, pFileComponentPath, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) { + return E_FAIL; + } + } + + + iComponentLength = m_strTrailMaskingName.length(); + pFileComponentPath = m_strTrailMaskingName.c_str(); + + if (!WriteFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) { + return E_FAIL; + } + + if (iComponentLength != 0) + { + if (!WriteFile(hFile, pFileComponentPath, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) { + return E_FAIL; + } + } + + m_pTrailCom->Save_Trail(hFile); + + CloseHandle(hFile); + + MessageBox(NULL, L"트레일 저장 성공", L"System Message", MB_OK); + return S_OK; +} + +#endif + +HRESULT CTrailObject::Load_Trail(const _char* pPath, LEVEL eLevel) +{ + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pMasking_TextureCom); + SAFE_RELEASE(m_pNoise_TextureCom); + + _string strPerfectFilePath = pPath; + + strPerfectFilePath += ".bin"; + + DWORD dwByte(0); + + HANDLE hFile = CreateFileW( + CMyTools::ToWstring(strPerfectFilePath).c_str(), // 파일 이름 + GENERIC_READ, // 읽기 모드 + FILE_SHARE_READ, // 다른 프로세스도 읽기 가능 + NULL, + OPEN_EXISTING, // 기존 파일 열기 + FILE_ATTRIBUTE_NORMAL, + NULL + ); + + m_strPath = strPerfectFilePath; + + if (hFile == INVALID_HANDLE_VALUE) { + MessageBox(NULL, L"오브젝트 읽기 실패", L"System Message", MB_OK); + return E_FAIL; + } + + + if (!ReadFile(hFile, &m_eEffectType, sizeof(EFFECT_TYPE), &dwByte, nullptr)) { + return E_FAIL; + } + + size_t iComponentLength = {}; + + if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) { + return E_FAIL; + } + + if (iComponentLength != 0) + { + _char szName[MAX_PATH] = {}; + + if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) { + return E_FAIL; + } + + m_strTrailDiffuseName = szName; + + m_isDiffuse = true; + + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strTrailDiffuseName), + reinterpret_cast(&m_pDiffuse_TextureCom)))) + return E_FAIL; + + + } + + if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) { + return E_FAIL; + } + + if (iComponentLength != 0) + { + _char szName[MAX_PATH] = {}; + + if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) { + return E_FAIL; + } + + m_strTrailNoiseName = szName; + + m_isNoise = true; + + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strTrailNoiseName), + reinterpret_cast(&m_pNoise_TextureCom)))) + return E_FAIL; + + } + + if (!ReadFile(hFile, &iComponentLength, sizeof(size_t), &dwByte, nullptr)) { + return E_FAIL; + } + + if (iComponentLength != 0) + { + _char szName[MAX_PATH] = {}; + + if (!ReadFile(hFile, &szName, sizeof(_char) * ((DWORD)iComponentLength + 1), &dwByte, nullptr)) { + return E_FAIL; + } + + m_strTrailMaskingName = szName; + + m_isMask = true; + + if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strTrailMaskingName), + reinterpret_cast(&m_pMasking_TextureCom)))) + return E_FAIL; + } + + m_pTrailCom->Load_Trail(hFile); + + CloseHandle(hFile); + + + MessageBox(NULL, L"트레일 로드 성공", L"System Message", MB_OK); + + return S_OK; +} + +HRESULT CTrailObject::Ready_Components(void* pArg) +{ + + if (FAILED(__super::Ready_Components(nullptr))) { + return E_FAIL; + } + + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_POSTEX, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + CTrail::TRAIL_DESC pTrailDesc; + + pTrailDesc.vHigh = _float3(0.f, 1.f, 0.f); + pTrailDesc.vLow = _float3(0.f, -1.f, 0.f); + + if (FAILED(Add_Component(ENUM_CLASS(LEVEL::EFFECT), &m_pTrailCom, &pTrailDesc))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CTrailObject::Render() +{ + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_POSTEX::TRAIL)))) + return E_FAIL; + + if (FAILED(Bind_ShaderResources())) + return E_FAIL; + + if (FAILED(m_pTrailCom->Render())) + return E_FAIL; + + return S_OK; +} + + + + +CTrailObject* CTrailObject::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CTrailObject* pInstance = new CTrailObject(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CTrailObject"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CTrailObject::Clone(void* pArg, CGameObject* pOwner) +{ + CTrailObject* pInstance = new CTrailObject(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CTrailObject"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CTrailObject::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pMasking_TextureCom); + SAFE_RELEASE(m_pNoise_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pTrailCom); +} + +void CTrailObject::Describe_Entity() +{ + + if (GUI::TreeNode("TRAIL")) + { + m_pTrailCom->Describe_Entity(); + + GUI::Checkbox("Diffuse", &m_isDiffuse); + GUI::Checkbox("Masking", &m_isMask); + GUI::Checkbox("Noise", &m_isNoise); + + if (m_isDiffuse == true) + { + if (GUI::TreeNode("TRAIL DIFFUSE")) + { + _string strName = m_pGameInstance->Asset_Description(ENUM_CLASS(LEVEL::EFFECT), "DIFFUSE_TEXTURE", (CComponent**)&m_pDiffuse_TextureCom, nullptr, this); + + if (strName != "") { + m_strTrailDiffuseName = strName; + } + + GUI::TreePop(); + } + } + + if (m_isMask == true) + { + if (GUI::TreeNode("TRAIL MASK")) + { + _string strName = m_pGameInstance->Asset_Description(ENUM_CLASS(LEVEL::EFFECT), "MASK_TEXTURE", (CComponent**)&m_pMasking_TextureCom, nullptr, this); + + if (strName != "") { + m_strTrailMaskingName = strName; + } + + GUI::TreePop(); + } + } + + if (m_isNoise == true) + { + if (GUI::TreeNode("TRAIL NOISE")) + { + _string strName = m_pGameInstance->Asset_Description(ENUM_CLASS(LEVEL::EFFECT), "NOISE_TEXTURE", (CComponent**)&m_pNoise_TextureCom, nullptr, this); + + if (strName != "") { + m_strTrailNoiseName = strName; + } + + GUI::TreePop(); + } + } + + GUI::TreePop(); + } + + GUI::Separator(); + GUI::Spacing(); + +} + +HRESULT CTrailObject::Bind_ShaderResources() +{ + + if (FAILED(m_pTrailCom->Bind_Resources())) + return E_FAIL; + + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Bind_RawValue("g_isDiffuse", &m_isDiffuse, sizeof(_bool)))) { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Bind_RawValue("g_isMask", &m_isMask, sizeof(_bool)))) { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Bind_RawValue("g_isNoise", &m_isNoise, sizeof(_bool)))) { + return E_FAIL; + } + + if (m_pDiffuse_TextureCom != nullptr) + { + if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_DiffuseTexture", 0))) { + return E_FAIL; + } + } + + if (m_pNoise_TextureCom != nullptr) + { + if (FAILED(m_pNoise_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_NoiseTexture", 0))) { + return E_FAIL; + } + } + + if (m_pMasking_TextureCom != nullptr) + { + if (FAILED(m_pMasking_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_MaskingTexture", 0))) { + return E_FAIL; + } + } + + return S_OK; +} diff --git a/Jusin154_Team3D/Editor/Public/EditEffect.h b/Jusin154_Team3D/Editor/Public/EditEffect.h index be9ec7891..af347487a 100644 --- a/Jusin154_Team3D/Editor/Public/EditEffect.h +++ b/Jusin154_Team3D/Editor/Public/EditEffect.h @@ -6,6 +6,7 @@ NS_BEGIN(Engine) class CModel; class CShader; + NS_END NS_BEGIN(Editor) @@ -25,6 +26,7 @@ class CEditEffect final : public CEffectObject public: void Reference_Mat_For_EditEffect(); HRESULT Save_Effect(const _char* pPath); + HRESULT Save_Path(HANDLE hFile); private: virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; @@ -32,6 +34,7 @@ class CEditEffect final : public CEffectObject private: _int m_iSelectTextureNum = {}; + public: static CEditEffect* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h index 337f65f8b..3d9a736ee 100644 --- a/Jusin154_Team3D/Editor/Public/Editor_Define.h +++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h @@ -25,6 +25,8 @@ namespace Editor enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, END }; enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, 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}; } using namespace Editor; diff --git a/Jusin154_Team3D/Editor/Public/EffectObject.h b/Jusin154_Team3D/Editor/Public/EffectObject.h index 8ec16cb71..e25614983 100644 --- a/Jusin154_Team3D/Editor/Public/EffectObject.h +++ b/Jusin154_Team3D/Editor/Public/EffectObject.h @@ -8,6 +8,7 @@ class CInstance_Model; class CShader; class CTexture; class CLight; +class CTrail; NS_END NS_BEGIN(Editor) @@ -62,6 +63,8 @@ class CEffectObject abstract : public CPartObject _bool isReverseDissolve = {}; + EFFECT_TYPE eEffectType = { EFFECT_TYPE::EFFECT }; + }EFFECT_INFO; typedef struct tagPreEffectInfo @@ -109,6 +112,10 @@ class CEffectObject abstract : public CPartObject LIGHT_DESC LightDesc = {}; RENDER eRenderOrder = { RENDER::EFFECT }; + _bool isReverseDissolve = {}; + + + }PRE_EFFECT_INFO; protected: @@ -150,6 +157,7 @@ class CEffectObject abstract : public CPartObject CInstance_Model* m_pInstance_ModelCom = { nullptr }; + protected: EFFECT_INFO m_EffectInfo = {}; _string m_strDiffuseName = {}; @@ -160,6 +168,9 @@ class CEffectObject abstract : public CPartObject _string m_strEmissiveName = {}; _string m_strDistortionName = {}; + _string m_strPath = {}; + _string m_strName = {}; + public: virtual void Free() override; }; diff --git a/Jusin154_Team3D/Editor/Public/Effect_Container.h b/Jusin154_Team3D/Editor/Public/Effect_Container.h new file mode 100644 index 000000000..f875f2383 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Effect_Container.h @@ -0,0 +1,54 @@ +#pragma once + +#include "Editor_Define.h" +#include "ContainerObject.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Editor) + +class CEffect_Container abstract : public CContainerObject +{ +protected: + CEffect_Container(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CEffect_Container(const CEffect_Container& rhs); + virtual ~CEffect_Container() = default; + +public: + virtual void Priority_Update(_float fTimeDelta) override; + virtual void Update(_float fTimeDelta) override; + virtual void Late_Update(_float fTimeDelta) override; + +public: +#ifdef _DEBUG + HRESULT Save_Package(const _char* pPath); +#endif + HRESULT Load_Package(const _char* pPath); +protected: + 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; + + void Update_Event(_float fTimeDelta); + +protected: + _wstring m_wstrEffectName = {}; + + _bool m_isLoop = {}; + + _float m_fAccTime = {}; + _float m_fPreAccTime = {}; + _float m_fDuration = {}; + _float m_fDelay = {}; + _bool m_isDelayed = { false }; + + map<_float, function> m_Events = {}; + +public: + virtual void Free() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/Effect_Editor.h b/Jusin154_Team3D/Editor/Public/Effect_Editor.h index 4080cf896..9a99b8766 100644 --- a/Jusin154_Team3D/Editor/Public/Effect_Editor.h +++ b/Jusin154_Team3D/Editor/Public/Effect_Editor.h @@ -1,7 +1,7 @@ #pragma once #include "Editor_Define.h" -#include "ContainerObject.h" +#include "Effect_Container.h" NS_BEGIN(Engine) class CModel; @@ -10,7 +10,7 @@ NS_END NS_BEGIN(Editor) -class CEffect_Editor final : public CContainerObject +class CEffect_Editor final : public CEffect_Container { private: CEffect_Editor(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); @@ -41,11 +41,17 @@ class CEffect_Editor final : public CContainerObject _string m_strCurrentEffectName = {}; _uint m_iNumPart = { 0 }; - class CEditEffect* m_pEditEffect = { nullptr }; + class CEditEffect* m_pEditEffect = { nullptr }; // 현재 선택된 이펙트 객체 + class CTrailObject* m_pTrailObject = { nullptr }; map<_wstring, vector>> m_MatFiles = {}; // map<머테리얼 이름, vector<텍스쳐이름 , 텍스쳐 경로>> _char m_szBuffer[MAX_PATH] = { "../Bin/Resources/Data/Effect/"}; + _char m_szTrailBuffer[MAX_PATH] = { "../Bin/Resources/Data/Effect/Trail/" }; + _char m_szPackageBuffer[MAX_PATH] = { "../Bin/Resources/Data/Effect/Package/" }; + _string m_strSavePath = {}; + _string m_strTrailSavePath = {}; + _string m_strPackageSavePath = {}; public: static CEffect_Editor* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Editor/Public/NomalJap.h b/Jusin154_Team3D/Editor/Public/NomalJap.h new file mode 100644 index 000000000..8873292dd --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/NomalJap.h @@ -0,0 +1,41 @@ +#pragma once + +#include "Editor_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Editor) + +class CNomalJap final : public CEffect_Container +{ +private: + CNomalJap(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CNomalJap(const CNomalJap& rhs); + virtual ~CNomalJap() = default; + +public: + virtual void Priority_Update(_float fTimeDelta) override; + virtual void Update(_float fTimeDelta) override; + virtual void Late_Update(_float fTimeDelta) 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; + +private: + _wstring m_wstrEffectName = {}; + +public: + static CNomalJap* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; + CGameObject* Clone(void* pArg, CGameObject* pOwner) override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/TrailObject.h b/Jusin154_Team3D/Editor/Public/TrailObject.h new file mode 100644 index 000000000..c332731be --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/TrailObject.h @@ -0,0 +1,67 @@ +#pragma once + +#include "Editor_Define.h" +#include "EffectObject.h" + +NS_BEGIN(Engine) +class CShader; +class CTexture; +class CTrail; +NS_END + +NS_BEGIN(Editor) + +class CTrailObject final : public CPartObject +{ +private: + CTrailObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CTrailObject(const CTrailObject& rhs); + virtual ~CTrailObject() = default; + +public: + virtual void Priority_Update(_float fTimeDelta) override; + virtual void Update(_float fTimeDelta) override; + virtual void Late_Update(_float fTimeDelta) override; + +public: +#ifdef _DEBUG + HRESULT Save_Path(HANDLE hFile); + HRESULT Save_Trail(const _char* pPath); +#endif + HRESULT Load_Trail(const _char* pPath, LEVEL eLevel); +private: + HRESULT Bind_ShaderResources() override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Render() override; + +public: + static CTrailObject* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pNoise_TextureCom = { nullptr }; + CTexture* m_pMasking_TextureCom = { nullptr }; + + CShader* m_pShaderCom = { nullptr }; + CTrail* m_pTrailCom = { nullptr }; + + _string m_strTrailDiffuseName = {}; + _string m_strTrailNoiseName = {}; + _string m_strTrailMaskingName = {}; + + _string m_strPath = {}; + _string m_strName = {}; + + _bool m_isDiffuse = {}; + _bool m_isNoise = {}; + _bool m_isMask = {}; + + EFFECT_TYPE m_eEffectType = { EFFECT_TYPE::TRAIL }; +}; + +NS_END diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli index 3ddc2f1e7..077fa26d2 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Engine_Shader_Defines.hlsli @@ -174,8 +174,8 @@ BlendState BS_WB_Acc DestBlend[0] = one; BlendOp[0] = Add; - SrcBlend[1] = Zero; - DestBlend[1] = Inv_Src_Alpha; + SrcBlend[1] = Inv_Src_Alpha; + DestBlend[1] = Zero; BlendOp[1] = Add; diff --git a/Jusin154_Team3D/Engine/Private/ComputeShader.cpp b/Jusin154_Team3D/Engine/Private/ComputeShader.cpp index e1660bda6..ddbd98b00 100644 --- a/Jusin154_Team3D/Engine/Private/ComputeShader.cpp +++ b/Jusin154_Team3D/Engine/Private/ComputeShader.cpp @@ -84,6 +84,8 @@ vector CComputeShader::Dispatch(_uint iSRVIndex, _uint if (SUCCEEDED(m_pContext->Map(m_pOutputStagingBuffer[i], 0, D3D11_MAP_READ, 0, &StagingSubResource))) { + + StagingSubResources.push_back(StagingSubResource); m_pContext->Unmap(m_pOutputStagingBuffer[i], 0); @@ -320,7 +322,7 @@ CComputeShader* CComputeShader::Create(ID3D11Device* pDevice, ID3D11DeviceContex { CComputeShader* pInstance = new CComputeShader(pDevice, pContext); - if (FAILED(pInstance->Initialize(pShaderFilePath, pStartFunctionName, iNumElement, iNumInputBuffer, iNumOutputBuffer, iOutputStructStride, iInputStructStride))) + if (FAILED(pInstance->Initialize(pShaderFilePath, pStartFunctionName, iNumElement, iNumInputBuffer, iNumOutputBuffer, iInputStructStride, iOutputStructStride))) { MSG_BOX("Failed to Created : CComputeShader Prototype"); SAFE_RELEASE(pInstance); diff --git a/Jusin154_Team3D/Engine/Private/Trail.cpp b/Jusin154_Team3D/Engine/Private/Trail.cpp index 7a3078077..d0a4e3279 100644 --- a/Jusin154_Team3D/Engine/Private/Trail.cpp +++ b/Jusin154_Team3D/Engine/Private/Trail.cpp @@ -13,39 +13,40 @@ CTrail::CTrail(const CTrail& rhs) HRESULT CTrail::Initialize_Prototype() { + return S_OK; +} + +HRESULT CTrail::Initialize(void* pArg) +{ + TRAIL_DESC* pDesc = static_cast(pArg); + + if (pDesc == nullptr) + return E_FAIL; + + m_TrailDesc = *pDesc; + m_iNumVertexBuffers = 1; - m_iNumVertices = 4; + m_iNumVertices = 256; m_iVertexStride = sizeof(VTXPOSTEX); - m_iNumIndices = 6; + m_iNumIndices = (m_iNumVertices / 2 - 1) * 6; m_iIndexStride = 4; m_eIndexFormat = DXGI_FORMAT_R32_UINT; m_ePrimitive = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST; + m_pVertices = new VTXPOSTEX[m_iNumVertices]; + #pragma region VTX_BUFFER D3D11_BUFFER_DESC VBDesc{}; VBDesc.ByteWidth = m_iVertexStride * m_iNumVertices; - VBDesc.Usage = D3D11_USAGE_DEFAULT; + VBDesc.Usage = D3D11_USAGE_DYNAMIC; VBDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER; - VBDesc.CPUAccessFlags = 0; + VBDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; VBDesc.MiscFlags = 0; VBDesc.StructureByteStride = m_iVertexStride; VTXPOSTEX* pVertices = new VTXPOSTEX[m_iNumVertices]{}; - m_pVertexPositions = new _float3[m_iNumIndices]{}; - - m_pVertexPositions[0] = pVertices[0].vPosition = _float3(-0.5f, 0.5f, 0.f); - pVertices[0].vTexcoord = _float2(0.0f, 0.0f); - - m_pVertexPositions[1] = pVertices[1].vPosition = _float3(0.5f, 0.5f, 0.f); - pVertices[1].vTexcoord = _float2(1.0f, 0.0f); - - m_pVertexPositions[2] = pVertices[2].vPosition = _float3(0.5f, -0.5f, 0.f); - pVertices[2].vTexcoord = _float2(1.0f, 1.0f); - - m_pVertexPositions[3] = pVertices[3].vPosition = _float3(-0.5f, -0.5f, 0.f); - pVertices[3].vTexcoord = _float2(0.0f, 1.0f); D3D11_SUBRESOURCE_DATA InitialVBDate{}; InitialVBDate.pSysMem = pVertices; @@ -58,9 +59,10 @@ HRESULT CTrail::Initialize_Prototype() #pragma endregion #pragma region IDX_BUFFER + D3D11_BUFFER_DESC IBDesc{}; IBDesc.ByteWidth = m_iIndexStride * m_iNumIndices; - IBDesc.Usage = D3D11_USAGE_DEFAULT; + IBDesc.Usage = D3D11_USAGE_IMMUTABLE; IBDesc.BindFlags = D3D11_BIND_INDEX_BUFFER; IBDesc.CPUAccessFlags = 0; IBDesc.MiscFlags = 0; @@ -69,13 +71,27 @@ HRESULT CTrail::Initialize_Prototype() _uint* pIndices = new _uint[m_iNumIndices]{}; - pIndices[0] = 0; - pIndices[1] = 1; - pIndices[2] = 2; + _uint iIndex = { 0 }; - pIndices[3] = 0; - pIndices[4] = 2; - pIndices[5] = 3; + for (_uint i = 0; i < m_iNumVertices / 2 - 1; i++) + { + _uint iStartIndex = i * 2; + + _uint Indicies[4] = { + iStartIndex , + iStartIndex + 1, + iStartIndex + 2, + iStartIndex + 3 + }; + + pIndices[iIndex++] = Indicies[0]; + pIndices[iIndex++] = Indicies[1]; + pIndices[iIndex++] = Indicies[2]; + + pIndices[iIndex++] = Indicies[1]; + pIndices[iIndex++] = Indicies[3]; + pIndices[iIndex++] = Indicies[2]; + } D3D11_SUBRESOURCE_DATA InitialIBDate{}; InitialIBDate.pSysMem = pIndices; @@ -83,16 +99,116 @@ HRESULT CTrail::Initialize_Prototype() if (FAILED(m_pDevice->CreateBuffer(&IBDesc, &InitialIBDate, &m_pIB))) { return E_FAIL; } + Safe_Delete_Array(pIndices); #pragma endregion - - return S_OK; } -HRESULT CTrail::Initialize(void* pArg) +void CTrail::Trail_Update(_float fDeltaTime, _fmatrix WorldMatrix) { + + _vector vLow = XMVector3TransformCoord(XMLoadFloat3(&m_TrailDesc.vLow), WorldMatrix); + _vector vHigh = XMVector3TransformCoord(XMLoadFloat3(&m_TrailDesc.vHigh), WorldMatrix); + + + //한칸씩 밀기 + memmove(m_PreLow, m_PreLow + 1, sizeof(VTXPOSTEX)); + memmove(m_PreHigh, m_PreHigh + 1, sizeof(VTXPOSTEX)); + + m_PreLow[1] = vLow; + m_PreHigh[1] = vHigh; + + if (m_iNumCount < 4) + { + XMStoreFloat3(&m_pVertices[m_iNumCount++].vPosition, vLow); + XMStoreFloat3(&m_pVertices[m_iNumCount++].vPosition, vHigh); + + //카운트가 적으면 시도하지 않음 + return; + } + + //시작점 끝점 내점 두개를 이용하여 보간할 것임 + + for (size_t i = 0; i < 4; i++) + { + _float iRatio = (_float)i / 3; + _vector vLerpLow = XMVectorCatmullRom(XMLoadFloat3(&m_pVertices[m_iNumCount - 2].vPosition), m_PreLow[0], m_PreLow[1], m_PreLow[1] + (m_PreLow[1] - m_PreLow[0]), iRatio); // LoW + _vector vLerpHigh = XMVectorCatmullRom(XMLoadFloat3(&m_pVertices[m_iNumCount - 1].vPosition), m_PreHigh[0], m_PreHigh[1], m_PreHigh[1] + (m_PreHigh[1] - m_PreHigh[0]), iRatio); + + XMStoreFloat3(&m_pVertices[m_iNumCount++].vPosition, vLerpLow); + XMStoreFloat3(&m_pVertices[m_iNumCount++].vPosition, vLerpHigh); + + if (m_iNumCount >= m_iNumVertices) + { + memmove(m_pVertices, m_pVertices + 2, sizeof(VTXPOSTEX) * (m_iNumCount - 2)); + + m_iNumCount -= 2; + } + + } + + //XMStoreFloat3(&m_pVertices[0].vPosition, vLow); + //XMStoreFloat3(&m_pVertices[1].vPosition, vHigh); + + for (_uint i = 0; i < m_iNumCount; i += 2) + { + + _float u = ((_float)i / (m_iNumCount - 2)); + + if (m_iNumCount - 2 <= 0) + u = 0; + + m_pVertices[i].vTexcoord = _float2(u, 0); // Low + + m_pVertices[i + 1].vTexcoord = _float2(u, 1); // High + } + + + D3D11_MAPPED_SUBRESOURCE VBResource{}; + + if (SUCCEEDED(m_pContext->Map(m_pVB, 0, D3D11_MAP_WRITE_DISCARD, 0, &VBResource))) + { + + memcpy(VBResource.pData, m_pVertices, sizeof(VTXPOSTEX) * m_iNumVertices); + + m_pContext->Unmap(m_pVB, 0); + } + +} + +#ifdef _DEBUG +HRESULT CTrail::Save_Trail(HANDLE hFile) +{ + DWORD dwByte(0); + + if (!WriteFile(hFile, &m_TrailDesc, sizeof(TRAIL_DESC), &dwByte, nullptr)) { + return E_FAIL; + } + + return S_OK; +} +#endif + +HRESULT CTrail::Load_Trail(HANDLE hFile) +{ + DWORD dwByte(0); + + if (!ReadFile(hFile, &m_TrailDesc, sizeof(TRAIL_DESC), &dwByte, nullptr)) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CTrail::Render() +{ + if (m_iNumCount < 4) + return S_OK; + + m_pContext->DrawIndexed( ((m_iNumCount / 2) - 1) * 6, 0, 0); + return S_OK; } @@ -126,9 +242,13 @@ void CTrail::Free() { __super::Free(); - + Safe_Delete_Array(m_pVertices); } void CTrail::Describe_Entity() { + + GUI::InputFloat3("Low", (_float*)&m_TrailDesc.vLow); + GUI::InputFloat3("High", (_float*)&m_TrailDesc.vHigh); + } diff --git a/Jusin154_Team3D/Engine/Private/VIBuffer.cpp b/Jusin154_Team3D/Engine/Private/VIBuffer.cpp index 418461da2..6d5e5b61a 100644 --- a/Jusin154_Team3D/Engine/Private/VIBuffer.cpp +++ b/Jusin154_Team3D/Engine/Private/VIBuffer.cpp @@ -1,4 +1,4 @@ -#include "pch.h" +#include "pch.h" #include "VIBuffer.h" CVIBuffer::CVIBuffer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) @@ -49,6 +49,7 @@ HRESULT CVIBuffer::Bind_Resources() HRESULT CVIBuffer::Render() { m_pContext->DrawIndexed(m_iNumIndices, 0, 0); + return S_OK; } diff --git a/Jusin154_Team3D/Engine/Public/ComputeShader.h b/Jusin154_Team3D/Engine/Public/ComputeShader.h index d13457208..0f179343f 100644 --- a/Jusin154_Team3D/Engine/Public/ComputeShader.h +++ b/Jusin154_Team3D/Engine/Public/ComputeShader.h @@ -34,7 +34,7 @@ class ENGINE_DLL CComputeShader final : public CBase private: vector m_pInputSRV = {}; vector m_pOutputUAV = {}; - vector< ID3D11ShaderResourceView*> m_pOutputSRV = {}; + vector m_pOutputSRV = {}; vector m_pInputBuffer = {}; vector m_pOutputBuffer = {}; @@ -57,4 +57,4 @@ class ENGINE_DLL CComputeShader final : public CBase }; -NS_END \ No newline at end of file +NS_END diff --git a/Jusin154_Team3D/Engine/Public/GameObject.h b/Jusin154_Team3D/Engine/Public/GameObject.h index 4d068bad7..f4d6b9e3f 100644 --- a/Jusin154_Team3D/Engine/Public/GameObject.h +++ b/Jusin154_Team3D/Engine/Public/GameObject.h @@ -8,6 +8,7 @@ NS_BEGIN(Engine) class ENGINE_DLL CGameObject abstract : public CBase { + protected: CGameObject(ID3D11Device * pDevice, ID3D11DeviceContext * pContext); CGameObject(const CGameObject& rhs); @@ -112,4 +113,4 @@ class ENGINE_DLL CGameObject abstract virtual void Describe_Entity()PURE; }; -NS_END \ No newline at end of file +NS_END diff --git a/Jusin154_Team3D/Engine/Public/PartObject.h b/Jusin154_Team3D/Engine/Public/PartObject.h index 713ee5e26..114793e13 100644 --- a/Jusin154_Team3D/Engine/Public/PartObject.h +++ b/Jusin154_Team3D/Engine/Public/PartObject.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include "GameObject.h" @@ -7,7 +7,7 @@ NS_BEGIN(Engine) class ENGINE_DLL CPartObject abstract : public CGameObject { public: - typedef struct tagPartObjectDesc + typedef struct tagPartObjectDesc { class CTransform* pParentTransform = { nullptr }; }PARTOBJECT_DESC; @@ -38,4 +38,4 @@ class ENGINE_DLL CPartObject abstract : public CGameObject virtual void Free() override; }; -NS_END \ No newline at end of file +NS_END diff --git a/Jusin154_Team3D/Engine/Public/Prototype_Manager.h b/Jusin154_Team3D/Engine/Public/Prototype_Manager.h index 75f3cf073..9b2949287 100644 --- a/Jusin154_Team3D/Engine/Public/Prototype_Manager.h +++ b/Jusin154_Team3D/Engine/Public/Prototype_Manager.h @@ -16,6 +16,7 @@ #include "FSM.h" #include "State.h" #include "VIBuffer_UI_Instance.h" +#include "Trail.h" NS_BEGIN(Engine) diff --git a/Jusin154_Team3D/Engine/Public/Trail.h b/Jusin154_Team3D/Engine/Public/Trail.h index 1a53f5315..9172a8e15 100644 --- a/Jusin154_Team3D/Engine/Public/Trail.h +++ b/Jusin154_Team3D/Engine/Public/Trail.h @@ -6,11 +6,25 @@ NS_BEGIN(Engine) class ENGINE_DLL CTrail final : public CVIBuffer { +public: + typedef struct tagTrailDesc + { + _float3 vHigh; + _float3 vLow; + }TRAIL_DESC; protected: CTrail(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); CTrail(const CTrail& rhs); virtual ~CTrail() = default; +public: + void Trail_Update(_float fDeltaTime, _fmatrix WorldMatrix); + +#ifdef _DEBUG + HRESULT Save_Trail(HANDLE hFile); +#endif + HRESULT Load_Trail(HANDLE hFile); + private: virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; @@ -20,6 +34,21 @@ class ENGINE_DLL CTrail final : virtual CTrail* Clone(void* pArg, class CGameObject* pOwner = nullptr) override; virtual void Free() override; virtual void Describe_Entity() override; + virtual HRESULT Render() override; +private: + TRAIL_DESC m_TrailDesc = {}; + + _uint m_iNumCount = {}; + + _vector m_PreHigh[2] = {}; + _vector m_PreLow[2] = {}; + + VTXPOSTEX* m_pVertices = { nullptr }; + + _float m_fAccTime = {}; + _float m_fTrailUpdateTime = {}; + + _uint m_iNumVerticesPerInstance = {}; }; NS_END