From b70cd3c3420e85a2204f16d4b3635f3ea10e981c Mon Sep 17 00:00:00 2001 From: GiJungSUk Date: Wed, 31 Dec 2025 22:10:34 +0900 Subject: [PATCH] commit --- .../Effect/Ranrok/RanrokBomb/Red_Sphere.bin | 4 +- .../Data/Effect/Ranrok/RanrokBomb/Rock_PT.bin | 3 + .../ShaderFiles/Shader_Particle_Compute.hlsl | 25 ++++++++- .../ShaderFiles/Shader_VtxModelInstance.hlsl | 8 ++- .../ShaderFiles/Shader_Particle_Compute.hlsl | 25 ++++++++- .../Engine/Private/Instance_Model.cpp | 56 ++++++++++++++----- .../Engine/Private/Renderer_Declare.cpp | 1 - .../Engine/Public/Instance_Model.h | 13 +++-- 8 files changed, 110 insertions(+), 25 deletions(-) create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBomb/Rock_PT.bin diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBomb/Red_Sphere.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBomb/Red_Sphere.bin index 8153aa37e..f22fac9b3 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBomb/Red_Sphere.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBomb/Red_Sphere.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:338ec5d6973d6da7ae14027df395db65662a94b1c9953347cac4d5610d3bea64 -size 1069 +oid sha256:78c6b60e1cff2a7adad7feb3bfdeb0f2f8413cd1f1fc9670ad3d159808f528b2 +size 1146 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBomb/Rock_PT.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBomb/Rock_PT.bin new file mode 100644 index 000000000..bf260d482 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Ranrok/RanrokBomb/Rock_PT.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:425fee10f13fdb8e64e765a8bdc1d622aab3f6d4a613b7eaf47a5a687c112554 +size 1098 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 3762ddc67..48568ebd5 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl @@ -59,6 +59,11 @@ struct ParticleValue float3 vWolrdOffset; float fLoopCount; /* 현재 몇번째 루프중인지 */ + float fRoundRangeLength; + float fAzimuthAngle; + float fPolarAngle; + float fRoundLengthLerpSpeed; + row_major matrix PreWorldMatrix; row_major matrix LocalMatrixInv; }; @@ -99,7 +104,7 @@ cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐 bool isNoResetTime; bool isLocal_Located_Not_TakeDelay; bool isCompute_LocalInverse; - bool isPadding2; + bool isRoundLengthLerp; float fTimeDelta; float fSizeLerpOption; // 반드시 상수버퍼는 16바이트 배수로 만들어져야 한다. @@ -160,6 +165,7 @@ void CS_MAIN( if (isNoPos) { + particle.vTranslation.xyz += WorldMatrix[3].xyz; /* 월드 오프셋 */ @@ -170,6 +176,22 @@ void CS_MAIN( } } + if (isRoundLengthLerp == true) + { + if(particle.vLifeTime.x < particle.vLifeTime.y) + { + float3 vRoundRange = float3( + particleValue.fRoundRangeLength * cos(particleValue.fAzimuthAngle) * sin(particleValue.fPolarAngle), + particleValue.fRoundRangeLength * sin(particleValue.fAzimuthAngle) * sin(particleValue.fPolarAngle), + particleValue.fRoundRangeLength * cos(particleValue.fPolarAngle) + ); + + + particleValue.vOriginTranslation.xyz += particleValue.fRoundLengthLerpSpeed * vRoundRange * fTimeDelta; + particle.vTranslation.xyz += particleValue.fRoundLengthLerpSpeed * vRoundRange * fTimeDelta; + } + } + particleValue.vDelay.x += fTimeDelta; if (particleValue.vDelay.x < particleValue.vDelay.y) @@ -271,6 +293,7 @@ void CS_MAIN( return ; } + if (isDrop == true) { diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl index 83b47a7eb..3b3a19c6b 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl @@ -49,6 +49,12 @@ struct ParticleValue float3 vWolrdOffset; float fLoopCount; /* 현재 몇번째 루프중인지 */ + float fRoundRangeLength; + float fAzimuthAngle; + float fPolarAngle; + float fRoundLengthLerpSpeed; + + row_major matrix PreWorldMatrix; row_major matrix LocalMatrixInv; }; @@ -1770,7 +1776,7 @@ technique11 DefaultTechnique pass Default_NonPos { SetRasterizerState(RS_Nocull); - SetDepthStencilState(DSS_None, 0); + SetDepthStencilState(DSS_Default, 0); SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); VertexShader = compile vs_5_0 VS_MAIN_NO_POS(); GeometryShader = NULL; 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 3762ddc67..48568ebd5 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl @@ -59,6 +59,11 @@ struct ParticleValue float3 vWolrdOffset; float fLoopCount; /* 현재 몇번째 루프중인지 */ + float fRoundRangeLength; + float fAzimuthAngle; + float fPolarAngle; + float fRoundLengthLerpSpeed; + row_major matrix PreWorldMatrix; row_major matrix LocalMatrixInv; }; @@ -99,7 +104,7 @@ cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐 bool isNoResetTime; bool isLocal_Located_Not_TakeDelay; bool isCompute_LocalInverse; - bool isPadding2; + bool isRoundLengthLerp; float fTimeDelta; float fSizeLerpOption; // 반드시 상수버퍼는 16바이트 배수로 만들어져야 한다. @@ -160,6 +165,7 @@ void CS_MAIN( if (isNoPos) { + particle.vTranslation.xyz += WorldMatrix[3].xyz; /* 월드 오프셋 */ @@ -170,6 +176,22 @@ void CS_MAIN( } } + if (isRoundLengthLerp == true) + { + if(particle.vLifeTime.x < particle.vLifeTime.y) + { + float3 vRoundRange = float3( + particleValue.fRoundRangeLength * cos(particleValue.fAzimuthAngle) * sin(particleValue.fPolarAngle), + particleValue.fRoundRangeLength * sin(particleValue.fAzimuthAngle) * sin(particleValue.fPolarAngle), + particleValue.fRoundRangeLength * cos(particleValue.fPolarAngle) + ); + + + particleValue.vOriginTranslation.xyz += particleValue.fRoundLengthLerpSpeed * vRoundRange * fTimeDelta; + particle.vTranslation.xyz += particleValue.fRoundLengthLerpSpeed * vRoundRange * fTimeDelta; + } + } + particleValue.vDelay.x += fTimeDelta; if (particleValue.vDelay.x < particleValue.vDelay.y) @@ -271,6 +293,7 @@ void CS_MAIN( return ; } + if (isDrop == true) { diff --git a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp index 7b026d367..515139589 100644 --- a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp @@ -581,6 +581,8 @@ void CInstance_Model::Compute_CS(_float fTimeDelta) pDesc->isNoResetTime = m_InstanceDesc.isNoResetTime; pDesc->isLocal_Located_Not_TakeDelay = m_InstanceDesc.isLocal_Located_Not_TakeDelay; pDesc->isCompute_LocalInverse = m_InstanceDesc.isCompute_LocalInverse; + pDesc->isRoundLengthLerp = m_InstanceDesc.isRoundLengthLerp; + pDesc->WorldMatrix = *m_pOwner->Get_Component()->Get_WorldMatrixPtr(); @@ -697,6 +699,12 @@ void CInstance_Model::Instane_Buffer_ReStruct() + fRoundRange * cosf(XMConvertToRadians(fPolarAngle)), 1.f); + + pParticleValues[i].fRoundRangeLength = fRoundRange; + pParticleValues[i].fAzimuthAngle = XMConvertToRadians(fAzimuthAngle); + pParticleValues[i].fPolarAngle = XMConvertToRadians(fPolarAngle); + pParticleValues[i].fRoundLengthLerpSpeed = m_InstanceDesc.fRoundLengthLerpSpeed; + _float3 vSinAmount = _float3( m_pGameInstance->Random_Float(m_InstanceDesc.vSinMinAmount.x, m_InstanceDesc.vSinMaxAmount.x), @@ -922,7 +930,6 @@ void CInstance_Model::Describe_Entity() } - if (GUI::TreeNode("Transform")) { @@ -956,20 +963,6 @@ void CInstance_Model::Describe_Entity() Instane_Buffer_ReStruct(); } - if (ImGui::DragFloat2("RoundRangeLength", reinterpret_cast<_float*>(&m_InstanceDesc.vRoundRangeLength))) - { - Instane_Buffer_ReStruct(); - } - - if (ImGui::DragFloat2("AzimuthAngle", reinterpret_cast<_float*>(& m_InstanceDesc.vAzimuthAngle))) - { - Instane_Buffer_ReStruct(); - } - - if (ImGui::DragFloat2("PolarAngle", reinterpret_cast<_float*>(&m_InstanceDesc.vPolarAngle))) - { - Instane_Buffer_ReStruct(); - } if (ImGui::DragFloat3("WolrdOffsetMin", reinterpret_cast<_float*>(&m_InstanceDesc.vWolrdOffsetMin))) { @@ -981,6 +974,39 @@ void CInstance_Model::Describe_Entity() Instane_Buffer_ReStruct(); } + + if (GUI::TreeNode("Round Range")) + { + + + if (ImGui::DragFloat2("RoundRangeLength", reinterpret_cast<_float*>(&m_InstanceDesc.vRoundRangeLength))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat2("AzimuthAngle", reinterpret_cast<_float*>(&m_InstanceDesc.vAzimuthAngle))) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat2("PolarAngle", reinterpret_cast<_float*>(&m_InstanceDesc.vPolarAngle))) + { + Instane_Buffer_ReStruct(); + } + + if (GUI::Checkbox("RoundLengthLerp", &m_InstanceDesc.isRoundLengthLerp)) + { + Instane_Buffer_ReStruct(); + } + + if (ImGui::DragFloat("fRoundLengthLerpSpeed", reinterpret_cast<_float*>(&m_InstanceDesc.fRoundLengthLerpSpeed))) + { + Instane_Buffer_ReStruct(); + } + + GUI::TreePop(); + } + GUI::TreePop(); } diff --git a/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp b/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp index 4a7a15f3f..e9efd4136 100644 --- a/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp +++ b/Jusin154_Team3D/Engine/Private/Renderer_Declare.cpp @@ -632,7 +632,6 @@ void CRenderer::Free() void CRenderer::Describe_Entitiy() { GUI::Begin("SYSTEM", 0, IMGUI_GLOBAL_BEGIN_FLAG); - GUI::SetColumnWidth(180.f); if (GUI::CollapsingHeader("RENDERER")) { if (GUI::CollapsingHeader("PostProcessing_Bloom")) { diff --git a/Jusin154_Team3D/Engine/Public/Instance_Model.h b/Jusin154_Team3D/Engine/Public/Instance_Model.h index 3283a824e..d57be0e28 100644 --- a/Jusin154_Team3D/Engine/Public/Instance_Model.h +++ b/Jusin154_Team3D/Engine/Public/Instance_Model.h @@ -78,15 +78,15 @@ class ENGINE_DLL CInstance_Model final : public CComponent _bool isNoResetTime = {}; _bool isLocal_Located_Not_TakeDelay = {}; _bool isCompute_LocalInverse = {}; - _bool isPadding3 = {}; + _bool isRoundLengthLerp = {}; _float fTimeMult = { 1.f }; _float2 vRoundRangeLength = {}; _float2 vAzimuthAngle = {}; _float2 vPolarAngle = {}; + _float fRoundLengthLerpSpeed = {}; - - _float4 vPadding6 = {}; + _float3 vPadding6 = {}; _bool isRandomAniIndex = {}; _bool isMoveUp = {}; @@ -193,7 +193,7 @@ class ENGINE_DLL CInstance_Model final : public CComponent _int isNoResetTime = {}; _int isLocal_Located_Not_TakeDelay = {}; _int isCompute_LocalInverse = {}; - _int isPadding2 = {}; + _int isRoundLengthLerp = {}; _float fTimeDelta = {}; _float fSizeLerpOption = {}; @@ -254,6 +254,11 @@ class ENGINE_DLL CInstance_Model final : public CComponent _float3 vWolrdOffset = {}; _float fLoopCount = {}; + _float fRoundRangeLength = {}; + _float fAzimuthAngle = {}; + _float fPolarAngle = {}; + _float fRoundLengthLerpSpeed = {}; + _float4x4 PreWorldMatrix = {}; _float4x4 LocalMatrixInv = {};