@@ -26,5 +26,5 @@ xcopy /y .\Engine\ThirdPartyLib\DirectXTK\DirectXTK.pdb .\Engine\Default\x
|
||||
xcopy /y .\Engine\ThirdPartyLib\FX11\Effects11d.pdb .\Engine\Default\x64\Debug\
|
||||
xcopy /y .\Engine\ThirdPartyLib\FX11\Effects11.pdb .\Engine\Default\x64\Release\
|
||||
|
||||
xcopy /y .\Engine\ThirdPartyLib\PhysX\debug\*.pdb .\Engine\Default\x64\Debug\
|
||||
xcopy /y .\Engine\ThirdPartyLib\PhysX\Release\*.pdb .\Engine\Default\x64\Release\
|
||||
xcopy /y .\Engine\ThirdPartyLib\PhysX\PhysX_debug\*.pdb .\Engine\Default\x64\Debug\
|
||||
xcopy /y .\Engine\ThirdPartyLib\PhysX\PhysX_Release\*.pdb .\Engine\Default\x64\Release\
|
||||
|
||||
@@ -29,7 +29,7 @@ Texture2D g_ShadowTexture;
|
||||
Texture2D g_PreShadowTexture;
|
||||
Texture2D g_BlurTexture;
|
||||
Texture2D g_BlurXTexture;
|
||||
Texture2D g_ColorTexture;
|
||||
|
||||
|
||||
|
||||
vector g_vLightDiffuse;
|
||||
@@ -72,6 +72,7 @@ struct PS_OUT_BACKBUFFER
|
||||
{
|
||||
float4 vBackBuffer : SV_TARGET0;
|
||||
};
|
||||
|
||||
PS_OUT_BACKBUFFER PS_MAIN_DEBUG(PS_IN In)
|
||||
{
|
||||
PS_OUT_BACKBUFFER Out;
|
||||
@@ -307,37 +308,6 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
||||
|
||||
Out.vBackBuffer += vColor;
|
||||
|
||||
/* Color_Target */
|
||||
|
||||
vector ColorTexture = g_ColorTexture.Sample(DefaultSampler, vTexcoord);
|
||||
|
||||
int iOption = ColorTexture.a * 10;
|
||||
|
||||
if (iOption == 0) // 0이면 수행하지 않음
|
||||
return Out;
|
||||
|
||||
switch (iOption)
|
||||
{
|
||||
case 1:
|
||||
Out.vBackBuffer.rgb += ColorTexture.rgb;
|
||||
break;
|
||||
case 2:
|
||||
Out.vBackBuffer.rgb *= ColorTexture.rgb;
|
||||
break;
|
||||
case 3:
|
||||
Out.vBackBuffer.rgb -= ColorTexture.rgb;
|
||||
break;
|
||||
case 4:
|
||||
Out.vBackBuffer.rgb /= ColorTexture.rgb;
|
||||
break;
|
||||
case 5:
|
||||
Out.vBackBuffer.rgb = ColorTexture.rgb;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
|
||||
Texture2D g_ColorTexture;
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VS_OUT
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
|
||||
matrix matWV, matWVP;
|
||||
|
||||
matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
Out.vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_IN
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct PS_OUT_BACKBUFFER
|
||||
{
|
||||
float4 vBackBuffer : SV_TARGET0;
|
||||
};
|
||||
|
||||
PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
|
||||
{
|
||||
PS_OUT_BACKBUFFER Out;
|
||||
|
||||
Out.vBackBuffer = float4(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
vector ColorTexture = g_ColorTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (0.f == ColorTexture.a)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
|
||||
int iOption = ColorTexture.a * 10;
|
||||
|
||||
|
||||
switch (iOption)
|
||||
{
|
||||
case 1:
|
||||
Out.vBackBuffer.rgb += ColorTexture.rgb;
|
||||
break;
|
||||
case 2:
|
||||
Out.vBackBuffer.rgb *= ColorTexture.rgb;
|
||||
break;
|
||||
case 3:
|
||||
Out.vBackBuffer.rgb -= ColorTexture.rgb;
|
||||
break;
|
||||
case 4:
|
||||
Out.vBackBuffer.rgb /= ColorTexture.rgb;
|
||||
break;
|
||||
case 5:
|
||||
Out.vBackBuffer.rgb = ColorTexture.rgb;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 DefaultTechnique
|
||||
{
|
||||
pass Default
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_OUT_LASTCOLOR();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -180,6 +180,26 @@ PS_OUT PS_MAIN(PS_IN In)
|
||||
|
||||
return Out;
|
||||
}
|
||||
PS_OUT PS_MAIN_OUTLINE(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
vector vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (vMtrlDiffuse.a < 0.4f)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
|
||||
vector vNormalDesc = g_NormalTexture.Sample(MirrorSampler, In.vTexcoord);
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||
|
||||
float3 vNormal = mul(vNormalDesc.xyz * 2.f - 1.f, WorldMatrix);
|
||||
|
||||
Out.vDiffuse = vMtrlDiffuse;
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4(In.vProjPos.z / In.vProjPos.w, In.vProjPos.w / g_fFar, 0.0f, 1.f);
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_IN_SHADOW
|
||||
{
|
||||
@@ -336,8 +356,8 @@ technique11 MeshTechnique11
|
||||
|
||||
pass SkyBoxPass // 2
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
|
||||
@@ -13,6 +13,7 @@ float4 g_vCamPosition;
|
||||
vector g_vColor;
|
||||
|
||||
float2 g_vUVGainAmount;
|
||||
float g_fBlurIntensity; //블러 세기
|
||||
|
||||
float4 g_vEmissive;
|
||||
float g_fColorOption;
|
||||
@@ -196,7 +197,71 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_Blur(PS_IN In)
|
||||
{
|
||||
|
||||
PS_OUT Out;
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
vector vMtrlMask;
|
||||
vector vMtrlNoise;
|
||||
vector vMtrlDisolve;
|
||||
|
||||
float2 vTexcoord = In.vTexcoord;
|
||||
|
||||
if (g_isUVMove)
|
||||
{
|
||||
vTexcoord += g_vUVGainAmount * (In.vLifeTime.x / In.vLifeTime.y);
|
||||
}
|
||||
|
||||
if (g_isDiffuse == true)
|
||||
{
|
||||
vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, vTexcoord);
|
||||
|
||||
if (vMtrlDiffuse.a < 0.3f)
|
||||
discard;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
vMtrlDiffuse = g_vColor;
|
||||
}
|
||||
|
||||
if (g_isMasking == true)
|
||||
{
|
||||
vMtrlMask = g_MaskingTexture.Sample(DefaultSampler, vTexcoord);
|
||||
}
|
||||
else
|
||||
{
|
||||
vMtrlMask.r = 1.f;
|
||||
}
|
||||
|
||||
if (g_isDissolve == true)
|
||||
{
|
||||
vMtrlDisolve = g_DissolveTexture.Sample(DefaultSampler, vTexcoord);
|
||||
}
|
||||
else
|
||||
{
|
||||
vMtrlDisolve.r = 0.f;
|
||||
}
|
||||
|
||||
if (g_isNoise == true)
|
||||
{
|
||||
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vTexcoord);
|
||||
}
|
||||
|
||||
|
||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlMask.r - vMtrlDisolve.r * (In.vLifeTime.x / In.vLifeTime.y));
|
||||
|
||||
Out.vDepth = float4(In.vProjPos.z / In.vProjPos.w, In.vProjPos.w / g_fFar, 0.0f, 0.0f);
|
||||
|
||||
Out.vDiffuse = vMtrlDiffuse * g_fBlurIntensity;
|
||||
|
||||
// 색깔 추가할 처리
|
||||
Out.vColor = vector(g_vEmissive.rgb, g_fColorOption / 10.f);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
technique11 DefaultTechnique
|
||||
@@ -221,4 +286,14 @@ technique11 DefaultTechnique
|
||||
PixelShader = compile ps_5_0 PS_NON_NORMALMAP();
|
||||
}
|
||||
|
||||
pass Blur
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Blur();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<EnableASAN>true</EnableASAN>
|
||||
<EnableASAN>false</EnableASAN>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
|
||||
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -29,7 +29,7 @@ Texture2D g_ShadowTexture;
|
||||
Texture2D g_PreShadowTexture;
|
||||
Texture2D g_BlurTexture;
|
||||
Texture2D g_BlurXTexture;
|
||||
Texture2D g_ColorTexture;
|
||||
|
||||
|
||||
|
||||
vector g_vLightDiffuse;
|
||||
@@ -72,6 +72,7 @@ struct PS_OUT_BACKBUFFER
|
||||
{
|
||||
float4 vBackBuffer : SV_TARGET0;
|
||||
};
|
||||
|
||||
PS_OUT_BACKBUFFER PS_MAIN_DEBUG(PS_IN In)
|
||||
{
|
||||
PS_OUT_BACKBUFFER Out;
|
||||
@@ -307,37 +308,6 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
||||
|
||||
Out.vBackBuffer += vColor;
|
||||
|
||||
/* Color_Target */
|
||||
|
||||
vector ColorTexture = g_ColorTexture.Sample(DefaultSampler, vTexcoord);
|
||||
|
||||
int iOption = ColorTexture.a * 10;
|
||||
|
||||
if (iOption == 0) // 0이면 수행하지 않음
|
||||
return Out;
|
||||
|
||||
switch (iOption)
|
||||
{
|
||||
case 1:
|
||||
Out.vBackBuffer.rgb += ColorTexture.rgb;
|
||||
break;
|
||||
case 2:
|
||||
Out.vBackBuffer.rgb *= ColorTexture.rgb;
|
||||
break;
|
||||
case 3:
|
||||
Out.vBackBuffer.rgb -= ColorTexture.rgb;
|
||||
break;
|
||||
case 4:
|
||||
Out.vBackBuffer.rgb /= ColorTexture.rgb;
|
||||
break;
|
||||
case 5:
|
||||
Out.vBackBuffer.rgb = ColorTexture.rgb;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
|
||||
Texture2D g_ColorTexture;
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VS_OUT
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
|
||||
matrix matWV, matWVP;
|
||||
|
||||
matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
Out.vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_IN
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct PS_OUT_BACKBUFFER
|
||||
{
|
||||
float4 vBackBuffer : SV_TARGET0;
|
||||
};
|
||||
|
||||
PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
|
||||
{
|
||||
PS_OUT_BACKBUFFER Out;
|
||||
|
||||
Out.vBackBuffer = float4(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
vector ColorTexture = g_ColorTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (0.f == ColorTexture.a)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
|
||||
int iOption = ColorTexture.a * 10;
|
||||
|
||||
|
||||
switch (iOption)
|
||||
{
|
||||
case 1:
|
||||
Out.vBackBuffer.rgb += ColorTexture.rgb;
|
||||
break;
|
||||
case 2:
|
||||
Out.vBackBuffer.rgb *= ColorTexture.rgb;
|
||||
break;
|
||||
case 3:
|
||||
Out.vBackBuffer.rgb -= ColorTexture.rgb;
|
||||
break;
|
||||
case 4:
|
||||
Out.vBackBuffer.rgb /= ColorTexture.rgb;
|
||||
break;
|
||||
case 5:
|
||||
Out.vBackBuffer.rgb = ColorTexture.rgb;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 DefaultTechnique
|
||||
{
|
||||
pass Default
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_OUT_LASTCOLOR();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -13,6 +13,7 @@ float4 g_vCamPosition;
|
||||
vector g_vColor;
|
||||
|
||||
float2 g_vUVGainAmount;
|
||||
float g_fBlurIntensity; //블러 세기
|
||||
|
||||
float4 g_vEmissive;
|
||||
float g_fColorOption;
|
||||
@@ -196,7 +197,71 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_Blur(PS_IN In)
|
||||
{
|
||||
|
||||
PS_OUT Out;
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
vector vMtrlMask;
|
||||
vector vMtrlNoise;
|
||||
vector vMtrlDisolve;
|
||||
|
||||
float2 vTexcoord = In.vTexcoord;
|
||||
|
||||
if (g_isUVMove)
|
||||
{
|
||||
vTexcoord += g_vUVGainAmount * (In.vLifeTime.x / In.vLifeTime.y);
|
||||
}
|
||||
|
||||
if (g_isDiffuse == true)
|
||||
{
|
||||
vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, vTexcoord);
|
||||
|
||||
if (vMtrlDiffuse.a < 0.3f)
|
||||
discard;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
vMtrlDiffuse = g_vColor;
|
||||
}
|
||||
|
||||
if (g_isMasking == true)
|
||||
{
|
||||
vMtrlMask = g_MaskingTexture.Sample(DefaultSampler, vTexcoord);
|
||||
}
|
||||
else
|
||||
{
|
||||
vMtrlMask.r = 1.f;
|
||||
}
|
||||
|
||||
if (g_isDissolve == true)
|
||||
{
|
||||
vMtrlDisolve = g_DissolveTexture.Sample(DefaultSampler, vTexcoord);
|
||||
}
|
||||
else
|
||||
{
|
||||
vMtrlDisolve.r = 0.f;
|
||||
}
|
||||
|
||||
if (g_isNoise == true)
|
||||
{
|
||||
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vTexcoord);
|
||||
}
|
||||
|
||||
|
||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlMask.r - vMtrlDisolve.r * (In.vLifeTime.x / In.vLifeTime.y));
|
||||
|
||||
Out.vDepth = float4(In.vProjPos.z / In.vProjPos.w, In.vProjPos.w / g_fFar, 0.0f, 0.0f);
|
||||
|
||||
Out.vDiffuse = vMtrlDiffuse * g_fBlurIntensity;
|
||||
|
||||
// 색깔 추가할 처리
|
||||
Out.vColor = vector(g_vEmissive.rgb, g_fColorOption / 10.f);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
technique11 DefaultTechnique
|
||||
@@ -221,4 +286,14 @@ technique11 DefaultTechnique
|
||||
PixelShader = compile ps_5_0 PS_NON_NORMALMAP();
|
||||
}
|
||||
|
||||
pass Blur
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Blur();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<EnableASAN>true</EnableASAN>
|
||||
<EnableASAN>false</EnableASAN>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
@@ -169,6 +169,7 @@
|
||||
<ClInclude Include="..\Public\Editor_Define.h" />
|
||||
<ClInclude Include="..\Public\Editor_Macro.h" />
|
||||
<ClInclude Include="..\Public\Editor_Struct.h" />
|
||||
<ClInclude Include="..\Public\Hair.h" />
|
||||
<ClInclude Include="..\Public\Level_EffectViewer.h" />
|
||||
<ClInclude Include="..\public\LodingWidget1.h" />
|
||||
<ClInclude Include="..\public\IMGUIUI.h" />
|
||||
@@ -192,7 +193,9 @@
|
||||
<ClInclude Include="..\public\Mission_Icon.h" />
|
||||
<ClInclude Include="..\public\Mission_Key.h" />
|
||||
<ClInclude Include="..\public\Mission_KeyHold.h" />
|
||||
<ClInclude Include="..\Public\Monster.h" />
|
||||
<ClInclude Include="..\public\Mouse_Cursor.h" />
|
||||
<ClInclude Include="..\Public\RootModelPart.h" />
|
||||
<ClInclude Include="Editor.h" />
|
||||
<ClInclude Include="framework.h" />
|
||||
<ClInclude Include="Resource.h" />
|
||||
@@ -215,6 +218,7 @@
|
||||
<ClCompile Include="..\Private\DummyRect.cpp" />
|
||||
<ClCompile Include="..\Private\Dummy_Cube.cpp" />
|
||||
<ClCompile Include="..\Private\Dummy_Goblin.cpp" />
|
||||
<ClCompile Include="..\Private\Hair.cpp" />
|
||||
<ClCompile Include="..\Private\Loader.cpp" />
|
||||
<ClCompile Include="..\Private\Level_EffectViewer.cpp" />
|
||||
<ClCompile Include="..\private\LodingWidget1.cpp" />
|
||||
@@ -239,11 +243,13 @@
|
||||
<ClCompile Include="..\private\Mission_Icon.cpp" />
|
||||
<ClCompile Include="..\private\Mission_Key.cpp" />
|
||||
<ClCompile Include="..\private\Mission_KeyHold.cpp" />
|
||||
<ClCompile Include="..\Private\Monster.cpp" />
|
||||
<ClCompile Include="..\private\Mouse_Cursor.cpp" />
|
||||
<ClCompile Include="..\Private\pch.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\RootModelPart.cpp" />
|
||||
<ClCompile Include="Editor.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -154,6 +154,12 @@
|
||||
<Filter Include="01.Level\60.PhysXLab">
|
||||
<UniqueIdentifier>{943a760b-2861-45b7-87b8-462e1309c172}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\ModelParts\RootModelPart">
|
||||
<UniqueIdentifier>{a9a39942-3c35-4932-b845-e8d1787f3ec3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Monster">
|
||||
<UniqueIdentifier>{a2944f33-1db0-480a-b793-7ec7f81e8116}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\GamePlay_Canvas\Loding_Panel\LoadingWidget_Flame">
|
||||
<UniqueIdentifier>{c347da03-98f1-4095-a4e4-2c840c308916}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -222,11 +228,20 @@
|
||||
<ClInclude Include="..\Public\Body.h">
|
||||
<Filter>02.GameObjects\ModelParts\Body</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Head.h">
|
||||
<Filter>02.GameObjects\ModelParts\Head</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Hair.h">
|
||||
<Filter>02.GameObjects\ModelParts\Hair</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\ModelParts.h">
|
||||
<Filter>02.GameObjects\ModelParts</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Head.h">
|
||||
<Filter>02.GameObjects\ModelParts\Head</Filter>
|
||||
<ClInclude Include="..\Public\RootModelPart.h">
|
||||
<Filter>02.GameObjects\ModelParts\RootModelPart</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Monster.h">
|
||||
<Filter>02.GameObjects\Monster</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Level_EffectViewer.h">
|
||||
<Filter>01.Level\40.EffectViewer</Filter>
|
||||
@@ -355,9 +370,6 @@
|
||||
<ClCompile Include="..\Private\Body.cpp">
|
||||
<Filter>02.GameObjects\ModelParts\Body</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\ModelParts.cpp">
|
||||
<Filter>02.GameObjects\ModelParts</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Head.cpp">
|
||||
<Filter>02.GameObjects\ModelParts\Head</Filter>
|
||||
</ClCompile>
|
||||
@@ -436,6 +448,18 @@
|
||||
<ClCompile Include="..\Private\Level_PhysXLab.cpp">
|
||||
<Filter>01.Level\60.PhysXLab</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Hair.cpp">
|
||||
<Filter>02.GameObjects\ModelParts\Hair</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\ModelParts.cpp">
|
||||
<Filter>02.GameObjects\ModelParts</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\RootModelPart.cpp">
|
||||
<Filter>02.GameObjects\ModelParts\RootModelPart</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Monster.cpp">
|
||||
<Filter>02.GameObjects\Monster</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Editor.rc">
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "Body.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "RootModelPart.h"
|
||||
|
||||
CBody::CBody(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CModelParts(pDevice, pContext)
|
||||
@@ -27,8 +28,9 @@ HRESULT CBody::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components()))
|
||||
return E_FAIL;
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(0);
|
||||
dynamic_cast<CRootModelPart*>(m_pOwner)->Push_ModelParts(this);
|
||||
|
||||
dynamic_cast<CRootModelPart*>(m_pOwner)->Push_MainModel(m_pModelCom);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -39,7 +41,7 @@ void CBody::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CBody::Update(_float fTimeDelta)
|
||||
{
|
||||
m_pModelCom->Play_Animation(fTimeDelta);
|
||||
//m_pModelCom->Play_Animation(fTimeDelta);
|
||||
}
|
||||
|
||||
void CBody::Late_Update(_float fTimeDelta)
|
||||
@@ -85,7 +87,7 @@ HRESULT CBody::Render()
|
||||
HRESULT CBody::Ready_Components()
|
||||
{
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Steve_Model"),
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_HumanBody_Model"),
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom))))
|
||||
return E_FAIL;
|
||||
|
||||
@@ -110,7 +112,7 @@ CBody* CBody::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
CGameObject* CBody::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CBody* pInstance = new CBody(*this);
|
||||
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CBody");
|
||||
@@ -124,6 +126,7 @@ void CBody::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CBody::Describe_Entity()
|
||||
|
||||
@@ -84,8 +84,6 @@ HRESULT CDummy_Goblin::Render()
|
||||
|
||||
HRESULT CDummy_Goblin::Ready_Components()
|
||||
{
|
||||
__super::Ready_Components(nullptr);
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_GoblinBody_Model"),
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom))))
|
||||
|
||||
@@ -83,8 +83,6 @@ HRESULT CDummy_Goblin_Head::Render()
|
||||
|
||||
HRESULT CDummy_Goblin_Head::Ready_Components()
|
||||
{
|
||||
__super::Ready_Components(nullptr);
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_GoblinHead_Model"),
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom))))
|
||||
|
||||
@@ -52,6 +52,9 @@ void CEditEffect::Late_Update(_float fTimeDelta)
|
||||
|
||||
_float4* vPos = (_float4*)(m_pTransformCom->Get_WorldMatrixPtr()->m[3]);
|
||||
|
||||
if(m_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());
|
||||
}
|
||||
|
||||
@@ -130,21 +133,26 @@ void CEditEffect::Describe_Entity()
|
||||
GUI::Checkbox("Dissolve", &m_isDissolve);
|
||||
GUI::Checkbox("Noise", &m_isNoise);
|
||||
GUI::Checkbox("UVMove", &m_isUVMove);
|
||||
GUI::Checkbox("Blur", &m_isBlur);
|
||||
|
||||
|
||||
GUI::ColorEdit4("Color", (_float*)&m_vColor);
|
||||
|
||||
GUI::DragFloat("BlurIntensity", &m_fBlurIntensity , 0.01f , 0.f , 1.f);
|
||||
|
||||
GUI::ColorEdit4("Emissive", (_float*)&m_vEmissive);
|
||||
GUI::InputFloat("ColorTargetOption", &m_fColorOption);
|
||||
|
||||
GUI::DragFloat2("vUVGainAmount", (_float*)&m_vUVGainAmount);
|
||||
GUI::DragFloat2("vUVGainAmount", (_float*)&m_vUVGainAmount , 0.01f);
|
||||
|
||||
|
||||
//UVMove를 각각의 텍스쳐마다 적용할 수 있어야함
|
||||
//노이즈 적용하기
|
||||
//디졸브 적용하기
|
||||
//라이프 타임에 의해서가 아닌 공용시간으로 제어해야함
|
||||
//UV잘라서 적용할 수 있도록
|
||||
//블러 적용
|
||||
//
|
||||
|
||||
//블러 웨이트도 설정할 수 있도록
|
||||
|
||||
|
||||
if (GUI::TreeNode("MODEL"))
|
||||
|
||||
@@ -56,10 +56,14 @@ HRESULT CEffectObject::Render_Blur()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fBlurIntensity", &m_fBlurIntensity, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < m_pInstance_ModelCom->Get_NumMeshes(); i++)
|
||||
{
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_INSTANCE_MODEL::NON_NOMALMAP)))) {
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_INSTANCE_MODEL::BLUR)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
#include "pch.h"
|
||||
#include "Hair.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "RootModelPart.h"
|
||||
|
||||
CHair::CHair(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CModelParts(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CHair::CHair(const CHair& Prototype)
|
||||
: CModelParts(Prototype)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CHair::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CHair::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Components()))
|
||||
return E_FAIL;
|
||||
|
||||
dynamic_cast<CRootModelPart*>(m_pOwner)->Push_ModelParts(this);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CHair::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CHair::Update(_float fTimeDelta)
|
||||
{
|
||||
//m_pModelCom->Play_Animation(fTimeDelta);
|
||||
}
|
||||
|
||||
void CHair::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
_float4 vPos;
|
||||
XMStoreFloat4(&vPos, Get_WorldPostion());
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this, vPos, 20.f);
|
||||
}
|
||||
|
||||
HRESULT CHair::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_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
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_ANIM::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CHair::Ready_Components()
|
||||
{
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_HumanHair_Model"),
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom))))
|
||||
return E_FAIL;
|
||||
|
||||
/*m_pModelCom->Change_AnimationIndex(0, true, 0.4f, true);*/
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CHair* CHair::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CHair* pInstance = new CHair(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CHair");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CHair::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CHair* pInstance = new CHair(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CHair");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CHair::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
}
|
||||
|
||||
void CHair::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "Head.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "RootModelPart.h"
|
||||
|
||||
CHead::CHead(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CModelParts(pDevice, pContext)
|
||||
@@ -27,7 +28,7 @@ HRESULT CHead::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components()))
|
||||
return E_FAIL;
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(0);
|
||||
dynamic_cast<CRootModelPart*>(m_pOwner)->Push_ModelParts(this);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -39,7 +40,7 @@ void CHead::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CHead::Update(_float fTimeDelta)
|
||||
{
|
||||
m_pModelCom->Play_Animation(fTimeDelta);
|
||||
//m_pModelCom->Play_Animation(fTimeDelta);
|
||||
}
|
||||
|
||||
void CHead::Late_Update(_float fTimeDelta)
|
||||
@@ -85,7 +86,7 @@ HRESULT CHead::Render()
|
||||
HRESULT CHead::Ready_Components()
|
||||
{
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_GoblinBody_Model"),
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_HumanHead_Model"),
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
@@ -2,11 +2,15 @@
|
||||
#include "Level_ObjectViewer.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Level_Loading.h"
|
||||
#include "RootModelPart.h"
|
||||
#include "Body.h"
|
||||
#include "Head.h"
|
||||
#include "Hair.h"
|
||||
#include "Dummy_Cube.h"
|
||||
#include "DebugCamera.h"
|
||||
#include "Layer.h"
|
||||
#include "GameObject.h"
|
||||
#include "Monster.h"
|
||||
|
||||
CLevel_ObjectViewer::CLevel_ObjectViewer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
||||
@@ -39,6 +43,10 @@ void CLevel_ObjectViewer::Update(_float fTimeDelta)
|
||||
Add_Object();
|
||||
|
||||
Show_ModelFilePath();
|
||||
|
||||
Show_AnimList();
|
||||
|
||||
Object_Setting();
|
||||
}
|
||||
|
||||
HRESULT CLevel_ObjectViewer::Render()
|
||||
@@ -54,60 +62,171 @@ void CLevel_ObjectViewer::Add_Object()
|
||||
|
||||
if (GUI::BeginTabBar("ObjectTabs"))
|
||||
{
|
||||
if (ImGui::BeginTabItem("Creatures"))
|
||||
{
|
||||
GUI::EndTabItem();
|
||||
}
|
||||
if (ImGui::BeginTabItem("Human"))
|
||||
{
|
||||
if (GUI::CollapsingHeader("Body"))
|
||||
{
|
||||
if (GUI::Button("Add"))
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBody>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, TEXT("Layer_Body"))))
|
||||
return;
|
||||
CBody* pBody = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_Body"))->Get_Object<CBody>();
|
||||
}
|
||||
if (GUI::Button("Delete"))
|
||||
{
|
||||
m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_Body"))->Clear_Layer();
|
||||
}
|
||||
}
|
||||
if (GUI::CollapsingHeader("Head"))
|
||||
{
|
||||
if (GUI::Button("Add"))
|
||||
{
|
||||
CGameObject* pOwner = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_Body"))->Get_Object<CBody>();
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CHead>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, TEXT("Layer_Head"), nullptr, pOwner)))
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (GUI::CollapsingHeader("Hair"))
|
||||
{
|
||||
}
|
||||
GUI::EndTabItem();
|
||||
}
|
||||
Add_Creature();
|
||||
|
||||
GUI::EndTabBar();
|
||||
Add_Human();
|
||||
|
||||
}
|
||||
GUI::EndTabBar();
|
||||
GUI::End();
|
||||
|
||||
}
|
||||
|
||||
GUI::End();
|
||||
void CLevel_ObjectViewer::Add_Creature()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Creatures"))
|
||||
{
|
||||
if (GUI::Button("Add Monster"))
|
||||
{
|
||||
CGameObject* pTempObject = { nullptr };
|
||||
CMonster::OBJECT_DESC Desc = {};
|
||||
Desc.pModelPrototypeTag = TEXT("Prototype_Component_Troll_Model");
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMonster>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, TEXT("Layer_Monster"), &Desc, nullptr, &pTempObject)))
|
||||
return;
|
||||
m_Objects.push_back(pTempObject);
|
||||
}
|
||||
|
||||
GUI::EndTabItem();
|
||||
}
|
||||
}
|
||||
|
||||
void CLevel_ObjectViewer::Add_Human()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Human"))
|
||||
{
|
||||
if (GUI::CollapsingHeader("Body"))
|
||||
{
|
||||
if (GUI::Button("Add Body"))
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRootModelPart>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, TEXT("Layer_Root"), nullptr, nullptr, &m_HumanRoot)))
|
||||
return;
|
||||
|
||||
CGameObject* pTempObject = { nullptr };
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBody>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, TEXT("Layer_Body"), nullptr, m_HumanRoot, &pTempObject)))
|
||||
return;
|
||||
m_Objects.push_back(pTempObject);
|
||||
}
|
||||
}
|
||||
_bool bDisabled = (m_HumanRoot == nullptr);
|
||||
if (bDisabled) ImGui::BeginDisabled();
|
||||
if (GUI::CollapsingHeader("Head"))
|
||||
{
|
||||
if (GUI::Button("Add Head"))
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CHead>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, TEXT("Layer_Head"), nullptr, m_HumanRoot)))
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (GUI::CollapsingHeader("Hair"))
|
||||
{
|
||||
if (GUI::Button("Add Hair"))
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CHair>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, TEXT("Layer_Hair"), nullptr, m_HumanRoot)))
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (bDisabled) ImGui::EndDisabled();
|
||||
GUI::EndTabItem();
|
||||
}
|
||||
}
|
||||
|
||||
void CLevel_ObjectViewer::Show_ModelFilePath()
|
||||
{
|
||||
GUI::Begin("Model_List");
|
||||
for (_uint i = 0; i < m_pGameInstance->ModelFilePathCount(); i++)
|
||||
/*GUI::Begin("Model_List");
|
||||
if(GUI::BeginTabBar("Model_List"))
|
||||
{
|
||||
/*GUI::Text(m_pGameInstance->Load_BinaryModelFilePath(i));*/
|
||||
GUI::SameLine();
|
||||
|
||||
std::string label = "Binary##" + std::to_string(i);
|
||||
if (GUI::Button(label.c_str()))
|
||||
if (GUI::BeginTabItem("Assimp_Model"))
|
||||
{
|
||||
m_pGameInstance->SaveAssimpModel(m_pGameInstance->Load_ModelFilePath(i));
|
||||
if (m_pGameInstance->ModelFilePathCount() > 0)
|
||||
{
|
||||
for (_uint i = 0; i < m_pGameInstance->ModelFilePathCount(); i++)
|
||||
{
|
||||
GUI::Text(m_pGameInstance->Load_ModelFilePath(i));
|
||||
GUI::SameLine();
|
||||
|
||||
std::string label = "Binary##" + std::to_string(i);
|
||||
if (GUI::Button(label.c_str()))
|
||||
{
|
||||
m_pGameInstance->SaveAssimpModel(m_pGameInstance->Load_ModelFilePath(i));
|
||||
}
|
||||
}
|
||||
GUI::EndTabItem();
|
||||
}
|
||||
}
|
||||
|
||||
if (GUI::BeginTabItem("Binary_Model"))
|
||||
{
|
||||
if (m_pGameInstance->BinaryModelFilePathCount() > 0)
|
||||
{
|
||||
for (_uint i = 0; i < m_pGameInstance->BinaryModelFilePathCount(); i++)
|
||||
{
|
||||
GUI::Text(m_pGameInstance->Load_BinaryModelFilePath(i));
|
||||
}
|
||||
}
|
||||
GUI::EndTabItem();
|
||||
}
|
||||
}
|
||||
GUI::EndTabBar();
|
||||
GUI::End();*/
|
||||
}
|
||||
|
||||
void CLevel_ObjectViewer::Show_AnimList()
|
||||
{
|
||||
GUI::Begin("Anim_List");
|
||||
if (!m_Objects.empty())
|
||||
{
|
||||
if (!m_Objects[m_iObjectIndex]->isDead())
|
||||
{
|
||||
CModel* pModel = m_Objects[m_iObjectIndex]->Get_Component<CModel>();
|
||||
for (_uint i = 0; i < pModel->Get_AnimSize(); i++)
|
||||
{
|
||||
if (GUI::Button(pModel->Get_AnimList(i)))
|
||||
{
|
||||
pModel->Set_AnimationIndex(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
void CLevel_ObjectViewer::Show_ObjectList()
|
||||
{
|
||||
for (size_t i = 0; i < m_Objects.size(); i++)
|
||||
{
|
||||
if (GUI::Selectable(typeid(*m_Objects[i]).name()))
|
||||
{
|
||||
m_iObjectIndex = (_int)i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CLevel_ObjectViewer::Object_Setting()
|
||||
{
|
||||
GUI::Begin("Object_Info");
|
||||
if (!m_Objects.empty())
|
||||
{
|
||||
Show_ObjectList();
|
||||
CModel* pModel = m_Objects[m_iObjectIndex]->Get_Component<CModel>();
|
||||
|
||||
_float AnimTrack = pModel->Get_CurrentTrackPosition();
|
||||
GUI::DragFloat("AnimTrack", &AnimTrack);
|
||||
|
||||
_float AnimSpeed = pModel->Get_AnimSpeed();
|
||||
GUI::DragFloat("AnimSpeed", &AnimSpeed, 0.1f);
|
||||
pModel->Set_AnimSpeed(AnimSpeed);
|
||||
|
||||
_bool bPlayAnim = pModel->Get_PlayAnim();
|
||||
if (GUI::Checkbox("Play Anim", &bPlayAnim))
|
||||
{
|
||||
pModel->Set_PlayAnim(bPlayAnim);
|
||||
}
|
||||
if (GUI::Button("Delete"))
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
@@ -117,7 +236,7 @@ HRESULT CLevel_ObjectViewer::Ready_Layer_Camera(const _wstring& strLayerTag)
|
||||
CameraDesc.fFovy = XMConvertToRadians(60.0f);
|
||||
CameraDesc.fNear = 0.1f;
|
||||
CameraDesc.fFar = 500.f;
|
||||
CameraDesc.vEye = _float3(0.f, 10.f, -10.f);
|
||||
CameraDesc.vEye = _float3(0.f, 50.f, -10.f);
|
||||
CameraDesc.vAt = _float3(0.f, 0.f, 0.f);
|
||||
CameraDesc.fSpeedPerSec = 5.f;
|
||||
CameraDesc.fRotationPerSec = XMConvertToRadians(90.0f);
|
||||
@@ -153,8 +272,8 @@ HRESULT CLevel_ObjectViewer::Ready_Layer_UI(const _wstring& strLayerTag)
|
||||
|
||||
HRESULT CLevel_ObjectViewer::Ready_Layer_Dummy(const _wstring& strLayerTag)
|
||||
{
|
||||
/*if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummy_Cube>(g_iStaticLevel, NEXT_LEVEL, LAYER_CUBE)))
|
||||
return E_FAIL;*/
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummy_Cube>(g_iStaticLevel, NEXT_LEVEL, LAYER_CUBE)))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -4,11 +4,21 @@
|
||||
#include "GameInstance.h"
|
||||
#include "DummyRect.h"
|
||||
#include "MainApp.h"
|
||||
|
||||
#include "Dummy_Cube.h"
|
||||
|
||||
#pragma region OBJECT_HEADER
|
||||
|
||||
#include "RootModelPart.h"
|
||||
#include "Head.h"
|
||||
#include "Body.h"
|
||||
#include "Hair.h"
|
||||
#include "Dummy_Goblin.h"
|
||||
#include "Dummy_Goblin.h"
|
||||
#include "Monster.h"
|
||||
#include <filesystem>
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region UI
|
||||
|
||||
#include "GamePlay_Canvas.h"
|
||||
@@ -20,9 +30,7 @@
|
||||
#include "Mission_Key.h"
|
||||
#include "Mission_KeyHold.h"
|
||||
#include "Mouse_Cursor.h"
|
||||
#include "Head.h"
|
||||
#include "Body.h"
|
||||
#include "Dummy_Goblin.h"
|
||||
|
||||
#include "Dummy_Cube.h"
|
||||
#include "LodingWidget1.h"
|
||||
#include "MiniMap_TrimBorder.h"
|
||||
@@ -514,44 +522,49 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
m_strMessage = TEXT("Model Loading..");
|
||||
|
||||
|
||||
/*if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinBody_Model"),
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinBody_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, "../Bin/Resources/Models/Goblin/GoblinBody.fbx", MODEL::ANIM, XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity(), 0))))
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_HumanBody_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Body/Body", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_HumanHead_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Head/Head", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_HumanHair_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Hair/Hair", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinHead_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, "../Bin/Resources/Models/Goblin/GoblinHead.fbx", MODEL::ANIM, XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity(), 0))))
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Goblin/GoblinHead", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Desc_Box"),
|
||||
CModel::Create(m_pDevice, m_pContext, "../Bin/Resources/Models/Box/Box.fbx", MODEL::NONANIM, XMMatrixIdentity(), 0))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Steve_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, "../Bin/Resources/Models/Steve/Steve.fbx", MODEL::ANIM, XMMatrixIdentity(), 0))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_TombProtector_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, "../Bin/Resources/Models/TombProtector/TombProtector.fbx", MODEL::ANIM,XMMatrixIdentity(), 0))))
|
||||
return E_FAIL;*/
|
||||
|
||||
m_strMessage = TEXT("Shader Loading..");
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinBody_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/SaveFile/GoblinBody", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Goblin/GoblinBody", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Steve_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/SaveFile/Steve",XMMatrixScaling(0.01f,0.01f,0.01f)* XMMatrixIdentity()))))
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Steve/Steve",XMMatrixScaling(0.01f,0.01f,0.01f)* XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_TombProtector_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/SaveFile/TombProtector", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/TombProtector/TombProtector", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Troll_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Troll/Troll", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
m_strMessage = TEXT("Prototype Loading..");
|
||||
|
||||
/* For.Prototype_GameObject_RootModelPart */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CRootModelPart>(g_iStaticLevel, CRootModelPart::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Body */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBody>(g_iStaticLevel, CBody::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
@@ -560,6 +573,14 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CHead>(g_iStaticLevel, CHead::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Hair */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CHair>(g_iStaticLevel, CHair::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Monster */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMonster>(g_iStaticLevel, CMonster::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Dummy_Cube */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDummy_Cube>(g_iStaticLevel, CDummy_Cube::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
#include "pch.h"
|
||||
#include "Monster.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "DebugCamera.h"
|
||||
|
||||
CMonster::CMonster(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CMonster::CMonster(const CMonster& Prototype)
|
||||
: CGameObject(Prototype)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CMonster::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMonster::Initialize(void* pArg)
|
||||
{
|
||||
OBJECT_DESC* pDesc = static_cast<OBJECT_DESC*>(pArg);
|
||||
|
||||
m_strModelPrototypeTag = pDesc->pModelPrototypeTag;
|
||||
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Ready_Components()))
|
||||
return E_FAIL;
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(0);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMonster::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CMonster::Update(_float fTimeDelta)
|
||||
{
|
||||
m_pModelCom->Play_Animation(fTimeDelta);
|
||||
}
|
||||
|
||||
void CMonster::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
_float4 vPos;
|
||||
XMStoreFloat4(&vPos, Get_WorldPostion());
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this, vPos, 20.f);
|
||||
}
|
||||
|
||||
HRESULT CMonster::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_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
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_ANIM::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMonster::Ready_Components()
|
||||
{
|
||||
__super::Ready_Components(nullptr);
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag,
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom))))
|
||||
return E_FAIL;
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_ANIMMESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMonster::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;
|
||||
}
|
||||
|
||||
CMonster* CMonster::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CMonster* pInstance = new CMonster(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CMonster");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CMonster::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CMonster* pInstance = new CMonster(*this);
|
||||
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CMonster");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CMonster::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
Safe_Release(m_pShaderCom);
|
||||
Safe_Release(m_pModelCom);
|
||||
}
|
||||
|
||||
void CMonster::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
#include "pch.h"
|
||||
#include "RootModelPart.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "DebugCamera.h"
|
||||
#include "ModelParts.h"
|
||||
|
||||
CRootModelPart::CRootModelPart(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CRootModelPart::CRootModelPart(const CRootModelPart& Prototype)
|
||||
: CGameObject(Prototype)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CRootModelPart::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRootModelPart::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRootModelPart::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CRootModelPart::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!m_pMainModel)
|
||||
return;
|
||||
|
||||
Update_Anim(fTimeDelta);
|
||||
}
|
||||
|
||||
void CRootModelPart::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CRootModelPart::Render()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRootModelPart::Update_Anim(_float fTimeDelta)
|
||||
{
|
||||
for (size_t i = 0; i < m_ModelParts.size(); i++)
|
||||
{
|
||||
m_ModelParts[i]->Get_Component<CModel>()->Set_PlayAnim(m_pMainModel->Get_PlayAnim());
|
||||
m_ModelParts[i]->Get_Component<CModel>()->Set_AnimationIndex(m_pMainModel->Get_AnimIndex());
|
||||
m_ModelParts[i]->Get_Component<CModel>()->Play_Animation(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
void CRootModelPart::Push_ModelParts(CModelParts* ModelParts)
|
||||
{
|
||||
m_ModelParts.push_back(ModelParts);
|
||||
SAFE_ADDREF(ModelParts);
|
||||
for (auto& ModelParts : m_ModelParts)
|
||||
{
|
||||
ModelParts->Get_Component<CModel>()->Set_AnimationIndex(0);
|
||||
ModelParts->Get_Component<CModel>()->Reset_CurrentTrackPosition();
|
||||
}
|
||||
}
|
||||
|
||||
void CRootModelPart::Push_MainModel(CModel* MainModel)
|
||||
{
|
||||
m_pMainModel = MainModel;
|
||||
SAFE_ADDREF(MainModel);
|
||||
}
|
||||
|
||||
HRESULT CRootModelPart::Ready_Components()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRootModelPart::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CRootModelPart* CRootModelPart::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CRootModelPart* pInstance = new CRootModelPart(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CRootModelPart");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CRootModelPart::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CRootModelPart* pInstance = new CRootModelPart(*this);
|
||||
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CRootModelPart");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CRootModelPart::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
for (auto& ModelParts : m_ModelParts)
|
||||
{
|
||||
SAFE_RELEASE(ModelParts);
|
||||
}
|
||||
m_ModelParts.clear();
|
||||
SAFE_RELEASE(m_pMainModel);
|
||||
}
|
||||
|
||||
void CRootModelPart::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -20,7 +20,7 @@ namespace Editor
|
||||
enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, END };
|
||||
enum class SHADER_PASS_PARTICLE { EXPLOSION, END };
|
||||
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR ,END };
|
||||
enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CURSOR, LODING, HOLD, END };
|
||||
}
|
||||
|
||||
|
||||
@@ -49,9 +49,11 @@ class CEffectObject abstract : public CGameObject
|
||||
_bool m_isDissolve = {};
|
||||
_bool m_isNoise = {};
|
||||
_bool m_isUVMove = {};
|
||||
_bool m_isBlur = {};
|
||||
|
||||
_float4 m_vEmissive = { 0.f ,0.f ,0.f ,0.f};
|
||||
_float m_fColorOption = {};
|
||||
_float m_fBlurIntensity = {};
|
||||
|
||||
RENDER m_eRenderOrder = {RENDER::NONLIGHT};
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "ModelParts.h"
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CHair final : public CModelParts
|
||||
{
|
||||
private:
|
||||
CHair(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CHair(const CHair& Prototype);
|
||||
virtual ~CHair() = default;
|
||||
|
||||
public:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
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:
|
||||
HRESULT Ready_Components();
|
||||
|
||||
public:
|
||||
static CHair* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -3,6 +3,10 @@
|
||||
#include "Editor_Define.h"
|
||||
#include "Level.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CGameObject;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CLevel_ObjectViewer final : public CLevel
|
||||
@@ -14,9 +18,6 @@ class CLevel_ObjectViewer final : public CLevel
|
||||
public:
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
void Add_Object();
|
||||
void Show_ModelFilePath();
|
||||
|
||||
private:
|
||||
/* 이 레벨에서 쓰기위한 객체들을 생성한다. */
|
||||
virtual HRESULT Initialize() override;
|
||||
@@ -25,6 +26,18 @@ class CLevel_ObjectViewer final : public CLevel
|
||||
HRESULT Ready_Layer_UI(const _wstring& strLayerTag);
|
||||
HRESULT Ready_Layer_Dummy(const _wstring& strLayerTag);
|
||||
|
||||
void Add_Object();
|
||||
void Add_Creature();
|
||||
void Add_Human();
|
||||
void Show_ModelFilePath();
|
||||
void Show_AnimList();
|
||||
void Show_ObjectList();
|
||||
void Object_Setting();
|
||||
private:
|
||||
vector<CGameObject*> m_Objects;
|
||||
CGameObject* m_HumanRoot = { nullptr };
|
||||
_int m_iObjectIndex = { 0 };
|
||||
|
||||
|
||||
public:
|
||||
static CLevel_ObjectViewer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID);
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CShader;
|
||||
class CModel;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CMonster final : public CGameObject
|
||||
{
|
||||
public:
|
||||
typedef struct tagObjectDesc
|
||||
{
|
||||
const _tchar* pModelPrototypeTag;
|
||||
}OBJECT_DESC;
|
||||
private:
|
||||
CMonster(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CMonster(const CMonster& Prototype);
|
||||
virtual ~CMonster() = default;
|
||||
|
||||
public:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
public:
|
||||
_wstring& Get_PrototypeTag() { return m_strModelPrototypeTag; }
|
||||
|
||||
private:
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
_wstring m_strModelPrototypeTag;
|
||||
_bool m_bRimLight = { true };
|
||||
_float m_fRimLightPower = { 3.2f };
|
||||
_float m_fRimLightStrength = { 3.04f };
|
||||
_float3 m_vRimLightColor = { 69.f / 255.f, 5.f / 255.f, 10.f / 255.f };
|
||||
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Bind_ShaderResources();
|
||||
|
||||
public:
|
||||
static CMonster* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "GameObject.h"
|
||||
NS_BEGIN(Engine)
|
||||
class CModel;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CRootModelPart final : public CGameObject
|
||||
{
|
||||
private:
|
||||
CRootModelPart(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CRootModelPart(const CRootModelPart& Prototype);
|
||||
virtual ~CRootModelPart() = default;
|
||||
|
||||
public:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
void Update_Anim(_float fTimeDelta);
|
||||
void Push_ModelParts(class CModelParts* ModelParts);
|
||||
void Push_MainModel(CModel* MainModel);
|
||||
void Set_AnimIndex(_uint iIndex) { m_iAnimIndex = iIndex; }
|
||||
|
||||
private:
|
||||
CModel* m_pMainModel = { nullptr };
|
||||
vector<class CModelParts*> m_ModelParts = {};
|
||||
_uint m_iAnimIndex = {0};
|
||||
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Bind_ShaderResources();
|
||||
|
||||
public:
|
||||
static CRootModelPart* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
virtual void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -29,7 +29,7 @@ Texture2D g_ShadowTexture;
|
||||
Texture2D g_PreShadowTexture;
|
||||
Texture2D g_BlurTexture;
|
||||
Texture2D g_BlurXTexture;
|
||||
Texture2D g_ColorTexture;
|
||||
|
||||
|
||||
|
||||
vector g_vLightDiffuse;
|
||||
@@ -72,6 +72,7 @@ struct PS_OUT_BACKBUFFER
|
||||
{
|
||||
float4 vBackBuffer : SV_TARGET0;
|
||||
};
|
||||
|
||||
PS_OUT_BACKBUFFER PS_MAIN_DEBUG(PS_IN In)
|
||||
{
|
||||
PS_OUT_BACKBUFFER Out;
|
||||
@@ -307,37 +308,6 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
||||
|
||||
Out.vBackBuffer += vColor;
|
||||
|
||||
/* Color_Target */
|
||||
|
||||
vector ColorTexture = g_ColorTexture.Sample(DefaultSampler, vTexcoord);
|
||||
|
||||
int iOption = ColorTexture.a * 10;
|
||||
|
||||
if (iOption == 0) // 0이면 수행하지 않음
|
||||
return Out;
|
||||
|
||||
switch (iOption)
|
||||
{
|
||||
case 1:
|
||||
Out.vBackBuffer.rgb += ColorTexture.rgb;
|
||||
break;
|
||||
case 2:
|
||||
Out.vBackBuffer.rgb *= ColorTexture.rgb;
|
||||
break;
|
||||
case 3:
|
||||
Out.vBackBuffer.rgb -= ColorTexture.rgb;
|
||||
break;
|
||||
case 4:
|
||||
Out.vBackBuffer.rgb /= ColorTexture.rgb;
|
||||
break;
|
||||
case 5:
|
||||
Out.vBackBuffer.rgb = ColorTexture.rgb;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
|
||||
Texture2D g_ColorTexture;
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VS_OUT
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
|
||||
matrix matWV, matWVP;
|
||||
|
||||
matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
Out.vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_IN
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct PS_OUT_BACKBUFFER
|
||||
{
|
||||
float4 vBackBuffer : SV_TARGET0;
|
||||
};
|
||||
|
||||
PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
|
||||
{
|
||||
PS_OUT_BACKBUFFER Out;
|
||||
|
||||
Out.vBackBuffer = float4(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
vector ColorTexture = g_ColorTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (0.f == ColorTexture.a)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
|
||||
int iOption = ColorTexture.a * 10;
|
||||
|
||||
|
||||
switch (iOption)
|
||||
{
|
||||
case 1:
|
||||
Out.vBackBuffer.rgb += ColorTexture.rgb;
|
||||
break;
|
||||
case 2:
|
||||
Out.vBackBuffer.rgb *= ColorTexture.rgb;
|
||||
break;
|
||||
case 3:
|
||||
Out.vBackBuffer.rgb -= ColorTexture.rgb;
|
||||
break;
|
||||
case 4:
|
||||
Out.vBackBuffer.rgb /= ColorTexture.rgb;
|
||||
break;
|
||||
case 5:
|
||||
Out.vBackBuffer.rgb = ColorTexture.rgb;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 DefaultTechnique
|
||||
{
|
||||
pass Default
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_OUT_LASTCOLOR();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -44,7 +44,7 @@
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<EnableASAN>true</EnableASAN>
|
||||
<EnableASAN>false</EnableASAN>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
@@ -123,8 +123,8 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<AdditionalLibraryDirectories>../ThirdPartyLib/fMod/;../ThirdPartyLib/DirectXTK/;../ThirdPartyLib/FX11/;../ThirdPartyLib/Assimp/;../ThirdPartyLib/PhysX/$(Configuration)/;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>d3d11.lib;fmod_vc.lib;dinput8.lib;LowLevel_static_64.lib;LowLevelAABB_static_64.lib;LowLevelDynamics_static_64.lib;PhysX_64.lib;PhysXCommon_64.lib;PhysXCooking_64.lib;PhysXExtensions_static_64.lib;PhysXFoundation_64.lib;PhysXPvdSDK_static_64.lib;PhysXTask_static_64.lib;SceneQuery_static_64.lib;SimulationController_static_64.lib;PhysXCharacterKinematic_static_64.lib;DirectXTKd.lib;Effects11d.lib;assimp-vc145-mtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>../ThirdPartyLib/fMod/;../ThirdPartyLib/DirectXTK/;../ThirdPartyLib/FX11/;../ThirdPartyLib/Assimp/;../ThirdPartyLib/PhysX/PhysX_$(Configuration)/;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>d3d11.lib;fmod_vc.lib;dinput8.lib;LowLevel_static_64.lib;LowLevelAABB_static_64.lib;LowLevelDynamics_static_64.lib;PhysX_64.lib;PhysXCommon_64.lib;PhysXCooking_64.lib;PhysXExtensions_static_64.lib;PhysXFoundation_64.lib;PhysXPvdSDK_static_64.lib;PhysXTask_static_64.lib;SceneQuery_static_64.lib;SimulationController_static_64.lib;PhysXCharacterKinematic_static_64.lib;DirectXTKd.lib;Effects11d.lib;assimp-vc145-mtd.lib;%(AdditionalDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@@ -146,8 +146,8 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<AdditionalLibraryDirectories>../ThirdPartyLib/fMod/;../ThirdPartyLib/DirectXTK/;../ThirdPartyLib/FX11/;../ThirdPartyLib/Assimp/;../ThirdPartyLib/PhysX/$(Configuration)/;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>d3d11.lib;fmod_vc.lib;dinput8.lib;LowLevel_static_64.lib;LowLevelAABB_static_64.lib;LowLevelDynamics_static_64.lib;PhysX_64.lib;PhysXCommon_64.lib;PhysXCooking_64.lib;PhysXExtensions_static_64.lib;PhysXFoundation_64.lib;PhysXPvdSDK_static_64.lib;PhysXTask_static_64.lib;SceneQuery_static_64.lib;SimulationController_static_64.lib;PhysXCharacterKinematic_static_64.lib;DirectXTK.lib;Effects11.lib;assimp-vc145-mt.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>../ThirdPartyLib/fMod/;../ThirdPartyLib/DirectXTK/;../ThirdPartyLib/FX11/;../ThirdPartyLib/Assimp/;../ThirdPartyLib/PhysX/PhysX_$(Configuration)/;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>d3d11.lib;fmod_vc.lib;dinput8.lib;LowLevel_static_64.lib;LowLevelAABB_static_64.lib;LowLevelDynamics_static_64.lib;PhysX_64.lib;PhysXCommon_64.lib;PhysXCooking_64.lib;PhysXExtensions_static_64.lib;PhysXFoundation_64.lib;PhysXPvdSDK_static_64.lib;PhysXTask_static_64.lib;SceneQuery_static_64.lib;SimulationController_static_64.lib;PhysXCharacterKinematic_static_64.lib;DirectXTK.lib;Effects11.lib;assimp-vc145-mt.lib;%(AdditionalDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
@@ -513,6 +513,12 @@
|
||||
<None Include="..\Public\fMod\fmod_errors.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_LastColor.hlsl">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Effect</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Effect</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">5.0</ShaderModel>
|
||||
</FxCompile>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_Cell.hlsl">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Effect</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">5.0</ShaderModel>
|
||||
|
||||
@@ -1107,5 +1107,8 @@
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_Particle_Compute.hlsl">
|
||||
<Filter>99.Define\01.SHADER</Filter>
|
||||
</FxCompile>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_LastColor.hlsl">
|
||||
<Filter>99.Define\01.SHADER</Filter>
|
||||
</FxCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -19,6 +19,7 @@ CAnimation::CAnimation(const CAnimation& rhs)
|
||||
, m_strName{ rhs.m_strName }
|
||||
, m_fTickPerSecond{ rhs.m_fTickPerSecond }
|
||||
, m_pSaveAnim{ rhs.m_pSaveAnim }
|
||||
, m_fAnimSpeed{rhs.m_fAnimSpeed }
|
||||
{
|
||||
memcpy_s(m_TickPerSeconds, sizeof(_float) * 2, rhs.m_TickPerSeconds, sizeof(_float) * 2);
|
||||
|
||||
@@ -31,7 +32,7 @@ CAnimation::CAnimation(const CAnimation& rhs)
|
||||
_bool CAnimation::Update_TransformationMatrices(const vector<class CBone*>& Bones, _bool bIsLoop, _float fTimeDelta)
|
||||
{
|
||||
//m_fCurrentTrackPosition += m_TickPerSeconds[m_bPause] * fTimeDelta;
|
||||
m_fCurrentTrackPosition += m_fTickPerSecond * fTimeDelta;
|
||||
m_fCurrentTrackPosition += m_fTickPerSecond * fTimeDelta * m_fAnimSpeed;
|
||||
if (m_fCurrentTrackPosition >= m_fDuration) {
|
||||
m_fCurrentTrackPosition = 0.f; // ·çÇÁ
|
||||
if (false == bIsLoop) {
|
||||
@@ -100,6 +101,7 @@ vector<_int>* CAnimation::Capture_Bones()
|
||||
HRESULT CAnimation::Initialize(const vector<CBone*>& Bones, const aiAnimation* pAIAnimation)
|
||||
{
|
||||
m_strName = pAIAnimation->mName.data;
|
||||
strcpy_s(m_szName, pAIAnimation->mName.data);
|
||||
size_t pos = m_strName.find_last_of('|');
|
||||
if (0 > pos) {
|
||||
pos = 0;
|
||||
@@ -108,6 +110,7 @@ HRESULT CAnimation::Initialize(const vector<CBone*>& Bones, const aiAnimation* p
|
||||
pos++;
|
||||
}
|
||||
m_strName = m_strName.substr(pos);
|
||||
|
||||
m_fDuration = (_float)pAIAnimation->mDuration;
|
||||
m_TickPerSeconds[0] = (_float)pAIAnimation->mTicksPerSecond;
|
||||
m_iNumChannels = pAIAnimation->mNumChannels;
|
||||
|
||||
@@ -175,6 +175,11 @@ const _char* CGameInstance::Load_BinaryModelFilePath(_uint iIndex)
|
||||
return iter->first;
|
||||
}
|
||||
|
||||
size_t CGameInstance::BinaryModelFilePathCount()
|
||||
{
|
||||
return m_sModelMap.size();
|
||||
}
|
||||
|
||||
|
||||
size_t CGameInstance::ModelFilePathCount()
|
||||
{
|
||||
|
||||
@@ -142,6 +142,8 @@ HRESULT CModel::Bind_BoneMatrices(_uint iMeshIndex, CShader* pShader, const _cha
|
||||
|
||||
_bool CModel::Play_Animation(_float fTimeDelta)
|
||||
{
|
||||
if (!m_bPlayAnim)
|
||||
return false;
|
||||
if (-1 == m_iCurrentAnimIndex // 정지 혹은 시작을 안시켜준 애님
|
||||
|| m_iCurrentAnimIndex >= (_int)m_iNumAnimations) // 애님 인덱스 초과됨
|
||||
{
|
||||
@@ -276,6 +278,31 @@ void CModel::Get_BoneMatrices(_float4x4* pOut)
|
||||
}
|
||||
}
|
||||
|
||||
void CModel::Reset_CurrentTrackPosition()
|
||||
{
|
||||
m_Animations[m_iCurrentAnimIndex]->Reset_CurrentTrackPosition();
|
||||
}
|
||||
|
||||
const _char* CModel::Get_AnimList(_uint iIndex)
|
||||
{
|
||||
return m_Animations[iIndex]->Get_SZName();
|
||||
}
|
||||
|
||||
_float CModel::Get_CurrentTrackPosition()
|
||||
{
|
||||
return m_Animations[m_iCurrentAnimIndex]->Get_CurrentTrackPosition();
|
||||
}
|
||||
|
||||
_float CModel::Get_AnimSpeed()
|
||||
{
|
||||
return m_Animations[m_iCurrentAnimIndex]->Get_AnimSpeed();
|
||||
}
|
||||
|
||||
void CModel::Set_AnimSpeed(_float fSpeed)
|
||||
{
|
||||
m_Animations[m_iCurrentAnimIndex]->Set_AnimSpeed(fSpeed);
|
||||
}
|
||||
|
||||
HRESULT CModel::Render(_uint iMeshIndex)
|
||||
{
|
||||
m_Meshes[iMeshIndex]->Bind_Resources();
|
||||
@@ -439,11 +466,11 @@ bool CModel::SaveAssimpModel(const _char* filename)
|
||||
if (!m_pAIScene) return false;
|
||||
|
||||
_char szModel[MAX_PATH] = {};
|
||||
_char szName[MAX_PATH] = {};
|
||||
_splitpath_s(filename, nullptr, 0, nullptr, 0, szName, MAX_PATH, nullptr, 0);
|
||||
strcat_s(szModel, sizeof(_char) * MAX_PATH, szName);
|
||||
_char szExt[MAX_PATH] = {};
|
||||
_splitpath_s(filename, nullptr, 0, nullptr, 0, nullptr, 0, szExt, MAX_PATH);
|
||||
strcat_s(szModel, sizeof(_char) * MAX_PATH, szExt);
|
||||
|
||||
_string savePath = string("../Bin/Resources/SaveFile/") + szModel;
|
||||
_string savePath = filename;
|
||||
|
||||
SaveModel modelData;
|
||||
modelData.MeshCount = m_pAIScene->mNumMeshes;
|
||||
@@ -690,8 +717,6 @@ bool CModel::SaveAssimpModel(const _char* filename)
|
||||
|
||||
fclose(fp);
|
||||
|
||||
MSG_BOX("Save Succeed");
|
||||
|
||||
return true;
|
||||
}
|
||||
_int CModel::SaveNodeRecursive(const aiNode* pAINode, std::vector<SaveNode>& outNodes, _int parentIndex)
|
||||
@@ -802,7 +827,15 @@ HRESULT CModel::Initialize_Prototype()
|
||||
|
||||
HRESULT CModel::Initialize_Prototype(MODEL eType, const _char* pModelFilePath, _fmatrix PreTransformMatrix)
|
||||
{
|
||||
LoadData(pModelFilePath);
|
||||
if (!LoadData(pModelFilePath))
|
||||
{
|
||||
_char Temp[256];
|
||||
strcpy_s(Temp, pModelFilePath);
|
||||
strcat_s(Temp,".fbx");
|
||||
Assimp_Model_Load(Temp, eType, PreTransformMatrix, 0);
|
||||
SaveAssimpModel(pModelFilePath);
|
||||
return S_OK;
|
||||
}
|
||||
m_pSaveModel = m_pGameInstance->Load_SaveModel(pModelFilePath);
|
||||
|
||||
m_eType = eType;
|
||||
@@ -932,46 +965,6 @@ bool CModel::LoadData(const _char* filename)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*_uint diffuseCount = 0;
|
||||
fread(&diffuseCount, sizeof(_uint), 1, fp);
|
||||
mat.DiffusePath.resize(diffuseCount);
|
||||
for (_uint j = 0; j < diffuseCount; j++)
|
||||
{
|
||||
_uint len = 0;
|
||||
fread(&len, sizeof(_uint), 1, fp);
|
||||
std::string temp;
|
||||
temp.resize(len);
|
||||
fread(&temp[0], sizeof(char), len, fp);
|
||||
mat.DiffusePath[j] = temp;
|
||||
}
|
||||
|
||||
_uint normalCount = 0;
|
||||
fread(&normalCount, sizeof(_uint), 1, fp);
|
||||
mat.NormalPath.resize(normalCount);
|
||||
for (_uint j = 0; j < normalCount; j++)
|
||||
{
|
||||
_uint len = 0;
|
||||
fread(&len, sizeof(_uint), 1, fp);
|
||||
std::string temp;
|
||||
temp.resize(len);
|
||||
fread(&temp[0], sizeof(char), len, fp);
|
||||
mat.NormalPath[j] = temp;
|
||||
}
|
||||
|
||||
_uint specularCount = 0;
|
||||
fread(&specularCount, sizeof(_uint), 1, fp);
|
||||
mat.SpecularPath.resize(specularCount);
|
||||
for (_uint j = 0; j < specularCount; j++)
|
||||
{
|
||||
_uint len = 0;
|
||||
fread(&len, sizeof(_uint), 1, fp);
|
||||
std::string temp;
|
||||
temp.resize(len);
|
||||
fread(&temp[0], sizeof(char), len, fp);
|
||||
mat.SpecularPath[j] = temp;
|
||||
}*/
|
||||
|
||||
NewModel.Materials.push_back(mat);
|
||||
}
|
||||
|
||||
|
||||
@@ -220,6 +220,7 @@ PSX::PxController* CPhysX_Manager::Add_BoxController(PSX::PxBoxControllerDesc& D
|
||||
PSX::PxController* pController = { nullptr };
|
||||
|
||||
pController = m_pCCTManager->createController(Desc);
|
||||
//pController->
|
||||
return pController;
|
||||
}
|
||||
|
||||
|
||||
@@ -106,6 +106,12 @@ HRESULT CPrototype_Manager::Ready_EngineAssets()
|
||||
VTXPOSTEX::Elements, VTXPOSTEX::iNumElements)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Add_Asset_Prototype(g_iStaticLevel, TEXT("FX_LASTCOLOR"),
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_LastColor.hlsl"),
|
||||
VTXPOSTEX::Elements, VTXPOSTEX::iNumElements)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -113,6 +113,7 @@ void CRenderer::Render()
|
||||
Render_NonLight();
|
||||
Render_Blend();
|
||||
Render_UI();
|
||||
Render_LastColor();
|
||||
|
||||
#ifdef _DEBUG
|
||||
if(m_pGameInstance->Key_Pressing(DIK_F10))
|
||||
@@ -299,9 +300,7 @@ void CRenderer::Render_Combined()
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Blur_X"), m_pShader, "g_BlurXTexture"))) {
|
||||
return;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Color"), m_pShader, "g_ColorTexture"))) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -414,6 +413,28 @@ void CRenderer::Render_UI()
|
||||
m_RenderObjects[ENUM_CLASS(RENDER::UI)].clear();
|
||||
}
|
||||
|
||||
void CRenderer::Render_LastColor()
|
||||
{
|
||||
// Bind_Resorces
|
||||
|
||||
m_pShader->Bind_Matrix("g_WorldMatrix", &m_WorldMatrix);
|
||||
m_pShader->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix);
|
||||
m_pShader->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix);
|
||||
m_pShader->Bind_Matrix("g_invMatView", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW_INV));
|
||||
m_pShader->Bind_Matrix("g_invmatProj", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ_INV));
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Color"), m_pShader, "g_ColorTexture"))) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_pShader->Begin(ENUM_CLASS(0));
|
||||
|
||||
m_pVIBuffer->Bind_Resources();
|
||||
m_pVIBuffer->Render();
|
||||
|
||||
}
|
||||
|
||||
HRESULT CRenderer::Ready_DepthStencilView(_uint iSizeX, _uint iSizeY)
|
||||
{
|
||||
ID3D11Texture2D* pDepthStencilTexture = nullptr;
|
||||
@@ -617,6 +638,15 @@ HRESULT CRenderer::Initialize()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
m_pLastColorShader = (CShader*)m_pGameInstance->Clone_Asset_Prototype(g_iStaticLevel, TEXT("FX_LASTCOLOR"), nullptr, nullptr);
|
||||
|
||||
if (nullptr == m_pLastColorShader) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
m_pVIBuffer = CVIBuffer_Rect::Create(m_pDevice, m_pContext);
|
||||
if (nullptr == m_pVIBuffer) {
|
||||
return E_FAIL;
|
||||
@@ -701,6 +731,7 @@ void CRenderer::Free()
|
||||
|
||||
SAFE_RELEASE(m_pShadowDSV);
|
||||
SAFE_RELEASE(m_pShader);
|
||||
SAFE_RELEASE(m_pLastColorShader);
|
||||
SAFE_RELEASE(m_pVIBuffer);
|
||||
SAFE_RELEASE(m_pDevice);
|
||||
SAFE_RELEASE(m_pContext);
|
||||
|
||||
@@ -22,6 +22,12 @@ class ENGINE_DLL CAnimation : public CBase
|
||||
vector<LERPDESC> Get_StartFrameInformations() { return m_StartKeyFrames; }
|
||||
const _string& Get_Name() const { return m_strName; }
|
||||
|
||||
const _char* Get_SZName() const { return m_szName; }
|
||||
void Reset_CurrentTrackPosition() { m_fCurrentTrackPosition = 0.f; }
|
||||
_float Get_CurrentTrackPosition() { return m_fCurrentTrackPosition; }
|
||||
void Set_AnimSpeed(_float fSpeed) { m_fAnimSpeed = fSpeed; }
|
||||
_float Get_AnimSpeed() { return m_fAnimSpeed; }
|
||||
|
||||
|
||||
#ifdef EDITOR_PROJECT
|
||||
private:
|
||||
@@ -43,6 +49,7 @@ class ENGINE_DLL CAnimation : public CBase
|
||||
SaveAnimation* m_pSaveAnim = { nullptr };
|
||||
_char m_szName[MAX_PATH] = {};
|
||||
_float m_fTickPerSecond = {};
|
||||
_float m_fAnimSpeed = {1.f};
|
||||
|
||||
_bool m_bPause = { FALSE }; // 애님퍼즈 인덱스
|
||||
_string m_strName = {}; // 애님 이름
|
||||
|
||||
@@ -203,6 +203,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
void Save_ModelFilePath(const _char* FilePath);
|
||||
const _char* Load_ModelFilePath(_uint iIndex);
|
||||
const _char* Load_BinaryModelFilePath(_uint iIndex);
|
||||
size_t BinaryModelFilePathCount();
|
||||
size_t ModelFilePathCount();
|
||||
|
||||
private:
|
||||
|
||||
@@ -39,6 +39,16 @@ class ENGINE_DLL CModel final : public CComponent
|
||||
void Get_BoneMatrices(_float4x4* pOut);
|
||||
_uint Get_BonesNum() const { return (_uint)m_Bones.size(); }
|
||||
|
||||
void Reset_CurrentTrackPosition();
|
||||
const _char* Get_AnimList(_uint iIndex);
|
||||
size_t Get_AnimSize() { return m_Animations.size(); }
|
||||
_float Get_CurrentTrackPosition();
|
||||
void Set_PlayAnim(_bool bPlayAnim) { m_bPlayAnim = bPlayAnim; }
|
||||
_bool Get_PlayAnim() { return m_bPlayAnim; }
|
||||
_int Get_AnimIndex() { return m_iCurrentAnimIndex; }
|
||||
_float Get_AnimSpeed();
|
||||
void Set_AnimSpeed(_float fSpeed);
|
||||
|
||||
public:
|
||||
HRESULT Bind_Material(_uint iMeshIndex, class CShader* pShader, const _char* pConstantName, _uint iType, _uint iTextureIndex);
|
||||
HRESULT Bind_BoneMatrices(_uint iMeshIndex, class CShader* pShader, const _char* pConstantName);
|
||||
@@ -84,6 +94,7 @@ class ENGINE_DLL CModel final : public CComponent
|
||||
_bool m_bIsLoop = { false }; // 루프애니메이션인지
|
||||
_bool m_bIsFinishedAnim = { false }; // 대상 애니메이션이 끝났는지
|
||||
_bool m_bIsFinishedLerp = { false }; // 럴프 애니메이션이 끝났는지
|
||||
_bool m_bPlayAnim = { true };
|
||||
vector<class CAnimation*> m_Animations; // 애니메이션의 벡터,
|
||||
|
||||
class CLerpAnim* m_pLerpAnim = { nullptr }; // 럴프전용 애니메이션
|
||||
@@ -121,6 +132,7 @@ class ENGINE_DLL CModel final : public CComponent
|
||||
static CModel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, MODEL eType, const _char* pModelFilePath, _fmatrix PreTransformMatrix = XMMatrixIdentity());
|
||||
//
|
||||
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr);
|
||||
|
||||
virtual void Free(); public:
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
@@ -31,6 +31,7 @@ class CRenderer final : public CBase
|
||||
#endif
|
||||
private:
|
||||
class CShader* m_pShader = { nullptr };
|
||||
class CShader* m_pLastColorShader = { nullptr };
|
||||
class CVIBuffer_Rect* m_pVIBuffer = { nullptr };
|
||||
|
||||
private:
|
||||
@@ -60,6 +61,7 @@ class CRenderer final : public CBase
|
||||
void Render_NonLight();
|
||||
void Render_Blend();
|
||||
void Render_UI();
|
||||
void Render_LastColor();
|
||||
|
||||
#ifdef _DEBUG
|
||||
private:
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user