Merge pull request #122 from SpicyGangjeong/Effect_1114_Follow
1114_21:32 [ADD] 이펙트 저장추가 이펙트에 라이트 기능 추가
This commit is contained in:
@@ -19,8 +19,11 @@ float g_fSpotOuterAngle;
|
||||
|
||||
vector g_vLightDir;
|
||||
vector g_vLightPos;
|
||||
vector g_vLightPosOffset;
|
||||
|
||||
vector g_vCamPosition;
|
||||
|
||||
|
||||
Texture2D g_NormalTexture;
|
||||
Texture2D g_DiffuseTexture;
|
||||
Texture2D g_ShadeTexture;
|
||||
@@ -156,7 +159,7 @@ PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In)
|
||||
vPosition = mul(vPosition, g_invmatProj);
|
||||
vPosition = mul(vPosition, g_invMatView);
|
||||
|
||||
vector vLightDir = vPosition - g_vLightPos;
|
||||
vector vLightDir = vPosition - (g_vLightPos + g_vLightPosOffset);
|
||||
float fDistance = length(vLightDir);
|
||||
float fAttenuation = saturate((g_fLightRange - fDistance) / g_fLightRange);
|
||||
if (fAttenuation <= 0.f)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
namespace Client {
|
||||
|
||||
#ifndef __TEXT
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 135 B |
@@ -19,8 +19,11 @@ float g_fSpotOuterAngle;
|
||||
|
||||
vector g_vLightDir;
|
||||
vector g_vLightPos;
|
||||
vector g_vLightPosOffset;
|
||||
|
||||
vector g_vCamPosition;
|
||||
|
||||
|
||||
Texture2D g_NormalTexture;
|
||||
Texture2D g_DiffuseTexture;
|
||||
Texture2D g_ShadeTexture;
|
||||
@@ -156,7 +159,7 @@ PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In)
|
||||
vPosition = mul(vPosition, g_invmatProj);
|
||||
vPosition = mul(vPosition, g_invMatView);
|
||||
|
||||
vector vLightDir = vPosition - g_vLightPos;
|
||||
vector vLightDir = vPosition - (g_vLightPos + g_vLightPosOffset);
|
||||
float fDistance = length(vLightDir);
|
||||
float fAttenuation = saturate((g_fLightRange - fDistance) / g_fLightRange);
|
||||
if (fAttenuation <= 0.f)
|
||||
|
||||
@@ -29,6 +29,7 @@ Texture2D g_NormalTexture : register(t1);
|
||||
Texture2D g_MaskingTexture : register(t2);
|
||||
Texture2D g_DissolveTexture : register(t3);
|
||||
Texture2D g_NoiseTexture : register(t4);
|
||||
Texture2D g_EmissiveTexture : register(t6);
|
||||
|
||||
StructuredBuffer<ParticleValue> g_ParticleValue : register(t5);
|
||||
|
||||
@@ -65,6 +66,7 @@ bool g_isDiffuse;
|
||||
bool g_isMasking;
|
||||
bool g_isDissolve;
|
||||
bool g_isNoise;
|
||||
bool g_isEmissive;
|
||||
|
||||
bool g_isDiffuseUVMove;
|
||||
bool g_isMaskUVMove;
|
||||
@@ -323,8 +325,16 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
Out.vDiffuse = vMtrlDiffuse;
|
||||
|
||||
// 색깔 추가할 처리 (이미시브)
|
||||
|
||||
float4 vEmissiveMtrl;
|
||||
|
||||
if (g_isEmissive == true)
|
||||
{
|
||||
vEmissiveMtrl = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
}
|
||||
|
||||
if (vMtrlDiffuse.a >= g_fEmissiveCutAlpha)
|
||||
Out.vColorTarget = vector(g_vEmissive.rgb, g_fColorOption / 10.f);
|
||||
Out.vColorTarget = vector(g_vEmissive.rgb + vEmissiveMtrl.rgb, g_fColorOption / 10.f);
|
||||
else
|
||||
Out.vColorTarget = vector(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
|
||||
Binary file not shown.
@@ -167,6 +167,7 @@
|
||||
<ClInclude Include="..\public\Active_Icon.h" />
|
||||
<ClInclude Include="..\Public\DummyObject.h" />
|
||||
<ClInclude Include="..\public\DummySkyBox.h" />
|
||||
<ClInclude Include="..\Public\Dummy_Plane.h" />
|
||||
<ClInclude Include="..\Public\Dummy_PhysXPlayable.h" />
|
||||
<ClInclude Include="..\public\GamePlay_Canvas.h" />
|
||||
<ClInclude Include="..\public\BuildingContainer.h" />
|
||||
@@ -233,6 +234,7 @@
|
||||
<ClCompile Include="..\private\Active_Icon.cpp" />
|
||||
<ClCompile Include="..\Private\DummyObject.cpp" />
|
||||
<ClCompile Include="..\private\DummySkyBox.cpp" />
|
||||
<ClCompile Include="..\Private\Dummy_Plane.cpp" />
|
||||
<ClCompile Include="..\Private\Dummy_PhysXPlayable.cpp" />
|
||||
<ClCompile Include="..\private\GamePlay_Canvas.cpp" />
|
||||
<ClCompile Include="..\private\BuildingContainer.cpp" />
|
||||
|
||||
@@ -199,6 +199,9 @@
|
||||
<Filter Include="02.GameObjects\MainLight">
|
||||
<UniqueIdentifier>{a9360a97-5ef2-476a-9f12-f4e06c28290c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Layer_Effect\Dummy_Plane">
|
||||
<UniqueIdentifier>{6872c5bc-5eac-46a1-b6d8-3ec0f4fb2cd5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Editor.h">
|
||||
@@ -402,6 +405,9 @@
|
||||
<ClInclude Include="..\Public\MainLight.h">
|
||||
<Filter>02.GameObjects\MainLight</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Dummy_Plane.h">
|
||||
<Filter>02.GameObjects\Layer_Effect\Dummy_Plane</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Editor.ico">
|
||||
@@ -601,6 +607,9 @@
|
||||
<ClCompile Include="..\Private\MainLight.cpp">
|
||||
<Filter>02.GameObjects\MainLight</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Dummy_Plane.cpp">
|
||||
<Filter>02.GameObjects\Layer_Effect\Dummy_Plane</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Editor.rc">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "Active_Icon.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "BuildingContainer.h"
|
||||
#include "PartObject.h"
|
||||
#include "Terrain.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "DummyRect.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "DummySkyBox.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "Dummy_Cube.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "Dummy_PhysXMesh.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
|
||||
@@ -0,0 +1,160 @@
|
||||
#include "pch.h"
|
||||
#include "Dummy_Plane.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
|
||||
|
||||
CDummy_Plane::CDummy_Plane(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CDummy_Plane::CDummy_Plane(const CDummy_Plane& rhs)
|
||||
: CGameObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CDummy_Plane::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummy_Plane::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(0.f, -10.f, 0.f, 1.f));
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CDummy_Plane::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CDummy_Plane::Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CDummy_Plane::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
_float4* vPos = (_float4*)(m_pTransformCom->Get_WorldMatrixPtr()->m[3]);
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this, *vPos, m_pTransformCom->Get_Radius());
|
||||
}
|
||||
|
||||
HRESULT CDummy_Plane::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_DiffuseTexture", aiTextureType_DIFFUSE, 0))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_NormalTexture", aiTextureType_NORMALS, 0))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummy_Plane::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
///* Com_Model */
|
||||
//if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_GoblinBody_Model"),
|
||||
// reinterpret_cast<CComponent**>(&m_pModelCom))))
|
||||
// return E_FAIL;
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Model_DummyPlane"),
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom))))
|
||||
return E_FAIL;
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummy_Plane::Bind_ShaderResources()
|
||||
{
|
||||
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_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CDummy_Plane* CDummy_Plane::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CDummy_Plane* pInstance = new CDummy_Plane(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CDummy_Plane");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CDummy_Plane::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CDummy_Plane* pInstance = new CDummy_Plane(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CDummy_Plane");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CDummy_Plane::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pModelCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
}
|
||||
|
||||
void CDummy_Plane::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "EditEffect.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
@@ -41,7 +41,7 @@ void CEditEffect::Update(_float fTimeDelta)
|
||||
|
||||
|
||||
|
||||
if (m_isBillboard)
|
||||
if (m_EffectInfo.isBillboard)
|
||||
m_pGameInstance->BillBoard(m_pTransformCom);
|
||||
|
||||
if (m_pInstance_ModelCom == nullptr)
|
||||
@@ -61,15 +61,16 @@ void CEditEffect::Late_Update(_float fTimeDelta)
|
||||
|
||||
_float4* vPos = (_float4*)(m_pTransformCom->Get_WorldMatrixPtr()->m[3]);
|
||||
|
||||
if (m_isBlur == true)
|
||||
if (m_EffectInfo.isBlur == true)
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLUR, this, *vPos, m_pTransformCom->Get_Radius());
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(m_eRenderOrder, this, *vPos, m_pTransformCom->Get_Radius());
|
||||
m_pGameInstance->Add_RenderGroup(m_EffectInfo.eRenderOrder, this, *vPos, m_pTransformCom->Get_Radius());
|
||||
}
|
||||
|
||||
void CEditEffect::Reference_Mat_For_EditEffect()
|
||||
{
|
||||
|
||||
string strName = {};
|
||||
|
||||
const char* pCompute[] = { "DIFFUSE" , "MASK", "NOISE", "DISSOLVE" };
|
||||
|
||||
@@ -79,16 +80,37 @@ void CEditEffect::Reference_Mat_For_EditEffect()
|
||||
switch (m_iSelectTextureNum)
|
||||
{
|
||||
case 0:
|
||||
dynamic_cast<CEffect_Editor*>(m_pOwner)->Reference_Mat_For_EditEffect((CComponent**)&m_pDiffuse_TextureCom, this);
|
||||
strName = dynamic_cast<CEffect_Editor*>(m_pOwner)->Reference_Mat_For_EditEffect((CComponent**)&m_pDiffuse_TextureCom, this);
|
||||
|
||||
if (strName != "")
|
||||
{
|
||||
m_strDiffuseName = strName;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
dynamic_cast<CEffect_Editor*>(m_pOwner)->Reference_Mat_For_EditEffect((CComponent**)&m_pMasking_TextureCom, this);
|
||||
strName =dynamic_cast<CEffect_Editor*>(m_pOwner)->Reference_Mat_For_EditEffect((CComponent**)&m_pMasking_TextureCom, this);
|
||||
|
||||
if (strName != "")
|
||||
{
|
||||
m_strMaskingName = strName;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
dynamic_cast<CEffect_Editor*>(m_pOwner)->Reference_Mat_For_EditEffect((CComponent**)&m_pNoise_TextureCom, this);
|
||||
strName = dynamic_cast<CEffect_Editor*>(m_pOwner)->Reference_Mat_For_EditEffect((CComponent**)&m_pNoise_TextureCom, this);
|
||||
|
||||
if (strName != "")
|
||||
{
|
||||
m_strNoiseName = strName;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
dynamic_cast<CEffect_Editor*>(m_pOwner)->Reference_Mat_For_EditEffect((CComponent**)&m_pDissolve_TextureCom, this);
|
||||
strName = dynamic_cast<CEffect_Editor*>(m_pOwner)->Reference_Mat_For_EditEffect((CComponent**)&m_pDissolve_TextureCom, this);
|
||||
|
||||
if (strName != "")
|
||||
{
|
||||
m_strDissolveName = strName;
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -97,6 +119,145 @@ void CEditEffect::Reference_Mat_For_EditEffect()
|
||||
|
||||
}
|
||||
|
||||
HRESULT CEditEffect::Save_Effect(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);
|
||||
|
||||
if (m_pLightCom != nullptr)
|
||||
{
|
||||
m_EffectInfo.LightDesc = *m_pLightCom->Get_LightDesc();
|
||||
}
|
||||
|
||||
|
||||
if (!WriteFile(hFile, &m_EffectInfo, sizeof(EFFECT_INFO), &dwByte, nullptr)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (m_EffectInfo.isDiffuse)
|
||||
{
|
||||
size_t iComponentLength = m_strDiffuseName.length();
|
||||
const _char* pFileComponentPath = m_strDiffuseName.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (m_EffectInfo.isNoise)
|
||||
{
|
||||
size_t iComponentLength = m_strNoiseName.length();
|
||||
const _char* pFileComponentPath = m_strNoiseName.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (m_EffectInfo.isMasking)
|
||||
{
|
||||
size_t iComponentLength = m_strMaskingName.length();
|
||||
const _char* pFileComponentPath = m_strMaskingName.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (m_EffectInfo.isDissolve)
|
||||
{
|
||||
size_t iComponentLength = m_strDissolveName.length();
|
||||
const _char* pFileComponentPath = m_strDissolveName.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (m_EffectInfo.isEmissive)
|
||||
{
|
||||
size_t iComponentLength = m_strEmissiveName.length();
|
||||
const _char* pFileComponentPath = m_strEmissiveName.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
size_t iComponentLength = m_strModelName.length();
|
||||
const _char* pFileComponentPath = m_strModelName.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_pInstance_ModelCom->Save_InstanceModel(hFile);
|
||||
|
||||
CloseHandle(hFile);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEditEffect::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg)))
|
||||
@@ -146,32 +307,32 @@ void CEditEffect::Free()
|
||||
|
||||
void CEditEffect::Describe_Entity()
|
||||
{
|
||||
//여기서 모델, 텍스쳐, 선택할 수 있도록 함
|
||||
//여기서 모델, 텍스쳐, 선택할 수 있도록 함
|
||||
|
||||
const char* pLerp[] = { "Linear" , "EaseInQuad", "EaseOutQuad", "EaseInCubic" , "EaseOutCubic" , "EaseInOutSin" , "EaseInBack" , "Expo" , "Circle" };
|
||||
const char* pRenderNames[] = { "PRIORITY" , "SHADOW", "NONBLEND", "BLUR" , "NONLIGHT" ,"EFFECT", "BLEND" , "UI" };
|
||||
|
||||
_int iCurrentItem = static_cast<_int>(m_eRenderOrder);
|
||||
_int iCurrentItem = static_cast<_int>(m_EffectInfo.eRenderOrder);
|
||||
|
||||
if (ImGui::Combo("Render Order", &iCurrentItem, pRenderNames, ENUM_CLASS(RENDER::END)))
|
||||
{
|
||||
m_eRenderOrder = static_cast<RENDER>(iCurrentItem);
|
||||
m_EffectInfo.eRenderOrder = static_cast<RENDER>(iCurrentItem);
|
||||
}
|
||||
|
||||
m_pTransformCom->Describe_Entity();
|
||||
|
||||
GUI::Checkbox("Diffuse", &m_isDiffuse);
|
||||
GUI::Checkbox("Masking", &m_isMasking);
|
||||
GUI::Checkbox("Dissolve", &m_isDissolve);
|
||||
GUI::Checkbox("Noise", &m_isNoise);
|
||||
GUI::Checkbox("Diffuse", &m_EffectInfo.isDiffuse);
|
||||
GUI::Checkbox("Masking", &m_EffectInfo.isMasking);
|
||||
GUI::Checkbox("Dissolve", &m_EffectInfo.isDissolve);
|
||||
GUI::Checkbox("Noise", &m_EffectInfo.isNoise);
|
||||
|
||||
|
||||
if (GUI::Checkbox("Billboard", &m_isBillboard))
|
||||
if (GUI::Checkbox("Billboard", &m_EffectInfo.isBillboard))
|
||||
{
|
||||
m_pTransformCom->Rotation(0.f, 0.f, 0.f);
|
||||
}
|
||||
|
||||
GUI::ColorEdit4("MixColor", (_float*)&m_vColor);
|
||||
GUI::ColorEdit4("MixColor", (_float*)&m_EffectInfo.vColor);
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
|
||||
@@ -181,11 +342,11 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
if (GUI::TreeNode("BLUR"))
|
||||
{
|
||||
GUI::Checkbox("Blur", &m_isBlur);
|
||||
GUI::Checkbox("Blur", &m_EffectInfo.isBlur);
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::DragFloat("BlurIntensity", &m_fBlurIntensity, 0.005f, 0.f, 1.f);
|
||||
GUI::DragInt("BlurWeight", &m_iBlurWeight, 1.f, 0, 32);
|
||||
GUI::DragFloat("BlurIntensity", &m_EffectInfo.fBlurIntensity, 0.005f, 0.f, 1.f);
|
||||
GUI::DragInt("BlurWeight", &m_EffectInfo.iBlurWeight, 1.f, 0, 32);
|
||||
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
@@ -198,24 +359,73 @@ void CEditEffect::Describe_Entity()
|
||||
{
|
||||
const char* pCompute[] = {"NONE", "DIV" , "PLUS", "SUBSTRACT", "MULTY" , "EQUL" };
|
||||
|
||||
_int iColorOption = (_int)m_fColorOption;
|
||||
_int iColorOption = (_int)m_EffectInfo.fColorOption;
|
||||
|
||||
if (ImGui::Combo("OPTION", &iColorOption, pCompute , 6))
|
||||
{
|
||||
m_fColorOption = (_float)iColorOption;
|
||||
m_EffectInfo.fColorOption = (_float)iColorOption;
|
||||
}
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::DragFloat("EmissiveCutAlpha", &m_fEmissiveCutAlpha, 0.005f, 0.f, 1.f);
|
||||
GUI::DragFloat("EmissiveCutAlpha", &m_EffectInfo.fEmissiveCutAlpha, 0.005f, 0.f, 1.f);
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
GUI::ColorEdit4("Emissive", (_float*)&m_vEmissive);
|
||||
GUI::ColorEdit4("Emissive", (_float*)&m_EffectInfo.vEmissive);
|
||||
|
||||
GUI::Checkbox("EmissiveTex", &m_EffectInfo.isEmissive);
|
||||
|
||||
if (m_EffectInfo.isEmissive)
|
||||
{
|
||||
if (GUI::TreeNode("EMISSIVE_TEX"))
|
||||
{
|
||||
_string strName = m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "EMISSIVE_TEXTURE", (CComponent**)&m_pEmissive_TextureCom, nullptr, this);
|
||||
|
||||
if (strName != "") {
|
||||
m_strEmissiveName = strName;
|
||||
}
|
||||
|
||||
|
||||
GUI::TreePop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GUI::TreePop();
|
||||
}
|
||||
|
||||
if (GUI::TreeNode("LIGHT"))
|
||||
{
|
||||
if (GUI::Button("ADD LIGHT"))
|
||||
{
|
||||
if (m_pLightCom != nullptr)
|
||||
{
|
||||
GUI::TreePop();
|
||||
return;
|
||||
}
|
||||
LIGHT_DESC LightDesc{};
|
||||
|
||||
LightDesc.eType = LIGHT::POINT;
|
||||
LightDesc.vDiffuse = _float4(0.0f, 0.0f, 0.0f, 0.f);
|
||||
LightDesc.vAmbient = _float4(0.0f, 0.0f, 0.0f, 0.f);
|
||||
LightDesc.vSpecular = _float4(0.f, 0.f, 0.f, 0.f);
|
||||
LightDesc.pPosition = m_pTransformCom->Get_StatePtr(STATE::POSITION);
|
||||
LightDesc.iLevel = NEXT_LEVEL;
|
||||
|
||||
/* Com_Light*/
|
||||
if (FAILED(Add_Component<CLight>(g_iStaticLevel, &m_pLightCom, &LightDesc)))
|
||||
{
|
||||
GUI::TreePop();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_pLightCom != nullptr)
|
||||
{
|
||||
m_pLightCom->Describe_Entity();
|
||||
}
|
||||
|
||||
GUI::TreePop();
|
||||
}
|
||||
|
||||
if (GUI::TreeNode("MODEL"))
|
||||
{
|
||||
@@ -224,7 +434,11 @@ void CEditEffect::Describe_Entity()
|
||||
if (m_pInstance_ModelCom != nullptr)
|
||||
InstanceDesc = m_pInstance_ModelCom->Get_EffectValue();
|
||||
|
||||
m_pGameInstance->Asset_Description<CInstance_Model>(ENUM_CLASS(LEVEL::EFFECT), "INSTANCE_MODEL", (CComponent**)&m_pInstance_ModelCom, &InstanceDesc, this);
|
||||
_string strName = m_pGameInstance->Asset_Description<CInstance_Model>(ENUM_CLASS(LEVEL::EFFECT), "INSTANCE_MODEL", (CComponent**)&m_pInstance_ModelCom, &InstanceDesc, this);
|
||||
|
||||
if (strName != "") {
|
||||
m_strModelName = strName;
|
||||
}
|
||||
|
||||
if (m_pInstance_ModelCom != nullptr)
|
||||
{
|
||||
@@ -235,27 +449,30 @@ void CEditEffect::Describe_Entity()
|
||||
}
|
||||
|
||||
|
||||
if (m_isDiffuse == true)
|
||||
|
||||
|
||||
|
||||
if (m_EffectInfo.isDiffuse == true)
|
||||
{
|
||||
if (GUI::TreeNode("DIFFUSE"))
|
||||
{
|
||||
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::Checkbox("DiffuseUVMove", &m_isDiffuseUVMove);
|
||||
GUI::InputFloat2("DiffuseUVCutting", (_float*)&m_vUVCutting);
|
||||
GUI::Checkbox("DiffuseUVMove", &m_EffectInfo.isDiffuseUVMove);
|
||||
GUI::InputFloat2("DiffuseUVCutting", (_float*)&m_EffectInfo.vUVCutting);
|
||||
|
||||
GUI::Spacing();
|
||||
|
||||
GUI::DragFloat2("DiffuseUVGainAmount", (_float*)&m_vDiffuseUVGainAmount, 0.01f);
|
||||
GUI::DragFloat2("DiffuseUVGainAmount", (_float*)&m_EffectInfo.vDiffuseUVGainAmount, 0.01f);
|
||||
|
||||
|
||||
|
||||
_int iDiffuseMoveLerpOption = (_int)m_iDiffuseMoveLerpOption;
|
||||
_int iDiffuseMoveLerpOption = (_int)m_EffectInfo.iDiffuseMoveLerpOption;
|
||||
|
||||
if (ImGui::Combo("Lerp DiffuseMove Option", &iDiffuseMoveLerpOption, pLerp, 9))
|
||||
{
|
||||
m_iDiffuseMoveLerpOption = iDiffuseMoveLerpOption;
|
||||
m_EffectInfo.iDiffuseMoveLerpOption = iDiffuseMoveLerpOption;
|
||||
}
|
||||
|
||||
GUI::Spacing();
|
||||
@@ -264,7 +481,13 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
if (GUI::TreeNode("DIFFUSE_TEX"))
|
||||
{
|
||||
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "DIFFUSE_TEXTURE", (CComponent**)&m_pDiffuse_TextureCom, nullptr, this);
|
||||
_string strName = m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "DIFFUSE_TEXTURE", (CComponent**)&m_pDiffuse_TextureCom, nullptr, this);
|
||||
|
||||
if (strName != "") {
|
||||
m_strDiffuseName = strName;
|
||||
}
|
||||
|
||||
|
||||
GUI::TreePop();
|
||||
}
|
||||
|
||||
@@ -275,27 +498,27 @@ void CEditEffect::Describe_Entity()
|
||||
}
|
||||
|
||||
|
||||
if (m_isMasking == true)
|
||||
if (m_EffectInfo.isMasking == true)
|
||||
{
|
||||
if (GUI::TreeNode("MASKING"))
|
||||
{
|
||||
|
||||
GUI::InputFloat2("MaskUVCutting", (_float*)&m_vUVMaskCutting);
|
||||
GUI::Checkbox("MaskUVMove", &m_isMaskUVMove);
|
||||
GUI::InputFloat2("MaskUVCutting", (_float*)&m_EffectInfo.vUVMaskCutting);
|
||||
GUI::Checkbox("MaskUVMove", &m_EffectInfo.isMaskUVMove);
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::DragFloat2("MaskingUVGainAmount", (_float*)&m_vMaskingUVGainAmount, 0.01f);
|
||||
GUI::DragFloat2("MaskingUVGainAmount", (_float*)&m_EffectInfo.vMaskingUVGainAmount, 0.01f);
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
|
||||
GUI::Spacing();
|
||||
|
||||
|
||||
_int iMaskMoveLerpOption = (_int)m_iMaskMoveLerpOption;
|
||||
_int iMaskMoveLerpOption = (_int)m_EffectInfo.iMaskMoveLerpOption;
|
||||
|
||||
if (ImGui::Combo("Lerp MaskMove Option", &iMaskMoveLerpOption, pLerp, 9))
|
||||
{
|
||||
m_iMaskMoveLerpOption = iMaskMoveLerpOption;
|
||||
m_EffectInfo.iMaskMoveLerpOption = iMaskMoveLerpOption;
|
||||
}
|
||||
|
||||
|
||||
@@ -303,7 +526,12 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
if (GUI::TreeNode("MASKING_TEX"))
|
||||
{
|
||||
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "MASKING_TEXTURE", (CComponent**)&m_pMasking_TextureCom, nullptr, this);
|
||||
string strName = m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "MASKING_TEXTURE", (CComponent**)&m_pMasking_TextureCom, nullptr, this);
|
||||
|
||||
if (strName != "") {
|
||||
m_strMaskingName = strName;
|
||||
}
|
||||
|
||||
GUI::TreePop();
|
||||
}
|
||||
GUI::Separator(); GUI::Spacing();
|
||||
@@ -312,13 +540,18 @@ void CEditEffect::Describe_Entity()
|
||||
}
|
||||
}
|
||||
|
||||
if (m_isDissolve == true)
|
||||
if (m_EffectInfo.isDissolve == true)
|
||||
{
|
||||
if (GUI::TreeNode("DISSOLVE"))
|
||||
{
|
||||
if (GUI::TreeNode("DISSOLV_TEX"))
|
||||
{
|
||||
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "DISSOLVE_TEXTURE", (CComponent**)&m_pDissolve_TextureCom, nullptr, this);
|
||||
_string strName = m_strDissolveName = m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "DISSOLVE_TEXTURE", (CComponent**)&m_pDissolve_TextureCom, nullptr, this);
|
||||
|
||||
if (strName != "") {
|
||||
m_strDissolveName = strName;
|
||||
}
|
||||
|
||||
GUI::TreePop();
|
||||
}
|
||||
GUI::Separator(); GUI::Spacing();
|
||||
@@ -327,34 +560,34 @@ void CEditEffect::Describe_Entity()
|
||||
}
|
||||
|
||||
}
|
||||
if (m_isNoise == true)
|
||||
if (m_EffectInfo.isNoise == true)
|
||||
{
|
||||
if (GUI::TreeNode("NOISE"))
|
||||
{
|
||||
ImGui::PushItemWidth(80);
|
||||
|
||||
GUI::DragFloat("NoiseDistortionIntensity", &m_fNoiseDistortionIntensity, 0.005f, 0.f, 1.f);
|
||||
GUI::DragFloat("NoiseDistortionIntensity", &m_EffectInfo.fNoiseDistortionIntensity, 0.005f, 0.f, 1.f);
|
||||
|
||||
GUI::Spacing();
|
||||
|
||||
GUI::DragFloat2("DiffuseNoiseUVGainAmount", (_float*)&m_vDiffuseNoiseUVGainAmount, 0.01f);
|
||||
GUI::DragFloat2("DiffuseNoiseUVGainAmount", (_float*)&m_EffectInfo.vDiffuseNoiseUVGainAmount, 0.01f);
|
||||
|
||||
_int iDiffuseNoiseMoveLerpOption = (_int)m_iDiffuseNoiseMoveLerpOption;
|
||||
_int iDiffuseNoiseMoveLerpOption = (_int)m_EffectInfo.iDiffuseNoiseMoveLerpOption;
|
||||
|
||||
if (ImGui::Combo("Lerp DiffuseNoiseMove Option", &iDiffuseNoiseMoveLerpOption, pLerp, 9))
|
||||
{
|
||||
m_iDiffuseNoiseMoveLerpOption = iDiffuseNoiseMoveLerpOption;
|
||||
m_EffectInfo.iDiffuseNoiseMoveLerpOption = iDiffuseNoiseMoveLerpOption;
|
||||
}
|
||||
|
||||
GUI::Spacing();
|
||||
|
||||
GUI::DragFloat2("MaskNoiseUVGainAmount", (_float*)&m_vMaskNoiseUVGainAmount, 0.01f);
|
||||
GUI::DragFloat2("MaskNoiseUVGainAmount", (_float*)&m_EffectInfo.vMaskNoiseUVGainAmount, 0.01f);
|
||||
|
||||
_int iMaskNoiseMoveLerpOption = (_int)m_iMaskNoiseMoveLerpOption;
|
||||
_int iMaskNoiseMoveLerpOption = (_int)m_EffectInfo.iMaskNoiseMoveLerpOption;
|
||||
|
||||
if (ImGui::Combo("Lerp MaskNoiseMove Option", &iMaskNoiseMoveLerpOption, pLerp, 9))
|
||||
{
|
||||
m_iMaskNoiseMoveLerpOption = iMaskNoiseMoveLerpOption;
|
||||
m_EffectInfo.iMaskNoiseMoveLerpOption = iMaskNoiseMoveLerpOption;
|
||||
}
|
||||
|
||||
GUI::Spacing();
|
||||
@@ -363,7 +596,11 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
if (GUI::TreeNode("NOISE_TEX"))
|
||||
{
|
||||
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "NOISE_TEXTURE", (CComponent**)&m_pNoise_TextureCom, nullptr, this);
|
||||
_string strName = m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "NOISE_TEXTURE", (CComponent**)&m_pNoise_TextureCom, nullptr, this);
|
||||
|
||||
if (strName != "") {
|
||||
m_strNoiseName = strName;
|
||||
}
|
||||
GUI::TreePop();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "EffectObject.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
@@ -62,11 +62,11 @@ HRESULT CEffectObject::Render_Blur()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fBlurIntensity", &m_fBlurIntensity, sizeof(_float)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fBlurIntensity", &m_EffectInfo.fBlurIntensity, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iBlurWeight", &m_iBlurWeight, sizeof(_int)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iBlurWeight", &m_EffectInfo.iBlurWeight, sizeof(_int)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -95,6 +95,200 @@ HRESULT CEffectObject::Render_Blur()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
||||
{
|
||||
_string strPerfectFilePath = pFilePath;
|
||||
|
||||
strPerfectFilePath += ".bin";
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
DWORD dwByte(0);
|
||||
|
||||
if (!ReadFile(hFile, &m_EffectInfo, sizeof(EFFECT_INFO), &dwByte, nullptr)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_EffectInfo.LightDesc.pPosition = m_pTransformCom->Get_StatePtr(STATE::POSITION);
|
||||
m_EffectInfo.LightDesc.iLevel = ENUM_CLASS(eLevel);
|
||||
|
||||
if (m_EffectInfo.LightDesc.eType != LIGHT::DIRECTIONAL) // 0이 아닐때만 생성
|
||||
{
|
||||
if (FAILED(Add_Component<CLight>(g_iStaticLevel, &m_pLightCom, &m_EffectInfo.LightDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (m_EffectInfo.isDiffuse)
|
||||
{
|
||||
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_strDiffuseName = szName;
|
||||
|
||||
}
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDiffuseName),
|
||||
reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom))))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (m_EffectInfo.isNoise)
|
||||
{
|
||||
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_strNoiseName = szName;
|
||||
}
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strNoiseName),
|
||||
reinterpret_cast<CComponent**>(&m_pNoise_TextureCom))))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (m_EffectInfo.isMasking)
|
||||
{
|
||||
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_strMaskingName = szName;
|
||||
}
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strMaskingName),
|
||||
reinterpret_cast<CComponent**>(&m_pMasking_TextureCom))))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (m_EffectInfo.isDissolve)
|
||||
{
|
||||
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_strDissolveName = szName;
|
||||
}
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDissolveName),
|
||||
reinterpret_cast<CComponent**>(&m_pDissolve_TextureCom))))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (m_EffectInfo.isEmissive)
|
||||
{
|
||||
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_strEmissiveName = szName;
|
||||
}
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strEmissiveName),
|
||||
reinterpret_cast<CComponent**>(&m_pEmissive_TextureCom))))
|
||||
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)(DWORD)iComponentLength + 1), &dwByte, nullptr)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strModelName = szName;
|
||||
}
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strModelName),
|
||||
reinterpret_cast<CComponent**>(&m_pInstance_ModelCom))))
|
||||
return E_FAIL;;
|
||||
|
||||
m_pInstance_ModelCom->Load_InstanceModel(hFile);
|
||||
|
||||
CloseHandle(hFile);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffectObject::Bind_ShaderResources()
|
||||
{
|
||||
|
||||
@@ -110,91 +304,95 @@ HRESULT CEffectObject::Bind_ShaderResources()
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isDiffuse", &m_isDiffuse, sizeof(_bool)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isDiffuse", &m_EffectInfo.isDiffuse, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isMasking", &m_isMasking, sizeof(_bool)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isMasking", &m_EffectInfo.isMasking, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isDissolve", &m_isDissolve, sizeof(_bool)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isDissolve", &m_EffectInfo.isDissolve, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isNoise", &m_isNoise, sizeof(_bool)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isNoise", &m_EffectInfo.isNoise, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isDiffuseUVMove", &m_isDiffuseUVMove, sizeof(_bool)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isEmissive", &m_EffectInfo.isEmissive, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isMaskUVMove", &m_isMaskUVMove, sizeof(_bool)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isDiffuseUVMove", &m_EffectInfo.isDiffuseUVMove, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vColor", &m_vColor, sizeof(_float4)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isMaskUVMove", &m_EffectInfo.isMaskUVMove, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vEmissive", &m_vEmissive, sizeof(_float4)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vColor", &m_EffectInfo.vColor, sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fColorOption", &m_fColorOption, sizeof(_float)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vEmissive", &m_EffectInfo.vEmissive, sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fEmissiveCutAlpha", &m_fEmissiveCutAlpha, sizeof(_float)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fColorOption", &m_EffectInfo.fColorOption, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fNoiseDistortionIntensity", &m_fNoiseDistortionIntensity, sizeof(_float)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fEmissiveCutAlpha", &m_EffectInfo.fEmissiveCutAlpha, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vDiffuseUVGainAmount", &m_vDiffuseUVGainAmount, sizeof(_float2)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fNoiseDistortionIntensity", &m_EffectInfo.fNoiseDistortionIntensity, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vMaskingUVGainAmount", &m_vMaskingUVGainAmount, sizeof(_float2)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vDiffuseUVGainAmount", &m_EffectInfo.vDiffuseUVGainAmount, sizeof(_float2)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vMaskingUVGainAmount", &m_EffectInfo.vMaskingUVGainAmount, sizeof(_float2)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vDiffuseNoiseUVGainAmount", &m_vDiffuseNoiseUVGainAmount, sizeof(_float2)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vDiffuseNoiseUVGainAmount", &m_EffectInfo.vDiffuseNoiseUVGainAmount, sizeof(_float2)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vMaskNoiseUVGainAmount", &m_vMaskNoiseUVGainAmount, sizeof(_float2)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vMaskNoiseUVGainAmount", &m_EffectInfo.vMaskNoiseUVGainAmount, sizeof(_float2)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vUVCutting", &m_vUVCutting, sizeof(_float2)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vUVCutting", &m_EffectInfo.vUVCutting, sizeof(_float2)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vUVMaskCutting", &m_vUVMaskCutting, sizeof(_float2)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vUVMaskCutting", &m_EffectInfo.vUVMaskCutting, sizeof(_float2)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iMaskMoveLerpOption", &m_iMaskMoveLerpOption, sizeof(_int)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iMaskMoveLerpOption", &m_EffectInfo.iMaskMoveLerpOption, sizeof(_int)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iDiffuseMoveLerpOption", &m_iDiffuseMoveLerpOption, sizeof(_int)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iDiffuseMoveLerpOption", &m_EffectInfo.iDiffuseMoveLerpOption, sizeof(_int)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iMaskNoiseMoveLerpOption", &m_iMaskNoiseMoveLerpOption, sizeof(_int)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iMaskNoiseMoveLerpOption", &m_EffectInfo.iMaskNoiseMoveLerpOption, sizeof(_int)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iDiffuseNoiseMoveLerpOption", &m_iDiffuseNoiseMoveLerpOption, sizeof(_int)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iDiffuseNoiseMoveLerpOption", &m_EffectInfo.iDiffuseNoiseMoveLerpOption, sizeof(_int)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -229,7 +427,16 @@ HRESULT CEffectObject::Bind_ShaderResources()
|
||||
}
|
||||
}
|
||||
|
||||
if (m_pEmissive_TextureCom != nullptr)
|
||||
{
|
||||
if (FAILED(m_pEmissive_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_EmissiveTexture", 0))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -245,7 +452,9 @@ HRESULT CEffectObject::Ready_Components(void* pArg)
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
//나중에 로드할 때 라이트를 값을 입력받아서 생성 하자
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -275,9 +484,13 @@ void CEffectObject::Free()
|
||||
SAFE_RELEASE(m_pNoise_TextureCom);
|
||||
SAFE_RELEASE(m_pMasking_TextureCom);
|
||||
SAFE_RELEASE(m_pDissolve_TextureCom);
|
||||
SAFE_RELEASE(m_pEmissive_TextureCom);
|
||||
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pInstance_ModelCom);
|
||||
|
||||
if(m_pLightCom != nullptr)
|
||||
SAFE_RELEASE(m_pLightCom);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -263,9 +263,10 @@ void CEffect_Editor::ReadMaterial(_wstring wstrFileName, const char* pFilePath)
|
||||
wifs.close();
|
||||
}
|
||||
|
||||
void CEffect_Editor::Reference_Mat_For_EditEffect(CComponent** pTexture, CGameObject* pObject)
|
||||
_string CEffect_Editor::Reference_Mat_For_EditEffect(CComponent** pTexture, CGameObject* pObject)
|
||||
{
|
||||
|
||||
_string strName = {};
|
||||
for (auto iter : m_MatFiles)
|
||||
{
|
||||
if (GUI::TreeNode(CMyTools::ToString(iter.first).c_str()))
|
||||
@@ -273,7 +274,7 @@ void CEffect_Editor::Reference_Mat_For_EditEffect(CComponent** pTexture, CGameOb
|
||||
|
||||
for (auto wstrTextureInfo : iter.second)
|
||||
{
|
||||
m_pGameInstance->Asset_Description<CTexture>(
|
||||
strName = m_pGameInstance->Asset_Description<CTexture>(
|
||||
ENUM_CLASS(LEVEL::EFFECT),
|
||||
CMyTools::ToString(iter.first).c_str()
|
||||
, pTexture
|
||||
@@ -281,6 +282,9 @@ void CEffect_Editor::Reference_Mat_For_EditEffect(CComponent** pTexture, CGameOb
|
||||
, pObject
|
||||
, wstrTextureInfo.first // 이름
|
||||
);
|
||||
|
||||
if(strName != "")
|
||||
return strName;
|
||||
};
|
||||
|
||||
|
||||
@@ -291,7 +295,24 @@ void CEffect_Editor::Reference_Mat_For_EditEffect(CComponent** pTexture, CGameOb
|
||||
}
|
||||
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
HRESULT CEffect_Editor::Load_Edit(const _char* pPath)
|
||||
{
|
||||
|
||||
if (m_pEditEffect == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pEditEffect->Load(pPath, LEVEL::EFFECT)))
|
||||
{
|
||||
Safe_Release(m_pEditEffect);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
Safe_Release(m_pEditEffect);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -337,6 +358,22 @@ void CEffect_Editor::Describe_Entity()
|
||||
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());
|
||||
}
|
||||
|
||||
ImGui::End();
|
||||
|
||||
ImGui::Begin("Reference Material");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "GamePlay_Canvas.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Mission_Panel.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "IMGUIUI.h"
|
||||
#include "UIObject.h"
|
||||
#include "GamePlay_Canvas.h"
|
||||
@@ -38,7 +38,7 @@ void CIMGUIUI::PanelwstringTostring(vector<std::wstring>& panelNames)
|
||||
|
||||
for (auto& wname : panelNames)
|
||||
{
|
||||
// wstring -> UTF-8 string 변환
|
||||
// wstring -> UTF-8 string 변환
|
||||
int size = WideCharToMultiByte(CP_UTF8, 0,
|
||||
wname.c_str(), (int)wname.size(),
|
||||
nullptr, 0, nullptr, nullptr);
|
||||
@@ -49,11 +49,11 @@ void CIMGUIUI::PanelwstringTostring(vector<std::wstring>& panelNames)
|
||||
wname.c_str(), (int)wname.size(),
|
||||
&result[0], size, nullptr, nullptr);
|
||||
|
||||
// 변환된 string 저장
|
||||
// 변환된 string 저장
|
||||
m_iPanelNamestring.push_back(std::move(result));
|
||||
}
|
||||
|
||||
// vector<const char*> 업데이트
|
||||
// vector<const char*> 업데이트
|
||||
for (auto& str : m_iPanelNamestring)
|
||||
m_iPanelName.push_back(str.c_str());
|
||||
|
||||
@@ -70,7 +70,7 @@ void CIMGUIUI::ElementwstringTostring(vector<wstring>& panelNames)
|
||||
|
||||
for (auto& wname : panelNames)
|
||||
{
|
||||
// wstring -> UTF-8 string 변환
|
||||
// wstring -> UTF-8 string 변환
|
||||
int size = WideCharToMultiByte(CP_UTF8, 0,
|
||||
wname.c_str(), (int)wname.size(),
|
||||
nullptr, 0, nullptr, nullptr);
|
||||
@@ -81,11 +81,11 @@ void CIMGUIUI::ElementwstringTostring(vector<wstring>& panelNames)
|
||||
wname.c_str(), (int)wname.size(),
|
||||
&result[0], size, nullptr, nullptr);
|
||||
|
||||
// 변환된 string 저장
|
||||
// 변환된 string 저장
|
||||
m_pElementNamestring.push_back(std::move(result));
|
||||
}
|
||||
|
||||
// vector<const char*> 업데이트
|
||||
// vector<const char*> 업데이트
|
||||
for (auto& str : m_pElementNamestring)
|
||||
m_pElementName.push_back(str.c_str());
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
|
||||
#include "Information.h"
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "Effect_Editor.h"
|
||||
#include "Dummy_Cube.h"
|
||||
#include "MainLight.h"
|
||||
#include "Dummy_Plane.h"
|
||||
|
||||
CLevel_EffectViewer::CLevel_EffectViewer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
||||
@@ -36,6 +37,9 @@ HRESULT CLevel_EffectViewer::Initialize()
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummy_Cube>(ENUM_CLASS(LEVEL::EFFECT), NEXT_LEVEL, LAYER_CUBE)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummy_Plane>(ENUM_CLASS(LEVEL::EFFECT), NEXT_LEVEL, LAYER_CUBE)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
#include "TestEffect.h"
|
||||
#include "EditEffect.h"
|
||||
#include "Effect_Editor.h"
|
||||
#include "Dummy_Plane.h"
|
||||
|
||||
#pragma endregion
|
||||
|
||||
@@ -475,6 +476,10 @@ HRESULT CLoader::Loading_For_Effect()
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Box/Box.bin", XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Model_DummyPlane"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Effect/DummyPlane/DummyPlane.fbx", XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
|
||||
m_strMessage = TEXT("Shader Loading..");
|
||||
@@ -509,6 +514,10 @@ HRESULT CLoader::Loading_For_Effect()
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDummy_Cube>(ENUM_CLASS(LEVEL::EFFECT), CDummy_Cube::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDummy_Plane>(ENUM_CLASS(LEVEL::EFFECT), CDummy_Plane::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
m_strMessage = TEXT("Loading Success!");
|
||||
|
||||
m_isFinished = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "Camera.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "GameObject.h"
|
||||
@@ -34,8 +34,8 @@ class CDummyObject final : public CGameObject
|
||||
_wstring& Get_PrototypeTag() { return m_strModelPrototypeTag; }
|
||||
|
||||
private:
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
_wstring m_strModelPrototypeTag;
|
||||
_bool m_bRimLight = { true };
|
||||
_float m_fRimLightPower = { 3.2f };
|
||||
@@ -53,4 +53,4 @@ class CDummyObject final : public CGameObject
|
||||
virtual void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CModel;
|
||||
class CShader;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CDummy_Plane final : public CGameObject
|
||||
{
|
||||
private:
|
||||
CDummy_Plane(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CDummy_Plane(const CDummy_Plane& rhs);
|
||||
virtual ~CDummy_Plane() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
private:
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
|
||||
public:
|
||||
static CDummy_Plane* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "EffectObject.h"
|
||||
@@ -23,8 +23,8 @@ class CEditEffect final : public CEffectObject
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
|
||||
public:
|
||||
void Reference_Mat_For_EditEffect();
|
||||
|
||||
void Reference_Mat_For_EditEffect();
|
||||
HRESULT Save_Effect(const _char* pPath);
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
@@ -39,4 +39,4 @@ class CEditEffect final : public CEffectObject
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "PartObject.h"
|
||||
@@ -7,12 +7,56 @@ NS_BEGIN(Engine)
|
||||
class CInstance_Model;
|
||||
class CShader;
|
||||
class CTexture;
|
||||
class CLight;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CEffectObject abstract : public CPartObject
|
||||
{
|
||||
public:
|
||||
typedef struct tagEffectInfo
|
||||
{
|
||||
_float4 vColor = { 0.f ,0.f ,0.f ,1.f };
|
||||
|
||||
_float2 vDiffuseUVGainAmount = {};
|
||||
_float2 vMaskingUVGainAmount = {};
|
||||
|
||||
_float2 vDiffuseNoiseUVGainAmount = {};
|
||||
_float2 vMaskNoiseUVGainAmount = {};
|
||||
|
||||
_float2 vUVCutting = { 1.f ,1.f };
|
||||
_float2 vUVMaskCutting = { 1.f ,1.f };
|
||||
|
||||
_int iMaskMoveLerpOption = { 0 };
|
||||
_int iDiffuseMoveLerpOption = { 0 };
|
||||
_int iMaskNoiseMoveLerpOption = { 0 };
|
||||
_int iDiffuseNoiseMoveLerpOption = { 0 };
|
||||
_int iBlurWeight = { 0 };
|
||||
|
||||
|
||||
_bool isDiffuse = {};
|
||||
_bool isMasking = {};
|
||||
_bool isDissolve = {};
|
||||
_bool isNoise = {};
|
||||
_bool isEmissive = {};
|
||||
_bool isDiffuseUVMove = {};
|
||||
_bool isMaskUVMove = {};
|
||||
_bool isBlur = {};
|
||||
_bool isBillboard = {};
|
||||
|
||||
|
||||
_float4 vEmissive = { 0.f ,0.f ,0.f ,0.f };
|
||||
_float fColorOption = {};
|
||||
_float fBlurIntensity = {};
|
||||
_float fNoiseDistortionIntensity = {};
|
||||
_float fEmissiveCutAlpha = {};
|
||||
|
||||
LIGHT_DESC LightDesc = {};
|
||||
RENDER eRenderOrder = { RENDER::EFFECT };
|
||||
|
||||
}EFFECT_INFO;
|
||||
|
||||
protected:
|
||||
CEffectObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CEffectObject(const CEffectObject& rhs);
|
||||
@@ -24,6 +68,8 @@ class CEffectObject abstract : public CPartObject
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual HRESULT Render_Blur() override;
|
||||
public:
|
||||
HRESULT Load(const _char* pFilePath, LEVEL eLevel);
|
||||
protected:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
@@ -35,50 +81,24 @@ class CEffectObject abstract : public CPartObject
|
||||
CTexture* m_pNoise_TextureCom = { nullptr };
|
||||
CTexture* m_pMasking_TextureCom = { nullptr };
|
||||
CTexture* m_pDissolve_TextureCom = { nullptr };
|
||||
CTexture* m_pEmissive_TextureCom = { nullptr };
|
||||
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CLight* m_pLightCom = { nullptr };
|
||||
|
||||
CInstance_Model* m_pInstance_ModelCom = { nullptr };
|
||||
|
||||
protected:
|
||||
_float4 m_vColor = { 0.f ,0.f ,0.f ,1.f };
|
||||
|
||||
_float2 m_vDiffuseUVGainAmount = {};
|
||||
_float2 m_vMaskingUVGainAmount = {};
|
||||
|
||||
_float2 m_vDiffuseNoiseUVGainAmount = {};
|
||||
_float2 m_vMaskNoiseUVGainAmount = {};
|
||||
|
||||
_float2 m_vUVCutting = { 1.f ,1.f };
|
||||
_float2 m_vUVMaskCutting = { 1.f ,1.f };
|
||||
|
||||
_int m_iMaskMoveLerpOption = { 0 };
|
||||
_int m_iDiffuseMoveLerpOption = { 0 };
|
||||
_int m_iMaskNoiseMoveLerpOption = { 0 };
|
||||
_int m_iDiffuseNoiseMoveLerpOption = { 0 };
|
||||
_int m_iBlurWeight = { 0 };
|
||||
|
||||
|
||||
_bool m_isDiffuse = {};
|
||||
_bool m_isMasking = {};
|
||||
_bool m_isDissolve = {};
|
||||
_bool m_isNoise = {};
|
||||
_bool m_isDiffuseUVMove = {};
|
||||
_bool m_isMaskUVMove = {};
|
||||
_bool m_isBlur = {};
|
||||
_bool m_isBillboard = {};
|
||||
|
||||
|
||||
_float4 m_vEmissive = { 0.f ,0.f ,0.f ,0.f };
|
||||
_float m_fColorOption = {};
|
||||
_float m_fBlurIntensity = {};
|
||||
_float m_fNoiseDistortionIntensity = {};
|
||||
_float m_fEmissiveCutAlpha = {};
|
||||
|
||||
|
||||
RENDER m_eRenderOrder = { RENDER::EFFECT };
|
||||
EFFECT_INFO m_EffectInfo = {};
|
||||
_string m_strDiffuseName = {};
|
||||
_string m_strNoiseName = {};
|
||||
_string m_strMaskingName = {};
|
||||
_string m_strDissolveName = {};
|
||||
_string m_strModelName = {};
|
||||
_string m_strEmissiveName = {};
|
||||
|
||||
public:
|
||||
virtual void Free() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "ContainerObject.h"
|
||||
@@ -23,7 +23,8 @@ class CEffect_Editor final : public CContainerObject
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
|
||||
public:
|
||||
void Reference_Mat_For_EditEffect(class CComponent** pTexture, CGameObject* pObject);
|
||||
_string Reference_Mat_For_EditEffect(class CComponent** pTexture, CGameObject* pObject);
|
||||
HRESULT Load_Edit(const _char* pPath);
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
@@ -37,9 +38,13 @@ class CEffect_Editor final : public CContainerObject
|
||||
|
||||
private:
|
||||
_string m_strCurrentEffectName = {};
|
||||
|
||||
_uint m_iNumPart = { 0 };
|
||||
class CEditEffect* m_pEditEffect = { nullptr };
|
||||
map<_wstring, vector<pair<_wstring, _wstring>>> m_MatFiles = {}; // map<머테리얼 이름, vector<텍스쳐이름 , 텍스쳐 경로>>
|
||||
map<_wstring, vector<pair<_wstring, _wstring>>> m_MatFiles = {}; // map<머테리얼 이름, vector<텍스쳐이름 , 텍스쳐 경로>>
|
||||
|
||||
_char m_szBuffer[MAX_PATH] = { "../Bin/Resources/Data/Effect/"};
|
||||
_string m_strSavePath = {};
|
||||
|
||||
public:
|
||||
static CEffect_Editor* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
@@ -50,4 +55,4 @@ class CEffect_Editor final : public CContainerObject
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "CanvasObject.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "ModelParts.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Base.h"
|
||||
#include "Editor_Define.h"
|
||||
@@ -15,7 +15,7 @@ typedef class CInformation final : public CBase
|
||||
_bool strListBox(const _char* Label, _int& iCurrentIndex, vector<_string>& contents);
|
||||
_bool wstrListBox(const _char* Label, _int& iCurrentIndex, vector<_wstring>& contents);
|
||||
|
||||
#pragma endregion // 전역
|
||||
#pragma endregion // 전역
|
||||
|
||||
#pragma region OBJECTVIEWER
|
||||
|
||||
|
||||
@@ -19,8 +19,11 @@ float g_fSpotOuterAngle;
|
||||
|
||||
vector g_vLightDir;
|
||||
vector g_vLightPos;
|
||||
vector g_vLightPosOffset;
|
||||
|
||||
vector g_vCamPosition;
|
||||
|
||||
|
||||
Texture2D g_NormalTexture;
|
||||
Texture2D g_DiffuseTexture;
|
||||
Texture2D g_ShadeTexture;
|
||||
@@ -156,7 +159,7 @@ PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In)
|
||||
vPosition = mul(vPosition, g_invmatProj);
|
||||
vPosition = mul(vPosition, g_invMatView);
|
||||
|
||||
vector vLightDir = vPosition - g_vLightPos;
|
||||
vector vLightDir = vPosition - (g_vLightPos + g_vLightPosOffset);
|
||||
float fDistance = length(vLightDir);
|
||||
float fAttenuation = saturate((g_fLightRange - fDistance) / g_fLightRange);
|
||||
if (fAttenuation <= 0.f)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "Base.h"
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
|
||||
#include "Bounding.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "Bounding_AABB.h"
|
||||
#include "Bounding_OBB.h"
|
||||
#include "Bounding_Sphere.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "Bounding_AABB.h"
|
||||
#include "Bounding_OBB.h"
|
||||
#include "Bounding_Sphere.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "Bounding_AABB.h"
|
||||
#include "Bounding_OBB.h"
|
||||
#include "Bounding_Sphere.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "CanvasObject.h"
|
||||
|
||||
CCanvasObject::CCanvasObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -144,5 +144,5 @@ void CCanvasObject::Free()
|
||||
|
||||
m_Panels.clear();
|
||||
m_PanelNames.clear();
|
||||
m_Panels_map.clear(); // map 비우기
|
||||
m_Panels_map.clear(); // map 비우기
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "Cell.h"
|
||||
|
||||
#include "VIBuffer_Cell.h"
|
||||
@@ -44,7 +44,7 @@ _ubyte CCell::Get_CellAttribute()
|
||||
HRESULT CCell::Initialize(const _float3* pPoints, _uint iIndex)
|
||||
{
|
||||
if (nullptr == pPoints) {
|
||||
return S_OK; // 로딩 전용
|
||||
return S_OK; // 로딩 전용
|
||||
}
|
||||
memcpy(m_vPoints, pPoints, sizeof(_float3) * ENUM_CLASS(NAVI_POINT::END));
|
||||
|
||||
@@ -153,7 +153,7 @@ HRESULT CCell::LoadAsBinary(HANDLE hFile, DWORD& dwByte, _uint iCellIndex)
|
||||
HRESULT CCell::SaveAsBinary(HANDLE hFile, DWORD& dwByte)
|
||||
{
|
||||
if (UINT_MAX == m_iIndex) {
|
||||
assert(false); // 초기화 되지 않은 정점 저장 시도
|
||||
assert(false); // 초기화 되지 않은 정점 저장 시도
|
||||
return E_FAIL;
|
||||
}
|
||||
WriteFile(hFile, m_vPoints, sizeof(_float3) * ENUM_CLASS(NAVI_POINT::END), &dwByte, nullptr);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Collider.h"
|
||||
#include "Collider.h"
|
||||
#include "pch.h"
|
||||
|
||||
#include "Collider.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "Collider_Manager.h"
|
||||
#include "GameInstance.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "Component.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//--------------------------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------------------------
|
||||
// File: DebugDraw.cpp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
CElementObject::CElementObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
|
||||
@@ -748,7 +748,7 @@ void CGameInstance::Release_Engine()
|
||||
SAFE_RELEASE(m_pPhysX_Manager);
|
||||
SAFE_RELEASE(m_pLevel_Manager);
|
||||
SAFE_RELEASE(m_pPrototype_Manager);
|
||||
SAFE_RELEASE(m_pLight_Manager); // Light Manager는 m_pObject_Manager 보다 빨리 불려야함
|
||||
SAFE_RELEASE(m_pLight_Manager); // Light Manager�� m_pObject_Manager ���� ���� �ҷ�����
|
||||
SAFE_RELEASE(m_pGraphic_Device);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "GameObject.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Transform.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "Graphic_Device.h"
|
||||
|
||||
CGraphic_Device::CGraphic_Device()
|
||||
@@ -95,32 +95,32 @@ HRESULT CGraphic_Device::Ready_SwapChain(HWND hWnd, _uint iWinCX, _uint iWinCY)
|
||||
IDXGIFactory* pFactory = nullptr;
|
||||
pAdapter->GetParent(__uuidof(IDXGIFactory), (void**)&pFactory);
|
||||
|
||||
/* 스왑체인을 생성한다. = 텍스쳐를 생성하는 행위 + 스왑하는 형태 */
|
||||
/* 스왑체인을 생성한다. = 텍스쳐를 생성하는 행위 + 스왑하는 형태 */
|
||||
DXGI_SWAP_CHAIN_DESC SwapChain;
|
||||
ZeroMemory(&SwapChain, sizeof(DXGI_SWAP_CHAIN_DESC));
|
||||
|
||||
/* 백버퍼 == 텍스쳐 */
|
||||
/*텍스처(백버퍼 == ID3D11Texture2D)를 생성하는 행위*/
|
||||
SwapChain.BufferDesc.Width = iWinCX; /* 가로 픽셀 수 */
|
||||
SwapChain.BufferDesc.Height = iWinCY; /* 세로 픽셀 수 */
|
||||
/* 백버퍼 == 텍스쳐 */
|
||||
/*텍스처(백버퍼 == ID3D11Texture2D)를 생성하는 행위*/
|
||||
SwapChain.BufferDesc.Width = iWinCX; /* 가로 픽셀 수 */
|
||||
SwapChain.BufferDesc.Height = iWinCY; /* 세로 픽셀 수 */
|
||||
|
||||
/* float4(1.f, 1.f, 1.f, 1.f) */
|
||||
/* float4(1.f, 0.f, 0.f, 1.f) */
|
||||
SwapChain.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; /* 만든 픽셀하나의 데이터 정보 : 32BIT픽셀생성하되 부호가 없는 정규화된 수를 저장할께 */
|
||||
SwapChain.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; /* 만든 픽셀하나의 데이터 정보 : 32BIT픽셀생성하되 부호가 없는 정규화된 수를 저장할께 */
|
||||
SwapChain.BufferDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED;
|
||||
SwapChain.BufferDesc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED;
|
||||
|
||||
/* 스케치북에 사과를 그릴꺼야. */
|
||||
/* RENDER_TARGET : 그림을 당하는 대상. 스케치북 */
|
||||
/* 스케치북에 사과를 그릴꺼야. */
|
||||
/* RENDER_TARGET : 그림을 당하는 대상. 스케치북 */
|
||||
SwapChain.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
|
||||
SwapChain.BufferCount = 1;
|
||||
|
||||
/*스왑하는 형태 : 모니터 주사율에 따라 조절해도 됨. */
|
||||
/*스왑하는 형태 : 모니터 주사율에 따라 조절해도 됨. */
|
||||
SwapChain.BufferDesc.RefreshRate.Numerator = 60;
|
||||
SwapChain.BufferDesc.RefreshRate.Denominator = 1;
|
||||
|
||||
/* 멀티샘플링 : 안티얼라이징 (계단현상방지) */
|
||||
/* 나중에 후처리 렌더링 : 멀티샘플링 지원(x) */
|
||||
/* 멀티샘플링 : 안티얼라이징 (계단현상방지) */
|
||||
/* 나중에 후처리 렌더링 : 멀티샘플링 지원(x) */
|
||||
SwapChain.SampleDesc.Quality = 0;
|
||||
SwapChain.SampleDesc.Count = 1;
|
||||
|
||||
@@ -128,7 +128,7 @@ HRESULT CGraphic_Device::Ready_SwapChain(HWND hWnd, _uint iWinCX, _uint iWinCY)
|
||||
SwapChain.Windowed = static_cast<BOOL>(true);
|
||||
SwapChain.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
|
||||
|
||||
/* 백버퍼라는 텍스처(ID3D11Texture2D)를 생성했다. */
|
||||
/* 백버퍼라는 텍스처(ID3D11Texture2D)를 생성했다. */
|
||||
if (FAILED(pFactory->CreateSwapChain(m_pDevice, &SwapChain, &m_pSwapChain)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
@@ -88,8 +88,31 @@ HRESULT CInstance_Model::Ready_Meshes(MODEL eType, const aiScene* pAIScene, _fma
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CInstance_Model::Save_InstanceModel(HANDLE hFile)
|
||||
{
|
||||
DWORD dwByte = {};
|
||||
|
||||
if (!WriteFile(hFile, &m_InstanceDesc, sizeof(INSTANCE_DESC), &dwByte, nullptr)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
HRESULT CInstance_Model::Load_InstanceModel(HANDLE hFile)
|
||||
{
|
||||
DWORD dwByte = {};
|
||||
|
||||
if (!ReadFile(hFile, &m_InstanceDesc, sizeof(INSTANCE_DESC), &dwByte, nullptr)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
Change_NumInstance();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CInstance_Model::Change_NumInstance()
|
||||
{
|
||||
SAFE_RELEASE(m_pVBInstance);
|
||||
@@ -99,39 +122,31 @@ HRESULT CInstance_Model::Change_NumInstance()
|
||||
|
||||
//모든 버퍼를 지우고 재 생성 해야함
|
||||
|
||||
if (FAILED(Create_Instance_Buffer(&m_InstanceDesc)))
|
||||
if (FAILED(Create_Instance_Buffer()))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Create_SubResource_Buffer()))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
//시작 시에 인스턴트 버퍼를 구성 해줌
|
||||
Instane_Buffer_ReStruct();
|
||||
|
||||
_uint CS_InputStrides[] = {
|
||||
sizeof(VTX_INSTANCE_PARTICLE),
|
||||
sizeof(CS_PARTICLE_VALUE_DESC),
|
||||
};
|
||||
|
||||
_uint CS_OutputStrides[] = {
|
||||
sizeof(VTX_INSTANCE_PARTICLE),
|
||||
sizeof(CS_PARTICLE_VALUE_DESC),
|
||||
};
|
||||
|
||||
m_pComputeShader = CComputeShader::Create(m_pDevice, m_pContext,
|
||||
L"../Bin/Resources/ShaderFiles/Shader_Particle_Compute.hlsl", "CS_MAIN", m_iNumInstance, 2, 2, CS_OutputStrides, CS_InputStrides);
|
||||
|
||||
if (m_pComputeShader == nullptr)
|
||||
if (FAILED(Create_CS()))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CInstance_Model::Create_Instance_Buffer(const INSTANCE_DESC* pDesc)
|
||||
HRESULT CInstance_Model::Create_Instance_Buffer()
|
||||
{
|
||||
if (pDesc != nullptr)
|
||||
m_InstanceDesc = *pDesc;
|
||||
|
||||
|
||||
m_iNumInstance = m_InstanceDesc.iNumInstance;
|
||||
|
||||
@@ -191,26 +206,11 @@ HRESULT CInstance_Model::Create_SubResource_Buffer()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
HRESULT CInstance_Model::Initialize(void* pArg)
|
||||
HRESULT CInstance_Model::Create_CS()
|
||||
{
|
||||
|
||||
INSTANCE_DESC* pInstanceDesc = static_cast<INSTANCE_DESC*>(pArg);
|
||||
|
||||
|
||||
|
||||
if (FAILED(Create_Instance_Buffer(pInstanceDesc)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Create_SubResource_Buffer()))
|
||||
return E_FAIL;
|
||||
|
||||
//시작 시에 인스턴트 버퍼를 구성 해줌
|
||||
Instane_Buffer_ReStruct();
|
||||
|
||||
_uint CS_InputStrides[] = {
|
||||
sizeof(VTX_INSTANCE_PARTICLE),
|
||||
sizeof(CS_PARTICLE_VALUE_DESC),
|
||||
sizeof(VTX_INSTANCE_PARTICLE),
|
||||
sizeof(CS_PARTICLE_VALUE_DESC),
|
||||
};
|
||||
|
||||
_uint CS_OutputStrides[] = {
|
||||
@@ -227,6 +227,32 @@ HRESULT CInstance_Model::Initialize(void* pArg)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
HRESULT CInstance_Model::Initialize(void* pArg)
|
||||
{
|
||||
|
||||
INSTANCE_DESC* pInstanceDesc = static_cast<INSTANCE_DESC*>(pArg);
|
||||
|
||||
if (pInstanceDesc != nullptr)
|
||||
m_InstanceDesc = *pInstanceDesc;
|
||||
else
|
||||
return S_OK;
|
||||
|
||||
if (FAILED(Create_Instance_Buffer()))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Create_SubResource_Buffer()))
|
||||
return E_FAIL;
|
||||
|
||||
//시작 시에 인스턴트 버퍼를 구성 해줌
|
||||
Instane_Buffer_ReStruct();
|
||||
|
||||
if(FAILED(Create_CS()))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CInstance_Model::Drop(_float fTimeDelta)
|
||||
{
|
||||
D3D11_MAPPED_SUBRESOURCE ConstantSubResource = {};
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "Light.h"
|
||||
#include "Shader.h"
|
||||
#include "VIBuffer.h"
|
||||
#include "GameInstance.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
|
||||
CLight::CLight(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -72,6 +73,9 @@ HRESULT CLight::Render(CShader* pShader, CVIBuffer* pVIBuffer) const
|
||||
if (FAILED(pShader->Bind_RawValue("g_vLightPos", m_LightDesc.pPosition, sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pShader->Bind_RawValue("g_vLightPosOffset", &m_LightDesc.vPosOffset, sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pShader->Bind_RawValue("g_fLightRange", &m_LightDesc.fRange, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -84,7 +88,10 @@ HRESULT CLight::Render(CShader* pShader, CVIBuffer* pVIBuffer) const
|
||||
iPassIndex = ENUM_CLASS(SHADER_PASS_DEFERRED::SPOT);
|
||||
}
|
||||
else {
|
||||
if (FAILED(pShader->Bind_RawValue("g_vLightPos", m_LightDesc.pDirection, sizeof(_float4)))) {
|
||||
if (FAILED(pShader->Bind_RawValue("g_vLightPos", m_LightDesc.pPosition, sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pShader->Bind_RawValue("g_vLightPosOffset", &m_LightDesc.vPosOffset, sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pShader->Bind_RawValue("g_fLightRange", &m_LightDesc.fRange, sizeof(_float)))) {
|
||||
@@ -147,7 +154,7 @@ void CLight::Free()
|
||||
|
||||
void CLight::Describe_Entity()
|
||||
{
|
||||
if (ImGui::TreeNode("LIGHT"))
|
||||
if (ImGui::TreeNode("LIGHT_INFO"))
|
||||
{
|
||||
ImGui::Separator(); ImGui::Spacing();
|
||||
|
||||
@@ -160,12 +167,23 @@ void CLight::Describe_Entity()
|
||||
m_LightDesc.eType = static_cast<LIGHT>(iCurrentItem);
|
||||
}
|
||||
|
||||
ImGui::DragFloat4("Diffuse", reinterpret_cast<float*>(&m_LightDesc.vDiffuse));
|
||||
ImGui::DragFloat4("Ambient", reinterpret_cast<float*>(&m_LightDesc.vAmbient));
|
||||
ImGui::DragFloat4("Specular", reinterpret_cast<float*>(&m_LightDesc.vSpecular));
|
||||
GUI::DragFloat4("Diffuse", reinterpret_cast<float*>(&m_LightDesc.vDiffuse) , 0.01f , 0.f ,1.f);
|
||||
GUI::DragFloat4("Ambient", reinterpret_cast<float*>(&m_LightDesc.vAmbient), 0.01f, 0.f, 1.f);
|
||||
GUI::DragFloat4("Specular", reinterpret_cast<float*>(&m_LightDesc.vSpecular), 0.01f, 0.f, 1.f);
|
||||
GUI::DragFloat("Range", &m_LightDesc.fRange, 1.f, 0.f);
|
||||
GUI::DragFloat2("SpotAngle", reinterpret_cast<float*>(&m_LightDesc.vSpotAngles));
|
||||
|
||||
ImGui::TreePop();
|
||||
GUI::Spacing();
|
||||
GUI::Spacing();
|
||||
|
||||
GUI::DragFloat3("PosOffest", reinterpret_cast<float*>(&m_LightDesc.vPosOffset));
|
||||
|
||||
GUI::Spacing();
|
||||
|
||||
m_pOwner->Get_Component<CTransform>()->Describe_Entity();
|
||||
|
||||
GUI::TreePop();
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
GUI::Separator();
|
||||
}
|
||||
|
||||
@@ -153,8 +153,9 @@ HRESULT CShader::CreateShader(const _tchar* pShaderFilePath, const D3D11_INPUT_E
|
||||
if (FAILED(m_pDevice->CreateInputLayout(
|
||||
pElements,
|
||||
iNumElements,
|
||||
PassDesc.pIAInputSignature/*���̴����� ���ټ� �ִ� ������ ����*/,
|
||||
PassDesc.IAInputSignatureSize/*���̴����� ���ټ� �ִ� ������ �����������*/,
|
||||
PassDesc.pIAInputSignature/*쉐이더에서 받아줄수 있는 정점의 정보*/,
|
||||
PassDesc.IAInputSignatureSize/*쉐이더에서 받아줄수 있는 정점의 멤버변수갯수*/,
|
||||
|
||||
&pInputLayout)))
|
||||
return E_FAIL;
|
||||
|
||||
@@ -167,7 +168,8 @@ HRESULT CShader::CreateShader(const _tchar* pShaderFilePath, const D3D11_INPUT_E
|
||||
|
||||
HRESULT CShader::Shader_Refresh()
|
||||
{
|
||||
// �� ��Dz ���̾ƿ� ����Ʈ �Ҹ��Ű��
|
||||
// 내 인풋 레이아웃 이펙트 소멸시키고
|
||||
|
||||
Safe_Release(m_pEffect);
|
||||
|
||||
for (auto& pInputLayout : m_InputLayouts)
|
||||
@@ -175,10 +177,16 @@ HRESULT CShader::Shader_Refresh()
|
||||
|
||||
m_InputLayouts.clear();
|
||||
|
||||
//그 경로로 재 생성한다.
|
||||
|
||||
//�� ��η� �� �����Ѵ�.
|
||||
if (FAILED(CreateShader(m_strShaderPath.c_str(), m_pElements, m_iNumElements)))
|
||||
{
|
||||
MessageBox(NULL, L"쉐이더 변경 실패", L"System Message", MB_OK);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
MessageBox(NULL, L"쉐이더 변경 성공", L"System Message", MB_OK);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -193,8 +201,9 @@ HRESULT CShader::Begin(_uint iPassIndex)
|
||||
|
||||
m_pContext->IASetInputLayout(m_InputLayouts[iPassIndex]);
|
||||
|
||||
/* Apply�� �ݵ�� ȣ���ؾ߸� ���̴��� ������. */
|
||||
/* Apply������ ���̴��� ������ ��� �����͵��� �� �������ƾ��Ѵ�. */
|
||||
/* Apply를 반드시 호출해야만 쉐이더로 그려진다. */
|
||||
/* Apply이전에 쉐이더에 전달할 모든 데이터들을 다 던져놓아야한다. */
|
||||
|
||||
m_pEffect->GetTechniqueByIndex(0)->GetPassByIndex(iPassIndex)->Apply(0, m_pContext);
|
||||
|
||||
return S_OK;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Base.h"
|
||||
|
||||
@@ -38,7 +38,7 @@ class ENGINE_DLL CAnimation : public CBase
|
||||
|
||||
private:
|
||||
HRESULT Initialize(HANDLE hFile, DWORD& dwByte);
|
||||
// 바이너리
|
||||
// 바이너리
|
||||
HRESULT Initialize(const class CModel* pModel,SaveAnimation* pSaveAnimation);
|
||||
//
|
||||
HRESULT Combined_Initialize();
|
||||
@@ -50,22 +50,22 @@ class ENGINE_DLL CAnimation : public CBase
|
||||
_float m_fTickPerSecond = {};
|
||||
_float m_fAnimSpeed = {1.f};
|
||||
|
||||
_bool m_bPause = { FALSE }; // 애님퍼즈 인덱스
|
||||
_string m_strName = {}; // 애님 이름
|
||||
_float m_fCurrentTrackPosition = {}; // 현재 트랙 위치
|
||||
_float m_fDuration = {}; // 트랙의 전체 길이
|
||||
_float m_TickPerSeconds[2] = { 0.f, 0.f }; // 초당 트랙 이동 거리
|
||||
_uint m_iNumChannels = {}; // 영향을 받는 본의 수
|
||||
_bool m_bPause = { FALSE }; // 애님퍼즈 인덱스
|
||||
_string m_strName = {}; // 애님 이름
|
||||
_float m_fCurrentTrackPosition = {}; // 현재 트랙 위치
|
||||
_float m_fDuration = {}; // 트랙의 전체 길이
|
||||
_float m_TickPerSeconds[2] = { 0.f, 0.f }; // 초당 트랙 이동 거리
|
||||
_uint m_iNumChannels = {}; // 영향을 받는 본의 수
|
||||
|
||||
vector<class CChannel*> m_Channels; // 이 애니메이션이 영향을 준 사전 계산된 본의 배열
|
||||
vector<_uint> m_CurrentKeyFrameIndices; // 각 본이 현재 애니메이션에서 취해야할 키프레임 왼쪽 인덱스
|
||||
vector<class CChannel*> m_Channels; // 이 애니메이션이 영향을 준 사전 계산된 본의 배열
|
||||
vector<_uint> m_CurrentKeyFrameIndices; // 각 본이 현재 애니메이션에서 취해야할 키프레임 왼쪽 인덱스
|
||||
|
||||
vector<_int> m_DestBones; // 이 애니메이션에서 영향을 받는 본들의 집합
|
||||
vector<LERPDESC> m_StartKeyFrames; // 이 애니메이션의 영향을 받는 본들의 초기값
|
||||
vector<_int> m_DestBones; // 이 애니메이션에서 영향을 받는 본들의 집합
|
||||
vector<LERPDESC> m_StartKeyFrames; // 이 애니메이션의 영향을 받는 본들의 초기값
|
||||
|
||||
public:
|
||||
static CAnimation* Create(HANDLE hFile, DWORD& dwByte);
|
||||
// 바이너리
|
||||
// 바이너리
|
||||
static CAnimation* Create(const class CModel* pModel, SaveAnimation* pSaveAnimation);
|
||||
//
|
||||
CAnimation* Clone();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
// Copyright (C) 2002-2007 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine" and the "irrXML" project.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Engine_Define.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Base.h"
|
||||
|
||||
@@ -22,22 +22,22 @@ class ENGINE_DLL CBone final : public CBase
|
||||
_bool Compare_Name(const _char* pBoneName) const {
|
||||
return !strcmp(pBoneName, m_szName);
|
||||
}
|
||||
void Get_KeyFrame(KEYFRAME& kf, _bool bIsCurrentFrame); // 현재 본의 로컬매트릭스를 캡쳐해서 키프레임으로 성분 분해하여 올려보낸다.
|
||||
void Get_KeyFrame(KEYFRAME& kf, _bool bIsCurrentFrame); // 현재 본의 로컬매트릭스를 캡쳐해서 키프레임으로 성분 분해하여 올려보낸다.
|
||||
const _char* Get_Name() const { return m_szName; }
|
||||
_float3 Get_LocalPosition();
|
||||
void Update_CombinedTransformationMatrix(const vector<CBone*>& Bones, _fmatrix PreTransformMatrix);
|
||||
void Set_TransformationMatrix(_fmatrix TransformationMatrix); // 애니메이션에서 현재 로컬 매트릭스를 변경할 때 사용된다
|
||||
void Set_TransformationMatrix(_fmatrix TransformationMatrix); // 애니메이션에서 현재 로컬 매트릭스를 변경할 때 사용된다
|
||||
|
||||
private:
|
||||
_char m_szName[MAX_PATH] = {}; // 본의 이름
|
||||
_float4x4 m_TransformationMatrix = {}; // 본의 현재 로컬 매트릭스
|
||||
_float4x4 m_CombinedTransformationMatrix = {}; // 본의 루트노드로부터 상대적인 복합매트릭스 ( 부모노드는 PreTranformMatrix와 월드좌표로부터 상대적임 )
|
||||
_int m_iParentBoneIndex = { -1 }; // 부모본의 인덱스 ( 모델에 있는 본벡터의 인덱스 ) ( 부모는 인덱스 -1 고정 )
|
||||
_char m_szName[MAX_PATH] = {}; // 본의 이름
|
||||
_float4x4 m_TransformationMatrix = {}; // 본의 현재 로컬 매트릭스
|
||||
_float4x4 m_CombinedTransformationMatrix = {}; // 본의 루트노드로부터 상대적인 복합매트릭스 ( 부모노드는 PreTranformMatrix와 월드좌표로부터 상대적임 )
|
||||
_int m_iParentBoneIndex = { -1 }; // 부모본의 인덱스 ( 모델에 있는 본벡터의 인덱스 ) ( 부모는 인덱스 -1 고정 )
|
||||
_float4x4 m_matInitial = {};
|
||||
|
||||
private:
|
||||
HRESULT Initialize(HANDLE hFile, DWORD& dwByte);
|
||||
// 바이너리
|
||||
// 바이너리
|
||||
HRESULT Initialize(const SaveNode& _SaveNode, _int iParentIndex);
|
||||
//
|
||||
|
||||
@@ -46,7 +46,7 @@ class ENGINE_DLL CBone final : public CBase
|
||||
CBone* Clone();
|
||||
virtual void Free() override;
|
||||
|
||||
// 바이너리
|
||||
// 바이너리
|
||||
static CBone* Create(const SaveNode& _SaveNode, _int iParentIndex);
|
||||
//
|
||||
#ifdef EDITOR_PROJECT
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Base.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Bounding.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Bounding.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Bounding.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "UIObject.h"
|
||||
|
||||
@@ -34,10 +34,10 @@ class ENGINE_DLL CCanvasObject abstract : public CUIObject
|
||||
virtual void Add_Panel(wstring Name, class CGameObject* pPanel);
|
||||
|
||||
protected:
|
||||
vector<class CGameObject*> m_Panels; // 캔버스가 패널들을 관리 하기 위해서 필요함
|
||||
vector<wstring> m_PanelNames; // 패널들의 이름을 전해주기 위해서
|
||||
map<wstring ,class CGameObject*> m_Panels_map; // 캔버스에서 내가 원하는 패널을 찾기 위해서
|
||||
_int m_iPanel_Count{}; // 전체 패널의 갯수
|
||||
vector<class CGameObject*> m_Panels; // 캔버스가 패널들을 관리 하기 위해서 필요함
|
||||
vector<wstring> m_PanelNames; // 패널들의 이름을 전해주기 위해서
|
||||
map<wstring ,class CGameObject*> m_Panels_map; // 캔버스에서 내가 원하는 패널을 찾기 위해서
|
||||
_int m_iPanel_Count{}; // 전체 패널의 갯수
|
||||
|
||||
private:
|
||||
virtual class CGameObject* Find_Panel(const wstring& Name);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Base.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Base.h"
|
||||
|
||||
@@ -30,23 +30,23 @@ class ENGINE_DLL CChannel : public CBase
|
||||
}
|
||||
private:
|
||||
HRESULT Initialize(HANDLE hFile, DWORD& dwByte);
|
||||
// 바이너리
|
||||
// 바이너리
|
||||
HRESULT Initialize(const class CModel* pModel, SaveChannel* pSaveChannel);
|
||||
//
|
||||
HRESULT Initialize(const vector<class CBone*>& Bones, _uint iIndex);
|
||||
|
||||
|
||||
private:
|
||||
_char m_szName[MAX_PATH] = {}; // 영향을 받을 본의 이름
|
||||
_int m_iBoneIndex = { -1 }; // 본 벡터에서 본의 인덱스
|
||||
_uint m_iNumKeyFrames = {}; // Animation의 m_fDuration동안 이 본이 취해야할 키프레임의 갯수
|
||||
_char m_szName[MAX_PATH] = {}; // 영향을 받을 본의 이름
|
||||
_int m_iBoneIndex = { -1 }; // 본 벡터에서 본의 인덱스
|
||||
_uint m_iNumKeyFrames = {}; // Animation의 m_fDuration동안 이 본이 취해야할 키프레임의 갯수
|
||||
_float4x4 m_PreTransformMatrix = {};
|
||||
vector<KEYFRAME> m_KeyFrames; // 키프레임 벡터
|
||||
vector<KEYFRAME> m_KeyFrames; // 키프레임 벡터
|
||||
|
||||
public:
|
||||
static CChannel* Create(const vector<class CBone*>& Bones, _uint iIndex); // 럴프전용
|
||||
static CChannel* Create(const vector<class CBone*>& Bones, _uint iIndex); // 럴프전용
|
||||
static CChannel* Create(HANDLE hFile, DWORD& dwByte);
|
||||
// 바이너리
|
||||
// 바이너리
|
||||
static CChannel* Create(const class CModel* pModel, SaveChannel* pSaveChannel);
|
||||
//
|
||||
virtual void Free() override;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Component.h"
|
||||
#include "Bounding_AABB.h"
|
||||
#include "Bounding_OBB.h"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user