This commit is contained in:
GiJungSUk
2025-11-13 14:43:09 +09:00
parent d849ceaab4
commit c6494bf9f8
8 changed files with 100 additions and 39 deletions
+27 -13
View File
@@ -93,6 +93,7 @@ void CEditEffect::Reference_Mat_For_EditEffect()
default:
break;
}
ImGui::End();
}
@@ -150,9 +151,6 @@ void CEditEffect::Describe_Entity()
//ĆŽˇšŔĎ ¸¸ľéąâ
//ťçŔÎ ˇŻÇÁ
//머테리얼 바인딩
//블러가 디졸브에 안사라짐
//루프 빌보드
const char* pRenderNames[] = { "PRIORITY" , "SHADOW", "NONBLEND", "BLUR" , "NONLIGHT" ,"EFFECT", "BLEND" , "UI" };
@@ -244,11 +242,15 @@ void CEditEffect::Describe_Entity()
GUI::InputFloat2("DiffuseUVCutting", (_float*)&m_vUVCutting);
GUI::DragFloat2("DiffuseUVGainAmount", (_float*)&m_vDiffuseUVGainAmount, 0.01f);
GUI::DragFloat2("DiffuseNoiseUVGainAmount", (_float*)&m_vDiffuseNoiseUVGainAmount, 0.01f);
ImGui::PopItemWidth();
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "DIFFUSE_TEXTURE", (CComponent**)&m_pDiffuse_TextureCom, nullptr, this);
if (GUI::TreeNode("DIFFUSE_TEX"))
{
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "DIFFUSE_TEXTURE", (CComponent**)&m_pDiffuse_TextureCom, nullptr, this);
GUI::TreePop();
}
GUI::Separator(); GUI::Spacing();
@@ -267,11 +269,13 @@ void CEditEffect::Describe_Entity()
ImGui::PushItemWidth(80);
GUI::DragFloat2("MaskingUVGainAmount", (_float*)&m_vMaskingUVGainAmount, 0.01f);
GUI::DragFloat2("MaskNoiseUVGainAmount", (_float*)&m_vMaskNoiseUVGainAmount, 0.01f);
ImGui::PopItemWidth();
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "MASKING_TEXTURE", (CComponent**)&m_pMasking_TextureCom, nullptr, this);
if (GUI::TreeNode("MASKING_TEX"))
{
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "MASKING_TEXTURE", (CComponent**)&m_pMasking_TextureCom, nullptr, this);
GUI::TreePop();
}
GUI::Separator(); GUI::Spacing();
GUI::TreePop();
@@ -282,8 +286,11 @@ void CEditEffect::Describe_Entity()
{
if (GUI::TreeNode("DISSOLVE"))
{
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "DISSOLVE_TEXTURE", (CComponent**)&m_pDissolve_TextureCom, nullptr, this);
if (GUI::TreeNode("DISSOLV_TEX"))
{
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "DISSOLVE_TEXTURE", (CComponent**)&m_pDissolve_TextureCom, nullptr, this);
GUI::TreePop();
}
GUI::Separator(); GUI::Spacing();
GUI::TreePop();
@@ -295,11 +302,18 @@ void CEditEffect::Describe_Entity()
if (GUI::TreeNode("NOISE"))
{
ImGui::PushItemWidth(80);
GUI::DragFloat("NoiseDistortionIntensity", &m_fNoiseDistortionIntensity, 0.005f, 0.f, 1.f);
GUI::DragFloat2("DiffuseNoiseUVGainAmount", (_float*)&m_vDiffuseNoiseUVGainAmount, 0.01f);
GUI::DragFloat2("MaskNoiseUVGainAmount", (_float*)&m_vMaskNoiseUVGainAmount, 0.01f);
ImGui::PopItemWidth();
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "NOISE_TEXTURE", (CComponent**)&m_pNoise_TextureCom, nullptr, this);
if (GUI::TreeNode("NOISE_TEX"))
{
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "NOISE_TEXTURE", (CComponent**)&m_pNoise_TextureCom, nullptr, this);
GUI::TreePop();
}
GUI::Separator(); GUI::Spacing();
@@ -23,21 +23,22 @@ HRESULT CEffect_Editor::Initialize_Prototype()
{
ReadMaterials("../Bin/Resources/VFX/ParticleMaterials/Base_Mat");
ReadMaterials("../Bin/Resources/VFX/ParticleMaterials/Mat_Instance");
//ReadMaterials("../Bin/Resources/VFX/Particles/Magic/Protego");
for (auto iter : m_MatFiles)
{
for (auto vec_iter : iter.second)
{
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::EFFECT), vec_iter.first,
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, vec_iter.second.c_str(), 0, vec_iter.first)))) {
return E_FAIL;
}
}
//for (auto iter : m_MatFiles)
//{
// for (auto vec_iter : iter.second)
// {
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::EFFECT), vec_iter.first,
// CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, vec_iter.second.c_str(), 0, vec_iter.first)))) {
// return E_FAIL;
// }
// }
//}
}
return S_OK;
}
+1 -1
View File
@@ -434,7 +434,7 @@ HRESULT CLoader::Loading_For_Effect()
Asset_FileLoad("../Bin/Resources/Models/Effect/ParticleMesh", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) {
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::EFFECT), wstrFileName,
CInstance_Model::Create(m_pDevice, m_pContext, pFilePath, MODEL::NONANIM, XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity(), 0))))
CInstance_Model::Create(m_pDevice, m_pContext, pFilePath, MODEL::NONANIM, XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixIdentity(), 0))))
return E_FAIL;
return S_OK;
@@ -345,6 +345,7 @@ void CComputeShader::Free()
Safe_Release(m_pOutputUAV[i]);
Safe_Release(m_pOutputBuffer[i]);
Safe_Release(m_pOutputSRV[i]);
Safe_Release(m_pOutputStagingBuffer[i]);
}
@@ -4,6 +4,7 @@
#include "Mesh.h"
#include "GameInstance.h"
#include "ComputeShader.h"
#include "Bone.h"
CInstance_Model::CInstance_Model(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CComponent{ pDevice , pContext }
@@ -427,6 +428,9 @@ void CInstance_Model::Free()
for (auto& pMesh : m_Meshes)
Safe_Release(pMesh);
for (auto& pBone : m_Bones)
Safe_Release(pBone);
Safe_Release(m_pComputeShader);
Safe_Release(m_pConstantBuffer);
Safe_Release(m_pParticleValueBuffer);
+1 -1
View File
@@ -66,7 +66,7 @@ class ENGINE_DLL CGameInstance final : public CBase
}
template<typename T>
void Asset_Description(_uint iLevel, const _char* pComponentName, CComponent** ppOut, void* pDesc, class CGameObject* pOwner = nullptr, _wstring wstrGroupName = L"")
void Asset_Description(_uint iLevel, const _char* pComponentName, Engine::CComponent** ppOut, void* pDesc, class CGameObject* pOwner = nullptr, _wstring wstrGroupName = L"")
{
return m_pPrototype_Manager->CPrototype_Manager::Asset_Description<T>(iLevel, pComponentName, ppOut, pDesc, pOwner, wstrGroupName);
}
@@ -96,7 +96,7 @@ class ENGINE_DLL CInstance_Model final : public CComponent
HRESULT Create_SubResource_Buffer();
private:
ID3D11Buffer* m_pVBInstance = { nullptr };
ID3D11Buffer* m_pVBInstance = { nullptr };
INSTANCE_DESC m_InstanceDesc = {};
@@ -114,9 +114,9 @@ class ENGINE_DLL CInstance_Model final : public CComponent
vector<class CBone*> m_Bones = {}; // 나중에 혹시 애님메쉬를 인스턴싱 할 일이 있을지도 모르니 남겨놓음
private:
class CComputeShader* m_pComputeShader = {};
ID3D11Buffer* m_pConstantBuffer = { nullptr }; // 컴퓨트 쉐이드 전용 상수버퍼
ID3D11Buffer* m_pParticleValueBuffer = { nullptr }; // 컴퓨트 쉐이드 두번째 버퍼 (스피드, 로테이션)
class CComputeShader* m_pComputeShader = {};
ID3D11Buffer* m_pConstantBuffer = { nullptr }; // 컴퓨트 쉐이드 전용 상수버퍼
ID3D11Buffer* m_pParticleValueBuffer = { nullptr }; // 컴퓨트 쉐이드 두번째 버퍼 (스피드, 로테이션)
public:
#ifdef EDITOR_PROJECT
@@ -71,7 +71,7 @@ class CPrototype_Manager final : public CBase
//만들고 선택할 시에 내 ppOut에 클론하는 기능을 담당
template<typename T>
void Asset_Description(_uint iLevel, const _char* pComponentName, CComponent** ppOut, void* pDesc, class CGameObject* pOwner = nullptr, _wstring wstrGroupName = L"")
void Asset_Description(_uint iLevel, const _char* pComponentName, Engine::CComponent** ppOut, void* pDesc, class CGameObject* pOwner = nullptr, _wstring wstrGroupName = L"")
{
vector<const _char*> pComponentNames = {};
vector<_string> strNames = {};
@@ -131,26 +131,67 @@ class CPrototype_Manager final : public CBase
return;
}
static _int s_iCurrentItem = -1;
static _int s_iCurrentItem = 0;
static ImGuiTextFilter filter;
// 다른 어셋일 경우 콤보로 띄우기
if (GUI::Combo(pComponentName, &s_iCurrentItem, pComponentNames.data(), (_int)pComponentNames.size()))
if(GUI::BeginCombo(pComponentName, (s_iCurrentItem >= 0 && s_iCurrentItem < pComponentNames.size())
? pComponentNames[s_iCurrentItem] : "NONE"))
{
if (*ppOut != nullptr)
Safe_Release(*ppOut);
if (ImGui::IsWindowAppearing())
{
ImGui::SetKeyboardFocusHere();
filter.Clear();
}
_string strComponentName = pComponentNames[s_iCurrentItem];
_wstring wstrComponentName = CMyTools::ToWstring(strComponentName);
auto iter = m_pAssets[iLevel].find(wstrComponentName);
filter.Draw("##Filter", -FLT_MIN);
for (_uint i = 0; i < pComponentNames.size(); i++)
{
bool is_selected = (s_iCurrentItem == i);
if (filter.PassFilter(pComponentNames[i]))
{
if (GUI::Selectable(pComponentNames[i], is_selected))
{
s_iCurrentItem = i;
}
if (is_selected)
{
ImGui::SetItemDefaultFocus();
}
}
}
GUI::EndCombo();
}
if (GUI::Button("Select"))
{
auto iter = m_pAssets[iLevel].find(CMyTools::ToWstring(pComponentNames[s_iCurrentItem]));
if (iter == m_pAssets[iLevel].end()) {
GUI::EndCombo();
return;
}
if (*ppOut != nullptr)
Safe_Release(*ppOut);
*ppOut = iter->second->Clone(pDesc, pOwner);
}
}
#endif