[add] Initiali_Commit
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
* text=auto
|
||||
# Sources
|
||||
*.c text diff=cpp
|
||||
*.cc text diff=cpp
|
||||
*.cxx text diff=cpp
|
||||
*.cpp text diff=cpp
|
||||
*.cpi text diff=cpp
|
||||
*.c++ text diff=cpp
|
||||
*.hpp text diff=cpp
|
||||
*.h text diff=cpp
|
||||
*.h++ text diff=cpp
|
||||
*.hh text diff=cpp
|
||||
# Compiled Object files
|
||||
*.slo binary
|
||||
*.lo binary
|
||||
*.o binary
|
||||
*.obj binary
|
||||
# Precompiled Headers
|
||||
*.gch binary
|
||||
*.pch binary
|
||||
# Compiled Dynamic libraries
|
||||
*.so binary
|
||||
*.dylib binary
|
||||
*.dll binary
|
||||
# Compiled Static libraries
|
||||
*.lai binary
|
||||
*.la binary
|
||||
*.a binary
|
||||
*.lib binary
|
||||
# Executables
|
||||
*.exe binary
|
||||
*.out binary
|
||||
*.app binary
|
||||
# *.vcxproj merge=union
|
||||
# *.vcxproj.filters merge=union
|
||||
# *.vcxproj.user merge=union
|
||||
*.doc diff=astextplain
|
||||
*.DOC diff=astextplain
|
||||
*.docx diff=astextplain
|
||||
*.DOCX diff=astextplain
|
||||
*.dot diff=astextplain
|
||||
*.DOT diff=astextplain
|
||||
*.pdf diff=astextplain
|
||||
*.PDF diff=astextplain
|
||||
*.rtf diff=astextplain
|
||||
*.RTF diff=astextplain
|
||||
*.fbx filter=lfs diff=lfs merge=lfs -text
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
# Prerequisites
|
||||
*.d
|
||||
|
||||
# Compiled Object files
|
||||
*.slo
|
||||
*.lo
|
||||
*.o
|
||||
*.obj
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
*.pch
|
||||
|
||||
# Linker files
|
||||
*.ilk
|
||||
|
||||
# Compiled Dynamic libraries
|
||||
*.so
|
||||
*.dylib
|
||||
|
||||
# Compiled Static libraries
|
||||
*.lai
|
||||
*.la
|
||||
*.a
|
||||
|
||||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
|
||||
# Visual Studio 관련 임시 파일
|
||||
.vs/
|
||||
*.ipch
|
||||
x64/
|
||||
Release/
|
||||
Debug/
|
||||
Inc/
|
||||
|
||||
# Imgui 임시 파일
|
||||
imgui.ini
|
||||
@@ -0,0 +1,13 @@
|
||||
#sln
|
||||
|
||||
# hlsl 저장형식 지정
|
||||
[*.hlsl]
|
||||
charset = utf-8
|
||||
insert_final_newline = true
|
||||
end_of_line = crlf
|
||||
|
||||
# hlsli 저장형식 지정
|
||||
[*.hlsli]
|
||||
charset = utf-8
|
||||
insert_final_newline = true
|
||||
end_of_line = crlf
|
||||
@@ -0,0 +1,27 @@
|
||||
|
||||
rmdir .\EngineSDK\Inc\ /s /q
|
||||
rmdir .\EngineSDK\Lib\Debug\ /s /q
|
||||
rmdir .\EngineSDK\Lib\Release\ /s /q
|
||||
|
||||
rmdir .\Engine\Default\x64\ /s /q
|
||||
rmdir .\Client\Default\x64\ /s /q
|
||||
rmdir .\Editor\Default\x64\ /s /q
|
||||
|
||||
rmdir .\Engine\Bin\Debug\ /s /q
|
||||
rmdir .\Client\Bin\Debug\ /s /q
|
||||
rmdir .\Editor\Bin\Debug\ /s /q
|
||||
|
||||
rmdir .\Engine\Bin\Release\ /s /q
|
||||
rmdir .\Client\Bin\Release\ /s /q
|
||||
rmdir .\Editor\Bin\Release\ /s /q
|
||||
rmdir .\.vs\ /s /q
|
||||
|
||||
|
||||
:: 정적라이브러리의 pdb는 심볼만 가져올 수 있도록 x64에 섞어서 보냄
|
||||
:: 그러면 디버깅할 때 해당 라이브러리의 내부에서 터졌을 때 함수주소를 이름이랑 매칭해서 볼 수 있음
|
||||
:: 안그러면 내부에서 터지면 함수 주소만 보임
|
||||
xcopy /y .\Engine\ThirdPartyLib\DirectXTK\DirectXTKd.pdb .\Engine\Default\x64\Debug\
|
||||
xcopy /y .\Engine\ThirdPartyLib\DirectXTK\DirectXTK.pdb .\Engine\Default\x64\Release\
|
||||
|
||||
xcopy /y .\Engine\ThirdPartyLib\FX11\Effects11d.pdb .\Engine\Default\x64\Debug\
|
||||
xcopy /y .\Engine\ThirdPartyLib\FX11\Effects11.pdb .\Engine\Default\x64\Release\
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,185 @@
|
||||
|
||||
vector g_vMtrlDiffuse = 1.f;
|
||||
vector g_vMtrlAmbient = 1.f;
|
||||
vector g_vMtrlSpecular = 1.f;
|
||||
|
||||
sampler DefaultSampler = sampler_state
|
||||
{
|
||||
Filter = MIN_MAG_MIP_LINEAR;
|
||||
AddressU = wrap;
|
||||
AddressV = wrap;
|
||||
};
|
||||
|
||||
sampler ClampSampler = sampler_state
|
||||
{
|
||||
Filter = MIN_MAG_MIP_POINT;
|
||||
AddressU = clamp;
|
||||
AddressV = clamp;
|
||||
};
|
||||
|
||||
sampler MirrorSampler = sampler_state
|
||||
{
|
||||
Filter = MIN_MAG_MIP_LINEAR;
|
||||
AddressU = mirror;
|
||||
AddressV = mirror;
|
||||
};
|
||||
|
||||
sampler BorderZeroSampler = sampler_state
|
||||
{
|
||||
Filter = MIN_MAG_MIP_POINT;
|
||||
AddressU = Border;
|
||||
AddressV = Border;
|
||||
BorderColor = float4(0, 0, 0, 0);
|
||||
};
|
||||
|
||||
RasterizerState RS_Default
|
||||
{
|
||||
FillMode = Solid;
|
||||
CullMode = Back;
|
||||
};
|
||||
|
||||
RasterizerState RS_Nocull
|
||||
{
|
||||
FillMode = Solid;
|
||||
CullMode = None;
|
||||
FrontCounterClockwise = false;
|
||||
DepthClipEnable = false;
|
||||
};
|
||||
|
||||
RasterizerState RS_Nocull_Wireframe
|
||||
{
|
||||
FillMode = Wireframe;
|
||||
CullMode = None;
|
||||
FrontCounterClockwise = false;
|
||||
DepthBias = 0;
|
||||
SlopeScaledDepthBias = 0.f;
|
||||
DepthBiasClamp = 0.f;
|
||||
DepthClipEnable = false;
|
||||
ScissorEnable = false;
|
||||
MultisampleEnable = false;
|
||||
AntialiasedLineEnable = false;
|
||||
};
|
||||
|
||||
RasterizerState RS_Scissor
|
||||
{
|
||||
FillMode = Solid;
|
||||
CullMode = Back;
|
||||
FrontCounterClockwise = false;
|
||||
ScissorEnable = true;
|
||||
};
|
||||
|
||||
DepthStencilState DSS_Default
|
||||
{
|
||||
DepthEnable = true;
|
||||
DepthWriteMask = all;
|
||||
DepthFunc = less_equal;
|
||||
};
|
||||
|
||||
DepthStencilState DSS_None
|
||||
{
|
||||
DepthEnable = false;
|
||||
DepthWriteMask = zero;
|
||||
};
|
||||
|
||||
DepthStencilState DSS_Effect
|
||||
{
|
||||
DepthEnable = true;
|
||||
DepthWriteMask = zero;
|
||||
DepthFunc = less_equal;
|
||||
StencilEnable = false;
|
||||
};
|
||||
|
||||
BlendState BS_None
|
||||
{
|
||||
BlendEnable[0] = false;
|
||||
};
|
||||
|
||||
BlendState BS_AlphaBlend // ALPHA_BLEND
|
||||
{
|
||||
BlendEnable[0] = true;
|
||||
BlendEnable[1] = true;
|
||||
BlendEnable[2] = true;
|
||||
BlendEnable[3] = true;
|
||||
BlendEnable[4] = true;
|
||||
BlendEnable[5] = true;
|
||||
BlendEnable[6] = true;
|
||||
BlendEnable[7] = true;
|
||||
|
||||
// Ac * Aa + Bc * (1 - Aa);
|
||||
SrcBlend = Src_Alpha;
|
||||
DestBlend = Inv_Src_Alpha;
|
||||
BlendOp = Add;
|
||||
};
|
||||
|
||||
BlendState BS_Blend // ADDITIVE_BLEND
|
||||
{
|
||||
BlendEnable[0] = true;
|
||||
BlendEnable[1] = true;
|
||||
BlendEnable[2] = true;
|
||||
BlendEnable[3] = true;
|
||||
BlendEnable[4] = true;
|
||||
BlendEnable[5] = true;
|
||||
BlendEnable[6] = true;
|
||||
BlendEnable[7] = true;
|
||||
|
||||
// Ac * (1) + Bc * (1);
|
||||
SrcBlend = one;
|
||||
DestBlend = one;
|
||||
BlendOp = Add;
|
||||
};
|
||||
|
||||
BlendState BS_UIBlend
|
||||
{
|
||||
BlendEnable[0] = true;
|
||||
BlendEnable[1] = true;
|
||||
BlendEnable[2] = true;
|
||||
BlendEnable[3] = true;
|
||||
BlendEnable[4] = true;
|
||||
BlendEnable[5] = true;
|
||||
BlendEnable[6] = true;
|
||||
BlendEnable[7] = true;
|
||||
|
||||
SrcBlend = Src_Alpha;
|
||||
DestBlend = Inv_Src_Alpha;
|
||||
BlendOp = Add;
|
||||
|
||||
SrcBlendAlpha = One;
|
||||
DestBlendAlpha = Zero;
|
||||
BlendOpAlpha = Add;
|
||||
|
||||
RenderTargetWriteMask[0] = 0x0F; // RGBA 모두 출력
|
||||
};
|
||||
|
||||
float ShadowVisibility_hwPCF(Texture2D ShadowMap, float4 vLightClip, float2 vShadowMapSize, float bias)
|
||||
{
|
||||
float2 uv = float2(vLightClip.x / vLightClip.w, -vLightClip.y / vLightClip.w) * 0.5f + 0.5f;
|
||||
float fDepthCenter = saturate(vLightClip.z / vLightClip.w);
|
||||
float2 vTexel = 1.f / vShadowMapSize;
|
||||
|
||||
float fVisibility = 0.f;
|
||||
for (int v = -1; v <= 1; ++v)
|
||||
{
|
||||
for (int u = -1; u <= 1; ++u)
|
||||
{
|
||||
float2 vOffset = float2(u, v) * vTexel;
|
||||
float fDepth = ShadowMap.Sample(DefaultSampler, uv + vOffset).x;
|
||||
fVisibility += (fDepthCenter - bias > fDepth) ? 0.f : 1.f;
|
||||
}
|
||||
}
|
||||
return fVisibility / 9.f;
|
||||
}
|
||||
|
||||
float GetRimLight(float3 vCamPosition, float3 vPosition, float3 vNormal, float fRimPower, float fRimStrength)
|
||||
{
|
||||
float fRimLight = (1 - dot(normalize(vCamPosition - vPosition), vNormal));
|
||||
fRimLight = pow(fRimLight, fRimPower);
|
||||
fRimLight = fRimLight * fRimStrength;
|
||||
return fRimLight;
|
||||
}
|
||||
|
||||
float2 Get_MovedUV(float2 vOriginalUV, float fDeltaU, float fDeltaV, uint iIndexU, uint iIndexV)
|
||||
{
|
||||
float2 vDelta = float2(fDeltaU, fDeltaV);
|
||||
float2 vOffset = float2(iIndexU * fDeltaU, iIndexV * fDeltaV);
|
||||
return vOriginalUV * vDelta + vOffset;
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
|
||||
vector g_vColor = 1.f;
|
||||
float g_fFar;
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
};
|
||||
|
||||
struct VS_OUT
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
};
|
||||
|
||||
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);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_IN
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
};
|
||||
|
||||
struct PS_OUT
|
||||
{
|
||||
float4 vColor : SV_TARGET0;
|
||||
};
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
Out.vColor = g_vColor;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 DefaultTechnique
|
||||
{
|
||||
pass Default
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 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_MAIN();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,392 @@
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
matrix g_invMatView, g_invmatProj;
|
||||
matrix g_LightViewMatrix, g_LightProjMatrix;
|
||||
matrix g_PreShadowLightViewMatrix, g_PreShadowLightProjMatrix;
|
||||
|
||||
float g_fFar;
|
||||
float g_fPreShadowFar;
|
||||
uint g_iMaxShadowWidth;
|
||||
uint g_iMaxShadowHeight;
|
||||
float2 g_vResolution;
|
||||
|
||||
Texture2D g_Texture;
|
||||
|
||||
float g_fLightRange;
|
||||
float g_fSpotInnerAngle;
|
||||
float g_fSpotOuterAngle;
|
||||
vector g_vLightDir;
|
||||
vector g_vLightPos;
|
||||
vector g_vCamPosition;
|
||||
|
||||
Texture2D g_NormalTexture;
|
||||
Texture2D g_DiffuseTexture;
|
||||
Texture2D g_ShadeTexture;
|
||||
Texture2D g_DepthTexture;
|
||||
Texture2D g_SpecularTexture;
|
||||
Texture2D g_ShadowTexture;
|
||||
Texture2D g_PreShadowTexture;
|
||||
Texture2D g_BlurTexture;
|
||||
Texture2D g_BlurXTexture;
|
||||
|
||||
|
||||
vector g_vLightDiffuse;
|
||||
vector g_vLightAmbient;
|
||||
vector g_vLightSpecular;
|
||||
|
||||
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_MAIN_DEBUG(PS_IN In)
|
||||
{
|
||||
PS_OUT_BACKBUFFER Out;
|
||||
|
||||
Out.vBackBuffer = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_OUT_LIGHT
|
||||
{
|
||||
vector vShade : SV_TARGET0;
|
||||
vector vSpecular : SV_TARGET1;
|
||||
};
|
||||
|
||||
PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
|
||||
{
|
||||
PS_OUT_LIGHT Out;
|
||||
|
||||
vector vNormalDesc = g_NormalTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
float4 vNormal = vector(vNormalDesc.xyz * 2.f - 1.f, 0.0f);
|
||||
|
||||
Out.vShade = g_vLightDiffuse * saturate(max(dot(normalize(g_vLightDir) * -1.f, vNormal), 0.f) + (g_vLightAmbient * g_vMtrlAmbient));
|
||||
|
||||
vector vDepthDesc = g_DepthTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
float fViewZ = vDepthDesc.y * g_fFar;
|
||||
|
||||
vector vPosition;
|
||||
|
||||
{ // vDepthDesc과 vTexcoord.xy로부터 World Position의 추론
|
||||
/* 직육면체의 NDC */
|
||||
/* LocalPos * World * View * Proj * ( 1 / w ) */
|
||||
vPosition.x = In.vTexcoord.x * 2.f - 1.f;
|
||||
vPosition.y = In.vTexcoord.y * -2.f + 1.f;
|
||||
vPosition.z = vDepthDesc.x;
|
||||
vPosition.w = 1.f;
|
||||
|
||||
/* [* (1 / w)] 소거*/
|
||||
/* z나누기를 되돌림 */
|
||||
vPosition = vPosition * fViewZ;
|
||||
// vPosition.x = In.vTexcoord.x * 2.f - 1.f * Far;
|
||||
// vPosition.y = In.vTexcoord.y * -2.f + 1.f * Far;
|
||||
// vPosition.z = vDepthDesc.x * Far;
|
||||
// vPosition.w = Far;
|
||||
|
||||
vPosition = mul(vPosition, g_invmatProj);
|
||||
vPosition = mul(vPosition, g_invMatView);
|
||||
}
|
||||
vector vLook = vPosition - g_vCamPosition;
|
||||
vector vReflect = reflect(normalize(g_vLightDir), vNormal);
|
||||
|
||||
Out.vSpecular = (g_vLightSpecular * g_vMtrlSpecular) * pow(max(dot(normalize(vLook) * -1.f, normalize(vReflect)), 0.f), 50.f);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In)
|
||||
{
|
||||
PS_OUT_LIGHT Out;
|
||||
|
||||
vector vNormalDesc = g_NormalTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
float4 vNormal = vector(vNormalDesc.xyz * 2.f - 1.f, 0.f);
|
||||
|
||||
vector vDepthDesc = g_DepthTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float fViewZ = vDepthDesc.y * g_fFar;
|
||||
|
||||
vector vPosition;
|
||||
/* 0 ~ 1 에서 -1 ~ 1 */
|
||||
vPosition.x = In.vTexcoord.x * 2.f - 1.f;
|
||||
vPosition.y = In.vTexcoord.y * -2.f + 1.f;
|
||||
vPosition.z = vDepthDesc.x;
|
||||
vPosition.w = 1.f;
|
||||
vPosition = vPosition * fViewZ;
|
||||
vPosition = mul(vPosition, g_invmatProj);
|
||||
vPosition = mul(vPosition, g_invMatView);
|
||||
|
||||
vector vLightDir = vPosition - g_vLightPos;
|
||||
float fDistance = length(vLightDir);
|
||||
float fAttenuation = saturate((g_fLightRange - fDistance) / g_fLightRange);
|
||||
if (fAttenuation <= 0.f)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
vLightDir = normalize(vLightDir);
|
||||
|
||||
Out.vShade = fAttenuation * (g_vLightDiffuse * saturate(max(dot(vLightDir * -1.f, vNormal), 0.f) + (g_vLightAmbient * g_vMtrlAmbient)));
|
||||
|
||||
vector vLook = vPosition - g_vCamPosition;
|
||||
vector vReflect = reflect(vLightDir, vNormal);
|
||||
|
||||
Out.vSpecular = fAttenuation * ((g_vLightSpecular * g_vMtrlSpecular) * pow(max(dot(normalize(vLook) * -1.f, normalize(vReflect)), 0.f), 50.f));
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
|
||||
{
|
||||
PS_OUT_LIGHT Out;
|
||||
|
||||
vector vNormalDesc = g_NormalTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
float4 vNormal = vector(vNormalDesc.xyz * 2.f - 1.f, 0.f);
|
||||
|
||||
vector vDepthDesc = g_DepthTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float fViewZ = vDepthDesc.y * g_fFar;
|
||||
|
||||
vector vPosition;
|
||||
/* 0 ~ 1 에서 -1 ~ 1 */
|
||||
vPosition.x = In.vTexcoord.x * 2.f - 1.f;
|
||||
vPosition.y = In.vTexcoord.y * -2.f + 1.f;
|
||||
vPosition.z = vDepthDesc.x;
|
||||
vPosition.w = 1.f;
|
||||
vPosition = vPosition * fViewZ;
|
||||
vPosition = mul(vPosition, g_invmatProj);
|
||||
vPosition = mul(vPosition, g_invMatView);
|
||||
|
||||
vector vLightDir = vPosition - g_vLightPos;
|
||||
float fDistance = length(vLightDir);
|
||||
float fAttenuation = saturate((g_fLightRange - fDistance) / g_fLightRange);
|
||||
if (fAttenuation <= 0.f)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
vLightDir = normalize(vLightDir);
|
||||
vector vSpotDir = normalize(g_vLightDir);
|
||||
float fCosAngle = dot(vLightDir, vSpotDir);
|
||||
if (fCosAngle < g_fSpotOuterAngle)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
float fSpotAttenenuation = saturate((fCosAngle - g_fSpotInnerAngle) / (g_fSpotInnerAngle - g_fSpotOuterAngle));
|
||||
fAttenuation *= fSpotAttenenuation;
|
||||
|
||||
Out.vShade = fAttenuation * (g_vLightDiffuse * saturate(max(dot(vLightDir * -1.f, vNormal), 0.f) + (g_vLightAmbient * g_vMtrlAmbient)));
|
||||
|
||||
vector vLook = vPosition - g_vCamPosition;
|
||||
vector vReflect = reflect(vLightDir, vNormal);
|
||||
|
||||
Out.vSpecular = fAttenuation * ((g_vLightSpecular * g_vMtrlSpecular) * pow(max(dot(normalize(vLook) * -1.f, normalize(vReflect)), 0.f), 50.f));
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
float g_fWeights[13] =
|
||||
{
|
||||
0.0090, 0.0218, 0.0448, 0.0784, 0.1169,
|
||||
0.1486, 0.1610, 0.1486, 0.1169, 0.0784,
|
||||
0.0448, 0.0218, 0.0090
|
||||
};
|
||||
|
||||
PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
||||
{
|
||||
PS_OUT_BACKBUFFER Out;
|
||||
|
||||
vector vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (0.f == vDiffuse.a)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
vector vShade = g_ShadeTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
vector vSpecular = g_SpecularTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
Out.vBackBuffer = vDiffuse * vShade + vSpecular;
|
||||
|
||||
vector vDepthDesc = g_DepthTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float fViewZ = vDepthDesc.y * g_fFar;
|
||||
|
||||
vector vPosition, vPreShadowPosition;
|
||||
|
||||
/* (로컬위치 * 월드 * 뷰 * 투영 / w) -> (로컬위치 * 월드) */
|
||||
vPosition.x = In.vTexcoord.x * 2.f - 1.f;
|
||||
vPosition.y = In.vTexcoord.y * -2.f + 1.f;
|
||||
vPosition.z = vDepthDesc.x;
|
||||
vPosition.w = 1.f;
|
||||
|
||||
vPosition = vPosition * fViewZ;
|
||||
|
||||
vPosition = mul(vPosition, g_invmatProj);
|
||||
vPosition = mul(vPosition, g_invMatView);
|
||||
vPreShadowPosition = vPosition;
|
||||
/* (로컬위치 * 월드) -> (로컬위치 * 월드 * 광원의 뷰 * 광원의 투영 ) */
|
||||
vPosition = mul(vPosition, g_LightViewMatrix);
|
||||
vPosition = mul(vPosition, g_LightProjMatrix);
|
||||
vPreShadowPosition = mul(vPreShadowPosition, g_PreShadowLightViewMatrix);
|
||||
vPreShadowPosition = mul(vPreShadowPosition, g_PreShadowLightProjMatrix);
|
||||
|
||||
/* (로컬위치 * 월드 * 광원의 뷰 * 광원의 투영 ) -> (로컬위치 * 월드 * 광원의 뷰 * 광원의 투영 * (/w) */
|
||||
float2 vTexcoord, vPreShadowTexcoord;
|
||||
vTexcoord.x = (vPosition.x / vPosition.w) * 0.5f + 0.5f;
|
||||
vTexcoord.y = (vPosition.y / vPosition.w) * -0.5f + 0.5f;
|
||||
vPreShadowTexcoord.x = (vPreShadowPosition.x / vPreShadowPosition.w) * 0.5f + 0.5f;
|
||||
vPreShadowTexcoord.y = (vPreShadowPosition.y / vPreShadowPosition.w) * -0.5f + 0.5f;
|
||||
/* 광원의 NDC에서 샘플링 */
|
||||
float fVisibility_Dynamic = ShadowVisibility_hwPCF(g_ShadowTexture, vPosition, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), 0.0005f);
|
||||
float fVisibility_Static = ShadowVisibility_hwPCF(g_PreShadowTexture, vPreShadowPosition, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), 0.0005f);
|
||||
Out.vBackBuffer.rgb *= lerp(0.5f, 1.f, min(fVisibility_Dynamic, fVisibility_Static));
|
||||
//float fShadowDepth = g_ShadowTexture.Sample(DefaultSampler, vTexcoord).x;
|
||||
//float fPreShadowDepth = g_PreShadowTexture.Sample(DefaultSampler, vPreShadowTexcoord).x;
|
||||
//bool IsShadow = { false };
|
||||
//if (vPosition.z - 0.0005f > fShadowDepth)
|
||||
//{
|
||||
// IsShadow = true;
|
||||
//}
|
||||
//if (vPreShadowPosition.z - 0.0005f > fPreShadowDepth)
|
||||
//{
|
||||
// IsShadow = true;
|
||||
//}
|
||||
//if (true == IsShadow)
|
||||
//{
|
||||
// Out.vBackBuffer *= 0.5f;
|
||||
//}
|
||||
|
||||
float4 vColor = 0.f;
|
||||
|
||||
for (int i = -6; i < 7; ++i)
|
||||
{
|
||||
vTexcoord.x = In.vTexcoord.x;
|
||||
vTexcoord.y = In.vTexcoord.y + i / g_vResolution.y;
|
||||
|
||||
vColor += g_fWeights[i + 6] * g_BlurXTexture.Sample(BorderZeroSampler, vTexcoord);
|
||||
}
|
||||
|
||||
Out.vBackBuffer += vColor;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_OUT_BLUR_X
|
||||
{
|
||||
float4 vBlurX : SV_TARGET0;
|
||||
};
|
||||
|
||||
|
||||
PS_OUT_BLUR_X PS_MAIN_BLUR_X(PS_IN In)
|
||||
{
|
||||
PS_OUT_BLUR_X Out;
|
||||
|
||||
float2 vTexcoord;
|
||||
float4 vColor = 0.f;
|
||||
|
||||
for (int i = -6; i < 7; ++i)
|
||||
{
|
||||
vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x;
|
||||
vTexcoord.y = In.vTexcoord.y;
|
||||
|
||||
vColor += g_fWeights[i + 6] * g_BlurTexture.Sample(BorderZeroSampler, vTexcoord);
|
||||
}
|
||||
|
||||
Out.vBlurX = vColor;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
technique11 DefaultTechnique
|
||||
{
|
||||
pass DebugPass
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 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_MAIN_DEBUG();
|
||||
}
|
||||
|
||||
pass DirectionalPass
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_Blend, 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_MAIN_DIRECTIONAL();
|
||||
}
|
||||
|
||||
pass PointPass
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_Blend, 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_MAIN_POINT();
|
||||
}
|
||||
|
||||
pass CombinedPass
|
||||
{
|
||||
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_MAIN_COMBINED();
|
||||
}
|
||||
pass BlurPass
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_Blend, 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_MAIN_BLUR_X();
|
||||
}
|
||||
|
||||
pass SpotPass
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_Blend, 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_MAIN_SPOT();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
#include "pch.h"
|
||||
#include "framework.h"
|
||||
#include "Client.h"
|
||||
#include "MainApp.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
#define MAX_LOADSTRING 100
|
||||
|
||||
HINSTANCE g_hInstance;
|
||||
HWND g_hWnd;
|
||||
WCHAR szTitle[MAX_LOADSTRING];
|
||||
WCHAR szWindowClass[MAX_LOADSTRING];
|
||||
|
||||
// 이 코드 모듈에 포함된 함수의 선언을 전달합니다:
|
||||
ATOM MyRegisterClass(HINSTANCE hInstance);
|
||||
BOOL InitInstance(HINSTANCE, int);
|
||||
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM);
|
||||
extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
|
||||
_In_opt_ HINSTANCE hPrevInstance,
|
||||
_In_ LPWSTR lpCmdLine,
|
||||
_In_ int nCmdShow)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
|
||||
#endif
|
||||
UNREFERENCED_PARAMETER(hPrevInstance);
|
||||
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||
|
||||
CMainApp* pMainApp = { nullptr };
|
||||
|
||||
LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
|
||||
LoadStringW(hInstance, IDC_CLIENT, szWindowClass, MAX_LOADSTRING);
|
||||
MyRegisterClass(hInstance);
|
||||
|
||||
if (!InitInstance(hInstance, nCmdShow))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_CLIENT));
|
||||
|
||||
MSG msg = {};
|
||||
|
||||
pMainApp = CMainApp::Create();
|
||||
if (nullptr == pMainApp)
|
||||
return FALSE;
|
||||
|
||||
CGameInstance* pGameInstance = CGameInstance::GetInstance();
|
||||
SAFE_ADDREF(pGameInstance);
|
||||
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_Default")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_60")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_PriorityUpdate")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_Update")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_LateUpdate")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_DrawCall")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_Present")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_FrameCount")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
_float fTimeAcc = { };
|
||||
|
||||
while (true)
|
||||
{
|
||||
if (PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE))
|
||||
{
|
||||
if (WM_QUIT == msg.message)
|
||||
break;
|
||||
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
|
||||
pGameInstance->Compute_TimeDelta(TEXT("Timer_Default"));
|
||||
|
||||
fTimeAcc += pGameInstance->Get_TimeDelta(TEXT("Timer_Default"));
|
||||
|
||||
if (fTimeAcc >= 1.f / 60.f)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
pGameInstance->Compute_TimeDelta(TEXT("Timer_FrameCount"));
|
||||
#endif // _DEBUG
|
||||
|
||||
pGameInstance->Compute_TimeDelta(TEXT("Timer_60"));
|
||||
#ifdef _DEBUG
|
||||
pMainApp->Update(0.0166f);
|
||||
#endif // _DEBUG
|
||||
#ifndef _DEBUG
|
||||
pMainApp->Update(pGameInstance->Get_TimeDelta(TEXT("Timer_60")));
|
||||
#endif // !_DEBUG
|
||||
|
||||
pMainApp->Render();
|
||||
|
||||
fTimeAcc = 0.f;
|
||||
#ifdef _DEBUG
|
||||
pGameInstance->Compute_TimeDelta(TEXT("Timer_FrameCount"));
|
||||
pMainApp->Compute_FrameCount();
|
||||
#endif // _DEBUG
|
||||
}
|
||||
}
|
||||
|
||||
SAFE_RELEASE(pGameInstance);
|
||||
SAFE_RELEASE(pMainApp);
|
||||
|
||||
return (int)msg.wParam;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// 함수: MyRegisterClass()
|
||||
//
|
||||
// 용도: 창 클래스를 등록합니다.
|
||||
//
|
||||
ATOM MyRegisterClass(HINSTANCE hInstance)
|
||||
{
|
||||
WNDCLASSEXW wcex;
|
||||
|
||||
wcex.cbSize = sizeof(WNDCLASSEX);
|
||||
|
||||
wcex.style = CS_HREDRAW | CS_VREDRAW;
|
||||
wcex.lpfnWndProc = WndProc;
|
||||
wcex.cbClsExtra = 0;
|
||||
wcex.cbWndExtra = 0;
|
||||
wcex.hInstance = hInstance;
|
||||
wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_CLIENT));
|
||||
wcex.hCursor = LoadCursor(nullptr, IDC_ARROW);
|
||||
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
|
||||
wcex.lpszMenuName = nullptr;
|
||||
wcex.lpszClassName = szWindowClass;
|
||||
wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));
|
||||
|
||||
return RegisterClassExW(&wcex);
|
||||
}
|
||||
|
||||
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
|
||||
{
|
||||
g_hInstance = hInstance;
|
||||
|
||||
RECT rcWindow = { 0, 0, g_iWinSizeX, g_iWinSizeY };
|
||||
|
||||
AdjustWindowRect(&rcWindow, WS_OVERLAPPEDWINDOW, TRUE);
|
||||
|
||||
HWND hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
|
||||
CW_USEDEFAULT, 0, rcWindow.right - rcWindow.left, rcWindow.bottom - rcWindow.top, nullptr, nullptr, hInstance, nullptr);
|
||||
|
||||
if (!hWnd)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ShowWindow(hWnd, nCmdShow);
|
||||
UpdateWindow(hWnd);
|
||||
|
||||
g_hWnd = hWnd;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
if (ImGui_ImplWin32_WndProcHandler(hWnd, message, wParam, lParam))
|
||||
return true;
|
||||
switch (message)
|
||||
{
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
default:
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#include "resource.h"
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 45 KiB |
Binary file not shown.
@@ -0,0 +1,187 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>18.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{ac297b17-64c9-4cd6-8986-ec121672d125}</ProjectGuid>
|
||||
<RootNamespace>Client</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<EnableASAN>true</EnableASAN>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<EnableASAN>false</EnableASAN>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>../Bin/$(Configuration)/</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>../Bin/$(Configuration)/</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>../Public/;../../EngineSDK/Inc/;../../EngineSDK/Inc/DirectXTK/;../../EngineSDK/Inc/fMod/;../../EngineSDK/Inc/IMGUI/;../../EngineSDK/Inc/FX11/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>../../EngineSDK/Lib/$(ConfigurationName);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>Engine.lib;fmod_vc.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>../Public/;../../EngineSDK/Inc/;../../EngineSDK/Inc/DirectXTK/;../../EngineSDK/Inc/fMod/;../../EngineSDK/Inc/IMGUI/;../../EngineSDK/Inc/FX11/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>../../EngineSDK/Lib/$(ConfigurationName);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>Engine.lib;fmod_vc.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Public\Client_Define.h" />
|
||||
<ClInclude Include="..\Public\Client_Enum.h" />
|
||||
<ClInclude Include="..\Public\Client_Macro.h" />
|
||||
<ClInclude Include="..\Public\Level_GamePlay.h" />
|
||||
<ClInclude Include="..\Public\Level_Loading.h" />
|
||||
<ClInclude Include="..\Public\Level_Logo.h" />
|
||||
<ClInclude Include="..\Public\Loader.h" />
|
||||
<ClInclude Include="..\Public\MainApp.h" />
|
||||
<ClInclude Include="Client.h" />
|
||||
<ClInclude Include="framework.h" />
|
||||
<ClInclude Include="Resource.h" />
|
||||
<ClInclude Include="targetver.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Level_GamePlay.cpp" />
|
||||
<ClCompile Include="..\Private\Level_Loading.cpp" />
|
||||
<ClCompile Include="..\Private\Level_Logo.cpp" />
|
||||
<ClCompile Include="..\Private\Loader.cpp" />
|
||||
<ClCompile Include="..\Private\MainApp.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="Client.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Client.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Client.ico" />
|
||||
<Image Include="small.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,130 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Client.h">
|
||||
<Filter>99.Define\00.DEFAULT</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="framework.h">
|
||||
<Filter>99.Define\00.DEFAULT</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Resource.h">
|
||||
<Filter>99.Define\00.DEFAULT</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="targetver.h">
|
||||
<Filter>99.Define\00.DEFAULT</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Client_Define.h">
|
||||
<Filter>99.Define</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Client_Enum.h">
|
||||
<Filter>99.Define</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Client_Macro.h">
|
||||
<Filter>99.Define</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\MainApp.h">
|
||||
<Filter>00.MainApp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Level_Loading.h">
|
||||
<Filter>01.Levels\00.Loading</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Loader.h">
|
||||
<Filter>01.Levels\00.Loading\Loader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Level_Logo.h">
|
||||
<Filter>01.Levels\01.Logo</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Level_GamePlay.h">
|
||||
<Filter>01.Levels\02.GamePlay</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Client.ico">
|
||||
<Filter>99.Define\00.DEFAULT</Filter>
|
||||
</Image>
|
||||
<Image Include="small.ico">
|
||||
<Filter>99.Define\00.DEFAULT</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="99.Define">
|
||||
<UniqueIdentifier>{2899f7fc-0ed2-41c0-8e24-0d89f08ffc39}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="00.MainApp">
|
||||
<UniqueIdentifier>{2902e559-abdf-4dd7-ac4c-cc6e2b81ad0d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="99.Define\00.DEFAULT">
|
||||
<UniqueIdentifier>{05a0db73-4fbf-456c-9137-bb605c632d68}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Levels">
|
||||
<UniqueIdentifier>{aa499dd2-f7cb-4abd-9b3c-19f6e8427d7e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Levels\00.Loading">
|
||||
<UniqueIdentifier>{f8cbe454-4dbd-4c76-9875-e68ce151bd01}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Levels\01.Logo">
|
||||
<UniqueIdentifier>{5a95b59a-ca09-4ece-b00b-c4d2a419731f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Levels\00.Loading\Loader">
|
||||
<UniqueIdentifier>{37d70d8d-655c-498b-82a6-afd3d1726cd8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Levels\02.GamePlay">
|
||||
<UniqueIdentifier>{7e641382-9dfa-4da7-a8c8-a3ee06360e7a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects">
|
||||
<UniqueIdentifier>{27434478-691e-42a8-83c7-ecd1a60f46ce}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="03.Information">
|
||||
<UniqueIdentifier>{cdfbb346-6cae-4094-93cd-b82685efa68e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Cameras">
|
||||
<UniqueIdentifier>{7efd65d5-eb4d-4331-a746-f0fa2de6275b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Environment">
|
||||
<UniqueIdentifier>{8d0b4269-fe26-433b-b18c-9ec1a893b7cf}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI">
|
||||
<UniqueIdentifier>{f4bd3a1f-c925-4422-af6c-3a77cddd1960}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Player">
|
||||
<UniqueIdentifier>{a3879c8c-52d4-48a0-82d6-6c4a20f44d11}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\NPC">
|
||||
<UniqueIdentifier>{be98e943-7e2e-4776-a801-d8cd6e263f54}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\NPC\Hostile">
|
||||
<UniqueIdentifier>{6ba6d00f-0638-4aae-a5cd-a9ddcfc67b75}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\NPC\Ally">
|
||||
<UniqueIdentifier>{a7d0a3fa-b3dc-40c6-b258-ffcde49b05c1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Client.cpp">
|
||||
<Filter>99.Define\00.DEFAULT</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\pch.cpp">
|
||||
<Filter>99.Define\00.DEFAULT</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\MainApp.cpp">
|
||||
<Filter>00.MainApp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Level_Loading.cpp">
|
||||
<Filter>01.Levels\00.Loading</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Loader.cpp">
|
||||
<Filter>01.Levels\00.Loading\Loader</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Level_Logo.cpp">
|
||||
<Filter>01.Levels\01.Logo</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Level_GamePlay.cpp">
|
||||
<Filter>01.Levels\02.GamePlay</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Client.rc">
|
||||
<Filter>99.Define\00.DEFAULT</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
||||
@@ -0,0 +1,30 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++에서 생성한 포함 파일입니다.
|
||||
// 다음에서 사용 Client.rc
|
||||
|
||||
#define IDS_APP_TITLE 103
|
||||
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDD_CLIENT_DIALOG 102
|
||||
#define IDD_ABOUTBOX 103
|
||||
#define IDM_ABOUT 104
|
||||
#define IDM_EXIT 105
|
||||
#define IDI_CLIENT 107
|
||||
#define IDI_SMALL 108
|
||||
#define IDC_CLIENT 109
|
||||
#define IDC_MYICON 2
|
||||
#ifndef IDC_STATIC
|
||||
#define IDC_STATIC -1
|
||||
#endif
|
||||
// 다음은 새 개체에 사용할 기본값입니다.
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
#define _APS_NO_MFC 130
|
||||
#define _APS_NEXT_RESOURCE_VALUE 129
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||
#define _APS_NEXT_SYMED_VALUE 110
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,15 @@
|
||||
// header.h: 표준 시스템 포함 파일
|
||||
// 또는 프로젝트 특정 포함 파일이 들어 있는 포함 파일입니다.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "targetver.h"
|
||||
#define WIN32_LEAN_AND_MEAN // 거의 사용되지 않는 내용을 Windows 헤더에서 제외합니다.
|
||||
// Windows 헤더 파일
|
||||
#include <windows.h>
|
||||
// C 런타임 헤더 파일입니다.
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h>
|
||||
#include <memory.h>
|
||||
#include <tchar.h>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 45 KiB |
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
// // SDKDDKVer.h를 포함하면 최고 수준의 가용성을 가진 Windows 플랫폼이 정의됩니다.
|
||||
// 이전 Windows 플랫폼용 애플리케이션을 빌드하려는 경우에는 SDKDDKVer.h를 포함하기 전에
|
||||
// WinSDKVer.h를 포함하고 _WIN32_WINNT를 지원하려는 플랫폼으로 설정합니다.
|
||||
#include <SDKDDKVer.h>
|
||||
@@ -0,0 +1,113 @@
|
||||
#include "pch.h"
|
||||
#include "Level_GamePlay.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Level_Loading.h"
|
||||
#include "Layer.h"
|
||||
|
||||
CLevel_GamePlay::CLevel_GamePlay(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
HRESULT CLevel_GamePlay::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(Ready_Lights())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Markers())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Layer_UI(LAYER_UI))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Layer_Effect(LAYER_EFFECT))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_GamePlay::Initialize()
|
||||
{
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
void CLevel_GamePlay::Update(_float fTimeDelta)
|
||||
{
|
||||
if (true == m_pGameInstance->Check_LevelShouldChange()) {
|
||||
//if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::WOODS)))) {
|
||||
// return;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CLevel_GamePlay::Render()
|
||||
{
|
||||
SetWindowText(g_hWnd, TEXT("°ÔÀÓÇ÷¹ÀÌ·¹º§ÀÔ´Ï´Ù"));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Lights()
|
||||
{
|
||||
LIGHT_DESC LightDesc{};
|
||||
|
||||
LightDesc.eType = LIGHT::DIRECTIONAL;
|
||||
LightDesc.vDiffuse = _float4(0.8f, 0.8f, 0.8f, 0.f);
|
||||
LightDesc.vAmbient = _float4(0.2f, 0.2f, 0.2f, 0.f);
|
||||
LightDesc.vSpecular = _float4(0.f, 0.f, 0.f, 0.f);
|
||||
LightDesc.vDirection = _float4(1.f, -1.f, 1.f, 0.f);
|
||||
|
||||
if (FAILED(m_pGameInstance->On_Light(NEXT_LEVEL, TEXT("Main_Light"), LightDesc, nullptr))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_UI(const _wstring& strLayerTag)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_Camera()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_Sound()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Markers()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_Effect(const _wstring& strLayerTag)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
pair<CLevel*, function<void()>> CLevel_GamePlay::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, void* pArg)
|
||||
{
|
||||
CLevel_GamePlay* pInstance = new CLevel_GamePlay(pDevice, pContext, eLevelID);
|
||||
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CLevel_GamePlay");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return { pInstance, [pInstance]() { pInstance->Ready_Layer_Camera(); pInstance->Ready_Layer_Sound(); } };
|
||||
}
|
||||
|
||||
void CLevel_GamePlay::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
#include "pch.h"
|
||||
#include "Level_Loading.h"
|
||||
|
||||
#include "Loader.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Layer.h"
|
||||
#include "Level_Logo.h"
|
||||
#include "Level_GamePlay.h"
|
||||
|
||||
CLevel_Loading::CLevel_Loading(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
HRESULT CLevel_Loading::Initialize(LEVEL eNextLevelID)
|
||||
{
|
||||
m_eNextLevelID = eNextLevelID;
|
||||
|
||||
m_pLoader = CLoader::Create(m_pDevice, m_pContext, eNextLevelID);
|
||||
if (nullptr == m_pLoader) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Layer_BackGround(LAYER_UI))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CLevel_Loading::Update(_float fTimeDelta)
|
||||
{
|
||||
if (true == m_pLoader->isFinished()
|
||||
//&& m_pGameInstance->Key_Down(DIK_RETURN)
|
||||
)
|
||||
{
|
||||
pair<CLevel*, function<void()>> pairLevel = { nullptr, nullptr };
|
||||
SHADOW_LIGHT_DESC ShadowDesc{};
|
||||
|
||||
switch (m_eNextLevelID)
|
||||
{
|
||||
case LEVEL::LOGO:
|
||||
{
|
||||
pairLevel = CLevel_Logo::Create(m_pDevice, m_pContext, m_eNextLevelID);
|
||||
} break;
|
||||
case LEVEL::GAMEPLAY:
|
||||
{
|
||||
pairLevel = CLevel_GamePlay::Create(m_pDevice, m_pContext, m_eNextLevelID, nullptr);
|
||||
} break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (SUCCEEDED(m_pGameInstance->Change_Level(pairLevel.first))) {
|
||||
if (nullptr != pairLevel.second)
|
||||
{
|
||||
pairLevel.second();
|
||||
}
|
||||
return;
|
||||
}
|
||||
else /* FAILED */ {
|
||||
assert(false); // ·¹º§ º¯°æ ½ÇÆÐ
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CLevel_Loading::Render()
|
||||
{
|
||||
m_pLoader->Output();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_Loading::Ready_Layer_BackGround(const _wstring& strLayerTag)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CLevel_Loading* CLevel_Loading::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, LEVEL eNextLevelID)
|
||||
{
|
||||
CLevel_Loading* pInstance = new CLevel_Loading(pDevice, pContext, eLevelID);
|
||||
|
||||
if (FAILED(pInstance->Initialize(eNextLevelID)))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CLevel_Loading");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CLevel_Loading::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pLoader);
|
||||
|
||||
|
||||
}
|
||||
|
||||
HRESULT CLevel_Loading::Initialize()
|
||||
{
|
||||
assert(false && TEXT("Denied"));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
#include "pch.h"
|
||||
#include "Level_Logo.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "Level_Loading.h"
|
||||
|
||||
|
||||
CLevel_Logo::CLevel_Logo(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
HRESULT CLevel_Logo::Initialize()
|
||||
{
|
||||
if (FAILED(Ready_Layer_UI(LAYER_UI))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CLevel_Logo::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pGameInstance->Mouse_Up(DIM_RBUTTON))
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::GAMEPLAY)))) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CLevel_Logo::Render()
|
||||
{
|
||||
SetWindowText(g_hWnd, TEXT("·Î°í·¹º§ÀÔ´Ï´Ù"));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_Logo::Ready_Layer_UI(const _wstring& strLayerTag)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
pair<CLevel_Logo*, function<void()>> CLevel_Logo::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||
{
|
||||
CLevel_Logo* pInstance = new CLevel_Logo(pDevice, pContext, eLevelID);
|
||||
|
||||
if (FAILED(pInstance->Initialize()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CLevel_Logo");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return { pInstance, nullptr };
|
||||
}
|
||||
|
||||
void CLevel_Logo::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
#include "pch.h"
|
||||
#include "Loader.h"
|
||||
#include "GameInstance.h"
|
||||
#include "MainApp.h"
|
||||
|
||||
CLoader::CLoader(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: m_pDevice{ pDevice }
|
||||
, m_pContext{ pContext }
|
||||
, m_pGameInstance{ CGameInstance::GetInstance() }
|
||||
{
|
||||
SAFE_ADDREF(m_pGameInstance);
|
||||
SAFE_ADDREF(m_pDevice);
|
||||
SAFE_ADDREF(m_pContext);
|
||||
}
|
||||
|
||||
unsigned int APIENTRY LoadingMain(void* pArg)
|
||||
{
|
||||
CLoader* pLoader = static_cast<CLoader*>(pArg);
|
||||
|
||||
if (FAILED(pLoader->Loading())) {
|
||||
assert(false);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
HRESULT CLoader::Initialize(LEVEL eNextLevelID)
|
||||
{
|
||||
m_eNextLevelID = eNextLevelID;
|
||||
|
||||
InitializeCriticalSection(&m_CriticalSection);
|
||||
|
||||
m_hThread = (HANDLE)_beginthreadex(nullptr, 0, LoadingMain, this, 0, nullptr);
|
||||
if (0 == m_hThread)
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLoader::Loading()
|
||||
{
|
||||
|
||||
if (FAILED(CoInitializeEx(nullptr, 0))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
EnterCriticalSection(&m_CriticalSection);
|
||||
|
||||
HRESULT hr = {};
|
||||
|
||||
switch (m_eNextLevelID)
|
||||
{
|
||||
case LEVEL::LOGO:
|
||||
hr = Loading_For_Logo();
|
||||
break;
|
||||
case LEVEL::GAMEPLAY:
|
||||
hr = Loading_For_GamePlay();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
LeaveCriticalSection(&m_CriticalSection);
|
||||
|
||||
if (FAILED(hr))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CLoader::Output()
|
||||
{
|
||||
SetWindowText(g_hWnd, m_strMessage.c_str());
|
||||
}
|
||||
|
||||
HRESULT CLoader::Loading_For_Logo()
|
||||
{
|
||||
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
|
||||
|
||||
m_strMessage = TEXT("사운드를(을) 로딩 중 입니다.");
|
||||
|
||||
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
|
||||
|
||||
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
|
||||
|
||||
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
|
||||
|
||||
m_strMessage = TEXT("로딩이 완료되었습니다..");
|
||||
|
||||
m_isFinished = true;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLoader::Loading_For_GamePlay()
|
||||
{
|
||||
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
|
||||
|
||||
|
||||
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
|
||||
|
||||
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
|
||||
|
||||
m_strMessage = TEXT("이펙트를(을) 로딩 중 입니다.");
|
||||
|
||||
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
|
||||
|
||||
m_strMessage = TEXT("정보를 불러오는 중입니다.");
|
||||
|
||||
m_strMessage = TEXT("로딩이 완료되었습니다..");
|
||||
|
||||
m_isFinished = true;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CLoader* CLoader::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eNextLevelID)
|
||||
{
|
||||
CLoader* pInstance = new CLoader(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize(eNextLevelID)))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CLoader");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
void CLoader::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
WaitForSingleObject(m_hThread, INFINITE);
|
||||
|
||||
CloseHandle(m_hThread);
|
||||
|
||||
DeleteCriticalSection(&m_CriticalSection);
|
||||
|
||||
SAFE_RELEASE(m_pGameInstance);
|
||||
SAFE_RELEASE(m_pDevice);
|
||||
SAFE_RELEASE(m_pContext);
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
#include "pch.h"
|
||||
#include "MainApp.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Level_Loading.h"
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
_float g_fTimeMult = 1.f;
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
CMainApp::CMainApp()
|
||||
: m_pGameInstance{ CGameInstance::GetInstance() }
|
||||
{
|
||||
SAFE_ADDREF(m_pGameInstance);
|
||||
}
|
||||
|
||||
HRESULT CMainApp::Initialize()
|
||||
{
|
||||
ENGINE_DESC EngineDesc{};
|
||||
EngineDesc.hInstance = g_hInstance;
|
||||
EngineDesc.hWnd = g_hWnd;
|
||||
EngineDesc.iWinSizeX = g_iWinSizeX;
|
||||
EngineDesc.iWinSizeY = g_iWinSizeY;
|
||||
EngineDesc.iStaticLevel = g_iStaticLevel;
|
||||
EngineDesc.iNumLevels = ENUM_CLASS(LEVEL::END);
|
||||
EngineDesc.iNumCollidableGroup = ENUM_CLASS(COLLIDABLEOBJECT::END);
|
||||
|
||||
//ShowCursor(false);
|
||||
|
||||
if (FAILED(m_pGameInstance->Initialize_Engine(EngineDesc, &m_pDevice, &m_pContext))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Default_Setting())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Prototypes())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Start_Level(LEVEL::LOGO))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_IMGUI())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMainApp::Update(_float fTimeDelta)
|
||||
{
|
||||
ImGui_ImplDX11_NewFrame();
|
||||
ImGui_ImplWin32_NewFrame();
|
||||
GUI::NewFrame();
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Present_TimeCost();
|
||||
GUI::DragFloat("fTimeMult", &g_fTimeMult, 0.01f, 0.f, 4.f);
|
||||
m_pGameInstance->Update_Engine(fTimeDelta * g_fTimeMult);
|
||||
#endif // _DEBUG
|
||||
#ifndef _DEBUG
|
||||
m_pGameInstance->Update_Engine(fTimeDelta);
|
||||
#endif // !_DEBUG
|
||||
}
|
||||
|
||||
HRESULT CMainApp::Render()
|
||||
{
|
||||
_float4 vClearColor = _float4(0.f, 0.f, 1.f, 1.f);
|
||||
|
||||
m_pGameInstance->Render_Begin(&vClearColor);
|
||||
|
||||
m_pGameInstance->Draw();
|
||||
GUI::Render();
|
||||
//m_pGameInstance->Render_Font(TEXT("HYHL"), TEXT("ÇǰïÇØ ¸ø ½á"), _float2(0.f, 0.f), XMVectorSet(1.f, 0.f, 0.f, 1.f));
|
||||
ImGui_ImplDX11_RenderDrawData(GUI::GetDrawData());
|
||||
m_pGameInstance->Render_End();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMainApp::Compute_FrameCount()
|
||||
{
|
||||
m_pGameInstance->Compute_FrameCount();
|
||||
}
|
||||
|
||||
HRESULT CMainApp::Ready_Default_Setting()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMainApp::Start_Level(LEVEL eLevelID)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, eLevelID)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMainApp::Ready_Prototypes()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMainApp::Ready_IMGUI()
|
||||
{
|
||||
IMGUI_CHECKVERSION();
|
||||
ImGui::CreateContext();
|
||||
ImGuiIO& io = ImGui::GetIO(); (void)io;
|
||||
ImFont* font = nullptr;
|
||||
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
|
||||
io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad;
|
||||
|
||||
ImGui::StyleColorsDark();
|
||||
|
||||
ImGui_ImplWin32_Init(g_hWnd);
|
||||
ImGui_ImplDX11_Init(m_pDevice, m_pContext);
|
||||
|
||||
string strFontTag = "../Bin/Resources/Fonts/SHOWG.TTF";
|
||||
|
||||
ifstream ifile;
|
||||
|
||||
ifile.open(strFontTag);
|
||||
if (ifile)
|
||||
{
|
||||
font = io.Fonts->AddFontFromFileTTF(strFontTag.c_str(), 10.f, NULL, io.Fonts->GetGlyphRangesKorean());
|
||||
}
|
||||
IM_ASSERT(font != NULL);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMainApp::Release_IMGUI()
|
||||
{
|
||||
ImGui_ImplDX11_Shutdown();
|
||||
ImGui_ImplWin32_Shutdown();
|
||||
ImGui::DestroyContext();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CMainApp* CMainApp::Create()
|
||||
{
|
||||
CMainApp* pInstance = new CMainApp();
|
||||
|
||||
if (FAILED(pInstance->Initialize()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CMainApp");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CMainApp::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
Release_IMGUI();
|
||||
|
||||
SAFE_RELEASE(m_pDevice);
|
||||
SAFE_RELEASE(m_pContext);
|
||||
|
||||
m_pGameInstance->Release_Engine();
|
||||
|
||||
SAFE_RELEASE(m_pGameInstance);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
#include "pch.h"
|
||||
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include <process.h>
|
||||
#include "../Default/framework.h"
|
||||
#include "Client_Enum.h"
|
||||
#include "Client_Macro.h"
|
||||
|
||||
namespace Client
|
||||
{
|
||||
const unsigned int g_iWinSizeX = 1920;
|
||||
const unsigned int g_iWinSizeY = 1080;
|
||||
|
||||
}
|
||||
|
||||
using namespace Client;
|
||||
|
||||
extern HINSTANCE g_hInstance;
|
||||
extern HWND g_hWnd;
|
||||
|
||||
#ifdef _DEBUG
|
||||
extern float g_fTimeMult;
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
namespace Client
|
||||
{
|
||||
enum class LEVEL { STATIC, LOADING, LOGO, LOBY, GAMEPLAY, RESTART, END };
|
||||
enum class COLLIDABLEOBJECT { PLAYER, MONSTER, HOSTILE_HITBOX, ALLY_HITBOX, NEUTRAL_HITBOX, ENVIRIONMENT, NPC, ITEM, TRIGGERBOX, REGION, NOCOLLIDE, END };
|
||||
|
||||
enum class SHADER_PASS_ANIM { DEFAULT, SHADOW, CAPTURE, BLUR, END };
|
||||
enum class SHADER_PASS_CUBE { DEFAULT, SHADOW, BLUR, END };
|
||||
enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, END };
|
||||
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 };
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
#pragma once
|
||||
namespace Client {
|
||||
|
||||
#ifndef __TEXT
|
||||
#define __TEXT(quote) L##quote
|
||||
#endif // !__TEXT
|
||||
#ifndef TEXT
|
||||
#define TEXT(quote) __TEXT(quote)
|
||||
#endif // !TEXT
|
||||
|
||||
|
||||
#pragma region FX_NAME
|
||||
#define FX_ANIMMESH TEXT("FX_ANIMMESH")
|
||||
#define FX_MESH TEXT("FX_MESH")
|
||||
#define FX_POSTEX TEXT("FX_POSTEX")
|
||||
#define FX_NORTEX TEXT("FX_NORTEX")
|
||||
#define FX_CELL TEXT("FX_CELL")
|
||||
#define FX_DEFERRED TEXT("FX_DEFFERED")
|
||||
#define FX_PARTICLE TEXT("FX_PARTICLE")
|
||||
|
||||
#pragma endregion
|
||||
#pragma region MACRO_PROTOTYPE
|
||||
#define CURRENT_LEVEL m_pGameInstance->Get_CurrentLevelID()
|
||||
#define NEXT_LEVEL m_pGameInstance->Get_NextLevelID()
|
||||
|
||||
#pragma endregion
|
||||
#pragma region OBJECT
|
||||
|
||||
#pragma endregion
|
||||
#pragma region COMPONENT
|
||||
|
||||
#pragma endregion
|
||||
#pragma region MACRO_LAYER
|
||||
|
||||
#define LAYER_FLOOR TEXT("Layer_Floor")
|
||||
#define LAYER_WALL TEXT("Layer_Wall")
|
||||
#define LAYER_CUBE TEXT("Layer_Cube")
|
||||
#define LAYER_EDITOR_CAMERA TEXT("Layer_Editor_Camera")
|
||||
#define LAYER_BACKGROUND TEXT("Layer_BackGround")
|
||||
#define LAYER_MARKER TEXT("Layer_Marker")
|
||||
#define LAYER_PLAYER TEXT("Layer_Player")
|
||||
#define LAYER_CAMERA TEXT("Layer_Camera")
|
||||
#define LAYER_MONSTER TEXT("Layer_Monster")
|
||||
#define LAYER_UI TEXT("Layer_UI")
|
||||
#define LAYER_EFFECT TEXT("Layer_Effect")
|
||||
#define LAYER_HITBOX TEXT("Layer_HitBox")
|
||||
#define LAYER_CHUNK TEXT("Layer_Chunk")
|
||||
#define LAYER_DOT TEXT("Layer_Dot")
|
||||
#define LAYER_CELL TEXT("Layer_Cell")
|
||||
#define LAYER_TRIGGER TEXT("Layer_Trigger")
|
||||
|
||||
|
||||
#pragma endregion
|
||||
#pragma region MACRO_TEXTURE
|
||||
|
||||
#pragma endregion
|
||||
#pragma region MACRO_EXTRA
|
||||
|
||||
#pragma endregion
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Level.h"
|
||||
NS_BEGIN(Engine)
|
||||
NS_END
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CLevel_GamePlay final : public CLevel
|
||||
{
|
||||
private:
|
||||
CLevel_GamePlay(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID);
|
||||
virtual ~CLevel_GamePlay() = default;
|
||||
|
||||
public:
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize() override;
|
||||
HRESULT Initialize(void* pArg);
|
||||
HRESULT Ready_Lights();
|
||||
HRESULT Ready_Markers();
|
||||
HRESULT Ready_Layer_UI(const _wstring& strLayerTag);
|
||||
HRESULT Ready_Layer_Camera();
|
||||
HRESULT Ready_Layer_Sound();
|
||||
HRESULT Ready_Layer_Effect(const _wstring& strLayerTag);
|
||||
|
||||
public:
|
||||
static pair<CLevel*, function<void()>> Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, void* pArg);
|
||||
virtual void Free() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Level.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CLevel_Loading final : public CLevel
|
||||
{
|
||||
private:
|
||||
CLevel_Loading(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID);
|
||||
virtual ~CLevel_Loading() = default;
|
||||
|
||||
public:
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
virtual _uint Get_NextLevelID() override { return ENUM_CLASS(m_eNextLevelID); };
|
||||
|
||||
private:
|
||||
LEVEL m_eNextLevelID = { LEVEL::END };
|
||||
class CLoader* m_pLoader = { nullptr };
|
||||
private:
|
||||
virtual HRESULT Initialize(LEVEL eNextLevelID);
|
||||
HRESULT Initialize() override;
|
||||
HRESULT Ready_Layer_BackGround(const _wstring& strLayerTag);
|
||||
|
||||
public:
|
||||
static CLevel_Loading* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, LEVEL eNextLevelID);
|
||||
virtual void Free() override;
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Level.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CLevel_Logo final : public CLevel
|
||||
{
|
||||
private:
|
||||
CLevel_Logo(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID);
|
||||
virtual ~CLevel_Logo() = default;
|
||||
|
||||
public:
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize() override;
|
||||
HRESULT Ready_Layer_UI(const _wstring& strLayerTag);
|
||||
|
||||
|
||||
public:
|
||||
static pair<CLevel_Logo*, function<void()>> Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID);
|
||||
virtual void Free() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Base.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CGameInstance;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CLoader final : public CBase
|
||||
{
|
||||
private:
|
||||
CLoader(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual ~CLoader() = default;
|
||||
|
||||
public:
|
||||
HRESULT Loading();
|
||||
void Output();
|
||||
|
||||
public:
|
||||
_bool isFinished() const { return m_isFinished; }
|
||||
private:
|
||||
CGameInstance* m_pGameInstance = { nullptr };
|
||||
ID3D11Device* m_pDevice = { nullptr };
|
||||
ID3D11DeviceContext* m_pContext = { nullptr };
|
||||
LEVEL m_eNextLevelID = { LEVEL::END };
|
||||
|
||||
HANDLE m_hThread = {};
|
||||
CRITICAL_SECTION m_CriticalSection = {};
|
||||
_wstring m_strMessage = {};
|
||||
_bool m_isFinished = { false };
|
||||
|
||||
private:
|
||||
HRESULT Initialize(LEVEL eNextLevelID);
|
||||
HRESULT Loading_For_Logo();
|
||||
HRESULT Loading_For_GamePlay();
|
||||
|
||||
public:
|
||||
static CLoader* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eNextLevelID);
|
||||
virtual void Free() override;
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,44 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Base.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CGameInstance;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CMainApp final : public CBase
|
||||
{
|
||||
private:
|
||||
CMainApp();
|
||||
virtual ~CMainApp() = default;
|
||||
|
||||
public:
|
||||
HRESULT Initialize();
|
||||
void Update(_float fTimeDelta);
|
||||
HRESULT Render();
|
||||
void Compute_FrameCount();
|
||||
|
||||
private:
|
||||
CGameInstance* m_pGameInstance = { nullptr };
|
||||
ID3D11Device* m_pDevice = { nullptr };
|
||||
ID3D11DeviceContext* m_pContext = { nullptr };
|
||||
|
||||
private:
|
||||
HRESULT Ready_Default_Setting();
|
||||
HRESULT Start_Level(LEVEL eLevelID);
|
||||
HRESULT Ready_Prototypes();
|
||||
HRESULT Ready_IMGUI();
|
||||
HRESULT Release_IMGUI();
|
||||
|
||||
public:
|
||||
static CMainApp* Create();
|
||||
virtual void Free() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,185 @@
|
||||
|
||||
vector g_vMtrlDiffuse = 1.f;
|
||||
vector g_vMtrlAmbient = 1.f;
|
||||
vector g_vMtrlSpecular = 1.f;
|
||||
|
||||
sampler DefaultSampler = sampler_state
|
||||
{
|
||||
Filter = MIN_MAG_MIP_LINEAR;
|
||||
AddressU = wrap;
|
||||
AddressV = wrap;
|
||||
};
|
||||
|
||||
sampler ClampSampler = sampler_state
|
||||
{
|
||||
Filter = MIN_MAG_MIP_POINT;
|
||||
AddressU = clamp;
|
||||
AddressV = clamp;
|
||||
};
|
||||
|
||||
sampler MirrorSampler = sampler_state
|
||||
{
|
||||
Filter = MIN_MAG_MIP_LINEAR;
|
||||
AddressU = mirror;
|
||||
AddressV = mirror;
|
||||
};
|
||||
|
||||
sampler BorderZeroSampler = sampler_state
|
||||
{
|
||||
Filter = MIN_MAG_MIP_POINT;
|
||||
AddressU = Border;
|
||||
AddressV = Border;
|
||||
BorderColor = float4(0, 0, 0, 0);
|
||||
};
|
||||
|
||||
RasterizerState RS_Default
|
||||
{
|
||||
FillMode = Solid;
|
||||
CullMode = Back;
|
||||
};
|
||||
|
||||
RasterizerState RS_Nocull
|
||||
{
|
||||
FillMode = Solid;
|
||||
CullMode = None;
|
||||
FrontCounterClockwise = false;
|
||||
DepthClipEnable = false;
|
||||
};
|
||||
|
||||
RasterizerState RS_Nocull_Wireframe
|
||||
{
|
||||
FillMode = Wireframe;
|
||||
CullMode = None;
|
||||
FrontCounterClockwise = false;
|
||||
DepthBias = 0;
|
||||
SlopeScaledDepthBias = 0.f;
|
||||
DepthBiasClamp = 0.f;
|
||||
DepthClipEnable = false;
|
||||
ScissorEnable = false;
|
||||
MultisampleEnable = false;
|
||||
AntialiasedLineEnable = false;
|
||||
};
|
||||
|
||||
RasterizerState RS_Scissor
|
||||
{
|
||||
FillMode = Solid;
|
||||
CullMode = Back;
|
||||
FrontCounterClockwise = false;
|
||||
ScissorEnable = true;
|
||||
};
|
||||
|
||||
DepthStencilState DSS_Default
|
||||
{
|
||||
DepthEnable = true;
|
||||
DepthWriteMask = all;
|
||||
DepthFunc = less_equal;
|
||||
};
|
||||
|
||||
DepthStencilState DSS_None
|
||||
{
|
||||
DepthEnable = false;
|
||||
DepthWriteMask = zero;
|
||||
};
|
||||
|
||||
DepthStencilState DSS_Effect
|
||||
{
|
||||
DepthEnable = true;
|
||||
DepthWriteMask = zero;
|
||||
DepthFunc = less_equal;
|
||||
StencilEnable = false;
|
||||
};
|
||||
|
||||
BlendState BS_None
|
||||
{
|
||||
BlendEnable[0] = false;
|
||||
};
|
||||
|
||||
BlendState BS_AlphaBlend // ALPHA_BLEND
|
||||
{
|
||||
BlendEnable[0] = true;
|
||||
BlendEnable[1] = true;
|
||||
BlendEnable[2] = true;
|
||||
BlendEnable[3] = true;
|
||||
BlendEnable[4] = true;
|
||||
BlendEnable[5] = true;
|
||||
BlendEnable[6] = true;
|
||||
BlendEnable[7] = true;
|
||||
|
||||
// Ac * Aa + Bc * (1 - Aa);
|
||||
SrcBlend = Src_Alpha;
|
||||
DestBlend = Inv_Src_Alpha;
|
||||
BlendOp = Add;
|
||||
};
|
||||
|
||||
BlendState BS_Blend // ADDITIVE_BLEND
|
||||
{
|
||||
BlendEnable[0] = true;
|
||||
BlendEnable[1] = true;
|
||||
BlendEnable[2] = true;
|
||||
BlendEnable[3] = true;
|
||||
BlendEnable[4] = true;
|
||||
BlendEnable[5] = true;
|
||||
BlendEnable[6] = true;
|
||||
BlendEnable[7] = true;
|
||||
|
||||
// Ac * (1) + Bc * (1);
|
||||
SrcBlend = one;
|
||||
DestBlend = one;
|
||||
BlendOp = Add;
|
||||
};
|
||||
|
||||
BlendState BS_UIBlend
|
||||
{
|
||||
BlendEnable[0] = true;
|
||||
BlendEnable[1] = true;
|
||||
BlendEnable[2] = true;
|
||||
BlendEnable[3] = true;
|
||||
BlendEnable[4] = true;
|
||||
BlendEnable[5] = true;
|
||||
BlendEnable[6] = true;
|
||||
BlendEnable[7] = true;
|
||||
|
||||
SrcBlend = Src_Alpha;
|
||||
DestBlend = Inv_Src_Alpha;
|
||||
BlendOp = Add;
|
||||
|
||||
SrcBlendAlpha = One;
|
||||
DestBlendAlpha = Zero;
|
||||
BlendOpAlpha = Add;
|
||||
|
||||
RenderTargetWriteMask[0] = 0x0F; // RGBA 모두 출력
|
||||
};
|
||||
|
||||
float ShadowVisibility_hwPCF(Texture2D ShadowMap, float4 vLightClip, float2 vShadowMapSize, float bias)
|
||||
{
|
||||
float2 uv = float2(vLightClip.x / vLightClip.w, -vLightClip.y / vLightClip.w) * 0.5f + 0.5f;
|
||||
float fDepthCenter = saturate(vLightClip.z / vLightClip.w);
|
||||
float2 vTexel = 1.f / vShadowMapSize;
|
||||
|
||||
float fVisibility = 0.f;
|
||||
for (int v = -1; v <= 1; ++v)
|
||||
{
|
||||
for (int u = -1; u <= 1; ++u)
|
||||
{
|
||||
float2 vOffset = float2(u, v) * vTexel;
|
||||
float fDepth = ShadowMap.Sample(DefaultSampler, uv + vOffset).x;
|
||||
fVisibility += (fDepthCenter - bias > fDepth) ? 0.f : 1.f;
|
||||
}
|
||||
}
|
||||
return fVisibility / 9.f;
|
||||
}
|
||||
|
||||
float GetRimLight(float3 vCamPosition, float3 vPosition, float3 vNormal, float fRimPower, float fRimStrength)
|
||||
{
|
||||
float fRimLight = (1 - dot(normalize(vCamPosition - vPosition), vNormal));
|
||||
fRimLight = pow(fRimLight, fRimPower);
|
||||
fRimLight = fRimLight * fRimStrength;
|
||||
return fRimLight;
|
||||
}
|
||||
|
||||
float2 Get_MovedUV(float2 vOriginalUV, float fDeltaU, float fDeltaV, uint iIndexU, uint iIndexV)
|
||||
{
|
||||
float2 vDelta = float2(fDeltaU, fDeltaV);
|
||||
float2 vOffset = float2(iIndexU * fDeltaU, iIndexV * fDeltaV);
|
||||
return vOriginalUV * vDelta + vOffset;
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
|
||||
vector g_vColor = 1.f;
|
||||
float g_fFar;
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
};
|
||||
|
||||
struct VS_OUT
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
};
|
||||
|
||||
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);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_IN
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
};
|
||||
|
||||
struct PS_OUT
|
||||
{
|
||||
float4 vColor : SV_TARGET0;
|
||||
};
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
Out.vColor = g_vColor;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 DefaultTechnique
|
||||
{
|
||||
pass Default
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 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_MAIN();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,392 @@
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
matrix g_invMatView, g_invmatProj;
|
||||
matrix g_LightViewMatrix, g_LightProjMatrix;
|
||||
matrix g_PreShadowLightViewMatrix, g_PreShadowLightProjMatrix;
|
||||
|
||||
float g_fFar;
|
||||
float g_fPreShadowFar;
|
||||
uint g_iMaxShadowWidth;
|
||||
uint g_iMaxShadowHeight;
|
||||
float2 g_vResolution;
|
||||
|
||||
Texture2D g_Texture;
|
||||
|
||||
float g_fLightRange;
|
||||
float g_fSpotInnerAngle;
|
||||
float g_fSpotOuterAngle;
|
||||
vector g_vLightDir;
|
||||
vector g_vLightPos;
|
||||
vector g_vCamPosition;
|
||||
|
||||
Texture2D g_NormalTexture;
|
||||
Texture2D g_DiffuseTexture;
|
||||
Texture2D g_ShadeTexture;
|
||||
Texture2D g_DepthTexture;
|
||||
Texture2D g_SpecularTexture;
|
||||
Texture2D g_ShadowTexture;
|
||||
Texture2D g_PreShadowTexture;
|
||||
Texture2D g_BlurTexture;
|
||||
Texture2D g_BlurXTexture;
|
||||
|
||||
|
||||
vector g_vLightDiffuse;
|
||||
vector g_vLightAmbient;
|
||||
vector g_vLightSpecular;
|
||||
|
||||
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_MAIN_DEBUG(PS_IN In)
|
||||
{
|
||||
PS_OUT_BACKBUFFER Out;
|
||||
|
||||
Out.vBackBuffer = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_OUT_LIGHT
|
||||
{
|
||||
vector vShade : SV_TARGET0;
|
||||
vector vSpecular : SV_TARGET1;
|
||||
};
|
||||
|
||||
PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
|
||||
{
|
||||
PS_OUT_LIGHT Out;
|
||||
|
||||
vector vNormalDesc = g_NormalTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
float4 vNormal = vector(vNormalDesc.xyz * 2.f - 1.f, 0.0f);
|
||||
|
||||
Out.vShade = g_vLightDiffuse * saturate(max(dot(normalize(g_vLightDir) * -1.f, vNormal), 0.f) + (g_vLightAmbient * g_vMtrlAmbient));
|
||||
|
||||
vector vDepthDesc = g_DepthTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
float fViewZ = vDepthDesc.y * g_fFar;
|
||||
|
||||
vector vPosition;
|
||||
|
||||
{ // vDepthDesc과 vTexcoord.xy로부터 World Position의 추론
|
||||
/* 직육면체의 NDC */
|
||||
/* LocalPos * World * View * Proj * ( 1 / w ) */
|
||||
vPosition.x = In.vTexcoord.x * 2.f - 1.f;
|
||||
vPosition.y = In.vTexcoord.y * -2.f + 1.f;
|
||||
vPosition.z = vDepthDesc.x;
|
||||
vPosition.w = 1.f;
|
||||
|
||||
/* [* (1 / w)] 소거*/
|
||||
/* z나누기를 되돌림 */
|
||||
vPosition = vPosition * fViewZ;
|
||||
// vPosition.x = In.vTexcoord.x * 2.f - 1.f * Far;
|
||||
// vPosition.y = In.vTexcoord.y * -2.f + 1.f * Far;
|
||||
// vPosition.z = vDepthDesc.x * Far;
|
||||
// vPosition.w = Far;
|
||||
|
||||
vPosition = mul(vPosition, g_invmatProj);
|
||||
vPosition = mul(vPosition, g_invMatView);
|
||||
}
|
||||
vector vLook = vPosition - g_vCamPosition;
|
||||
vector vReflect = reflect(normalize(g_vLightDir), vNormal);
|
||||
|
||||
Out.vSpecular = (g_vLightSpecular * g_vMtrlSpecular) * pow(max(dot(normalize(vLook) * -1.f, normalize(vReflect)), 0.f), 50.f);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In)
|
||||
{
|
||||
PS_OUT_LIGHT Out;
|
||||
|
||||
vector vNormalDesc = g_NormalTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
float4 vNormal = vector(vNormalDesc.xyz * 2.f - 1.f, 0.f);
|
||||
|
||||
vector vDepthDesc = g_DepthTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float fViewZ = vDepthDesc.y * g_fFar;
|
||||
|
||||
vector vPosition;
|
||||
/* 0 ~ 1 에서 -1 ~ 1 */
|
||||
vPosition.x = In.vTexcoord.x * 2.f - 1.f;
|
||||
vPosition.y = In.vTexcoord.y * -2.f + 1.f;
|
||||
vPosition.z = vDepthDesc.x;
|
||||
vPosition.w = 1.f;
|
||||
vPosition = vPosition * fViewZ;
|
||||
vPosition = mul(vPosition, g_invmatProj);
|
||||
vPosition = mul(vPosition, g_invMatView);
|
||||
|
||||
vector vLightDir = vPosition - g_vLightPos;
|
||||
float fDistance = length(vLightDir);
|
||||
float fAttenuation = saturate((g_fLightRange - fDistance) / g_fLightRange);
|
||||
if (fAttenuation <= 0.f)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
vLightDir = normalize(vLightDir);
|
||||
|
||||
Out.vShade = fAttenuation * (g_vLightDiffuse * saturate(max(dot(vLightDir * -1.f, vNormal), 0.f) + (g_vLightAmbient * g_vMtrlAmbient)));
|
||||
|
||||
vector vLook = vPosition - g_vCamPosition;
|
||||
vector vReflect = reflect(vLightDir, vNormal);
|
||||
|
||||
Out.vSpecular = fAttenuation * ((g_vLightSpecular * g_vMtrlSpecular) * pow(max(dot(normalize(vLook) * -1.f, normalize(vReflect)), 0.f), 50.f));
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
|
||||
{
|
||||
PS_OUT_LIGHT Out;
|
||||
|
||||
vector vNormalDesc = g_NormalTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
float4 vNormal = vector(vNormalDesc.xyz * 2.f - 1.f, 0.f);
|
||||
|
||||
vector vDepthDesc = g_DepthTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float fViewZ = vDepthDesc.y * g_fFar;
|
||||
|
||||
vector vPosition;
|
||||
/* 0 ~ 1 에서 -1 ~ 1 */
|
||||
vPosition.x = In.vTexcoord.x * 2.f - 1.f;
|
||||
vPosition.y = In.vTexcoord.y * -2.f + 1.f;
|
||||
vPosition.z = vDepthDesc.x;
|
||||
vPosition.w = 1.f;
|
||||
vPosition = vPosition * fViewZ;
|
||||
vPosition = mul(vPosition, g_invmatProj);
|
||||
vPosition = mul(vPosition, g_invMatView);
|
||||
|
||||
vector vLightDir = vPosition - g_vLightPos;
|
||||
float fDistance = length(vLightDir);
|
||||
float fAttenuation = saturate((g_fLightRange - fDistance) / g_fLightRange);
|
||||
if (fAttenuation <= 0.f)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
vLightDir = normalize(vLightDir);
|
||||
vector vSpotDir = normalize(g_vLightDir);
|
||||
float fCosAngle = dot(vLightDir, vSpotDir);
|
||||
if (fCosAngle < g_fSpotOuterAngle)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
float fSpotAttenenuation = saturate((fCosAngle - g_fSpotInnerAngle) / (g_fSpotInnerAngle - g_fSpotOuterAngle));
|
||||
fAttenuation *= fSpotAttenenuation;
|
||||
|
||||
Out.vShade = fAttenuation * (g_vLightDiffuse * saturate(max(dot(vLightDir * -1.f, vNormal), 0.f) + (g_vLightAmbient * g_vMtrlAmbient)));
|
||||
|
||||
vector vLook = vPosition - g_vCamPosition;
|
||||
vector vReflect = reflect(vLightDir, vNormal);
|
||||
|
||||
Out.vSpecular = fAttenuation * ((g_vLightSpecular * g_vMtrlSpecular) * pow(max(dot(normalize(vLook) * -1.f, normalize(vReflect)), 0.f), 50.f));
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
float g_fWeights[13] =
|
||||
{
|
||||
0.0090, 0.0218, 0.0448, 0.0784, 0.1169,
|
||||
0.1486, 0.1610, 0.1486, 0.1169, 0.0784,
|
||||
0.0448, 0.0218, 0.0090
|
||||
};
|
||||
|
||||
PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
||||
{
|
||||
PS_OUT_BACKBUFFER Out;
|
||||
|
||||
vector vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (0.f == vDiffuse.a)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
vector vShade = g_ShadeTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
vector vSpecular = g_SpecularTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
Out.vBackBuffer = vDiffuse * vShade + vSpecular;
|
||||
|
||||
vector vDepthDesc = g_DepthTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float fViewZ = vDepthDesc.y * g_fFar;
|
||||
|
||||
vector vPosition, vPreShadowPosition;
|
||||
|
||||
/* (로컬위치 * 월드 * 뷰 * 투영 / w) -> (로컬위치 * 월드) */
|
||||
vPosition.x = In.vTexcoord.x * 2.f - 1.f;
|
||||
vPosition.y = In.vTexcoord.y * -2.f + 1.f;
|
||||
vPosition.z = vDepthDesc.x;
|
||||
vPosition.w = 1.f;
|
||||
|
||||
vPosition = vPosition * fViewZ;
|
||||
|
||||
vPosition = mul(vPosition, g_invmatProj);
|
||||
vPosition = mul(vPosition, g_invMatView);
|
||||
vPreShadowPosition = vPosition;
|
||||
/* (로컬위치 * 월드) -> (로컬위치 * 월드 * 광원의 뷰 * 광원의 투영 ) */
|
||||
vPosition = mul(vPosition, g_LightViewMatrix);
|
||||
vPosition = mul(vPosition, g_LightProjMatrix);
|
||||
vPreShadowPosition = mul(vPreShadowPosition, g_PreShadowLightViewMatrix);
|
||||
vPreShadowPosition = mul(vPreShadowPosition, g_PreShadowLightProjMatrix);
|
||||
|
||||
/* (로컬위치 * 월드 * 광원의 뷰 * 광원의 투영 ) -> (로컬위치 * 월드 * 광원의 뷰 * 광원의 투영 * (/w) */
|
||||
float2 vTexcoord, vPreShadowTexcoord;
|
||||
vTexcoord.x = (vPosition.x / vPosition.w) * 0.5f + 0.5f;
|
||||
vTexcoord.y = (vPosition.y / vPosition.w) * -0.5f + 0.5f;
|
||||
vPreShadowTexcoord.x = (vPreShadowPosition.x / vPreShadowPosition.w) * 0.5f + 0.5f;
|
||||
vPreShadowTexcoord.y = (vPreShadowPosition.y / vPreShadowPosition.w) * -0.5f + 0.5f;
|
||||
/* 광원의 NDC에서 샘플링 */
|
||||
float fVisibility_Dynamic = ShadowVisibility_hwPCF(g_ShadowTexture, vPosition, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), 0.0005f);
|
||||
float fVisibility_Static = ShadowVisibility_hwPCF(g_PreShadowTexture, vPreShadowPosition, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), 0.0005f);
|
||||
Out.vBackBuffer.rgb *= lerp(0.5f, 1.f, min(fVisibility_Dynamic, fVisibility_Static));
|
||||
//float fShadowDepth = g_ShadowTexture.Sample(DefaultSampler, vTexcoord).x;
|
||||
//float fPreShadowDepth = g_PreShadowTexture.Sample(DefaultSampler, vPreShadowTexcoord).x;
|
||||
//bool IsShadow = { false };
|
||||
//if (vPosition.z - 0.0005f > fShadowDepth)
|
||||
//{
|
||||
// IsShadow = true;
|
||||
//}
|
||||
//if (vPreShadowPosition.z - 0.0005f > fPreShadowDepth)
|
||||
//{
|
||||
// IsShadow = true;
|
||||
//}
|
||||
//if (true == IsShadow)
|
||||
//{
|
||||
// Out.vBackBuffer *= 0.5f;
|
||||
//}
|
||||
|
||||
float4 vColor = 0.f;
|
||||
|
||||
for (int i = -6; i < 7; ++i)
|
||||
{
|
||||
vTexcoord.x = In.vTexcoord.x;
|
||||
vTexcoord.y = In.vTexcoord.y + i / g_vResolution.y;
|
||||
|
||||
vColor += g_fWeights[i + 6] * g_BlurXTexture.Sample(BorderZeroSampler, vTexcoord);
|
||||
}
|
||||
|
||||
Out.vBackBuffer += vColor;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_OUT_BLUR_X
|
||||
{
|
||||
float4 vBlurX : SV_TARGET0;
|
||||
};
|
||||
|
||||
|
||||
PS_OUT_BLUR_X PS_MAIN_BLUR_X(PS_IN In)
|
||||
{
|
||||
PS_OUT_BLUR_X Out;
|
||||
|
||||
float2 vTexcoord;
|
||||
float4 vColor = 0.f;
|
||||
|
||||
for (int i = -6; i < 7; ++i)
|
||||
{
|
||||
vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x;
|
||||
vTexcoord.y = In.vTexcoord.y;
|
||||
|
||||
vColor += g_fWeights[i + 6] * g_BlurTexture.Sample(BorderZeroSampler, vTexcoord);
|
||||
}
|
||||
|
||||
Out.vBlurX = vColor;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
technique11 DefaultTechnique
|
||||
{
|
||||
pass DebugPass
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 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_MAIN_DEBUG();
|
||||
}
|
||||
|
||||
pass DirectionalPass
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_Blend, 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_MAIN_DIRECTIONAL();
|
||||
}
|
||||
|
||||
pass PointPass
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_Blend, 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_MAIN_POINT();
|
||||
}
|
||||
|
||||
pass CombinedPass
|
||||
{
|
||||
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_MAIN_COMBINED();
|
||||
}
|
||||
pass BlurPass
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_Blend, 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_MAIN_BLUR_X();
|
||||
}
|
||||
|
||||
pass SpotPass
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_Blend, 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_MAIN_SPOT();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,316 @@
|
||||
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
|
||||
bool g_bRimLight;
|
||||
bool g_bUseNormalMap;
|
||||
|
||||
float g_fFar;
|
||||
float g_LifeRatio;
|
||||
float g_fRimStrength;
|
||||
float g_fRimPower;
|
||||
float3 g_vRimColor;
|
||||
vector g_vCamPosition;
|
||||
|
||||
Texture2D g_DiffuseTexture;
|
||||
Texture2D g_NormalTexture;
|
||||
|
||||
matrix g_BoneMatrices[512];
|
||||
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
float3 vNormal : NORMAL;
|
||||
float3 vTangent : TANGENT;
|
||||
float3 vBinormal : BINORMAL;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
|
||||
uint4 vBlendIndex : BLENDINDEX;
|
||||
float4 vBlendWeight : BLENDWEIGHT;
|
||||
};
|
||||
|
||||
struct VS_OUT
|
||||
{
|
||||
float4 vPosition : SV_Position;
|
||||
float3 vNormal : NORMAL;
|
||||
float3 vTangent : TANGENT;
|
||||
float3 vBinormal : BINORMAL;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
float4 vWorldPos : TEXCOORD1;
|
||||
float4 vProjPos : TEXCOORD2;
|
||||
};
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
|
||||
float fWeightW = 1.f - (In.vBlendWeight.x + In.vBlendWeight.y + In.vBlendWeight.z);
|
||||
|
||||
matrix BoneMatrix =
|
||||
mul(g_BoneMatrices[In.vBlendIndex.x], In.vBlendWeight.x) +
|
||||
mul(g_BoneMatrices[In.vBlendIndex.y], In.vBlendWeight.y) +
|
||||
mul(g_BoneMatrices[In.vBlendIndex.z], In.vBlendWeight.z) +
|
||||
mul(g_BoneMatrices[In.vBlendIndex.w], fWeightW);
|
||||
|
||||
vector vPosition = mul(vector(In.vPosition, 1.f), BoneMatrix);
|
||||
vector vNormal = mul(vector(In.vNormal, 0.f), BoneMatrix);
|
||||
vector vBinormal = mul(vector(In.vBinormal, 0.f), BoneMatrix);
|
||||
vector vTangent = mul(vector(In.vTangent, 0.f), BoneMatrix);
|
||||
|
||||
|
||||
matrix matWV, matWVP;
|
||||
matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
Out.vPosition = mul(vPosition, matWVP);
|
||||
Out.vNormal = normalize(mul(vNormal, g_WorldMatrix)).xyz;
|
||||
Out.vBinormal = normalize(mul(vBinormal, g_WorldMatrix)).xyz;
|
||||
Out.vTangent = normalize(mul(vTangent, g_WorldMatrix)).xyz;
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vWorldPos = mul(vPosition, g_WorldMatrix);
|
||||
Out.vProjPos = Out.vPosition;
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct VS_OUT_CAPTUREDMODEL
|
||||
{
|
||||
float4 vPosition : SV_Position;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VS_OUT_BLUR
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
VS_OUT_CAPTUREDMODEL VS_CAPTUREDMODEL(VS_IN In)
|
||||
{
|
||||
VS_OUT_CAPTUREDMODEL Out;
|
||||
|
||||
float fWeightW = 1.f - (In.vBlendWeight.x + In.vBlendWeight.y + In.vBlendWeight.z);
|
||||
|
||||
matrix BoneMatrix =
|
||||
mul(g_BoneMatrices[In.vBlendIndex.x], In.vBlendWeight.x ) +
|
||||
mul(g_BoneMatrices[In.vBlendIndex.y], In.vBlendWeight.y ) +
|
||||
mul(g_BoneMatrices[In.vBlendIndex.z], In.vBlendWeight.z ) +
|
||||
mul(g_BoneMatrices[In.vBlendIndex.w], fWeightW);
|
||||
|
||||
vector vPosition = mul(vector(In.vPosition, 1.f), BoneMatrix);
|
||||
|
||||
matrix matWV, matWVP;
|
||||
matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
Out.vPosition = mul(vPosition, matWVP);
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
return Out;
|
||||
}
|
||||
|
||||
VS_OUT_BLUR VS_MAIN_BLUR(VS_IN In)
|
||||
{
|
||||
VS_OUT_BLUR Out;
|
||||
|
||||
float fWeightW = 1.f - (In.vBlendWeight.x + In.vBlendWeight.y + In.vBlendWeight.z);
|
||||
|
||||
matrix BoneMatrix =
|
||||
mul(g_BoneMatrices[In.vBlendIndex.x], In.vBlendWeight.x) +
|
||||
mul(g_BoneMatrices[In.vBlendIndex.y], In.vBlendWeight.y) +
|
||||
mul(g_BoneMatrices[In.vBlendIndex.z], In.vBlendWeight.z) +
|
||||
mul(g_BoneMatrices[In.vBlendIndex.w], fWeightW);
|
||||
|
||||
vector vPosition = mul(vector(In.vPosition, 1.f), BoneMatrix);
|
||||
|
||||
matrix matWV, matWVP;
|
||||
matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
Out.vPosition = mul(vPosition, matWVP);
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct VS_OUT_SHADOW
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float4 vProjPos : TEXCOORD0;
|
||||
};
|
||||
|
||||
VS_OUT_SHADOW VS_MAIN_SHADOW(VS_IN In)
|
||||
{
|
||||
VS_OUT_SHADOW Out;
|
||||
|
||||
float fWeightW = 1.f - (In.vBlendWeight.x + In.vBlendWeight.y + In.vBlendWeight.z);
|
||||
|
||||
matrix BoneMatrix = g_BoneMatrices[In.vBlendIndex.x] * In.vBlendWeight.x +
|
||||
g_BoneMatrices[In.vBlendIndex.y] * In.vBlendWeight.y +
|
||||
g_BoneMatrices[In.vBlendIndex.z] * In.vBlendWeight.z +
|
||||
g_BoneMatrices[In.vBlendIndex.w] * fWeightW;
|
||||
|
||||
/* 스키닝 */
|
||||
vector vPosition = mul(vector(In.vPosition, 1.f), BoneMatrix);
|
||||
|
||||
matrix matWV, matWVP;
|
||||
|
||||
matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
Out.vPosition = mul(vPosition, matWVP);
|
||||
Out.vProjPos = Out.vPosition;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_IN
|
||||
{
|
||||
float4 vPosition : SV_Position;
|
||||
float3 vNormal : NORMAL;
|
||||
float3 vTangent : TANGENT;
|
||||
float3 vBinormal : BINORMAL;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
float4 vWorldPos : TEXCOORD1;
|
||||
float4 vProjPos : TEXCOORD2;
|
||||
};
|
||||
|
||||
struct PS_OUT
|
||||
{
|
||||
float4 vDiffuse : SV_TARGET0;
|
||||
float4 vNormal : SV_TARGET1;
|
||||
float4 vDepth : SV_TARGET2;
|
||||
};
|
||||
|
||||
PS_OUT PS_MAIN(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);
|
||||
|
||||
if (true == g_bRimLight)
|
||||
{
|
||||
float fRimLight = GetRimLight(g_vCamPosition.xyz, In.vWorldPos.xyz, vNormal, g_fRimPower, g_fRimStrength);
|
||||
vMtrlDiffuse.xyz = (vMtrlDiffuse.xyz * (1 - fRimLight)) + g_vRimColor * fRimLight;
|
||||
}
|
||||
|
||||
|
||||
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
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float4 vProjPos : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct PS_OUT_SHADOW
|
||||
{
|
||||
float4 vShadowLightDepth : SV_TARGET0;
|
||||
};
|
||||
|
||||
PS_OUT_SHADOW PS_MAIN_SHADOW(PS_IN_SHADOW In)
|
||||
{
|
||||
PS_OUT_SHADOW Out = (PS_OUT_SHADOW) 0;
|
||||
|
||||
Out.vShadowLightDepth.x = In.vProjPos.z;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_IN_CAPTUREDMODEL
|
||||
{
|
||||
float4 vPosition : SV_Position;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
struct PS_OUT_CAPTUREDMODEL
|
||||
{
|
||||
float4 vColor : SV_TARGET0;
|
||||
};
|
||||
|
||||
PS_OUT_CAPTUREDMODEL PS_CAPTUREDMODEL(PS_IN_CAPTUREDMODEL In)
|
||||
{
|
||||
PS_OUT_CAPTUREDMODEL Out = (PS_OUT_CAPTUREDMODEL) 0;
|
||||
|
||||
Out.vColor = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
Out.vColor.a = saturate(1 - g_LifeRatio) * 0.5f;
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_IN_BLUR
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
struct PS_OUT_BLUR
|
||||
{
|
||||
float4 vDiffuse : SV_TARGET0;
|
||||
};
|
||||
|
||||
PS_OUT_BLUR PS_MAIN_BLUR(PS_IN_BLUR In)
|
||||
{
|
||||
PS_OUT_BLUR Out = (PS_OUT_BLUR) 0;
|
||||
|
||||
vector vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
Out.vDiffuse = saturate(vMtrlDiffuse);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
technique11 DefaultTechnique
|
||||
{
|
||||
pass Default
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 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_MAIN();
|
||||
}
|
||||
|
||||
pass ShadowPass
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN_SHADOW();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN_SHADOW();
|
||||
}
|
||||
|
||||
pass CAPTUREDMODELPASS
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Effect, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_CAPTUREDMODEL();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_CAPTUREDMODEL();
|
||||
}
|
||||
pass BlurPass // 9
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_Blend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN_BLUR();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN_BLUR();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,420 @@
|
||||
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
|
||||
bool g_bUVTargetDiffuse;
|
||||
bool g_bAdditiveDisolve;
|
||||
float g_LifeRatio;
|
||||
float g_fFar;
|
||||
float g_fTime;
|
||||
float g_fDeltaU;
|
||||
float g_fDeltaV;
|
||||
uint g_iIndexU;
|
||||
uint g_iIndexV;
|
||||
|
||||
float g_fDisolveRatio;
|
||||
|
||||
float2 g_vClipBoxSize;
|
||||
float2 g_vClipBoxLTPos;
|
||||
|
||||
Texture2D g_DiffuseTexture;
|
||||
Texture2D g_MaskingTexture;
|
||||
Texture2D g_ClippingTexture;
|
||||
Texture2D g_DisolveTexture;
|
||||
Texture2D g_NormalTexture;
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
float3 vNormal : NORMAL;
|
||||
float3 vTangent : TANGENT;
|
||||
float3 vBinormal : BINORMAL;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VS_OUT
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float3 vNormal : NORMAL;
|
||||
float3 vTangent : TANGENT;
|
||||
float3 vBinormal : BINORMAL;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
float4 vWorldPos : TEXCOORD1;
|
||||
float4 vProjPos : TEXCOORD2;
|
||||
};
|
||||
|
||||
struct VS_OUT_BLUR
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VS_OUT_SHADOW
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float4 vProjPos : TEXCOORD0;
|
||||
};
|
||||
|
||||
|
||||
VS_OUT_BLUR VS_MAIN_BLUR(VS_IN In)
|
||||
{
|
||||
VS_OUT_BLUR 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;
|
||||
}
|
||||
|
||||
VS_OUT_SHADOW VS_MAIN_SHADOW(VS_IN In)
|
||||
{
|
||||
VS_OUT_SHADOW 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.vProjPos = Out.vPosition;
|
||||
|
||||
return Out;
|
||||
}
|
||||
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.vNormal = normalize(mul(vector(In.vNormal, 0.f), g_WorldMatrix)).xyz;
|
||||
Out.vTangent = normalize(mul(vector(In.vTangent, 0.f), g_WorldMatrix)).xyz;
|
||||
Out.vBinormal = normalize(mul(vector(In.vBinormal, 0.f), g_WorldMatrix)).xyz;
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vWorldPos = mul(vector(In.vPosition, 1.f), g_WorldMatrix);
|
||||
Out.vProjPos = Out.vPosition;
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct VS_OUT_EFFECT
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
VS_OUT_EFFECT VS_EFFECT(VS_IN In)
|
||||
{
|
||||
VS_OUT_EFFECT 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 VS_OUT_CAPTUREDMODEL
|
||||
{
|
||||
float4 vPosition : SV_Position;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
VS_OUT_CAPTUREDMODEL VS_CAPTUREDMODEL(VS_IN In)
|
||||
{
|
||||
VS_OUT_CAPTUREDMODEL 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;
|
||||
float3 vNormal : NORMAL;
|
||||
float3 vTangent : TANGENT;
|
||||
float3 vBinormal : BINORMAL;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
float4 vWorldPos : TEXCOORD1;
|
||||
float4 vProjPos : TEXCOORD2;
|
||||
};
|
||||
|
||||
struct PS_OUT
|
||||
{
|
||||
float4 vDiffuse : SV_TARGET0;
|
||||
float4 vNormal : SV_TARGET1;
|
||||
float4 vDepth : SV_TARGET2;
|
||||
};
|
||||
PS_OUT PS_MAIN(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
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float4 vProjPos : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct PS_OUT_SHADOW
|
||||
{
|
||||
float4 vShadowLightDepth : SV_TARGET0;
|
||||
};
|
||||
|
||||
struct PS_IN_BLUR
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
struct PS_OUT_BLUR
|
||||
{
|
||||
float4 vDiffuse : SV_TARGET0;
|
||||
};
|
||||
|
||||
|
||||
PS_OUT_BLUR PS_MAIN_BLUR(PS_IN_BLUR In)
|
||||
{
|
||||
PS_OUT_BLUR Out = (PS_OUT_BLUR) 0;
|
||||
|
||||
vector vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
Out.vDiffuse = saturate(vMtrlDiffuse);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT_SHADOW PS_MAIN_SHADOW(PS_IN_SHADOW In)
|
||||
{
|
||||
PS_OUT_SHADOW Out = (PS_OUT_SHADOW) 0;
|
||||
|
||||
Out.vShadowLightDepth.x = In.vProjPos.z;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_IN_EFFECT
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
struct PS_OUT_EFFECT
|
||||
{
|
||||
float4 vColor : SV_TARGET0;
|
||||
};
|
||||
|
||||
|
||||
PS_OUT_EFFECT PS_EFFECT_UVMOVE(PS_IN_EFFECT In)
|
||||
{
|
||||
PS_OUT_EFFECT Out;
|
||||
|
||||
float2 vMovedUV = Get_MovedUV(In.vTexcoord, g_fDeltaU, g_fDeltaV, g_iIndexU, g_iIndexV);
|
||||
|
||||
vector vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, vMovedUV);
|
||||
|
||||
if (vDiffuse.a < 0.01f)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
|
||||
Out.vColor = vDiffuse;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT_EFFECT PS_EFFECT(PS_IN_EFFECT In)
|
||||
{
|
||||
PS_OUT_EFFECT Out;
|
||||
|
||||
float2 uv = In.vTexcoord;
|
||||
float2 vClipBoxUV = g_vClipBoxLTPos + g_vClipBoxSize * In.vTexcoord;
|
||||
uv.x += g_fDeltaU * g_fTime;
|
||||
uv.y += g_fDeltaV * g_fTime;
|
||||
|
||||
vector vDiffuse;
|
||||
vector vMasking;
|
||||
vector vClipCell = g_ClippingTexture.Sample(DefaultSampler, vClipBoxUV);
|
||||
vector vDisolveCell = g_DisolveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bUVTargetDiffuse)
|
||||
{
|
||||
vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, uv);
|
||||
vMasking = g_MaskingTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
}
|
||||
else
|
||||
{
|
||||
vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vMasking = g_MaskingTexture.Sample(DefaultSampler, uv);
|
||||
}
|
||||
if (true == g_bAdditiveDisolve)
|
||||
{
|
||||
vDiffuse.a = saturate(vDiffuse.a * vMasking.r * vClipCell.r + vDisolveCell.r * g_fDisolveRatio);
|
||||
}
|
||||
else
|
||||
{
|
||||
vDiffuse.a = saturate(vDiffuse.a * vMasking.r * vClipCell.r - vDisolveCell.r * g_fDisolveRatio);
|
||||
}
|
||||
|
||||
if (vDiffuse.a < 0.01f)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
|
||||
Out.vColor = vDiffuse;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_IN_CAPTUREDMODEL
|
||||
{
|
||||
float4 vPosition : SV_Position;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
struct PS_OUT_CAPTUREDMODEL
|
||||
{
|
||||
float4 vColor : SV_TARGET0;
|
||||
};
|
||||
|
||||
PS_OUT_CAPTUREDMODEL PS_CAPTUREDMODEL(PS_IN_CAPTUREDMODEL In)
|
||||
{
|
||||
PS_OUT_CAPTUREDMODEL Out = (PS_OUT_CAPTUREDMODEL) 0;
|
||||
|
||||
Out.vColor = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
Out.vColor.a = saturate(1 - g_LifeRatio) * 0.5f;
|
||||
return Out;
|
||||
}
|
||||
technique11 MeshTechnique11
|
||||
{
|
||||
pass MeshPass // 0
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 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_MAIN();
|
||||
}
|
||||
|
||||
pass ShadowPass
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN_SHADOW();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN_SHADOW();
|
||||
}
|
||||
|
||||
pass SkyBoxPass // 2
|
||||
{
|
||||
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;
|
||||
PixelShader = compile ps_5_0 PS_MAIN();
|
||||
}
|
||||
|
||||
pass ALPHABlendPass // 3
|
||||
{
|
||||
SetRasterizerState(RS_Nocull_Wireframe);
|
||||
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_MAIN();
|
||||
}
|
||||
|
||||
|
||||
|
||||
pass EffectPass_AlphaBlend // 4
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Effect, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_EFFECT();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_EFFECT();
|
||||
}
|
||||
pass EffectPass_Blend // 5
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Effect, 0);
|
||||
SetBlendState(BS_Blend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_EFFECT();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_EFFECT();
|
||||
}
|
||||
pass EffectPass_AlphaBlend_Cull // 6
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Effect, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_EFFECT();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_EFFECT();
|
||||
}
|
||||
pass EffectPass_Blend_Cull // 7
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Effect, 0);
|
||||
SetBlendState(BS_Blend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_EFFECT();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_EFFECT();
|
||||
}
|
||||
pass CAPTUREDMODELPASS // 8
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Effect, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_CAPTUREDMODEL();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_CAPTUREDMODEL();
|
||||
}
|
||||
pass BlurPass // 9
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_Blend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN_BLUR();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN_BLUR();
|
||||
}
|
||||
pass UVMovePass
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Effect, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_EFFECT();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_EFFECT_UVMOVE();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
|
||||
float g_fFar;
|
||||
|
||||
Texture2D g_DiffuseTexture;
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
float3 vNormal : NORMAL;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VS_OUT
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float4 vNormal : NORMAL;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
float4 vWorldPos : TEXCOORD1;
|
||||
float4 vProjPos : TEXCOORD2;
|
||||
};
|
||||
|
||||
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;
|
||||
Out.vNormal = normalize(mul(vector(In.vNormal, 0.f), g_WorldMatrix));
|
||||
Out.vWorldPos = mul(vector(In.vPosition, 1.f), g_WorldMatrix);
|
||||
Out.vProjPos = Out.vPosition;
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_IN
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float4 vNormal : NORMAL;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
float4 vWorldPos : TEXCOORD1;
|
||||
float4 vProjPos : TEXCOORD2;
|
||||
};
|
||||
|
||||
struct PS_OUT
|
||||
{
|
||||
float4 vDiffuse : SV_TARGET0;
|
||||
float4 vNormal : SV_TARGET1;
|
||||
float4 vDepth : SV_TARGET2;
|
||||
};
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
vector vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord * 30.f);
|
||||
if (vMtrlDiffuse.a < 0.4f)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
Out.vDiffuse = vMtrlDiffuse;
|
||||
|
||||
Out.vNormal = float4(In.vNormal.xyz * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4(In.vProjPos.z / In.vProjPos.w, In.vProjPos.w / g_fFar, 0.0f, 1.0f);
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 NorTexTechnique11
|
||||
{
|
||||
pass NorTexPass
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 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_MAIN();
|
||||
}
|
||||
pass TerrainPass
|
||||
{
|
||||
SetRasterizerState(RS_Nocull_Wireframe);
|
||||
SetDepthStencilState(DSS_Default, 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_MAIN();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
|
||||
float g_fDeltaU;
|
||||
float g_fDeltaV;
|
||||
uint g_iIndexU;
|
||||
uint g_iIndexV;
|
||||
|
||||
Texture2D g_DiffuseTexture;
|
||||
Texture2D g_MaskingTexture;
|
||||
Texture2D g_DisolveTexture;
|
||||
vector g_vCamPosition;
|
||||
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
|
||||
row_major float4x4 TransformMatrix : WORLD;
|
||||
|
||||
float2 vLifeTime : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VS_OUT
|
||||
{
|
||||
float4 vPosition : POSITION;
|
||||
float fSize : PSIZE;
|
||||
float2 vLifeTime : TEXCOORD0;
|
||||
};
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
|
||||
vector vPosition = mul(vector(In.vPosition, 1.f), In.TransformMatrix);
|
||||
|
||||
Out.vPosition = mul(vPosition, g_WorldMatrix);
|
||||
Out.fSize = length(In.TransformMatrix._11_12_13);
|
||||
Out.vLifeTime = In.vLifeTime;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct GS_IN
|
||||
{
|
||||
float4 vPosition : POSITION;
|
||||
float fSize : PSIZE;
|
||||
float2 vLifeTime : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct GS_OUT
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
float2 vLifeTime : TEXCOORD1;
|
||||
};
|
||||
|
||||
//GS_MAIN(triangle GS_INIn[3])
|
||||
//GS_MAIN(line GS_IN In[2])
|
||||
|
||||
[maxvertexcount(6)]
|
||||
void GS_MAIN(point GS_IN In[1], inout TriangleStream<GS_OUT> OutStream)
|
||||
{
|
||||
GS_OUT Out[4];
|
||||
|
||||
float3 vLook = (g_vCamPosition - In[0].vPosition).xyz;
|
||||
float3 vRight = normalize(cross(float3(0.f, 1.f, 0.f), vLook)) * In[0].fSize * 0.5f;
|
||||
float3 vUp = normalize(cross(vLook, vRight)) * In[0].fSize * 0.5f;
|
||||
|
||||
|
||||
matrix matVP = mul(g_ViewMatrix, g_ProjMatrix);
|
||||
|
||||
Out[0].vPosition = mul(float4(In[0].vPosition.xyz + vRight + vUp, 1.f), matVP);
|
||||
Out[0].vTexcoord = float2(0.f, 0.f);
|
||||
Out[0].vLifeTime = In[0].vLifeTime;
|
||||
|
||||
Out[1].vPosition = mul(float4(In[0].vPosition.xyz - vRight + vUp, 1.f), matVP);
|
||||
Out[1].vTexcoord = float2(1.f, 0.f);
|
||||
Out[1].vLifeTime = In[0].vLifeTime;
|
||||
|
||||
Out[2].vPosition = mul(float4(In[0].vPosition.xyz - vRight - vUp, 1.f), matVP);
|
||||
Out[2].vTexcoord = float2(1.f, 1.f);
|
||||
Out[2].vLifeTime = In[0].vLifeTime;
|
||||
|
||||
Out[3].vPosition = mul(float4(In[0].vPosition.xyz + vRight - vUp, 1.f), matVP);
|
||||
Out[3].vTexcoord = float2(0.f, 1.f);
|
||||
Out[3].vLifeTime = In[0].vLifeTime;
|
||||
|
||||
|
||||
OutStream.Append(Out[0]);
|
||||
OutStream.Append(Out[1]);
|
||||
OutStream.Append(Out[2]);
|
||||
OutStream.RestartStrip();
|
||||
|
||||
OutStream.Append(Out[0]);
|
||||
OutStream.Append(Out[2]);
|
||||
OutStream.Append(Out[3]);
|
||||
OutStream.RestartStrip();
|
||||
}
|
||||
|
||||
/* 출력된 정점 위치벡터의 w값으로 모든 성분을 나눈다 -> 투영스페이스로 변환 */
|
||||
/* 정점의 위치에 대해서 뷰포트 변환을 수행한다 */
|
||||
/* 정점의 모든 정보를 보간하여 픽셀을 만든다. -> 래스터라이즈 */
|
||||
|
||||
struct PS_IN
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
float2 vLifeTime : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct PS_OUT
|
||||
{
|
||||
float4 vColor : SV_TARGET0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* 픽셀 쉐이더 : 픽셀의 최종적인 색을 결정하낟. */
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
float2 vMovedUV = Get_MovedUV(In.vTexcoord, g_fDeltaU, g_fDeltaV, g_iIndexU, g_iIndexV);
|
||||
|
||||
vector vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, vMovedUV);
|
||||
vector vMask = g_MaskingTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vector vDisolve = g_DisolveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
vDiffuse.a = saturate(vDiffuse.a * vMask.r - vDisolve.r * (2.f * In.vLifeTime.x / In.vLifeTime.y));
|
||||
Out.vColor = vDiffuse;
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 DefaultTechnique
|
||||
{
|
||||
pass Explosion
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Effect, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = compile gs_5_0 GS_MAIN();
|
||||
PixelShader = compile ps_5_0 PS_MAIN();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
Texture2D g_DepthTexture;
|
||||
|
||||
float g_fFar;
|
||||
float g_fDeltaU;
|
||||
float g_fDeltaV;
|
||||
uint g_iIndexU;
|
||||
uint g_iIndexV;
|
||||
|
||||
Texture2D g_Texture;
|
||||
Texture2D g_DiffuseTexture;
|
||||
Texture2D g_MaskingTexture;
|
||||
|
||||
|
||||
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
|
||||
{
|
||||
float4 vColor : SV_Target0;
|
||||
};
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
Out.vColor = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
return Out;
|
||||
}
|
||||
PS_OUT PS_UVMove(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
float2 vMovedUV = Get_MovedUV(In.vTexcoord, g_fDeltaU, g_fDeltaV, g_iIndexU, g_iIndexV);
|
||||
|
||||
Out.vColor = g_Texture.Sample(DefaultSampler, vMovedUV);
|
||||
clip(Out.vColor.a - 0.01f);
|
||||
|
||||
return Out;
|
||||
}
|
||||
PS_OUT PS_Trail(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
vector vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vector vMasking = g_MaskingTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
vDiffuse.a = vDiffuse.a * vMasking.r;
|
||||
Out.vColor = vDiffuse;
|
||||
Out.vColor.a *= In.vTexcoord.x;
|
||||
clip(Out.vColor.a - 0.01f);
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
technique11 PosTexTechnique11
|
||||
{
|
||||
pass PosTexPass
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 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_MAIN();
|
||||
}
|
||||
pass ScissorPass
|
||||
{
|
||||
SetRasterizerState(RS_Scissor);
|
||||
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_MAIN();
|
||||
}
|
||||
pass UIPass
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_UIBlend, 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_MAIN();
|
||||
}
|
||||
pass UVMovePass
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_None, 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_UVMove();
|
||||
}
|
||||
pass TrailPass
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_Blend, 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_Trail();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,193 @@
|
||||
#include "pch.h"
|
||||
#include "framework.h"
|
||||
#include "Editor.h"
|
||||
#include "MainApp.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
#define MAX_LOADSTRING 100
|
||||
|
||||
HINSTANCE g_hInstance;
|
||||
HWND g_hWnd;
|
||||
WCHAR szTitle[MAX_LOADSTRING];
|
||||
WCHAR szWindowClass[MAX_LOADSTRING];
|
||||
|
||||
ATOM MyRegisterClass(HINSTANCE hInstance);
|
||||
BOOL InitInstance(HINSTANCE, int);
|
||||
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM);
|
||||
extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
|
||||
_In_opt_ HINSTANCE hPrevInstance,
|
||||
_In_ LPWSTR lpCmdLine,
|
||||
_In_ int nCmdShow)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
|
||||
#endif
|
||||
UNREFERENCED_PARAMETER(hPrevInstance);
|
||||
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||
|
||||
|
||||
CMainApp* pMainApp = { nullptr };
|
||||
|
||||
LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
|
||||
LoadStringW(hInstance, IDC_EDITOR, szWindowClass, MAX_LOADSTRING);
|
||||
MyRegisterClass(hInstance);
|
||||
|
||||
if (!InitInstance(hInstance, nCmdShow))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_EDITOR));
|
||||
|
||||
MSG msg;
|
||||
|
||||
pMainApp = CMainApp::Create();
|
||||
if (nullptr == pMainApp)
|
||||
return FALSE;
|
||||
|
||||
CGameInstance* pGameInstance = CGameInstance::GetInstance();
|
||||
SAFE_ADDREF(pGameInstance);
|
||||
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_Default")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_60")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_PriorityUpdate")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_Update")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_LateUpdate")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_DrawCall")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_Present")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pGameInstance->Add_Timer(TEXT("Timer_FrameCount")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
_float fTimeAcc = { };
|
||||
|
||||
while (true)
|
||||
{
|
||||
if (PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE))
|
||||
{
|
||||
if (WM_QUIT == msg.message)
|
||||
break;
|
||||
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
|
||||
pGameInstance->Compute_TimeDelta(TEXT("Timer_Default"));
|
||||
|
||||
fTimeAcc += pGameInstance->Get_TimeDelta(TEXT("Timer_Default"));
|
||||
|
||||
if (fTimeAcc >= 1.f / 60.f)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
pGameInstance->Compute_TimeDelta(TEXT("Timer_FrameCount"));
|
||||
#endif // _DEBUG
|
||||
|
||||
pGameInstance->Compute_TimeDelta(TEXT("Timer_60"));
|
||||
|
||||
#ifdef _DEBUG
|
||||
pMainApp->Update(1.f / 60.f);
|
||||
#endif // _DEBUG
|
||||
#ifndef _DEBUG
|
||||
pMainApp->Update(pGameInstance->Get_TimeDelta(TEXT("Timer_60")));
|
||||
#endif
|
||||
pMainApp->Render();
|
||||
|
||||
fTimeAcc = 0.f;
|
||||
#ifdef _DEBUG
|
||||
pGameInstance->Compute_TimeDelta(TEXT("Timer_FrameCount"));
|
||||
pMainApp->Compute_FrameCount();
|
||||
#endif // _DEBUG
|
||||
}
|
||||
}
|
||||
|
||||
SAFE_RELEASE(pGameInstance);
|
||||
SAFE_RELEASE(pMainApp);
|
||||
|
||||
return (int)msg.wParam;
|
||||
}
|
||||
|
||||
|
||||
ATOM MyRegisterClass(HINSTANCE hInstance)
|
||||
{
|
||||
WNDCLASSEXW wcex;
|
||||
|
||||
wcex.cbSize = sizeof(WNDCLASSEX);
|
||||
|
||||
wcex.style = CS_HREDRAW | CS_VREDRAW;
|
||||
wcex.lpfnWndProc = WndProc;
|
||||
wcex.cbClsExtra = 0;
|
||||
wcex.cbWndExtra = 0;
|
||||
wcex.hInstance = hInstance;
|
||||
wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_EDITOR));
|
||||
wcex.hCursor = LoadCursor(nullptr, IDC_ARROW);
|
||||
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
|
||||
wcex.lpszMenuName = nullptr;
|
||||
wcex.lpszClassName = szWindowClass;
|
||||
wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));
|
||||
|
||||
return RegisterClassExW(&wcex);
|
||||
}
|
||||
|
||||
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
|
||||
{
|
||||
g_hInstance = hInstance;
|
||||
|
||||
RECT rcWindow = { 0, 0, g_iWinSizeX, g_iWinSizeY };
|
||||
|
||||
AdjustWindowRect(&rcWindow, WS_OVERLAPPEDWINDOW, TRUE);
|
||||
|
||||
HWND hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
|
||||
CW_USEDEFAULT, 0, rcWindow.right - rcWindow.left, rcWindow.bottom - rcWindow.top, nullptr, nullptr, hInstance, nullptr);
|
||||
|
||||
if (!hWnd)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ShowWindow(hWnd, nCmdShow);
|
||||
UpdateWindow(hWnd);
|
||||
|
||||
g_hWnd = hWnd;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
if (ImGui_ImplWin32_WndProcHandler(hWnd, message, wParam, lParam)) {
|
||||
return true;
|
||||
}
|
||||
switch (message)
|
||||
{
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
default:
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#include "resource.h"
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 45 KiB |
Binary file not shown.
@@ -0,0 +1,219 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>18.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{f91ad988-a0c8-4169-aa7d-a7596a403cff}</ProjectGuid>
|
||||
<RootNamespace>Editor</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<EnableASAN>true</EnableASAN>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<EnableASAN>false</EnableASAN>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>../Bin/\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>../Bin/\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>EDITOR_PROJECT;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>../../EngineSDK/Inc/;../Public/;../../EngineSDK/Inc/DirectXTK/;../../EngineSDK/Inc/fMod/;../../EngineSDK/Inc/IMGUI/;../../EngineSDK/Inc/FX11/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>../../EngineSDK/Lib/$(ConfigurationName)/;../ThirdPartyLib/ZLib/$(ConfigurationName)/;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>Engine.lib;fmod_vc.lib;Crypt32.lib;assimp-vc145-mtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>EDITOR_PROJECT;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>../../EngineSDK/Inc/;../Public/;../../EngineSDK/Inc/DirectXTK/;../../EngineSDK/Inc/fMod/;../../EngineSDK/Inc/IMGUI/;../../EngineSDK/Inc/FX11/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>../../EngineSDK/Lib/$(ConfigurationName)/;../ThirdPartyLib/ZLib/$(ConfigurationName)/;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>Engine.lib;fmod_vc.lib;Crypt32.lib;assimp-vc145-mt.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Public\DebugCamera.h" />
|
||||
<ClInclude Include="..\Public\Editor_Define.h" />
|
||||
<ClInclude Include="..\Public\Editor_Macro.h" />
|
||||
<ClInclude Include="..\Public\Editor_Struct.h" />
|
||||
<ClInclude Include="..\Public\Level_Loading.h" />
|
||||
<ClInclude Include="..\Public\Level_Logo.h" />
|
||||
<ClInclude Include="..\Public\Loader.h" />
|
||||
<ClInclude Include="..\Public\MainApp.h" />
|
||||
<ClInclude Include="Editor.h" />
|
||||
<ClInclude Include="framework.h" />
|
||||
<ClInclude Include="Resource.h" />
|
||||
<ClInclude Include="targetver.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\DebugCamera.cpp" />
|
||||
<ClCompile Include="..\Private\Level_Loading.cpp" />
|
||||
<ClCompile Include="..\Private\Level_Logo.cpp" />
|
||||
<ClCompile Include="..\Private\Loader.cpp" />
|
||||
<ClCompile Include="..\Private\MainApp.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="Editor.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Editor.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Editor.ico" />
|
||||
<Image Include="small.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_VtxAnimMesh.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_VtxMesh.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_VtxNorTex.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_VtxPointParticle.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_VtxPosTex.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>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,153 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="99.Define">
|
||||
<UniqueIdentifier>{c639ae17-df43-46bf-b703-13e6a1cb5390}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="99.Define\SHADER">
|
||||
<UniqueIdentifier>{2ba9f1c9-af17-4750-ad96-1f74272f36aa}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="99.Define\DEFAULT">
|
||||
<UniqueIdentifier>{d2bc8c26-c2f1-4430-bc71-05b1d260a3e6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Level">
|
||||
<UniqueIdentifier>{84180928-9f81-4b54-a492-0b60d1de4573}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects">
|
||||
<UniqueIdentifier>{79dcc46a-5ae9-48bb-962b-8984b15e4f5a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="03.Information">
|
||||
<UniqueIdentifier>{fc210c4d-b8a6-4ed4-b19c-4bd175232e5f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="00.MainApp">
|
||||
<UniqueIdentifier>{47a1f529-dd0e-4f37-9ada-5aa6731dea0b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Level\00.Loading">
|
||||
<UniqueIdentifier>{a93b491c-23f3-4297-b393-8653d245270e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Level\01.Logo">
|
||||
<UniqueIdentifier>{d2b37133-49a9-44dc-9b6f-0dbfcf322be6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Level\30.MapViewer">
|
||||
<UniqueIdentifier>{89cc185d-9692-465b-8004-f17d5613b6e0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Level\40.EffectViewer">
|
||||
<UniqueIdentifier>{e8b03d0e-3f3f-4e58-98c0-d4e8b8c123c1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Level\20.ObjectViewer">
|
||||
<UniqueIdentifier>{d1083821-eca9-4cfc-8cd3-57aac01bd812}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Level\00.Loading\Loader">
|
||||
<UniqueIdentifier>{475d1e29-da38-4fe5-a31c-7d1aa7129c7b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Dummys">
|
||||
<UniqueIdentifier>{fb090860-8f24-4f71-9daf-7fd971a8f5c2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Dummys\DebugCamera">
|
||||
<UniqueIdentifier>{0eeb6d5c-db23-4147-b981-8346c879a1eb}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Dummys\DummyObject">
|
||||
<UniqueIdentifier>{085e6bcb-1fe4-4857-bfc6-ed6fc0218358}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Dummys\DummyCube">
|
||||
<UniqueIdentifier>{91ef449e-1e1e-445f-8387-caf587c37216}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Env">
|
||||
<UniqueIdentifier>{1f58b759-0d65-4092-ad42-da21c974ea12}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect">
|
||||
<UniqueIdentifier>{a9a30c22-af8f-421a-8901-edfb8146f59d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Editor.h">
|
||||
<Filter>99.Define\DEFAULT</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="framework.h">
|
||||
<Filter>99.Define\DEFAULT</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Resource.h">
|
||||
<Filter>99.Define\DEFAULT</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="targetver.h">
|
||||
<Filter>99.Define\DEFAULT</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Editor_Macro.h">
|
||||
<Filter>99.Define</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Editor_Struct.h">
|
||||
<Filter>99.Define</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Editor_Define.h">
|
||||
<Filter>99.Define</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\MainApp.h">
|
||||
<Filter>00.MainApp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Level_Loading.h">
|
||||
<Filter>01.Level\00.Loading</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Loader.h">
|
||||
<Filter>01.Level\00.Loading\Loader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Level_Logo.h">
|
||||
<Filter>01.Level\01.Logo</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DebugCamera.h">
|
||||
<Filter>02.GameObjects\Dummys\DebugCamera</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Editor.ico">
|
||||
<Filter>99.Define\DEFAULT</Filter>
|
||||
</Image>
|
||||
<Image Include="small.ico">
|
||||
<Filter>99.Define\DEFAULT</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Editor.cpp">
|
||||
<Filter>99.Define\DEFAULT</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\MainApp.cpp">
|
||||
<Filter>00.MainApp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Level_Loading.cpp">
|
||||
<Filter>01.Level\00.Loading</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Loader.cpp">
|
||||
<Filter>01.Level\00.Loading\Loader</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Level_Logo.cpp">
|
||||
<Filter>01.Level\01.Logo</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\DebugCamera.cpp">
|
||||
<Filter>02.GameObjects\Dummys\DebugCamera</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\pch.cpp">
|
||||
<Filter>99.Define\DEFAULT</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Editor.rc">
|
||||
<Filter>99.Define\DEFAULT</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_VtxAnimMesh.hlsl">
|
||||
<Filter>99.Define\SHADER</Filter>
|
||||
</FxCompile>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_VtxMesh.hlsl">
|
||||
<Filter>99.Define\SHADER</Filter>
|
||||
</FxCompile>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_VtxNorTex.hlsl">
|
||||
<Filter>99.Define\SHADER</Filter>
|
||||
</FxCompile>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_VtxPointParticle.hlsl">
|
||||
<Filter>99.Define\SHADER</Filter>
|
||||
</FxCompile>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_VtxPosTex.hlsl">
|
||||
<Filter>99.Define\SHADER</Filter>
|
||||
</FxCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
||||
@@ -0,0 +1,30 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++에서 생성한 포함 파일입니다.
|
||||
// 다음에서 사용 Editor.rc
|
||||
|
||||
#define IDS_APP_TITLE 103
|
||||
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDD_EDITOR_DIALOG 102
|
||||
#define IDD_ABOUTBOX 103
|
||||
#define IDM_ABOUT 104
|
||||
#define IDM_EXIT 105
|
||||
#define IDI_EDITOR 107
|
||||
#define IDI_SMALL 108
|
||||
#define IDC_EDITOR 109
|
||||
#define IDC_MYICON 2
|
||||
#ifndef IDC_STATIC
|
||||
#define IDC_STATIC -1
|
||||
#endif
|
||||
// 다음은 새 개체에 사용할 기본값입니다.
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
#define _APS_NO_MFC 130
|
||||
#define _APS_NEXT_RESOURCE_VALUE 129
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||
#define _APS_NEXT_SYMED_VALUE 110
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,15 @@
|
||||
// header.h: 표준 시스템 포함 파일
|
||||
// 또는 프로젝트 특정 포함 파일이 들어 있는 포함 파일입니다.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "targetver.h"
|
||||
#define WIN32_LEAN_AND_MEAN // 거의 사용되지 않는 내용을 Windows 헤더에서 제외합니다.
|
||||
// Windows 헤더 파일
|
||||
#include <windows.h>
|
||||
// C 런타임 헤더 파일입니다.
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h>
|
||||
#include <memory.h>
|
||||
#include <tchar.h>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 45 KiB |
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
// // SDKDDKVer.h를 포함하면 최고 수준의 가용성을 가진 Windows 플랫폼이 정의됩니다.
|
||||
// 이전 Windows 플랫폼용 애플리케이션을 빌드하려는 경우에는 SDKDDKVer.h를 포함하기 전에
|
||||
// WinSDKVer.h를 포함하고 _WIN32_WINNT를 지원하려는 플랫폼으로 설정합니다.
|
||||
#include <SDKDDKVer.h>
|
||||
@@ -0,0 +1,152 @@
|
||||
#include "pch.h"
|
||||
#include "DebugCamera.h"
|
||||
#include "Shader.h"
|
||||
|
||||
CDebugCamera::CDebugCamera(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CCamera(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CDebugCamera::CDebugCamera(const CDebugCamera& rhs)
|
||||
: CCamera(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
void CDebugCamera::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CDebugCamera::Update(_float fTimeDelta)
|
||||
{
|
||||
_float3 vCamPos = {};
|
||||
XMStoreFloat3(&vCamPos, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
GUI::Text("Cam Coord %.2f, %.2f, %.2f", vCamPos.x, vCamPos.y, vCamPos.z);
|
||||
if (m_pGameInstance->Key_Up(DIK_GRAVE)) {
|
||||
m_bMovable = !m_bMovable;
|
||||
}
|
||||
if (m_pGameInstance->Mouse_Down(DIM_RBUTTON)) {
|
||||
m_pGameInstance->Toggle_MouseCenter();
|
||||
}
|
||||
if (m_bMovable) {
|
||||
#pragma region Position
|
||||
_float fSpeed = 5.f;
|
||||
if (m_pGameInstance->Key_Pressing(DIK_W)) {
|
||||
m_pTransformCom->Go_Straight(fTimeDelta * fSpeed);
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_A)) {
|
||||
m_pTransformCom->Go_Left(fTimeDelta * fSpeed);
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_S)) {
|
||||
m_pTransformCom->Go_Backward(fTimeDelta * fSpeed);
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_D)) {
|
||||
m_pTransformCom->Go_Right(fTimeDelta * fSpeed);
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_SPACE)) {
|
||||
m_pTransformCom->Go_Up(fTimeDelta * fSpeed);
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_C)) {
|
||||
m_pTransformCom->Go_Down(fTimeDelta * fSpeed);
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_TAB)) {
|
||||
Set_InitialPos();
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
#pragma region Angle
|
||||
|
||||
_float3 fMove = m_pGameInstance->Get_MouseMove();
|
||||
m_pTransformCom->Turn(XMVectorSet(0.f, 1.f, 0.f, 0.f), fTimeDelta * fMove.x * m_fMouseSensor);
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::RIGHT), fTimeDelta * fMove.y * m_fMouseSensor);
|
||||
|
||||
#pragma endregion
|
||||
|
||||
}
|
||||
__super::Bind_Matrices();
|
||||
}
|
||||
|
||||
void CDebugCamera::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CDebugCamera::Render()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDebugCamera::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDebugCamera::Initialize(void* pArg)
|
||||
{
|
||||
CAMERA_DEBUG_DESC* pDesc = static_cast<CAMERA_DEBUG_DESC*>(pArg);
|
||||
m_fMouseSensor = pDesc->fMouseSensor;
|
||||
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vEye), 1.f));
|
||||
m_pTransformCom->LookAt(XMVectorSetW(XMLoadFloat3(&pDesc->vAt), 1.f));
|
||||
m_matInitial = *m_pTransformCom->Get_WorldMatrixPtr();
|
||||
m_bActive = true;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDebugCamera::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDebugCamera::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CDebugCamera::Set_InitialPos()
|
||||
{
|
||||
m_pTransformCom->Set_WorldMatrix(m_matInitial);
|
||||
}
|
||||
|
||||
CDebugCamera* CDebugCamera::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CDebugCamera* pInstance = new CDebugCamera(pDevice, pContext);
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CDebugCamera");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CDebugCamera::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CDebugCamera* pInstance = new CDebugCamera(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CDebugCamera");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CDebugCamera::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
void CDebugCamera::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
#include "pch.h"
|
||||
#include "Level_Loading.h"
|
||||
#include "Loader.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
#include "Level_Logo.h"
|
||||
|
||||
CLevel_Loading::CLevel_Loading(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
HRESULT CLevel_Loading::Initialize(LEVEL eNextLevelID)
|
||||
{
|
||||
m_eNextLevelID = eNextLevelID;
|
||||
|
||||
m_pLoader = CLoader::Create(m_pDevice, m_pContext, eNextLevelID);
|
||||
if (nullptr == m_pLoader) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Layer_BackGround(LAYER_UI))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CLevel_Loading::Update(_float fTimeDelta)
|
||||
{
|
||||
if (true == m_pLoader->isFinished() &&
|
||||
m_pGameInstance->Key_Down(DIK_RETURN))
|
||||
{
|
||||
CLevel* pNewLevel = { nullptr };
|
||||
|
||||
switch (m_eNextLevelID)
|
||||
{
|
||||
case LEVEL::LOGO:
|
||||
pNewLevel = CLevel_Logo::Create(m_pDevice, m_pContext, m_eNextLevelID);
|
||||
break;
|
||||
//case LEVEL::MAP:
|
||||
// pNewLevel = CLevel_MapViewer::Create(m_pDevice, m_pContext, m_eNextLevelID);
|
||||
// break;
|
||||
//case LEVEL::OBJECT:
|
||||
// pNewLevel = CLevel_ObjectViewer::Create(m_pDevice, m_pContext, m_eNextLevelID);
|
||||
// break;
|
||||
//case LEVEL::COMBINED:
|
||||
// pNewLevel = CLevel_LevelViewer::Create(m_pDevice, m_pContext, m_eNextLevelID);
|
||||
// break;
|
||||
//case LEVEL::EFFECT:
|
||||
// pNewLevel = CLevel_EffectViewer::Create(m_pDevice, m_pContext, m_eNextLevelID);
|
||||
// break;
|
||||
//case LEVEL::SKIllSTUDIO:
|
||||
// pNewLevel = CLevel_SkillStudio::Create(m_pDevice, m_pContext, m_eNextLevelID);
|
||||
// break;
|
||||
//case LEVEL::PARTICLE:
|
||||
// pNewLevel = CLevel_ParticleViewer::Create(m_pDevice, m_pContext, m_eNextLevelID);
|
||||
// break;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Change_Level(pNewLevel)))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CLevel_Loading::Render()
|
||||
{
|
||||
m_pLoader->Output();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_Loading::Ready_Layer_BackGround(const _wstring& strLayerTag)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CLevel_Loading* CLevel_Loading::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, LEVEL eNextLevelID)
|
||||
{
|
||||
CLevel_Loading* pInstance = new CLevel_Loading(pDevice, pContext, eLevelID);
|
||||
|
||||
if (FAILED(pInstance->Initialize(eNextLevelID)))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CLevel_Loading");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CLevel_Loading::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pLoader);
|
||||
|
||||
|
||||
}
|
||||
|
||||
HRESULT CLevel_Loading::Initialize()
|
||||
{
|
||||
assert(false && TEXT("Denied"));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
#include "pch.h"
|
||||
#include "Level_Logo.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Level_Loading.h"
|
||||
|
||||
|
||||
CLevel_Logo::CLevel_Logo(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
HRESULT CLevel_Logo::Initialize()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CLevel_Logo::Update(_float fTimeDelta)
|
||||
{
|
||||
GUI::Begin("SelectEditor");
|
||||
//if (GUI::Button("Map Editor", { 100, 100 })) {
|
||||
// if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::MAP))))
|
||||
// return;
|
||||
//}
|
||||
//else if (GUI::Button("Object Editor", { 100, 100 })) {
|
||||
// if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::OBJECT))))
|
||||
// return;
|
||||
//}
|
||||
//else if (GUI::Button("Combined Editor", { 100, 100 })) {
|
||||
// if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::COMBINED))))
|
||||
// return;
|
||||
//}
|
||||
//else if (GUI::Button("Effect Editor", { 100, 100 })) {
|
||||
// if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::EFFECT))))
|
||||
// return;
|
||||
//}
|
||||
//else if (GUI::Button("Skill Editor", { 100, 100 })) {
|
||||
// if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::SKIllSTUDIO))))
|
||||
// return;
|
||||
//}
|
||||
//else if (GUI::Button("Particle Editor", { 100, 100 })) {
|
||||
// if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::PARTICLE))))
|
||||
// return;
|
||||
//}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
HRESULT CLevel_Logo::Render()
|
||||
{
|
||||
SetWindowText(g_hWnd, TEXT("·Î°í·¹º§ÀÔ´Ï´Ù"));
|
||||
GUI::ShowDemoWindow();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
HRESULT CLevel_Logo::Ready_Layer_Camera(const _wstring& strLayerTag)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_Logo::Ready_Layer_UI(const _wstring& strLayerTag)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CLevel_Logo* CLevel_Logo::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||
{
|
||||
CLevel_Logo* pInstance = new CLevel_Logo(pDevice, pContext, eLevelID);
|
||||
|
||||
if (FAILED(pInstance->Initialize()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CLevel_Logo");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CLevel_Logo::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
#include "pch.h"
|
||||
#include "Loader.h"
|
||||
#include "DebugCamera.h"
|
||||
#include "GameInstance.h"
|
||||
#include "MainApp.h"
|
||||
|
||||
CLoader::CLoader(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: m_pDevice{ pDevice }
|
||||
, m_pContext{ pContext }
|
||||
, m_pGameInstance{ CGameInstance::GetInstance() }
|
||||
{
|
||||
SAFE_ADDREF(m_pGameInstance);
|
||||
SAFE_ADDREF(m_pDevice);
|
||||
SAFE_ADDREF(m_pContext);
|
||||
}
|
||||
|
||||
unsigned int APIENTRY LoadingMain(void* pArg)
|
||||
{
|
||||
CLoader* pLoader = static_cast<CLoader*>(pArg);
|
||||
|
||||
if (FAILED(pLoader->Loading())) {
|
||||
assert(false);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
HRESULT CLoader::Initialize(LEVEL eNextLevelID)
|
||||
{
|
||||
m_eNextLevelID = eNextLevelID;
|
||||
|
||||
InitializeCriticalSection(&m_CriticalSection);
|
||||
|
||||
m_hThread = (HANDLE)_beginthreadex(nullptr, 0, LoadingMain, this, 0, nullptr);
|
||||
if (0 == m_hThread)
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLoader::Loading()
|
||||
{
|
||||
|
||||
if (FAILED(CoInitializeEx(nullptr, 0))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
EnterCriticalSection(&m_CriticalSection);
|
||||
|
||||
HRESULT hr = {};
|
||||
|
||||
switch (m_eNextLevelID)
|
||||
{
|
||||
case LEVEL::LOGO:
|
||||
hr = Loading_For_Logo();
|
||||
break;
|
||||
//case LEVEL::MAP:
|
||||
// hr = Loading_For_MapViewer();
|
||||
// break;
|
||||
//case LEVEL::OBJECT:
|
||||
// hr = Loading_For_ObjectViewer();
|
||||
// break;
|
||||
//case LEVEL::COMBINED:
|
||||
// hr = Loading_For_CombinedViewer();
|
||||
// break;
|
||||
//case LEVEL::EFFECT:
|
||||
// hr = Loading_For_Effect();
|
||||
// break;
|
||||
//case LEVEL::SKIllSTUDIO:
|
||||
// hr = Loading_For_SkillStudio();
|
||||
// break;
|
||||
//case LEVEL::PARTICLE:
|
||||
// hr = Loading_For_Particle();
|
||||
// break;
|
||||
default:
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
|
||||
LeaveCriticalSection(&m_CriticalSection);
|
||||
|
||||
if (FAILED(hr))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CLoader::Output()
|
||||
{
|
||||
SetWindowText(g_hWnd, m_strMessage.c_str());
|
||||
}
|
||||
|
||||
HRESULT CLoader::Loading_For_Logo()
|
||||
{
|
||||
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
|
||||
|
||||
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
|
||||
|
||||
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_NORTEX,
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_VtxNorTex.hlsl"),
|
||||
VTXNORTEX::Elements, VTXNORTEX::iNumElements)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_MESH,
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl"),
|
||||
VTXMESH::Elements, VTXMESH::iNumElements)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_ANIMMESH,
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl"),
|
||||
VTXANIMMESH::Elements, VTXANIMMESH::iNumElements)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_CELL,
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_Cell.hlsl"),
|
||||
VTXPOS::Elements, VTXPOS::iNumElements)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_PARTICLE,
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_VtxPointParticle.hlsl"),
|
||||
VTX_POS_INSTANCE_PARTICLE::Elements, VTX_POS_INSTANCE_PARTICLE::iNumElements)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDebugCamera>(g_iStaticLevel, CDebugCamera::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_strMessage = TEXT("로딩이 완료되었습니다..");
|
||||
|
||||
m_isFinished = true;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CLoader* CLoader::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eNextLevelID)
|
||||
{
|
||||
CLoader* pInstance = new CLoader(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize(eNextLevelID)))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CLoader");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
void CLoader::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
WaitForSingleObject(m_hThread, INFINITE);
|
||||
|
||||
CloseHandle(m_hThread);
|
||||
|
||||
DeleteCriticalSection(&m_CriticalSection);
|
||||
|
||||
SAFE_RELEASE(m_pGameInstance);
|
||||
SAFE_RELEASE(m_pDevice);
|
||||
SAFE_RELEASE(m_pContext);
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
#include "pch.h"
|
||||
#include "MainApp.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
|
||||
#include "Level_Loading.h"
|
||||
|
||||
_float g_fTimeMult = 1.f;
|
||||
CMainApp::CMainApp()
|
||||
: m_pGameInstance{ CGameInstance::GetInstance() }
|
||||
{
|
||||
SAFE_ADDREF(m_pGameInstance);
|
||||
}
|
||||
|
||||
HRESULT CMainApp::Initialize()
|
||||
{
|
||||
ENGINE_DESC EngineDesc{};
|
||||
EngineDesc.hInstance = g_hInstance;
|
||||
EngineDesc.hWnd = g_hWnd;
|
||||
EngineDesc.iWinSizeX = g_iWinSizeX;
|
||||
EngineDesc.iWinSizeY = g_iWinSizeY;
|
||||
EngineDesc.iStaticLevel = g_iStaticLevel;
|
||||
EngineDesc.iNumLevels = ENUM_CLASS(LEVEL::END);
|
||||
EngineDesc.iNumCollidableGroup = ENUM_CLASS(COLLIDABLEOBJECT::END);
|
||||
if (FAILED(m_pGameInstance->Initialize_Engine(EngineDesc, &m_pDevice, &m_pContext)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Default_Setting())){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Prototypes())){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Start_Level(LEVEL::LOGO))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_IMGUI())){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMainApp::Update(_float fTimeDelta)
|
||||
{
|
||||
ImGui_ImplDX11_NewFrame();
|
||||
ImGui_ImplWin32_NewFrame();
|
||||
GUI::NewFrame();
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Present_TimeCost();
|
||||
#endif // _DEBUG
|
||||
GUI::DragFloat("fTimeMult", &g_fTimeMult, 0.01f, 0.f, 4.f);
|
||||
m_pGameInstance->Update_Engine(fTimeDelta * g_fTimeMult);
|
||||
}
|
||||
|
||||
HRESULT CMainApp::Render()
|
||||
{
|
||||
_float4 vClearColor = _float4(0.f, 0.f, 1.f, 1.f);
|
||||
|
||||
m_pGameInstance->Render_Begin(&vClearColor);
|
||||
|
||||
m_pGameInstance->Draw();
|
||||
GUI::Render();
|
||||
ImGui_ImplDX11_RenderDrawData(GUI::GetDrawData());
|
||||
|
||||
m_pGameInstance->Render_End();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMainApp::Compute_FrameCount()
|
||||
{
|
||||
m_pGameInstance->Compute_FrameCount();
|
||||
}
|
||||
|
||||
HRESULT CMainApp::Ready_Default_Setting()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMainApp::Start_Level(LEVEL eLevelID)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, eLevelID))))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMainApp::Ready_Prototypes()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMainApp::Ready_IMGUI()
|
||||
{
|
||||
IMGUI_CHECKVERSION();
|
||||
ImGui::CreateContext();
|
||||
ImGuiIO& io = ImGui::GetIO(); (void)io;
|
||||
ImFont* font = nullptr;
|
||||
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
|
||||
io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad;
|
||||
|
||||
ImGui::StyleColorsDark();
|
||||
|
||||
ImGui_ImplWin32_Init(g_hWnd);
|
||||
ImGui_ImplDX11_Init(m_pDevice, m_pContext);
|
||||
|
||||
string strFontTag = "C:\\Windows\\Fonts\\malgun.ttf";
|
||||
//string strFontTag = "../Bin/Resources/Fonts/SHOWG.TTF";
|
||||
|
||||
ifstream ifile;
|
||||
|
||||
ifile.open(strFontTag);
|
||||
if (ifile)
|
||||
{
|
||||
font = io.Fonts->AddFontFromFileTTF(strFontTag.c_str(), 16.f, NULL, io.Fonts->GetGlyphRangesKorean());
|
||||
}
|
||||
IM_ASSERT(font != NULL);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMainApp::Release_IMGUI()
|
||||
{
|
||||
ImGui_ImplDX11_Shutdown();
|
||||
ImGui_ImplWin32_Shutdown();
|
||||
ImGui::DestroyContext();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CMainApp* CMainApp::Create()
|
||||
{
|
||||
CMainApp* pInstance = new CMainApp();
|
||||
|
||||
if (FAILED(pInstance->Initialize()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CMainApp");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CMainApp::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
|
||||
Release_IMGUI();
|
||||
|
||||
SAFE_RELEASE(m_pDevice);
|
||||
SAFE_RELEASE(m_pContext);
|
||||
|
||||
m_pGameInstance->Release_Engine();
|
||||
|
||||
SAFE_RELEASE(m_pGameInstance);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
#include "pch.h"
|
||||
@@ -0,0 +1,47 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "Camera.h"
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CDebugCamera final : public CCamera
|
||||
{
|
||||
public:
|
||||
typedef struct tagCamera_Debug : public CCamera::CAMERA_DESC
|
||||
{
|
||||
_float3 vEye{}, vAt{};
|
||||
_float fMouseSensor{};
|
||||
}CAMERA_DEBUG_DESC;
|
||||
private:
|
||||
CDebugCamera(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CDebugCamera(const CDebugCamera& rhs);
|
||||
virtual ~CDebugCamera() = 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:
|
||||
_bool m_bMovable = true;
|
||||
_float m_fMouseSensor = {};
|
||||
_float4x4 m_matInitial = {};
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
void Set_InitialPos();
|
||||
|
||||
public:
|
||||
static CDebugCamera* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include <process.h>
|
||||
#include "../Default/framework.h"
|
||||
#include "wincrypt.h"
|
||||
#include "Editor_Macro.h"
|
||||
#include "Editor_Struct.h"
|
||||
|
||||
namespace Editor
|
||||
{
|
||||
const unsigned int g_iWinSizeX = 1920;
|
||||
const unsigned int g_iWinSizeY = 1080;
|
||||
|
||||
enum class LEVEL { STATIC, LOADING, LOGO, LOBY, GAMEPLAY, RESTART, END };
|
||||
enum class COLLIDABLEOBJECT { PLAYER, MONSTER, HOSTILE_HITBOX, ALLY_HITBOX, NEUTRAL_HITBOX, ENVIRIONMENT, NPC, ITEM, TRIGGERBOX, REGION, NOCOLLIDE, END };
|
||||
|
||||
enum class SHADER_PASS_ANIM { DEFAULT, SHADOW, CAPTURE, BLUR, END };
|
||||
enum class SHADER_PASS_CUBE { DEFAULT, SHADOW, BLUR, END };
|
||||
enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, EFFECT_ALPHABLEND_UVMOVE, END };
|
||||
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 };
|
||||
}
|
||||
|
||||
using namespace Editor;
|
||||
|
||||
extern HINSTANCE g_hInstance;
|
||||
extern HWND g_hWnd;
|
||||
extern float g_fTimeMult;
|
||||
@@ -0,0 +1,60 @@
|
||||
#pragma once
|
||||
namespace Editor {
|
||||
|
||||
#ifndef __TEXT
|
||||
#define __TEXT(quote) L##quote
|
||||
#endif // !__TEXT
|
||||
#ifndef TEXT
|
||||
#define TEXT(quote) __TEXT(quote)
|
||||
#endif // !TEXT
|
||||
|
||||
|
||||
#pragma region FX_NAME
|
||||
#define FX_ANIMMESH TEXT("FX_ANIMMESH")
|
||||
#define FX_MESH TEXT("FX_MESH")
|
||||
#define FX_POSTEX TEXT("FX_POSTEX")
|
||||
#define FX_NORTEX TEXT("FX_NORTEX")
|
||||
#define FX_CELL TEXT("FX_CELL")
|
||||
#define FX_DEFERRED TEXT("FX_DEFFERED")
|
||||
#define FX_PARTICLE TEXT("FX_PARTICLE")
|
||||
|
||||
#pragma endregion
|
||||
#pragma region MACRO_PROTOTYPE
|
||||
#define CURRENT_LEVEL m_pGameInstance->Get_CurrentLevelID()
|
||||
#define NEXT_LEVEL m_pGameInstance->Get_NextLevelID()
|
||||
|
||||
#pragma endregion
|
||||
#pragma region OBJECT
|
||||
|
||||
#pragma endregion
|
||||
#pragma region COMPONENT
|
||||
|
||||
#pragma endregion
|
||||
#pragma region MACRO_LAYER
|
||||
|
||||
#define LAYER_FLOOR TEXT("Layer_Floor")
|
||||
#define LAYER_WALL TEXT("Layer_Wall")
|
||||
#define LAYER_CUBE TEXT("Layer_Cube")
|
||||
#define LAYER_EDITOR_CAMERA TEXT("Layer_Editor_Camera")
|
||||
#define LAYER_BACKGROUND TEXT("Layer_BackGround")
|
||||
#define LAYER_MARKER TEXT("Layer_Marker")
|
||||
#define LAYER_PLAYER TEXT("Layer_Player")
|
||||
#define LAYER_CAMERA TEXT("Layer_Camera")
|
||||
#define LAYER_MONSTER TEXT("Layer_Monster")
|
||||
#define LAYER_UI TEXT("Layer_UI")
|
||||
#define LAYER_EFFECT TEXT("Layer_Effect")
|
||||
#define LAYER_HITBOX TEXT("Layer_HitBox")
|
||||
#define LAYER_CHUNK TEXT("Layer_Chunk")
|
||||
#define LAYER_DOT TEXT("Layer_Dot")
|
||||
#define LAYER_CELL TEXT("Layer_Cell")
|
||||
#define LAYER_TRIGGER TEXT("Layer_Trigger")
|
||||
|
||||
#pragma endregion
|
||||
#pragma region MACRO_TEXTURE
|
||||
|
||||
#pragma endregion
|
||||
#pragma region MACRO_EXTRA
|
||||
|
||||
|
||||
#pragma endregion
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
namespace Editor {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "Level.h"
|
||||
|
||||
|
||||
/* 2. 자원을 로드하는 동안, 화면에 로딩 상태를 표현해준다. */
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CLevel_Loading final : public CLevel
|
||||
{
|
||||
private:
|
||||
CLevel_Loading(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID);
|
||||
virtual ~CLevel_Loading() = default;
|
||||
|
||||
public:
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
virtual _uint Get_NextLevelID() override { return ENUM_CLASS(m_eNextLevelID); };
|
||||
|
||||
private:
|
||||
LEVEL m_eNextLevelID = { LEVEL::END };
|
||||
class CLoader* m_pLoader = { nullptr };
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize(LEVEL eNextLevelID);
|
||||
HRESULT Initialize() override;
|
||||
HRESULT Ready_Layer_BackGround(const _wstring& strLayerTag);
|
||||
|
||||
|
||||
|
||||
public:
|
||||
static CLevel_Loading* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID, LEVEL eNextLevelID);
|
||||
virtual void Free() override;
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "Level.h"
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CLevel_Logo final : public CLevel
|
||||
{
|
||||
private:
|
||||
CLevel_Logo(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID);
|
||||
virtual ~CLevel_Logo() = default;
|
||||
|
||||
public:
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
private:
|
||||
/* 이 레벨에서 쓰기위한 객체들을 생성한다. */
|
||||
virtual HRESULT Initialize() override;
|
||||
HRESULT Ready_Layer_Camera(const _wstring& strLayerTag);
|
||||
HRESULT Ready_Layer_UI(const _wstring& strLayerTag);
|
||||
|
||||
|
||||
public:
|
||||
static CLevel_Logo* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID);
|
||||
virtual void Free() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,51 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "Base.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CGameInstance;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CLoader final : public CBase
|
||||
{
|
||||
private:
|
||||
CLoader(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual ~CLoader() = default;
|
||||
|
||||
public:
|
||||
HRESULT Loading();
|
||||
void Output();
|
||||
|
||||
public:
|
||||
_bool isFinished() const {
|
||||
return m_isFinished;
|
||||
}
|
||||
|
||||
private:
|
||||
ID3D11Device* m_pDevice = { nullptr };
|
||||
ID3D11DeviceContext* m_pContext = { nullptr };
|
||||
LEVEL m_eNextLevelID = { LEVEL::END };
|
||||
|
||||
HANDLE m_hThread = {};
|
||||
|
||||
_wstring m_strMessage = {};
|
||||
_bool m_isFinished = { false };
|
||||
|
||||
CRITICAL_SECTION m_CriticalSection = {};
|
||||
|
||||
CGameInstance* m_pGameInstance = { nullptr };
|
||||
|
||||
private:
|
||||
HRESULT Initialize(LEVEL eNextLevelID);
|
||||
HRESULT Loading_For_Logo();
|
||||
|
||||
public:
|
||||
static CLoader* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eNextLevelID);
|
||||
virtual void Free() override;
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,45 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "Base.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CGameInstance;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CMainApp final : public CBase
|
||||
{
|
||||
private:
|
||||
CMainApp();
|
||||
virtual ~CMainApp() = default;
|
||||
|
||||
public:
|
||||
HRESULT Initialize();
|
||||
void Update(_float fTimeDelta);
|
||||
HRESULT Render();
|
||||
void Compute_FrameCount();
|
||||
|
||||
|
||||
private:
|
||||
CGameInstance* m_pGameInstance = { nullptr };
|
||||
ID3D11Device* m_pDevice = { nullptr };
|
||||
ID3D11DeviceContext* m_pContext = { nullptr };
|
||||
|
||||
private:
|
||||
HRESULT Ready_Default_Setting();
|
||||
HRESULT Start_Level(LEVEL eLevelID);
|
||||
HRESULT Ready_Prototypes();
|
||||
HRESULT Ready_IMGUI();
|
||||
HRESULT Release_IMGUI();
|
||||
|
||||
public:
|
||||
static CMainApp* Create();
|
||||
virtual void Free() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,185 @@
|
||||
|
||||
vector g_vMtrlDiffuse = 1.f;
|
||||
vector g_vMtrlAmbient = 1.f;
|
||||
vector g_vMtrlSpecular = 1.f;
|
||||
|
||||
sampler DefaultSampler = sampler_state
|
||||
{
|
||||
Filter = MIN_MAG_MIP_LINEAR;
|
||||
AddressU = wrap;
|
||||
AddressV = wrap;
|
||||
};
|
||||
|
||||
sampler ClampSampler = sampler_state
|
||||
{
|
||||
Filter = MIN_MAG_MIP_POINT;
|
||||
AddressU = clamp;
|
||||
AddressV = clamp;
|
||||
};
|
||||
|
||||
sampler MirrorSampler = sampler_state
|
||||
{
|
||||
Filter = MIN_MAG_MIP_LINEAR;
|
||||
AddressU = mirror;
|
||||
AddressV = mirror;
|
||||
};
|
||||
|
||||
sampler BorderZeroSampler = sampler_state
|
||||
{
|
||||
Filter = MIN_MAG_MIP_POINT;
|
||||
AddressU = Border;
|
||||
AddressV = Border;
|
||||
BorderColor = float4(0, 0, 0, 0);
|
||||
};
|
||||
|
||||
RasterizerState RS_Default
|
||||
{
|
||||
FillMode = Solid;
|
||||
CullMode = Back;
|
||||
};
|
||||
|
||||
RasterizerState RS_Nocull
|
||||
{
|
||||
FillMode = Solid;
|
||||
CullMode = None;
|
||||
FrontCounterClockwise = false;
|
||||
DepthClipEnable = false;
|
||||
};
|
||||
|
||||
RasterizerState RS_Nocull_Wireframe
|
||||
{
|
||||
FillMode = Wireframe;
|
||||
CullMode = None;
|
||||
FrontCounterClockwise = false;
|
||||
DepthBias = 0;
|
||||
SlopeScaledDepthBias = 0.f;
|
||||
DepthBiasClamp = 0.f;
|
||||
DepthClipEnable = false;
|
||||
ScissorEnable = false;
|
||||
MultisampleEnable = false;
|
||||
AntialiasedLineEnable = false;
|
||||
};
|
||||
|
||||
RasterizerState RS_Scissor
|
||||
{
|
||||
FillMode = Solid;
|
||||
CullMode = Back;
|
||||
FrontCounterClockwise = false;
|
||||
ScissorEnable = true;
|
||||
};
|
||||
|
||||
DepthStencilState DSS_Default
|
||||
{
|
||||
DepthEnable = true;
|
||||
DepthWriteMask = all;
|
||||
DepthFunc = less_equal;
|
||||
};
|
||||
|
||||
DepthStencilState DSS_None
|
||||
{
|
||||
DepthEnable = false;
|
||||
DepthWriteMask = zero;
|
||||
};
|
||||
|
||||
DepthStencilState DSS_Effect
|
||||
{
|
||||
DepthEnable = true;
|
||||
DepthWriteMask = zero;
|
||||
DepthFunc = less_equal;
|
||||
StencilEnable = false;
|
||||
};
|
||||
|
||||
BlendState BS_None
|
||||
{
|
||||
BlendEnable[0] = false;
|
||||
};
|
||||
|
||||
BlendState BS_AlphaBlend // ALPHA_BLEND
|
||||
{
|
||||
BlendEnable[0] = true;
|
||||
BlendEnable[1] = true;
|
||||
BlendEnable[2] = true;
|
||||
BlendEnable[3] = true;
|
||||
BlendEnable[4] = true;
|
||||
BlendEnable[5] = true;
|
||||
BlendEnable[6] = true;
|
||||
BlendEnable[7] = true;
|
||||
|
||||
// Ac * Aa + Bc * (1 - Aa);
|
||||
SrcBlend = Src_Alpha;
|
||||
DestBlend = Inv_Src_Alpha;
|
||||
BlendOp = Add;
|
||||
};
|
||||
|
||||
BlendState BS_Blend // ADDITIVE_BLEND
|
||||
{
|
||||
BlendEnable[0] = true;
|
||||
BlendEnable[1] = true;
|
||||
BlendEnable[2] = true;
|
||||
BlendEnable[3] = true;
|
||||
BlendEnable[4] = true;
|
||||
BlendEnable[5] = true;
|
||||
BlendEnable[6] = true;
|
||||
BlendEnable[7] = true;
|
||||
|
||||
// Ac * (1) + Bc * (1);
|
||||
SrcBlend = one;
|
||||
DestBlend = one;
|
||||
BlendOp = Add;
|
||||
};
|
||||
|
||||
BlendState BS_UIBlend
|
||||
{
|
||||
BlendEnable[0] = true;
|
||||
BlendEnable[1] = true;
|
||||
BlendEnable[2] = true;
|
||||
BlendEnable[3] = true;
|
||||
BlendEnable[4] = true;
|
||||
BlendEnable[5] = true;
|
||||
BlendEnable[6] = true;
|
||||
BlendEnable[7] = true;
|
||||
|
||||
SrcBlend = Src_Alpha;
|
||||
DestBlend = Inv_Src_Alpha;
|
||||
BlendOp = Add;
|
||||
|
||||
SrcBlendAlpha = One;
|
||||
DestBlendAlpha = Zero;
|
||||
BlendOpAlpha = Add;
|
||||
|
||||
RenderTargetWriteMask[0] = 0x0F; // RGBA 모두 출력
|
||||
};
|
||||
|
||||
float ShadowVisibility_hwPCF(Texture2D ShadowMap, float4 vLightClip, float2 vShadowMapSize, float bias)
|
||||
{
|
||||
float2 uv = float2(vLightClip.x / vLightClip.w, -vLightClip.y / vLightClip.w) * 0.5f + 0.5f;
|
||||
float fDepthCenter = saturate(vLightClip.z / vLightClip.w);
|
||||
float2 vTexel = 1.f / vShadowMapSize;
|
||||
|
||||
float fVisibility = 0.f;
|
||||
for (int v = -1; v <= 1; ++v)
|
||||
{
|
||||
for (int u = -1; u <= 1; ++u)
|
||||
{
|
||||
float2 vOffset = float2(u, v) * vTexel;
|
||||
float fDepth = ShadowMap.Sample(DefaultSampler, uv + vOffset).x;
|
||||
fVisibility += (fDepthCenter - bias > fDepth) ? 0.f : 1.f;
|
||||
}
|
||||
}
|
||||
return fVisibility / 9.f;
|
||||
}
|
||||
|
||||
float GetRimLight(float3 vCamPosition, float3 vPosition, float3 vNormal, float fRimPower, float fRimStrength)
|
||||
{
|
||||
float fRimLight = (1 - dot(normalize(vCamPosition - vPosition), vNormal));
|
||||
fRimLight = pow(fRimLight, fRimPower);
|
||||
fRimLight = fRimLight * fRimStrength;
|
||||
return fRimLight;
|
||||
}
|
||||
|
||||
float2 Get_MovedUV(float2 vOriginalUV, float fDeltaU, float fDeltaV, uint iIndexU, uint iIndexV)
|
||||
{
|
||||
float2 vDelta = float2(fDeltaU, fDeltaV);
|
||||
float2 vOffset = float2(iIndexU * fDeltaU, iIndexV * fDeltaV);
|
||||
return vOriginalUV * vDelta + vOffset;
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
|
||||
vector g_vColor = 1.f;
|
||||
float g_fFar;
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
};
|
||||
|
||||
struct VS_OUT
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
};
|
||||
|
||||
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);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_IN
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
};
|
||||
|
||||
struct PS_OUT
|
||||
{
|
||||
float4 vColor : SV_TARGET0;
|
||||
};
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
Out.vColor = g_vColor;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 DefaultTechnique
|
||||
{
|
||||
pass Default
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 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_MAIN();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,392 @@
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
matrix g_invMatView, g_invmatProj;
|
||||
matrix g_LightViewMatrix, g_LightProjMatrix;
|
||||
matrix g_PreShadowLightViewMatrix, g_PreShadowLightProjMatrix;
|
||||
|
||||
float g_fFar;
|
||||
float g_fPreShadowFar;
|
||||
uint g_iMaxShadowWidth;
|
||||
uint g_iMaxShadowHeight;
|
||||
float2 g_vResolution;
|
||||
|
||||
Texture2D g_Texture;
|
||||
|
||||
float g_fLightRange;
|
||||
float g_fSpotInnerAngle;
|
||||
float g_fSpotOuterAngle;
|
||||
vector g_vLightDir;
|
||||
vector g_vLightPos;
|
||||
vector g_vCamPosition;
|
||||
|
||||
Texture2D g_NormalTexture;
|
||||
Texture2D g_DiffuseTexture;
|
||||
Texture2D g_ShadeTexture;
|
||||
Texture2D g_DepthTexture;
|
||||
Texture2D g_SpecularTexture;
|
||||
Texture2D g_ShadowTexture;
|
||||
Texture2D g_PreShadowTexture;
|
||||
Texture2D g_BlurTexture;
|
||||
Texture2D g_BlurXTexture;
|
||||
|
||||
|
||||
vector g_vLightDiffuse;
|
||||
vector g_vLightAmbient;
|
||||
vector g_vLightSpecular;
|
||||
|
||||
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_MAIN_DEBUG(PS_IN In)
|
||||
{
|
||||
PS_OUT_BACKBUFFER Out;
|
||||
|
||||
Out.vBackBuffer = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_OUT_LIGHT
|
||||
{
|
||||
vector vShade : SV_TARGET0;
|
||||
vector vSpecular : SV_TARGET1;
|
||||
};
|
||||
|
||||
PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
|
||||
{
|
||||
PS_OUT_LIGHT Out;
|
||||
|
||||
vector vNormalDesc = g_NormalTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
float4 vNormal = vector(vNormalDesc.xyz * 2.f - 1.f, 0.0f);
|
||||
|
||||
Out.vShade = g_vLightDiffuse * saturate(max(dot(normalize(g_vLightDir) * -1.f, vNormal), 0.f) + (g_vLightAmbient * g_vMtrlAmbient));
|
||||
|
||||
vector vDepthDesc = g_DepthTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
float fViewZ = vDepthDesc.y * g_fFar;
|
||||
|
||||
vector vPosition;
|
||||
|
||||
{ // vDepthDesc과 vTexcoord.xy로부터 World Position의 추론
|
||||
/* 직육면체의 NDC */
|
||||
/* LocalPos * World * View * Proj * ( 1 / w ) */
|
||||
vPosition.x = In.vTexcoord.x * 2.f - 1.f;
|
||||
vPosition.y = In.vTexcoord.y * -2.f + 1.f;
|
||||
vPosition.z = vDepthDesc.x;
|
||||
vPosition.w = 1.f;
|
||||
|
||||
/* [* (1 / w)] 소거*/
|
||||
/* z나누기를 되돌림 */
|
||||
vPosition = vPosition * fViewZ;
|
||||
// vPosition.x = In.vTexcoord.x * 2.f - 1.f * Far;
|
||||
// vPosition.y = In.vTexcoord.y * -2.f + 1.f * Far;
|
||||
// vPosition.z = vDepthDesc.x * Far;
|
||||
// vPosition.w = Far;
|
||||
|
||||
vPosition = mul(vPosition, g_invmatProj);
|
||||
vPosition = mul(vPosition, g_invMatView);
|
||||
}
|
||||
vector vLook = vPosition - g_vCamPosition;
|
||||
vector vReflect = reflect(normalize(g_vLightDir), vNormal);
|
||||
|
||||
Out.vSpecular = (g_vLightSpecular * g_vMtrlSpecular) * pow(max(dot(normalize(vLook) * -1.f, normalize(vReflect)), 0.f), 50.f);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In)
|
||||
{
|
||||
PS_OUT_LIGHT Out;
|
||||
|
||||
vector vNormalDesc = g_NormalTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
float4 vNormal = vector(vNormalDesc.xyz * 2.f - 1.f, 0.f);
|
||||
|
||||
vector vDepthDesc = g_DepthTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float fViewZ = vDepthDesc.y * g_fFar;
|
||||
|
||||
vector vPosition;
|
||||
/* 0 ~ 1 에서 -1 ~ 1 */
|
||||
vPosition.x = In.vTexcoord.x * 2.f - 1.f;
|
||||
vPosition.y = In.vTexcoord.y * -2.f + 1.f;
|
||||
vPosition.z = vDepthDesc.x;
|
||||
vPosition.w = 1.f;
|
||||
vPosition = vPosition * fViewZ;
|
||||
vPosition = mul(vPosition, g_invmatProj);
|
||||
vPosition = mul(vPosition, g_invMatView);
|
||||
|
||||
vector vLightDir = vPosition - g_vLightPos;
|
||||
float fDistance = length(vLightDir);
|
||||
float fAttenuation = saturate((g_fLightRange - fDistance) / g_fLightRange);
|
||||
if (fAttenuation <= 0.f)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
vLightDir = normalize(vLightDir);
|
||||
|
||||
Out.vShade = fAttenuation * (g_vLightDiffuse * saturate(max(dot(vLightDir * -1.f, vNormal), 0.f) + (g_vLightAmbient * g_vMtrlAmbient)));
|
||||
|
||||
vector vLook = vPosition - g_vCamPosition;
|
||||
vector vReflect = reflect(vLightDir, vNormal);
|
||||
|
||||
Out.vSpecular = fAttenuation * ((g_vLightSpecular * g_vMtrlSpecular) * pow(max(dot(normalize(vLook) * -1.f, normalize(vReflect)), 0.f), 50.f));
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
|
||||
{
|
||||
PS_OUT_LIGHT Out;
|
||||
|
||||
vector vNormalDesc = g_NormalTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
float4 vNormal = vector(vNormalDesc.xyz * 2.f - 1.f, 0.f);
|
||||
|
||||
vector vDepthDesc = g_DepthTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float fViewZ = vDepthDesc.y * g_fFar;
|
||||
|
||||
vector vPosition;
|
||||
/* 0 ~ 1 에서 -1 ~ 1 */
|
||||
vPosition.x = In.vTexcoord.x * 2.f - 1.f;
|
||||
vPosition.y = In.vTexcoord.y * -2.f + 1.f;
|
||||
vPosition.z = vDepthDesc.x;
|
||||
vPosition.w = 1.f;
|
||||
vPosition = vPosition * fViewZ;
|
||||
vPosition = mul(vPosition, g_invmatProj);
|
||||
vPosition = mul(vPosition, g_invMatView);
|
||||
|
||||
vector vLightDir = vPosition - g_vLightPos;
|
||||
float fDistance = length(vLightDir);
|
||||
float fAttenuation = saturate((g_fLightRange - fDistance) / g_fLightRange);
|
||||
if (fAttenuation <= 0.f)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
vLightDir = normalize(vLightDir);
|
||||
vector vSpotDir = normalize(g_vLightDir);
|
||||
float fCosAngle = dot(vLightDir, vSpotDir);
|
||||
if (fCosAngle < g_fSpotOuterAngle)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
float fSpotAttenenuation = saturate((fCosAngle - g_fSpotInnerAngle) / (g_fSpotInnerAngle - g_fSpotOuterAngle));
|
||||
fAttenuation *= fSpotAttenenuation;
|
||||
|
||||
Out.vShade = fAttenuation * (g_vLightDiffuse * saturate(max(dot(vLightDir * -1.f, vNormal), 0.f) + (g_vLightAmbient * g_vMtrlAmbient)));
|
||||
|
||||
vector vLook = vPosition - g_vCamPosition;
|
||||
vector vReflect = reflect(vLightDir, vNormal);
|
||||
|
||||
Out.vSpecular = fAttenuation * ((g_vLightSpecular * g_vMtrlSpecular) * pow(max(dot(normalize(vLook) * -1.f, normalize(vReflect)), 0.f), 50.f));
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
float g_fWeights[13] =
|
||||
{
|
||||
0.0090, 0.0218, 0.0448, 0.0784, 0.1169,
|
||||
0.1486, 0.1610, 0.1486, 0.1169, 0.0784,
|
||||
0.0448, 0.0218, 0.0090
|
||||
};
|
||||
|
||||
PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
||||
{
|
||||
PS_OUT_BACKBUFFER Out;
|
||||
|
||||
vector vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (0.f == vDiffuse.a)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
vector vShade = g_ShadeTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
vector vSpecular = g_SpecularTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
Out.vBackBuffer = vDiffuse * vShade + vSpecular;
|
||||
|
||||
vector vDepthDesc = g_DepthTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float fViewZ = vDepthDesc.y * g_fFar;
|
||||
|
||||
vector vPosition, vPreShadowPosition;
|
||||
|
||||
/* (로컬위치 * 월드 * 뷰 * 투영 / w) -> (로컬위치 * 월드) */
|
||||
vPosition.x = In.vTexcoord.x * 2.f - 1.f;
|
||||
vPosition.y = In.vTexcoord.y * -2.f + 1.f;
|
||||
vPosition.z = vDepthDesc.x;
|
||||
vPosition.w = 1.f;
|
||||
|
||||
vPosition = vPosition * fViewZ;
|
||||
|
||||
vPosition = mul(vPosition, g_invmatProj);
|
||||
vPosition = mul(vPosition, g_invMatView);
|
||||
vPreShadowPosition = vPosition;
|
||||
/* (로컬위치 * 월드) -> (로컬위치 * 월드 * 광원의 뷰 * 광원의 투영 ) */
|
||||
vPosition = mul(vPosition, g_LightViewMatrix);
|
||||
vPosition = mul(vPosition, g_LightProjMatrix);
|
||||
vPreShadowPosition = mul(vPreShadowPosition, g_PreShadowLightViewMatrix);
|
||||
vPreShadowPosition = mul(vPreShadowPosition, g_PreShadowLightProjMatrix);
|
||||
|
||||
/* (로컬위치 * 월드 * 광원의 뷰 * 광원의 투영 ) -> (로컬위치 * 월드 * 광원의 뷰 * 광원의 투영 * (/w) */
|
||||
float2 vTexcoord, vPreShadowTexcoord;
|
||||
vTexcoord.x = (vPosition.x / vPosition.w) * 0.5f + 0.5f;
|
||||
vTexcoord.y = (vPosition.y / vPosition.w) * -0.5f + 0.5f;
|
||||
vPreShadowTexcoord.x = (vPreShadowPosition.x / vPreShadowPosition.w) * 0.5f + 0.5f;
|
||||
vPreShadowTexcoord.y = (vPreShadowPosition.y / vPreShadowPosition.w) * -0.5f + 0.5f;
|
||||
/* 광원의 NDC에서 샘플링 */
|
||||
float fVisibility_Dynamic = ShadowVisibility_hwPCF(g_ShadowTexture, vPosition, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), 0.0005f);
|
||||
float fVisibility_Static = ShadowVisibility_hwPCF(g_PreShadowTexture, vPreShadowPosition, float2(g_iMaxShadowWidth, g_iMaxShadowHeight), 0.0005f);
|
||||
Out.vBackBuffer.rgb *= lerp(0.5f, 1.f, min(fVisibility_Dynamic, fVisibility_Static));
|
||||
//float fShadowDepth = g_ShadowTexture.Sample(DefaultSampler, vTexcoord).x;
|
||||
//float fPreShadowDepth = g_PreShadowTexture.Sample(DefaultSampler, vPreShadowTexcoord).x;
|
||||
//bool IsShadow = { false };
|
||||
//if (vPosition.z - 0.0005f > fShadowDepth)
|
||||
//{
|
||||
// IsShadow = true;
|
||||
//}
|
||||
//if (vPreShadowPosition.z - 0.0005f > fPreShadowDepth)
|
||||
//{
|
||||
// IsShadow = true;
|
||||
//}
|
||||
//if (true == IsShadow)
|
||||
//{
|
||||
// Out.vBackBuffer *= 0.5f;
|
||||
//}
|
||||
|
||||
float4 vColor = 0.f;
|
||||
|
||||
for (int i = -6; i < 7; ++i)
|
||||
{
|
||||
vTexcoord.x = In.vTexcoord.x;
|
||||
vTexcoord.y = In.vTexcoord.y + i / g_vResolution.y;
|
||||
|
||||
vColor += g_fWeights[i + 6] * g_BlurXTexture.Sample(BorderZeroSampler, vTexcoord);
|
||||
}
|
||||
|
||||
Out.vBackBuffer += vColor;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_OUT_BLUR_X
|
||||
{
|
||||
float4 vBlurX : SV_TARGET0;
|
||||
};
|
||||
|
||||
|
||||
PS_OUT_BLUR_X PS_MAIN_BLUR_X(PS_IN In)
|
||||
{
|
||||
PS_OUT_BLUR_X Out;
|
||||
|
||||
float2 vTexcoord;
|
||||
float4 vColor = 0.f;
|
||||
|
||||
for (int i = -6; i < 7; ++i)
|
||||
{
|
||||
vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x;
|
||||
vTexcoord.y = In.vTexcoord.y;
|
||||
|
||||
vColor += g_fWeights[i + 6] * g_BlurTexture.Sample(BorderZeroSampler, vTexcoord);
|
||||
}
|
||||
|
||||
Out.vBlurX = vColor;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
technique11 DefaultTechnique
|
||||
{
|
||||
pass DebugPass
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 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_MAIN_DEBUG();
|
||||
}
|
||||
|
||||
pass DirectionalPass
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_Blend, 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_MAIN_DIRECTIONAL();
|
||||
}
|
||||
|
||||
pass PointPass
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_Blend, 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_MAIN_POINT();
|
||||
}
|
||||
|
||||
pass CombinedPass
|
||||
{
|
||||
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_MAIN_COMBINED();
|
||||
}
|
||||
pass BlurPass
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_Blend, 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_MAIN_BLUR_X();
|
||||
}
|
||||
|
||||
pass SpotPass
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_Blend, 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_MAIN_SPOT();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,478 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{2133313a-e5e1-41cd-b976-21753fbcd083}</ProjectGuid>
|
||||
<RootNamespace>Engine</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<EnableASAN>true</EnableASAN>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<EnableASAN>false</EnableASAN>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>../Bin/$(Configuration)/</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>../Bin/$(Configuration)/</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;ENGINE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;ENGINE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>EDITOR_PROJECT;ENGINE_EXPORTS;IMGUI_EXPORTS;$(USERNAME);_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>../Public/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<AdditionalLibraryDirectories>../ThirdPartyLib/fMod/;../ThirdPartyLib/DirectXTK/;../ThirdPartyLib/FX11/;../ThirdPartyLib/Assimp/;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>d3d11.lib;fmod_vc.lib;dinput8.lib;DirectXTKd.lib;Effects11d.lib;assimp-vc145-mtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>EDITOR_PROJECT;ENGINE_EXPORTS;IMGUI_EXPORTS;$(USERDOMAIN);NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>../Public/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<AdditionalLibraryDirectories>../ThirdPartyLib/fMod/;../ThirdPartyLib/DirectXTK/;../ThirdPartyLib/FX11/;../ThirdPartyLib/Assimp/;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>d3d11.lib;fmod_vc.lib;dinput8.lib;DirectXTK.lib;Effects11.lib;assimp-vc145-mt.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Base.cpp" />
|
||||
<ClCompile Include="..\Private\Bounding.cpp" />
|
||||
<ClCompile Include="..\Private\Bounding_AABB.cpp" />
|
||||
<ClCompile Include="..\Private\Bounding_OBB.cpp" />
|
||||
<ClCompile Include="..\Private\Bounding_Sphere.cpp" />
|
||||
<ClCompile Include="..\Private\Camera.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Camera_Manager.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Cell.cpp" />
|
||||
<ClCompile Include="..\Private\Collider.cpp" />
|
||||
<ClCompile Include="..\Private\Component.cpp" />
|
||||
<ClCompile Include="..\Private\ContainerObject.cpp" />
|
||||
<ClCompile Include="..\Private\DebugDraw.cpp" />
|
||||
<ClCompile Include="..\Private\GameInstance.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\GameObject.cpp" />
|
||||
<ClCompile Include="..\Private\GameObject_Manager.cpp" />
|
||||
<ClCompile Include="..\Private\Graphic_Device.cpp" />
|
||||
<ClCompile Include="..\Private\imgui.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">../Public/IMGUI/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../Public/IMGUI/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\imgui_demo.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">../Public/IMGUI/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../Public/IMGUI/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\imgui_draw.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">../Public/IMGUI/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../Public/IMGUI/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\imgui_impl_dx11.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">../Public/IMGUI/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../Public/IMGUI/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\imgui_impl_win32.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">../Public/IMGUI/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../Public/IMGUI/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\imgui_tables.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">../Public/IMGUI/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../Public/IMGUI/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\imgui_widgets.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">../Public/IMGUI/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../Public/IMGUI/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Key_Manager.cpp" />
|
||||
<ClCompile Include="..\Private\Layer.cpp" />
|
||||
<ClCompile Include="..\Private\Level.cpp" />
|
||||
<ClCompile Include="..\Private\Level_Manager.cpp" />
|
||||
<ClCompile Include="..\Private\Light.cpp" />
|
||||
<ClCompile Include="..\Private\Light_Manager.cpp" />
|
||||
<ClCompile Include="..\Private\Model.cpp" />
|
||||
<ClCompile Include="..\Private\Mouse_Manager.cpp" />
|
||||
<ClCompile Include="..\Private\MyTools.cpp" />
|
||||
<ClCompile Include="..\Private\Navigation.cpp" />
|
||||
<ClCompile Include="..\Private\PartObject.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\PipeLine.cpp" />
|
||||
<ClCompile Include="..\Private\Prototype_Manager.cpp" />
|
||||
<ClCompile Include="..\Private\Renderer.cpp" />
|
||||
<ClCompile Include="..\Private\RenderTarget.cpp" />
|
||||
<ClCompile Include="..\Private\RenderTarget_Manager.cpp" />
|
||||
<ClCompile Include="..\Private\Shader.cpp" />
|
||||
<ClCompile Include="..\Private\Shadow.cpp" />
|
||||
<ClCompile Include="..\Private\SoundSrc.cpp" />
|
||||
<ClCompile Include="..\Private\Texture.cpp" />
|
||||
<ClCompile Include="..\Private\Timer.cpp" />
|
||||
<ClCompile Include="..\Private\Timer_Manager.cpp" />
|
||||
<ClCompile Include="..\Private\Transform.cpp" />
|
||||
<ClCompile Include="..\Private\VIBuffer.cpp" />
|
||||
<ClCompile Include="..\Private\VIBuffer_Cell.cpp" />
|
||||
<ClCompile Include="..\Private\VIBuffer_Rect.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Public\Assimp\aabb.h" />
|
||||
<ClInclude Include="..\Public\Assimp\ai_assert.h" />
|
||||
<ClInclude Include="..\Public\Assimp\anim.h" />
|
||||
<ClInclude Include="..\Public\Assimp\AssertHandler.h" />
|
||||
<ClInclude Include="..\Public\Assimp\Base64.hpp" />
|
||||
<ClInclude Include="..\Public\Assimp\BaseImporter.h" />
|
||||
<ClInclude Include="..\Public\Assimp\Bitmap.h" />
|
||||
<ClInclude Include="..\Public\Assimp\BlobIOSystem.h" />
|
||||
<ClInclude Include="..\Public\Assimp\ByteSwapper.h" />
|
||||
<ClInclude Include="..\Public\Assimp\camera.h" />
|
||||
<ClInclude Include="..\Public\Assimp\cexport.h" />
|
||||
<ClInclude Include="..\Public\Assimp\cfileio.h" />
|
||||
<ClInclude Include="..\Public\Assimp\cimport.h" />
|
||||
<ClInclude Include="..\Public\Assimp\ColladaMetaData.h" />
|
||||
<ClInclude Include="..\Public\Assimp\color4.h" />
|
||||
<ClInclude Include="..\Public\Assimp\commonMetaData.h" />
|
||||
<ClInclude Include="..\Public\Assimp\Compiler\poppack1.h" />
|
||||
<ClInclude Include="..\Public\Assimp\Compiler\pstdint.h" />
|
||||
<ClInclude Include="..\Public\Assimp\Compiler\pushpack1.h" />
|
||||
<ClInclude Include="..\Public\Assimp\config.h" />
|
||||
<ClInclude Include="..\Public\Assimp\CreateAnimMesh.h" />
|
||||
<ClInclude Include="..\Public\Assimp\DefaultIOStream.h" />
|
||||
<ClInclude Include="..\Public\Assimp\DefaultIOSystem.h" />
|
||||
<ClInclude Include="..\Public\Assimp\DefaultLogger.hpp" />
|
||||
<ClInclude Include="..\Public\Assimp\defs.h" />
|
||||
<ClInclude Include="..\Public\Assimp\Exceptional.h" />
|
||||
<ClInclude Include="..\Public\Assimp\Exporter.hpp" />
|
||||
<ClInclude Include="..\Public\Assimp\fast_atof.h" />
|
||||
<ClInclude Include="..\Public\Assimp\GenericProperty.h" />
|
||||
<ClInclude Include="..\Public\Assimp\GltfMaterial.h" />
|
||||
<ClInclude Include="..\Public\Assimp\Hash.h" />
|
||||
<ClInclude Include="..\Public\Assimp\Importer.hpp" />
|
||||
<ClInclude Include="..\Public\Assimp\importerdesc.h" />
|
||||
<ClInclude Include="..\Public\Assimp\IOStream.hpp" />
|
||||
<ClInclude Include="..\Public\Assimp\IOStreamBuffer.h" />
|
||||
<ClInclude Include="..\Public\Assimp\IOSystem.hpp" />
|
||||
<ClInclude Include="..\Public\Assimp\light.h" />
|
||||
<ClInclude Include="..\Public\Assimp\LineSplitter.h" />
|
||||
<ClInclude Include="..\Public\Assimp\LogAux.h" />
|
||||
<ClInclude Include="..\Public\Assimp\Logger.hpp" />
|
||||
<ClInclude Include="..\Public\Assimp\LogStream.hpp" />
|
||||
<ClInclude Include="..\Public\Assimp\material.h" />
|
||||
<ClInclude Include="..\Public\Assimp\MathFunctions.h" />
|
||||
<ClInclude Include="..\Public\Assimp\matrix3x3.h" />
|
||||
<ClInclude Include="..\Public\Assimp\matrix4x4.h" />
|
||||
<ClInclude Include="..\Public\Assimp\MemoryIOWrapper.h" />
|
||||
<ClInclude Include="..\Public\Assimp\mesh.h" />
|
||||
<ClInclude Include="..\Public\Assimp\metadata.h" />
|
||||
<ClInclude Include="..\Public\Assimp\NullLogger.hpp" />
|
||||
<ClInclude Include="..\Public\Assimp\ObjMaterial.h" />
|
||||
<ClInclude Include="..\Public\Assimp\ParsingUtils.h" />
|
||||
<ClInclude Include="..\Public\Assimp\pbrmaterial.h" />
|
||||
<ClInclude Include="..\Public\Assimp\port\AndroidJNI\AndroidJNIIOSystem.h" />
|
||||
<ClInclude Include="..\Public\Assimp\port\AndroidJNI\BundledAssetIOSystem.h" />
|
||||
<ClInclude Include="..\Public\Assimp\postprocess.h" />
|
||||
<ClInclude Include="..\Public\Assimp\Profiler.h" />
|
||||
<ClInclude Include="..\Public\Assimp\ProgressHandler.hpp" />
|
||||
<ClInclude Include="..\Public\Assimp\qnan.h" />
|
||||
<ClInclude Include="..\Public\Assimp\quaternion.h" />
|
||||
<ClInclude Include="..\Public\Assimp\RemoveComments.h" />
|
||||
<ClInclude Include="..\Public\Assimp\revision.h" />
|
||||
<ClInclude Include="..\Public\Assimp\scene.h" />
|
||||
<ClInclude Include="..\Public\Assimp\SceneCombiner.h" />
|
||||
<ClInclude Include="..\Public\Assimp\SGSpatialSort.h" />
|
||||
<ClInclude Include="..\Public\Assimp\SkeletonMeshBuilder.h" />
|
||||
<ClInclude Include="..\Public\Assimp\SmallVector.h" />
|
||||
<ClInclude Include="..\Public\Assimp\SmoothingGroups.h" />
|
||||
<ClInclude Include="..\Public\Assimp\SpatialSort.h" />
|
||||
<ClInclude Include="..\Public\Assimp\StandardShapes.h" />
|
||||
<ClInclude Include="..\Public\Assimp\StreamReader.h" />
|
||||
<ClInclude Include="..\Public\Assimp\StreamWriter.h" />
|
||||
<ClInclude Include="..\Public\Assimp\StringComparison.h" />
|
||||
<ClInclude Include="..\Public\Assimp\StringUtils.h" />
|
||||
<ClInclude Include="..\Public\Assimp\Subdivision.h" />
|
||||
<ClInclude Include="..\Public\Assimp\texture.h" />
|
||||
<ClInclude Include="..\Public\Assimp\TinyFormatter.h" />
|
||||
<ClInclude Include="..\Public\Assimp\types.h" />
|
||||
<ClInclude Include="..\Public\Assimp\vector2.h" />
|
||||
<ClInclude Include="..\Public\Assimp\vector3.h" />
|
||||
<ClInclude Include="..\Public\Assimp\version.h" />
|
||||
<ClInclude Include="..\Public\Assimp\Vertex.h" />
|
||||
<ClInclude Include="..\Public\Assimp\XmlParser.h" />
|
||||
<ClInclude Include="..\Public\Assimp\XMLTools.h" />
|
||||
<ClInclude Include="..\Public\Assimp\ZipArchiveIOSystem.h" />
|
||||
<ClInclude Include="..\Public\Base.h" />
|
||||
<ClInclude Include="..\Public\Bounding.h" />
|
||||
<ClInclude Include="..\Public\Bounding_AABB.h" />
|
||||
<ClInclude Include="..\Public\Bounding_OBB.h" />
|
||||
<ClInclude Include="..\Public\Bounding_Sphere.h" />
|
||||
<ClInclude Include="..\Public\Camera.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Camera_Manager.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Cell.h" />
|
||||
<ClInclude Include="..\Public\Collider.h" />
|
||||
<ClInclude Include="..\Public\Component.h" />
|
||||
<ClInclude Include="..\Public\ContainerObject.h" />
|
||||
<ClInclude Include="..\Public\DebugDraw.h" />
|
||||
<ClInclude Include="..\Public\DirectXTK\Audio.h" />
|
||||
<ClInclude Include="..\Public\DirectXTK\BufferHelpers.h" />
|
||||
<ClInclude Include="..\Public\DirectXTK\CommonStates.h" />
|
||||
<ClInclude Include="..\Public\DirectXTK\DDSTextureLoader.h" />
|
||||
<ClInclude Include="..\Public\DirectXTK\DirectXHelpers.h" />
|
||||
<ClInclude Include="..\Public\DirectXTK\Effects.h" />
|
||||
<ClInclude Include="..\Public\DirectXTK\GamePad.h" />
|
||||
<ClInclude Include="..\Public\DirectXTK\GeometricPrimitive.h" />
|
||||
<ClInclude Include="..\Public\DirectXTK\GraphicsMemory.h" />
|
||||
<ClInclude Include="..\Public\DirectXTK\Keyboard.h" />
|
||||
<ClInclude Include="..\Public\DirectXTK\Model.h" />
|
||||
<ClInclude Include="..\Public\DirectXTK\Mouse.h" />
|
||||
<ClInclude Include="..\Public\DirectXTK\PostProcess.h" />
|
||||
<ClInclude Include="..\Public\DirectXTK\PrimitiveBatch.h" />
|
||||
<ClInclude Include="..\Public\DirectXTK\ScreenGrab.h" />
|
||||
<ClInclude Include="..\Public\DirectXTK\SimpleMath.h" />
|
||||
<ClInclude Include="..\Public\DirectXTK\SpriteBatch.h" />
|
||||
<ClInclude Include="..\Public\DirectXTK\SpriteFont.h" />
|
||||
<ClInclude Include="..\Public\DirectXTK\VertexTypes.h" />
|
||||
<ClInclude Include="..\Public\DirectXTK\WICTextureLoader.h" />
|
||||
<ClInclude Include="..\Public\DirectXTK\XboxDDSTextureLoader.h" />
|
||||
<ClInclude Include="..\Public\Engine_Define.h" />
|
||||
<ClInclude Include="..\Public\Engine_Enum.h" />
|
||||
<ClInclude Include="..\Public\Engine_Function.h" />
|
||||
<ClInclude Include="..\Public\Engine_Macro.h" />
|
||||
<ClInclude Include="..\Public\Engine_Struct.h" />
|
||||
<ClInclude Include="..\Public\Engine_Typedef.h" />
|
||||
<ClInclude Include="..\Public\fMod\fmod.h" />
|
||||
<ClInclude Include="..\Public\fMod\fmod.hpp" />
|
||||
<ClInclude Include="..\Public\fMod\fmod_codec.h" />
|
||||
<ClInclude Include="..\Public\fMod\fmod_common.h" />
|
||||
<ClInclude Include="..\Public\fMod\fmod_dsp.h" />
|
||||
<ClInclude Include="..\Public\fMod\fmod_dsp_effects.h" />
|
||||
<ClInclude Include="..\Public\fMod\fmod_errors.h" />
|
||||
<ClInclude Include="..\Public\fMod\fmod_output.h" />
|
||||
<ClInclude Include="..\Public\FX11\d3dx11effect.h" />
|
||||
<ClInclude Include="..\Public\FX11\d3dxGlobal.h" />
|
||||
<ClInclude Include="..\Public\GameInstance.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\GameObject.h" />
|
||||
<ClInclude Include="..\Public\GameObject_Manager.h" />
|
||||
<ClInclude Include="..\Public\Graphic_Device.h" />
|
||||
<ClInclude Include="..\Public\IMGUI\imconfig.h" />
|
||||
<ClInclude Include="..\Public\IMGUI\imgui.h" />
|
||||
<ClInclude Include="..\Public\IMGUI\imgui_impl_dx11.h" />
|
||||
<ClInclude Include="..\Public\IMGUI\imgui_impl_win32.h" />
|
||||
<ClInclude Include="..\Public\IMGUI\imgui_internal.h" />
|
||||
<ClInclude Include="..\Public\IMGUI\imstb_rectpack.h" />
|
||||
<ClInclude Include="..\Public\IMGUI\imstb_textedit.h" />
|
||||
<ClInclude Include="..\Public\IMGUI\imstb_truetype.h" />
|
||||
<ClInclude Include="..\Public\Key_Manager.h" />
|
||||
<ClInclude Include="..\Public\Layer.h" />
|
||||
<ClInclude Include="..\Public\Level.h" />
|
||||
<ClInclude Include="..\Public\Level_Manager.h" />
|
||||
<ClInclude Include="..\Public\Light.h" />
|
||||
<ClInclude Include="..\Public\Light_Manager.h" />
|
||||
<ClInclude Include="..\Public\Model.h" />
|
||||
<ClInclude Include="..\Public\Mouse_Manager.h" />
|
||||
<ClInclude Include="..\Public\MyTools.h" />
|
||||
<ClInclude Include="..\Public\Navigation.h" />
|
||||
<ClInclude Include="..\Public\PartObject.h" />
|
||||
<ClInclude Include="..\Public\pch.h" />
|
||||
<ClInclude Include="..\Public\PipeLine.h" />
|
||||
<ClInclude Include="..\Public\Prototype_Manager.h" />
|
||||
<ClInclude Include="..\Public\Renderer.h" />
|
||||
<ClInclude Include="..\Public\RenderTarget.h" />
|
||||
<ClInclude Include="..\Public\RenderTarget_Manager.h" />
|
||||
<ClInclude Include="..\Public\Shader.h" />
|
||||
<ClInclude Include="..\Public\Shadow.h" />
|
||||
<ClInclude Include="..\Public\SoundSrc.h" />
|
||||
<ClInclude Include="..\Public\Texture.h" />
|
||||
<ClInclude Include="..\Public\Timer.h" />
|
||||
<ClInclude Include="..\Public\Timer_Manager.h" />
|
||||
<ClInclude Include="..\Public\Transform.h" />
|
||||
<ClInclude Include="..\Public\VIBuffer.h" />
|
||||
<ClInclude Include="..\Public\VIBuffer_Cell.h" />
|
||||
<ClInclude Include="..\Public\VIBuffer_Rect.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\Bin\Resources\ShaderFiles\Engine_Shader_Defines.hlsli" />
|
||||
<None Include="..\Public\Assimp\color4.inl" />
|
||||
<None Include="..\Public\Assimp\config.h.in" />
|
||||
<None Include="..\Public\Assimp\material.inl" />
|
||||
<None Include="..\Public\Assimp\matrix3x3.inl" />
|
||||
<None Include="..\Public\Assimp\matrix4x4.inl" />
|
||||
<None Include="..\Public\Assimp\module.modulemap" />
|
||||
<None Include="..\Public\Assimp\quaternion.inl" />
|
||||
<None Include="..\Public\Assimp\revision.h.in" />
|
||||
<None Include="..\Public\Assimp\SmoothingGroups.inl" />
|
||||
<None Include="..\Public\Assimp\vector2.inl" />
|
||||
<None Include="..\Public\Assimp\vector3.inl" />
|
||||
<None Include="..\Public\DirectXTK\SimpleMath.inl" />
|
||||
<None Include="..\Public\fMod\fmod.cs" />
|
||||
<None Include="..\Public\fMod\fmod_dsp.cs" />
|
||||
<None Include="..\Public\fMod\fmod_errors.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<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>
|
||||
</FxCompile>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_Deferred.hlsl">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Effect</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">5.0</ShaderModel>
|
||||
</FxCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,934 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="00.System">
|
||||
<UniqueIdentifier>{b9573a87-7a2c-4e47-a2b5-8ac9e1bd6887}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="00.System\99.Base">
|
||||
<UniqueIdentifier>{0c9df74d-79e3-4ca1-87cd-22b0789afc1c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="99.Define">
|
||||
<UniqueIdentifier>{2cb454c9-e390-4f2e-8cf5-b5c6325543ed}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="99.Define\00.DEFAULT">
|
||||
<UniqueIdentifier>{0e35cd1b-88f6-46b9-b72e-b46eeaacd4e0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="99.Define\99.THIRDPARTY">
|
||||
<UniqueIdentifier>{32ca0c26-d3e2-49c5-8dc6-cc67e5291214}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="99.Define\99.THIRDPARTY\IMGUI">
|
||||
<UniqueIdentifier>{17dcadfe-e4cd-46c6-8122-e5e02bb73e57}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="99.Define\99.THIRDPARTY\FX11">
|
||||
<UniqueIdentifier>{c3e7b75b-ec8b-4071-8b52-e5c356febfa6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="99.Define\99.THIRDPARTY\FMOD">
|
||||
<UniqueIdentifier>{57dd171f-f788-4918-aae2-85c20794b3cb}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="99.Define\99.THIRDPARTY\DXTK">
|
||||
<UniqueIdentifier>{40758cb1-0f91-4db9-bad7-7c77eb8002da}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="99.Define\99.THIRDPARTY\ASSIMP">
|
||||
<UniqueIdentifier>{bbf3ec67-56f5-4e67-b6cf-8eb1eb4400ff}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="99.Define\01.SHADER">
|
||||
<UniqueIdentifier>{30c382b4-2ac9-4355-b3a5-c1b3622c2982}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="99.Define\70.NS_SOUND">
|
||||
<UniqueIdentifier>{1622af23-8aca-43cd-8250-b289e363e613}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="00.System\01.Timer">
|
||||
<UniqueIdentifier>{de88c47e-55e3-4c50-8b4c-7dd94c0c837f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="00.System\00.Device">
|
||||
<UniqueIdentifier>{f69b37d9-7bbc-4df3-9500-59519fc972d7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="03.Management">
|
||||
<UniqueIdentifier>{6d1b87d2-f89a-4d0b-ab45-59354f66d995}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element">
|
||||
<UniqueIdentifier>{f56f4248-8206-42a9-935c-58a3da5f170e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Utility">
|
||||
<UniqueIdentifier>{651c9406-d16c-48f9-9a0e-8f3883a29535}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Utility\00.GameInstance">
|
||||
<UniqueIdentifier>{1d05b463-1d77-4114-a33f-32866f510895}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Utility\01.Renderer">
|
||||
<UniqueIdentifier>{a087f449-06e3-4e3b-a55b-d07b53a5ec51}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Utility\02.PipeLine">
|
||||
<UniqueIdentifier>{25e059a7-5d1d-47da-ad0b-3865fadecf72}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Utility\03.RenderTargets">
|
||||
<UniqueIdentifier>{d7596dbd-fa1c-414b-9f4e-f05a1a982434}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Utility\04.Light">
|
||||
<UniqueIdentifier>{0c8440f6-63b2-4dcb-9cb8-4c2356106fd0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Utility\05.Shadow">
|
||||
<UniqueIdentifier>{6f4f880c-b0f2-4fab-ba8b-0939f6bc9321}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="03.Management\10.Collider_Manager">
|
||||
<UniqueIdentifier>{ab763fcc-ac5b-4a2e-a99e-e96924a06c84}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="03.Management\11.Obstacle_Manager">
|
||||
<UniqueIdentifier>{b22c46db-a0c1-469b-911c-47719a76ff7b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="03.Management\01.Prototype_Manager">
|
||||
<UniqueIdentifier>{053fca41-962f-483d-a3d0-6569cdf188ca}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="03.Management\00.GameObject_Manager">
|
||||
<UniqueIdentifier>{1cc7e2f7-559a-4b58-9e84-bbfafb84f81c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="03.Management\02.Asset_Manager">
|
||||
<UniqueIdentifier>{685d2cc6-b29a-4018-b72f-d66a2807463d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\00.Level">
|
||||
<UniqueIdentifier>{beb918fe-e798-41b2-8076-6d0cbc525ada}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component">
|
||||
<UniqueIdentifier>{015bd5de-833e-44d3-bc1e-e5142e845b26}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\01.GameObject">
|
||||
<UniqueIdentifier>{e30e4f0e-a7b7-4854-a5ea-c06b6268d364}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="00.System\00.Device\Graphic">
|
||||
<UniqueIdentifier>{f7180997-ba88-4c22-8b3c-462662946df1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="00.System\00.Device\Input">
|
||||
<UniqueIdentifier>{b04220bf-3cdf-4100-9297-2011d191bea4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="00.System\00.Device\Sound">
|
||||
<UniqueIdentifier>{ec0de87d-3357-4e28-b089-23a8170c1706}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="00.System\00.Device\Input\00.Key_Manager">
|
||||
<UniqueIdentifier>{7b663849-e677-4117-a4f3-49526a5c41b0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="00.System\00.Device\Input\01.Mouse_Manager">
|
||||
<UniqueIdentifier>{d9f02732-2a8d-4e47-a236-5d76d981a14d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="00.System\00.Device\Sound\00.Sound_Manager">
|
||||
<UniqueIdentifier>{8c67e221-93f9-41f2-8b0f-8fa6a2b86e4f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\00.Level\Manager">
|
||||
<UniqueIdentifier>{b6b69002-3802-473d-85ec-6263e54cfe5c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="03.Management\00.GameObject_Manager\Layer">
|
||||
<UniqueIdentifier>{84644f2b-5f42-44e4-a193-68914e22f66d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\00.Transform">
|
||||
<UniqueIdentifier>{89f6e50e-7dd3-4abb-b77b-3ce6250bf1ee}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="00.System\01.Timer\Timer_Manager">
|
||||
<UniqueIdentifier>{e401f91c-93ee-40c8-95bb-aa59d01204a7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\01.Shader">
|
||||
<UniqueIdentifier>{f668c4cc-5655-457d-8a48-c382315b7203}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Utility\03.RenderTargets\RenderTarget_Manager">
|
||||
<UniqueIdentifier>{5d881e7d-b040-492b-9c64-2da299534bd0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\02.VIBuffer">
|
||||
<UniqueIdentifier>{269dc6d4-fcee-4f16-a091-4fc836c9fd8c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\02.VIBuffer\Rect">
|
||||
<UniqueIdentifier>{5fec6152-84b6-4811-a2ee-f5f1044cc1eb}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Utility\04.Light\Manager">
|
||||
<UniqueIdentifier>{2bb63dcf-1503-446f-820e-03bfc3e1e38e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="03.Management\20.Camera_Manager">
|
||||
<UniqueIdentifier>{b89f3382-3069-4263-8e56-6116866a2518}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\03.Texture">
|
||||
<UniqueIdentifier>{56c197ea-fb6f-4138-91da-c5b0c7625d82}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\04.Collider">
|
||||
<UniqueIdentifier>{2e7d8e87-901c-4ed2-bb65-cd7d26b9dd3d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\04.Collider\Bounding">
|
||||
<UniqueIdentifier>{b5918cea-7af5-4e2f-909a-25613a5164ef}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\04.Collider\DebugDraw">
|
||||
<UniqueIdentifier>{495acaa3-3602-450d-959c-98b8559418cd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\04.Collider\Bounding\AABB">
|
||||
<UniqueIdentifier>{0d2bb8fc-2175-4d75-b62c-6dd75540c586}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\04.Collider\Bounding\Sphere">
|
||||
<UniqueIdentifier>{879c8fad-7f3c-4c8c-b45a-6fcdb9b28958}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\04.Collider\Bounding\OBB">
|
||||
<UniqueIdentifier>{16ea747e-d066-4300-b85d-860d339c1f8a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\05.Navigation">
|
||||
<UniqueIdentifier>{d70a7d8e-2ba1-402f-930a-17a4bd73f49e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\06.Model">
|
||||
<UniqueIdentifier>{bcf90b04-c793-4f99-b64d-3f0321d9a8ce}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\01.GameObject\01.PartObject">
|
||||
<UniqueIdentifier>{b3742605-653a-4bdf-bad9-329d993e7f52}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\01.GameObject\00.ContainerObject">
|
||||
<UniqueIdentifier>{acf78d53-8123-45d9-91d4-c038c6cc4872}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\01.GameObject\10.Camera">
|
||||
<UniqueIdentifier>{14cad0fb-f45b-444e-ad80-1f68eac8c462}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\06.Model\Animation">
|
||||
<UniqueIdentifier>{001b5c01-59a6-45dc-a46f-175f701b5585}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\06.Model\Mesh">
|
||||
<UniqueIdentifier>{2ade693f-2b8a-49b3-81e8-0bac262c8ffd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\06.Model\Bone">
|
||||
<UniqueIdentifier>{c3ee329c-4547-4b48-b29b-e7844039cf55}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\06.Model\Material">
|
||||
<UniqueIdentifier>{cdcc83b7-695f-4bf1-ada9-ca7c46e74225}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\05.Navigation\Cell">
|
||||
<UniqueIdentifier>{3f8a432d-0710-4bc6-8178-66eae9a6a5bd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\02.VIBuffer\Cell">
|
||||
<UniqueIdentifier>{1737bcf1-ee47-4421-934f-be11533d2ca2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\02.VIBuffer\Instance">
|
||||
<UniqueIdentifier>{6130d263-dccd-4c7c-914f-1a4b223b911a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\02.VIBuffer\Terrain">
|
||||
<UniqueIdentifier>{52994263-6339-4d57-97b3-7bb3c6dca479}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Base.cpp">
|
||||
<Filter>00.System\99.Base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\pch.cpp">
|
||||
<Filter>99.Define\00.DEFAULT</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\MyTools.cpp">
|
||||
<Filter>99.Define\00.DEFAULT</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\SoundSrc.cpp">
|
||||
<Filter>99.Define\70.NS_SOUND</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Graphic_Device.cpp">
|
||||
<Filter>00.System\00.Device\Graphic</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\GameInstance.cpp">
|
||||
<Filter>01.Utility\00.GameInstance</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\GameObject.cpp">
|
||||
<Filter>02.Element\01.GameObject</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Component.cpp">
|
||||
<Filter>02.Element\02.Component</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Level.cpp">
|
||||
<Filter>02.Element\00.Level</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Level_Manager.cpp">
|
||||
<Filter>02.Element\00.Level\Manager</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\GameObject_Manager.cpp">
|
||||
<Filter>03.Management\00.GameObject_Manager</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Layer.cpp">
|
||||
<Filter>03.Management\00.GameObject_Manager\Layer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Prototype_Manager.cpp">
|
||||
<Filter>03.Management\01.Prototype_Manager</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Transform.cpp">
|
||||
<Filter>02.Element\02.Component\00.Transform</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Timer.cpp">
|
||||
<Filter>00.System\01.Timer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Timer_Manager.cpp">
|
||||
<Filter>00.System\01.Timer\Timer_Manager</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\PipeLine.cpp">
|
||||
<Filter>01.Utility\02.PipeLine</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Renderer.cpp">
|
||||
<Filter>01.Utility\01.Renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Shader.cpp">
|
||||
<Filter>02.Element\02.Component\01.Shader</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\RenderTarget.cpp">
|
||||
<Filter>01.Utility\03.RenderTargets</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\RenderTarget_Manager.cpp">
|
||||
<Filter>01.Utility\03.RenderTargets\RenderTarget_Manager</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Camera_Manager.cpp">
|
||||
<Filter>03.Management\20.Camera_Manager</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Camera.cpp">
|
||||
<Filter>02.Element\01.GameObject\10.Camera</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\VIBuffer.cpp">
|
||||
<Filter>02.Element\02.Component\02.VIBuffer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\VIBuffer_Rect.cpp">
|
||||
<Filter>02.Element\02.Component\02.VIBuffer\Rect</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Shadow.cpp">
|
||||
<Filter>01.Utility\05.Shadow</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Light.cpp">
|
||||
<Filter>01.Utility\04.Light</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Light_Manager.cpp">
|
||||
<Filter>01.Utility\04.Light\Manager</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\imgui_demo.cpp">
|
||||
<Filter>99.Define\99.THIRDPARTY\IMGUI</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\imgui_draw.cpp">
|
||||
<Filter>99.Define\99.THIRDPARTY\IMGUI</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\imgui_impl_dx11.cpp">
|
||||
<Filter>99.Define\99.THIRDPARTY\IMGUI</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\imgui_impl_win32.cpp">
|
||||
<Filter>99.Define\99.THIRDPARTY\IMGUI</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\imgui_tables.cpp">
|
||||
<Filter>99.Define\99.THIRDPARTY\IMGUI</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\imgui_widgets.cpp">
|
||||
<Filter>99.Define\99.THIRDPARTY\IMGUI</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\imgui.cpp">
|
||||
<Filter>99.Define\99.THIRDPARTY\IMGUI</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Key_Manager.cpp">
|
||||
<Filter>00.System\00.Device\Input\00.Key_Manager</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Mouse_Manager.cpp">
|
||||
<Filter>00.System\00.Device\Input\01.Mouse_Manager</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Texture.cpp">
|
||||
<Filter>02.Element\02.Component\03.Texture</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Collider.cpp">
|
||||
<Filter>02.Element\02.Component\04.Collider</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Bounding.cpp">
|
||||
<Filter>02.Element\02.Component\04.Collider\Bounding</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Bounding_AABB.cpp">
|
||||
<Filter>02.Element\02.Component\04.Collider\Bounding\AABB</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Bounding_OBB.cpp">
|
||||
<Filter>02.Element\02.Component\04.Collider\Bounding\OBB</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Bounding_Sphere.cpp">
|
||||
<Filter>02.Element\02.Component\04.Collider\Bounding\Sphere</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\DebugDraw.cpp">
|
||||
<Filter>02.Element\02.Component\04.Collider\DebugDraw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Model.cpp">
|
||||
<Filter>02.Element\02.Component\06.Model</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\ContainerObject.cpp">
|
||||
<Filter>02.Element\01.GameObject\00.ContainerObject</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\PartObject.cpp">
|
||||
<Filter>02.Element\01.GameObject\01.PartObject</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Navigation.cpp">
|
||||
<Filter>02.Element\02.Component\05.Navigation</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Cell.cpp">
|
||||
<Filter>02.Element\02.Component\05.Navigation\Cell</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\VIBuffer_Cell.cpp">
|
||||
<Filter>02.Element\02.Component\02.VIBuffer\Cell</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Public\Base.h">
|
||||
<Filter>00.System\99.Base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\pch.h">
|
||||
<Filter>99.Define\00.DEFAULT</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\aabb.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\ai_assert.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\anim.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\AssertHandler.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\Base64.hpp">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\BaseImporter.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\Bitmap.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\BlobIOSystem.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\ByteSwapper.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\camera.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\cexport.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\cfileio.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\cimport.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\ColladaMetaData.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\color4.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\commonMetaData.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\config.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\CreateAnimMesh.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\DefaultIOStream.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\DefaultIOSystem.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\DefaultLogger.hpp">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\defs.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\Exceptional.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\Exporter.hpp">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\fast_atof.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\GenericProperty.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\GltfMaterial.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\Hash.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\Importer.hpp">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\importerdesc.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\IOStream.hpp">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\IOStreamBuffer.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\IOSystem.hpp">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\light.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\LineSplitter.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\LogAux.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\Logger.hpp">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\LogStream.hpp">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\material.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\MathFunctions.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\matrix3x3.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\matrix4x4.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\MemoryIOWrapper.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\mesh.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\metadata.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\NullLogger.hpp">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\ObjMaterial.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\ParsingUtils.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\pbrmaterial.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\postprocess.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\Profiler.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\ProgressHandler.hpp">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\qnan.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\quaternion.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\RemoveComments.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\revision.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\scene.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\SceneCombiner.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\SGSpatialSort.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\SkeletonMeshBuilder.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\SmallVector.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\SmoothingGroups.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\SpatialSort.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\StandardShapes.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\StreamReader.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\StreamWriter.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\StringComparison.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\StringUtils.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\Subdivision.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\texture.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\TinyFormatter.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\types.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\vector2.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\vector3.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\version.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\Vertex.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\XmlParser.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\XMLTools.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\ZipArchiveIOSystem.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\Compiler\poppack1.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\Compiler\pstdint.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\Compiler\pushpack1.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\port\AndroidJNI\AndroidJNIIOSystem.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Assimp\port\AndroidJNI\BundledAssetIOSystem.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DirectXTK\Audio.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\DXTK</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DirectXTK\BufferHelpers.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\DXTK</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DirectXTK\CommonStates.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\DXTK</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DirectXTK\DDSTextureLoader.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\DXTK</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DirectXTK\DirectXHelpers.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\DXTK</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DirectXTK\Effects.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\DXTK</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DirectXTK\GamePad.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\DXTK</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DirectXTK\GeometricPrimitive.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\DXTK</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DirectXTK\GraphicsMemory.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\DXTK</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DirectXTK\Keyboard.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\DXTK</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DirectXTK\Model.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\DXTK</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DirectXTK\Mouse.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\DXTK</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DirectXTK\PostProcess.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\DXTK</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DirectXTK\PrimitiveBatch.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\DXTK</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DirectXTK\ScreenGrab.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\DXTK</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DirectXTK\SimpleMath.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\DXTK</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DirectXTK\SpriteBatch.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\DXTK</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DirectXTK\SpriteFont.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\DXTK</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DirectXTK\VertexTypes.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\DXTK</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DirectXTK\WICTextureLoader.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\DXTK</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DirectXTK\XboxDDSTextureLoader.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\DXTK</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\fMod\fmod.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\FMOD</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\fMod\fmod.hpp">
|
||||
<Filter>99.Define\99.THIRDPARTY\FMOD</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\fMod\fmod_codec.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\FMOD</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\fMod\fmod_common.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\FMOD</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\fMod\fmod_dsp.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\FMOD</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\fMod\fmod_dsp_effects.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\FMOD</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\fMod\fmod_errors.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\FMOD</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\fMod\fmod_output.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\FMOD</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\FX11\d3dx11effect.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\FX11</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\FX11\d3dxGlobal.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\FX11</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\IMGUI\imconfig.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\IMGUI</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\IMGUI\imgui.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\IMGUI</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\IMGUI\imgui_impl_dx11.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\IMGUI</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\IMGUI\imgui_impl_win32.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\IMGUI</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\IMGUI\imgui_internal.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\IMGUI</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\IMGUI\imstb_rectpack.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\IMGUI</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\IMGUI\imstb_textedit.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\IMGUI</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\IMGUI\imstb_truetype.h">
|
||||
<Filter>99.Define\99.THIRDPARTY\IMGUI</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Engine_Typedef.h">
|
||||
<Filter>99.Define</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Engine_Define.h">
|
||||
<Filter>99.Define</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Engine_Enum.h">
|
||||
<Filter>99.Define</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Engine_Function.h">
|
||||
<Filter>99.Define</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Engine_Macro.h">
|
||||
<Filter>99.Define</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Engine_Struct.h">
|
||||
<Filter>99.Define</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\MyTools.h">
|
||||
<Filter>99.Define</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\SoundSrc.h">
|
||||
<Filter>99.Define\70.NS_SOUND</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Graphic_Device.h">
|
||||
<Filter>00.System\00.Device\Graphic</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\GameInstance.h">
|
||||
<Filter>01.Utility\00.GameInstance</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\GameObject.h">
|
||||
<Filter>02.Element\01.GameObject</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Component.h">
|
||||
<Filter>02.Element\02.Component</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Level.h">
|
||||
<Filter>02.Element\00.Level</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Level_Manager.h">
|
||||
<Filter>02.Element\00.Level\Manager</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\GameObject_Manager.h">
|
||||
<Filter>03.Management\00.GameObject_Manager</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Layer.h">
|
||||
<Filter>03.Management\00.GameObject_Manager\Layer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Prototype_Manager.h">
|
||||
<Filter>03.Management\01.Prototype_Manager</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Transform.h">
|
||||
<Filter>02.Element\02.Component\00.Transform</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Timer.h">
|
||||
<Filter>00.System\01.Timer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Timer_Manager.h">
|
||||
<Filter>00.System\01.Timer\Timer_Manager</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\PipeLine.h">
|
||||
<Filter>01.Utility\02.PipeLine</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Renderer.h">
|
||||
<Filter>01.Utility\01.Renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Shader.h">
|
||||
<Filter>02.Element\02.Component\01.Shader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\RenderTarget.h">
|
||||
<Filter>01.Utility\03.RenderTargets</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\RenderTarget_Manager.h">
|
||||
<Filter>01.Utility\03.RenderTargets\RenderTarget_Manager</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Camera_Manager.h">
|
||||
<Filter>03.Management\20.Camera_Manager</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Camera.h">
|
||||
<Filter>02.Element\01.GameObject\10.Camera</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\VIBuffer.h">
|
||||
<Filter>02.Element\02.Component\02.VIBuffer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\VIBuffer_Rect.h">
|
||||
<Filter>02.Element\02.Component\02.VIBuffer\Rect</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Shadow.h">
|
||||
<Filter>01.Utility\05.Shadow</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Light.h">
|
||||
<Filter>01.Utility\04.Light</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Light_Manager.h">
|
||||
<Filter>01.Utility\04.Light\Manager</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Key_Manager.h">
|
||||
<Filter>00.System\00.Device\Input\00.Key_Manager</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Mouse_Manager.h">
|
||||
<Filter>00.System\00.Device\Input\01.Mouse_Manager</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Texture.h">
|
||||
<Filter>02.Element\02.Component\03.Texture</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Collider.h">
|
||||
<Filter>02.Element\02.Component\04.Collider</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Bounding.h">
|
||||
<Filter>02.Element\02.Component\04.Collider\Bounding</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Bounding_AABB.h">
|
||||
<Filter>02.Element\02.Component\04.Collider\Bounding\AABB</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Bounding_OBB.h">
|
||||
<Filter>02.Element\02.Component\04.Collider\Bounding\OBB</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Bounding_Sphere.h">
|
||||
<Filter>02.Element\02.Component\04.Collider\Bounding\Sphere</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DebugDraw.h">
|
||||
<Filter>02.Element\02.Component\04.Collider\DebugDraw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Model.h">
|
||||
<Filter>02.Element\02.Component\06.Model</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\ContainerObject.h">
|
||||
<Filter>02.Element\01.GameObject\00.ContainerObject</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\PartObject.h">
|
||||
<Filter>02.Element\01.GameObject\01.PartObject</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Navigation.h">
|
||||
<Filter>02.Element\02.Component\05.Navigation</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Cell.h">
|
||||
<Filter>02.Element\02.Component\05.Navigation\Cell</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\VIBuffer_Cell.h">
|
||||
<Filter>02.Element\02.Component\02.VIBuffer\Cell</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\Public\Assimp\color4.inl">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</None>
|
||||
<None Include="..\Public\Assimp\config.h.in">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</None>
|
||||
<None Include="..\Public\Assimp\material.inl">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</None>
|
||||
<None Include="..\Public\Assimp\matrix3x3.inl">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</None>
|
||||
<None Include="..\Public\Assimp\matrix4x4.inl">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</None>
|
||||
<None Include="..\Public\Assimp\module.modulemap">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</None>
|
||||
<None Include="..\Public\Assimp\quaternion.inl">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</None>
|
||||
<None Include="..\Public\Assimp\revision.h.in">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</None>
|
||||
<None Include="..\Public\Assimp\SmoothingGroups.inl">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</None>
|
||||
<None Include="..\Public\Assimp\vector2.inl">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</None>
|
||||
<None Include="..\Public\Assimp\vector3.inl">
|
||||
<Filter>99.Define\99.THIRDPARTY\ASSIMP</Filter>
|
||||
</None>
|
||||
<None Include="..\Public\DirectXTK\SimpleMath.inl">
|
||||
<Filter>99.Define\99.THIRDPARTY\DXTK</Filter>
|
||||
</None>
|
||||
<None Include="..\Public\fMod\fmod.cs">
|
||||
<Filter>99.Define\99.THIRDPARTY\FMOD</Filter>
|
||||
</None>
|
||||
<None Include="..\Public\fMod\fmod_dsp.cs">
|
||||
<Filter>99.Define\99.THIRDPARTY\FMOD</Filter>
|
||||
</None>
|
||||
<None Include="..\Public\fMod\fmod_errors.cs">
|
||||
<Filter>99.Define\99.THIRDPARTY\FMOD</Filter>
|
||||
</None>
|
||||
<None Include="..\Bin\Resources\ShaderFiles\Engine_Shader_Defines.hlsli">
|
||||
<Filter>99.Define\01.SHADER</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_Cell.hlsl">
|
||||
<Filter>99.Define\01.SHADER</Filter>
|
||||
</FxCompile>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_Deferred.hlsl">
|
||||
<Filter>99.Define\01.SHADER</Filter>
|
||||
</FxCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
||||
@@ -0,0 +1,31 @@
|
||||
#include "pch.h"
|
||||
#include "Base.h"
|
||||
|
||||
|
||||
CBase::CBase()
|
||||
{
|
||||
}
|
||||
|
||||
_uint CBase::AddRef()
|
||||
{
|
||||
return ++m_iRefCnt;
|
||||
}
|
||||
|
||||
_uint CBase::Release()
|
||||
{
|
||||
if (0 == m_iRefCnt)
|
||||
{
|
||||
Free();
|
||||
|
||||
delete this;
|
||||
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
return m_iRefCnt--;
|
||||
}
|
||||
}
|
||||
|
||||
void CBase::Free()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#include "pch.h"
|
||||
|
||||
#include "Bounding.h"
|
||||
|
||||
CBounding::CBounding(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: m_pDevice{ pDevice }
|
||||
, m_pContext{ pContext }
|
||||
{
|
||||
SAFE_ADDREF(m_pDevice);
|
||||
SAFE_ADDREF(m_pContext);
|
||||
}
|
||||
|
||||
HRESULT CBounding::Initialize()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CBounding::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDevice);
|
||||
SAFE_RELEASE(m_pContext);
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
#include "pch.h"
|
||||
#include "Bounding_AABB.h"
|
||||
#include "Bounding_OBB.h"
|
||||
#include "Bounding_Sphere.h"
|
||||
|
||||
#include "DebugDraw.h"
|
||||
|
||||
CBounding_AABB::CBounding_AABB(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CBounding(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CBounding_AABB::Initialize(const void* pArg)
|
||||
{
|
||||
const BOUNDING_AABB_DESC* pDesc = static_cast<const BOUNDING_AABB_DESC*>(pArg);
|
||||
|
||||
m_pOriginalDesc = new BoundingBox(pDesc->vCenter, _float3(pDesc->vSize.x * 0.5f, pDesc->vSize.y * 0.5f, pDesc->vSize.z * 0.5f));
|
||||
m_pDesc = new BoundingBox(*m_pOriginalDesc);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CBounding_AABB::Update(_fmatrix WorldMatrix)
|
||||
{
|
||||
_matrix TransformMatrix = WorldMatrix;
|
||||
|
||||
TransformMatrix.r[0] = XMVectorSet(1.f, 0.f, 0.f, 0.f) * XMVector3Length(TransformMatrix.r[0]);
|
||||
TransformMatrix.r[1] = XMVectorSet(0.f, 1.f, 0.f, 0.f) * XMVector3Length(TransformMatrix.r[1]);
|
||||
TransformMatrix.r[2] = XMVectorSet(0.f, 0.f, 1.f, 0.f) * XMVector3Length(TransformMatrix.r[2]);
|
||||
|
||||
m_pOriginalDesc->Transform(*m_pDesc, TransformMatrix);
|
||||
}
|
||||
|
||||
_bool CBounding_AABB::Intersect(COLLIDER eType, CBounding* pTarget)
|
||||
{
|
||||
_bool isColl = { false };
|
||||
|
||||
switch (eType)
|
||||
{
|
||||
case COLLIDER::AABB:
|
||||
isColl = m_pDesc->Intersects(*static_cast<CBounding_AABB*>(pTarget)->Get_Desc());
|
||||
break;
|
||||
case COLLIDER::OBB:
|
||||
isColl = m_pDesc->Intersects(*static_cast<CBounding_OBB*>(pTarget)->Get_Desc());
|
||||
break;
|
||||
case COLLIDER::SPHERE:
|
||||
isColl = m_pDesc->Intersects(*static_cast<CBounding_Sphere*>(pTarget)->Get_Desc());
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return isColl;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
HRESULT CBounding_AABB::Render(PrimitiveBatch<VertexPositionColor>* pBatch, _fvector vColor)
|
||||
{
|
||||
pBatch->Begin();
|
||||
|
||||
DX::Draw(pBatch, *m_pDesc, vColor);
|
||||
|
||||
pBatch->End();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
CBounding_AABB* CBounding_AABB::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const void* pArg)
|
||||
{
|
||||
CBounding_AABB* pInstance = new CBounding_AABB(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CBounding_AABB");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
void CBounding_AABB::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
Safe_Delete(m_pOriginalDesc);
|
||||
Safe_Delete(m_pDesc);
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
#include "pch.h"
|
||||
#include "Bounding_AABB.h"
|
||||
#include "Bounding_OBB.h"
|
||||
#include "Bounding_Sphere.h"
|
||||
#include "DebugDraw.h"
|
||||
|
||||
CBounding_OBB::CBounding_OBB(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CBounding(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CBounding_OBB::Initialize(const void* pArg)
|
||||
{
|
||||
const BOUNDING_OBB_DESC* pDesc = static_cast<const BOUNDING_OBB_DESC*>(pArg);
|
||||
|
||||
_float4 vQuaternion = {};
|
||||
XMStoreFloat4(&vQuaternion, XMQuaternionRotationRollPitchYaw(pDesc->vAngles.x, pDesc->vAngles.y, pDesc->vAngles.z));
|
||||
|
||||
m_pOriginalDesc = new BoundingOrientedBox(pDesc->vCenter, _float3(pDesc->vSize.x * 0.5f, pDesc->vSize.y * 0.5f, pDesc->vSize.z * 0.5f), vQuaternion);
|
||||
m_pDesc = new BoundingOrientedBox(*m_pOriginalDesc);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CBounding_OBB::Update(_fmatrix WorldMatrix)
|
||||
{
|
||||
|
||||
m_pOriginalDesc->Transform(*m_pDesc, WorldMatrix);
|
||||
}
|
||||
|
||||
_bool CBounding_OBB::Intersect(COLLIDER eType, CBounding* pTarget)
|
||||
{
|
||||
_bool isColl = { false };
|
||||
|
||||
switch (eType)
|
||||
{
|
||||
case COLLIDER::AABB:
|
||||
isColl = m_pDesc->Intersects(*static_cast<CBounding_AABB*>(pTarget)->Get_Desc());
|
||||
break;
|
||||
case COLLIDER::OBB:
|
||||
isColl = m_pDesc->Intersects(*static_cast<CBounding_OBB*>(pTarget)->Get_Desc());
|
||||
break;
|
||||
case COLLIDER::SPHERE:
|
||||
isColl = m_pDesc->Intersects(*static_cast<CBounding_Sphere*>(pTarget)->Get_Desc());
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return isColl;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
HRESULT CBounding_OBB::Render(PrimitiveBatch<VertexPositionColor>* pBatch, _fvector vColor)
|
||||
{
|
||||
pBatch->Begin();
|
||||
|
||||
DX::Draw(pBatch, *m_pDesc, vColor);
|
||||
|
||||
pBatch->End();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
CBounding_OBB* CBounding_OBB::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const void* pArg)
|
||||
{
|
||||
CBounding_OBB* pInstance = new CBounding_OBB(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CBounding_OBB");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
void CBounding_OBB::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
Safe_Delete(m_pOriginalDesc);
|
||||
Safe_Delete(m_pDesc);
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
#include "pch.h"
|
||||
#include "Bounding_AABB.h"
|
||||
#include "Bounding_OBB.h"
|
||||
#include "Bounding_Sphere.h"
|
||||
#include "DebugDraw.h"
|
||||
|
||||
CBounding_Sphere::CBounding_Sphere(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CBounding(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CBounding_Sphere::Initialize(const void* pArg)
|
||||
{
|
||||
const BOUNDING_SPHERE_DESC* pDesc = static_cast<const BOUNDING_SPHERE_DESC*>(pArg);
|
||||
if (nullptr != m_pOriginalDesc) {
|
||||
|
||||
}
|
||||
m_pOriginalDesc = new BoundingSphere(pDesc->vCenter, pDesc->fRadius);
|
||||
m_pDesc = new BoundingSphere(*m_pOriginalDesc);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CBounding_Sphere::Update(_fmatrix WorldMatrix)
|
||||
{
|
||||
m_pOriginalDesc->Transform(*m_pDesc, WorldMatrix);
|
||||
}
|
||||
|
||||
_bool CBounding_Sphere::Intersect(COLLIDER eType, CBounding* pTarget)
|
||||
{
|
||||
_bool isColl = { false };
|
||||
|
||||
switch (eType)
|
||||
{
|
||||
case COLLIDER::AABB:
|
||||
isColl = m_pDesc->Intersects(*static_cast<CBounding_AABB*>(pTarget)->Get_Desc());
|
||||
break;
|
||||
case COLLIDER::OBB:
|
||||
isColl = m_pDesc->Intersects(*static_cast<CBounding_OBB*>(pTarget)->Get_Desc());
|
||||
break;
|
||||
case COLLIDER::SPHERE:
|
||||
isColl = m_pDesc->Intersects(*static_cast<CBounding_Sphere*>(pTarget)->Get_Desc());
|
||||
break;
|
||||
}
|
||||
return isColl;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
HRESULT CBounding_Sphere::Render(PrimitiveBatch<VertexPositionColor>* pBatch, _fvector vColor)
|
||||
{
|
||||
pBatch->Begin();
|
||||
|
||||
DX::Draw(pBatch, *m_pDesc, vColor);
|
||||
|
||||
pBatch->End();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
CBounding_Sphere* CBounding_Sphere::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const void* pArg)
|
||||
{
|
||||
CBounding_Sphere* pInstance = new CBounding_Sphere(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CBounding_Sphere");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
void CBounding_Sphere::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
Safe_Delete(m_pOriginalDesc);
|
||||
Safe_Delete(m_pDesc);
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
#include "pch.h"
|
||||
#include "Camera.h"
|
||||
|
||||
CCamera::CCamera(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CCamera::CCamera(const CCamera& rhs)
|
||||
: CGameObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CCamera::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCamera::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
D3D11_VIEWPORT vp = {};
|
||||
_uint iTargetVP = 1;
|
||||
m_pContext->RSGetViewports(&iTargetVP, &vp);
|
||||
|
||||
CAMERA_DESC* pDesc = static_cast<CAMERA_DESC*>(pArg);
|
||||
m_fFovy = pDesc->fFovy;
|
||||
m_fAspect = vp.Width / vp.Height;
|
||||
m_fNear = pDesc->fNear;
|
||||
m_fFar = pDesc->fFar;
|
||||
m_bActive = false;
|
||||
m_iPriority = pDesc->iPriority;
|
||||
m_pFollowTarget = pDesc->pFollowTarget;
|
||||
SAFE_ADDREF(m_pFollowTarget);
|
||||
m_pLookTarget = pDesc->pLookTarget;
|
||||
SAFE_ADDREF(m_pLookTarget);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCamera::Bind_Matrices()
|
||||
{
|
||||
if (true == m_bActive) {
|
||||
m_pGameInstance->Set_Transform(D3DTS::VIEW, XMMatrixInverse(nullptr, XMLoadFloat4x4(m_pTransformCom->Get_WorldMatrixPtr())));
|
||||
m_pGameInstance->Set_Transform(D3DTS::PROJ, XMMatrixPerspectiveFovLH(m_fFovy, m_fAspect, m_fNear, m_fFar));
|
||||
Ready_Shadow();
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CCamera::Transition(_float fTimeDelta)
|
||||
{
|
||||
if (false == m_bIsCurrentTransition) {
|
||||
return;
|
||||
}
|
||||
m_fTransitionCurrentTime += fTimeDelta;
|
||||
_float fRatio = m_fTransitionCurrentTime / m_fTransitionMaxTime;
|
||||
if (fRatio > 1.f) {
|
||||
fRatio = 1.f;
|
||||
m_bIsCurrentTransition = false;
|
||||
}
|
||||
|
||||
CTransform* pLookTransform = m_pLookTarget->Get_Component<CTransform>();
|
||||
_vector vFollowTarget = m_pFollowTarget->Get_Component<CTransform>()->Get_State(STATE::POSITION);
|
||||
_vector vLookTarget = pLookTransform->Get_State(STATE::POSITION);
|
||||
_matrix matTarget = XMMatrixInverse(nullptr, XMMatrixLookAtLH(vFollowTarget, vLookTarget, XMVectorSet(0.f, 1.f, 0.f, 0.f)));
|
||||
|
||||
_vector vTargetScale{}, vTargetRotq{}, vTargetTrans{}, vOriginScale{}, vOriginRotq{}, vOriginTrans{};
|
||||
XMMatrixDecompose(&vTargetScale, &vTargetRotq, &vTargetTrans, matTarget);
|
||||
XMMatrixDecompose(&vOriginScale, &vOriginRotq, &vOriginTrans, m_pTransformCom->Get_XMWorldMatrix());
|
||||
|
||||
vTargetScale = XMVectorLerp(vOriginScale, vTargetScale, fRatio);
|
||||
vTargetRotq = XMQuaternionSlerp(vOriginRotq, vTargetRotq, fRatio);
|
||||
vTargetTrans = XMVectorLerp(vOriginTrans, vTargetTrans, fRatio);
|
||||
|
||||
m_pTransformCom->Set_WorldMatrix(XMMatrixAffineTransformation(vTargetScale, XMVectorZero(), vTargetRotq, vTargetTrans));
|
||||
}
|
||||
|
||||
void CCamera::Active_Camera(pair<_float4, _float3>& pairTransitionInfo)
|
||||
{
|
||||
//if (true == m_bTransitionLerp) {
|
||||
m_pTransformCom->Set_WorldMatrix(XMMatrixAffineTransformation(XMVectorSplatOne(), XMVectorZero(),
|
||||
XMLoadFloat4(&pairTransitionInfo.first), XMLoadFloat3(&pairTransitionInfo.second)));
|
||||
m_fTransitionCurrentTime = 0.f;
|
||||
m_bIsCurrentTransition = true;
|
||||
//}
|
||||
//m_bActive = true;
|
||||
}
|
||||
|
||||
void CCamera::DeActive_Camera(pair<_float4, _float3>& pairTransition)
|
||||
{
|
||||
m_bActive = false;
|
||||
m_bIsCurrentTransition = false;
|
||||
_vector vScale{}, vRotq{}, vTrans{};
|
||||
XMMatrixDecompose(&vScale, &vRotq, &vTrans, m_pTransformCom->Get_XMWorldMatrix());
|
||||
XMStoreFloat4(&pairTransition.first, vRotq);
|
||||
XMStoreFloat3(&pairTransition.second, vTrans);
|
||||
}
|
||||
|
||||
void CCamera::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CCamera::Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CCamera::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CCamera::Render()
|
||||
{
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCamera::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_bool CCamera::IsImportantThan(CCamera* pOther) const
|
||||
{
|
||||
return m_iPriority > pOther->m_iPriority;
|
||||
}
|
||||
|
||||
const _float* CCamera::Get_CurrentFar()
|
||||
{
|
||||
return &m_fFar;
|
||||
}
|
||||
|
||||
HRESULT CCamera::Ready_Shadow()
|
||||
{
|
||||
if (nullptr == m_pLookTarget) {
|
||||
return S_OK;
|
||||
}
|
||||
ShadowDesc = *m_pGameInstance->Get_ShadowDesc();
|
||||
|
||||
ShadowDesc.fFar = 200.f;
|
||||
ShadowDesc.fNear = 0.1f;
|
||||
ShadowDesc.fWidth = 30.f;
|
||||
ShadowDesc.fHeight = 30.f;
|
||||
|
||||
XMStoreFloat4(&ShadowDesc.vAt, m_pLookTarget->Get_WorldPostion());
|
||||
|
||||
_matrix matRotation = XMMatrixRotationRollPitchYaw(XMConvertToRadians(vRollPichYaw.x), XMConvertToRadians(vRollPichYaw.y), XMConvertToRadians(vRollPichYaw.z));
|
||||
XMStoreFloat4(&ShadowDesc.vEye, XMLoadFloat4(&ShadowDesc.vAt) - matRotation.r[2] * (ShadowDesc.fFar * 0.25f));
|
||||
|
||||
if (FAILED(m_pGameInstance->Ready_Shadow_Light(ShadowDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CCamera::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pFollowTarget);
|
||||
SAFE_RELEASE(m_pLookTarget);
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
#include "pch.h"
|
||||
#include "Camera_Manager.h"
|
||||
#include "Camera.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CCamera_Manager::CCamera_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CBase(),
|
||||
m_pDevice{ pDevice },
|
||||
m_pContext{ pContext }
|
||||
{
|
||||
SAFE_ADDREF(m_pDevice);
|
||||
SAFE_ADDREF(m_pContext);
|
||||
}
|
||||
|
||||
HRESULT CCamera_Manager::Add_Camera(_uint iLevel, CCamera* pCamera, const _wstring& wstrCameraKey)
|
||||
{
|
||||
if (nullptr != Find_Camera(iLevel, wstrCameraKey)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (nullptr == pCamera) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_Cameras[iLevel].emplace(wstrCameraKey, pCamera);
|
||||
SAFE_ADDREF(pCamera);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCamera_Manager::Bind_Camera(_uint iLevel, const _wstring& wstrCameraKey, _bool bIgnorePriority)
|
||||
{
|
||||
CCamera* pNextCamera = Find_Camera(iLevel, wstrCameraKey);
|
||||
if (nullptr == pNextCamera) {
|
||||
return E_FAIL;
|
||||
}
|
||||
pair<_float4, _float3> pairTransitionInfo = { };
|
||||
if (nullptr != m_pCurrentMainCamera) {
|
||||
if (false == bIgnorePriority && false == pNextCamera->IsImportantThan(m_pCurrentMainCamera)) {
|
||||
return E_ACCESSDENIED;
|
||||
}
|
||||
m_pCurrentMainCamera->DeActive_Camera(pairTransitionInfo);
|
||||
SAFE_RELEASE(m_pCurrentMainCamera);
|
||||
}
|
||||
else {
|
||||
XMStoreFloat4(&pairTransitionInfo.first, XMQuaternionIdentity());
|
||||
}
|
||||
|
||||
{
|
||||
m_pCurrentMainCamera = pNextCamera;
|
||||
m_wstrCurrentCameraKey = wstrCameraKey;
|
||||
m_fFar = *m_pCurrentMainCamera->Get_CurrentFar();
|
||||
}
|
||||
{
|
||||
m_pCurrentMainCamera->Active_Camera(pairTransitionInfo);
|
||||
SAFE_ADDREF(m_pCurrentMainCamera);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCamera_Manager::IsBinded_Camera(const _wstring& wstrCameraKey)
|
||||
{
|
||||
if (m_wstrCurrentCameraKey == wstrCameraKey) {
|
||||
return S_OK;
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
const _float* CCamera_Manager::Get_CurrentCameraFar()
|
||||
{
|
||||
return &m_fFar;
|
||||
}
|
||||
|
||||
HRESULT CCamera_Manager::Initialize(_uint iLevelNumber)
|
||||
{
|
||||
m_iLevelNumber = iLevelNumber;
|
||||
m_Cameras = new unordered_map<_wstring, CCamera*>[iLevelNumber];
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CCamera* CCamera_Manager::Find_Camera(_uint iLevel, const _wstring& wstrCameraKey)
|
||||
{
|
||||
auto iter = m_Cameras[iLevel].find(wstrCameraKey);
|
||||
|
||||
if (iter == m_Cameras[iLevel].end()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return iter->second;
|
||||
}
|
||||
|
||||
HRESULT CCamera_Manager::Clear_Cameras(_uint iLevel)
|
||||
{
|
||||
if (nullptr != m_pCurrentMainCamera) {
|
||||
pair<_float4, _float3> pairTransitionInfo = { };
|
||||
m_pCurrentMainCamera->DeActive_Camera(pairTransitionInfo);
|
||||
SAFE_RELEASE(m_pCurrentMainCamera);
|
||||
}
|
||||
for (auto& iter : m_Cameras[iLevel]) {
|
||||
SAFE_RELEASE(iter.second);
|
||||
}
|
||||
m_Cameras[iLevel].clear();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCamera_Manager::Release_Camera(_uint iLevel, const _wstring& wstrCameraKey)
|
||||
{
|
||||
auto iter = m_Cameras[iLevel].find(wstrCameraKey);
|
||||
|
||||
if (iter == m_Cameras[iLevel].end()) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (nullptr != m_pCurrentMainCamera) {
|
||||
if (m_pCurrentMainCamera == (*iter).second) {
|
||||
pair<_float4, _float3> pairTransitionInfo = { };
|
||||
m_pCurrentMainCamera->DeActive_Camera(pairTransitionInfo);
|
||||
SAFE_RELEASE(m_pCurrentMainCamera);
|
||||
}
|
||||
}
|
||||
|
||||
SAFE_RELEASE((*iter).second);
|
||||
m_Cameras[iLevel].erase(iter);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CCamera_Manager* CCamera_Manager::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, _uint iLevelNumber)
|
||||
{
|
||||
CCamera_Manager* pInstance = new CCamera_Manager(pDevice, pContext);
|
||||
if (FAILED(pInstance->Initialize(iLevelNumber))) {
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CCamera_Manager::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
for (_uint i = 0; i < m_iLevelNumber; ++i) {
|
||||
Clear_Cameras(i);
|
||||
}
|
||||
|
||||
SAFE_RELEASE(m_pCurrentMainCamera);
|
||||
SAFE_RELEASE(m_pDevice);
|
||||
SAFE_RELEASE(m_pContext);
|
||||
|
||||
Safe_Delete_Array(m_Cameras);
|
||||
}
|
||||
@@ -0,0 +1,214 @@
|
||||
#include "pch.h"
|
||||
#include "Cell.h"
|
||||
|
||||
#include "VIBuffer_Cell.h"
|
||||
|
||||
CCell::CCell(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: m_pDevice{ pDevice }
|
||||
, m_pContext{ pContext }
|
||||
{
|
||||
SAFE_ADDREF(m_pDevice);
|
||||
SAFE_ADDREF(m_pContext);
|
||||
}
|
||||
|
||||
_vector CCell::Get_Point(NAVI_POINT ePoint)
|
||||
{
|
||||
return XMLoadFloat3(&m_vPoints[ENUM_CLASS(ePoint)]);
|
||||
}
|
||||
|
||||
const _float3* CCell::Get_ConstPoint(NAVI_POINT ePoint)
|
||||
{
|
||||
return &m_vPoints[ENUM_CLASS(ePoint)];
|
||||
}
|
||||
|
||||
const _float3* CCell::Get_Normarl(NAVI_LINE eLine)
|
||||
{
|
||||
return &m_vNormals[ENUM_CLASS(eLine)];
|
||||
}
|
||||
|
||||
void CCell::Set_Neighbor(NAVI_LINE eLine, CCell* pNeighbor)
|
||||
{
|
||||
m_NeighborIndices[ENUM_CLASS(eLine)] = pNeighbor->m_iIndex;
|
||||
}
|
||||
|
||||
_int CCell::Get_Neighbor(NAVI_LINE eLine)
|
||||
{
|
||||
return m_NeighborIndices[ENUM_CLASS(eLine)];
|
||||
}
|
||||
|
||||
_ubyte CCell::Get_CellAttribute()
|
||||
{
|
||||
return m_ubyteCellAttribute;
|
||||
}
|
||||
|
||||
HRESULT CCell::Initialize(const _float3* pPoints, _uint iIndex)
|
||||
{
|
||||
if (nullptr == pPoints) {
|
||||
return S_OK; // 로딩 전용
|
||||
}
|
||||
memcpy(m_vPoints, pPoints, sizeof(_float3) * ENUM_CLASS(NAVI_POINT::END));
|
||||
|
||||
XMStoreFloat3(&m_vLines[ENUM_CLASS(NAVI_LINE::AB)], XMVector3Normalize(XMLoadFloat3(&m_vPoints[ENUM_CLASS(NAVI_POINT::B)]) - XMLoadFloat3(&m_vPoints[ENUM_CLASS(NAVI_POINT::A)])));
|
||||
XMStoreFloat3(&m_vLines[ENUM_CLASS(NAVI_LINE::BC)], XMVector3Normalize(XMLoadFloat3(&m_vPoints[ENUM_CLASS(NAVI_POINT::C)]) - XMLoadFloat3(&m_vPoints[ENUM_CLASS(NAVI_POINT::B)])));
|
||||
XMStoreFloat3(&m_vLines[ENUM_CLASS(NAVI_LINE::CA)], XMVector3Normalize(XMLoadFloat3(&m_vPoints[ENUM_CLASS(NAVI_POINT::A)]) - XMLoadFloat3(&m_vPoints[ENUM_CLASS(NAVI_POINT::C)])));
|
||||
|
||||
m_vNormals[ENUM_CLASS(NAVI_LINE::AB)] = _float3(m_vLines[ENUM_CLASS(NAVI_LINE::AB)].z * -1.f, 0.f, m_vLines[ENUM_CLASS(NAVI_LINE::AB)].x);
|
||||
m_vNormals[ENUM_CLASS(NAVI_LINE::BC)] = _float3(m_vLines[ENUM_CLASS(NAVI_LINE::BC)].z * -1.f, 0.f, m_vLines[ENUM_CLASS(NAVI_LINE::BC)].x);
|
||||
m_vNormals[ENUM_CLASS(NAVI_LINE::CA)] = _float3(m_vLines[ENUM_CLASS(NAVI_LINE::CA)].z * -1.f, 0.f, m_vLines[ENUM_CLASS(NAVI_LINE::CA)].x);
|
||||
|
||||
m_iIndex = iIndex;
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_pVIBuffer = CVIBuffer_Cell::Create(m_pDevice, m_pContext, pPoints);
|
||||
if (nullptr == m_pVIBuffer) {
|
||||
return E_FAIL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
XMStoreFloat4(&m_vPlane, XMPlaneFromPoints( XMLoadFloat3(&m_vPoints[0]), XMLoadFloat3(&m_vPoints[1]), XMLoadFloat3(&m_vPoints[2])));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCell::isIn(_fvector vLocalPos, _float* fOuts, _uint& iCrossCnt)
|
||||
{
|
||||
HRESULT inside = S_OK; iCrossCnt = 0;
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
_vector vToPosition = XMVectorSetY(vLocalPos - XMLoadFloat3(&m_vPoints[i]), 0.f);
|
||||
_vector vLine = XMVectorSetY(XMLoadFloat3(&m_vLines[i]), 0.f);
|
||||
|
||||
fOuts[i] = XMVectorGetY(XMVector3Cross(vLine, vToPosition));
|
||||
if (fOuts[i] < 0.f)
|
||||
{
|
||||
iCrossCnt++;
|
||||
inside = E_FAIL;
|
||||
}
|
||||
}
|
||||
return inside;
|
||||
}
|
||||
|
||||
_bool CCell::Compare(_fvector vSourPoint, _fvector vDestPoint)
|
||||
{
|
||||
if (true == XMVector3Equal(XMLoadFloat3(&m_vPoints[ENUM_CLASS(NAVI_POINT::A)]), vSourPoint))
|
||||
{
|
||||
if (true == XMVector3Equal(XMLoadFloat3(&m_vPoints[ENUM_CLASS(NAVI_POINT::B)]), vDestPoint))
|
||||
return true;
|
||||
|
||||
if (true == XMVector3Equal(XMLoadFloat3(&m_vPoints[ENUM_CLASS(NAVI_POINT::C)]), vDestPoint))
|
||||
return true;
|
||||
}
|
||||
if (true == XMVector3Equal(XMLoadFloat3(&m_vPoints[ENUM_CLASS(NAVI_POINT::B)]), vSourPoint))
|
||||
{
|
||||
if (true == XMVector3Equal(XMLoadFloat3(&m_vPoints[ENUM_CLASS(NAVI_POINT::C)]), vDestPoint))
|
||||
return true;
|
||||
|
||||
if (true == XMVector3Equal(XMLoadFloat3(&m_vPoints[ENUM_CLASS(NAVI_POINT::A)]), vDestPoint))
|
||||
return true;
|
||||
}
|
||||
|
||||
if (true == XMVector3Equal(XMLoadFloat3(&m_vPoints[ENUM_CLASS(NAVI_POINT::C)]), vSourPoint))
|
||||
{
|
||||
if (true == XMVector3Equal(XMLoadFloat3(&m_vPoints[ENUM_CLASS(NAVI_POINT::A)]), vDestPoint))
|
||||
return true;
|
||||
|
||||
if (true == XMVector3Equal(XMLoadFloat3(&m_vPoints[ENUM_CLASS(NAVI_POINT::B)]), vDestPoint))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
_float CCell::Compute_Height(_fvector vPoint)
|
||||
{
|
||||
return (-m_vPlane.x * XMVectorGetX(vPoint)
|
||||
- m_vPlane.z * XMVectorGetZ(vPoint) - m_vPlane.w) / m_vPlane.y;
|
||||
}
|
||||
HRESULT CCell::LoadAsBinary(HANDLE hFile, DWORD& dwByte, _uint iCellIndex)
|
||||
{
|
||||
m_iIndex = iCellIndex;
|
||||
if (!ReadFile(hFile, m_vPoints, sizeof(_float3) * ENUM_CLASS(NAVI_POINT::END), &dwByte, nullptr)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (!ReadFile(hFile, m_vLines, sizeof(_float3) * ENUM_CLASS(NAVI_LINE::END), &dwByte, nullptr)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (!ReadFile(hFile, m_vNormals, sizeof(_float3) * ENUM_CLASS(NAVI_LINE::END), &dwByte, nullptr)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (!ReadFile(hFile, &m_vPlane, sizeof(_float4), &dwByte, nullptr)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (!ReadFile(hFile, &m_ubyteCellAttribute, sizeof(_ubyte), &dwByte, nullptr)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_pVIBuffer = CVIBuffer_Cell::Create(m_pDevice, m_pContext, m_vPoints);
|
||||
#endif // _DEBUG
|
||||
return S_OK;
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
HRESULT CCell::SaveAsBinary(HANDLE hFile, DWORD& dwByte)
|
||||
{
|
||||
if (UINT_MAX == m_iIndex) {
|
||||
assert(false); // 초기화 되지 않은 정점 저장 시도
|
||||
return E_FAIL;
|
||||
}
|
||||
WriteFile(hFile, m_vPoints, sizeof(_float3) * ENUM_CLASS(NAVI_POINT::END), &dwByte, nullptr);
|
||||
WriteFile(hFile, m_vLines, sizeof(_float3) * ENUM_CLASS(NAVI_LINE::END), &dwByte, nullptr);
|
||||
WriteFile(hFile, m_vNormals, sizeof(_float3) * ENUM_CLASS(NAVI_LINE::END), &dwByte, nullptr);
|
||||
WriteFile(hFile, &m_vPlane, sizeof(_float4), &dwByte, nullptr);
|
||||
WriteFile(hFile, &m_ubyteCellAttribute, sizeof(_ubyte), &dwByte, nullptr);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
void CCell::ReallocatedCellIndex(_uint iIndex)
|
||||
{
|
||||
m_iIndex = iIndex;
|
||||
}
|
||||
|
||||
void CCell::Change_PrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY eType) {
|
||||
m_pVIBuffer->Change_PrimitiveTopology(eType);
|
||||
}
|
||||
HRESULT CCell::Render()
|
||||
{
|
||||
if (nullptr != m_pVIBuffer) {
|
||||
m_pVIBuffer->Bind_Resources();
|
||||
|
||||
m_pVIBuffer->Render();
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
CCell* CCell::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _float3* vPoints, _uint iIndex)
|
||||
{
|
||||
CCell* pInstance = new CCell(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize(vPoints, iIndex)))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CCell");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CCell::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
SAFE_RELEASE(m_pVIBuffer);
|
||||
#endif
|
||||
|
||||
SAFE_RELEASE(m_pDevice);
|
||||
SAFE_RELEASE(m_pContext);
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
#include "Collider.h"
|
||||
#include "pch.h"
|
||||
|
||||
#include "Collider.h"
|
||||
#include "GameObject.h"
|
||||
#include "Bounding_AABB.h"
|
||||
#include "Bounding_OBB.h"
|
||||
#include "Bounding_Sphere.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
|
||||
|
||||
CCollider::CCollider(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CComponent(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
CCollider::CCollider(const CCollider& rhs)
|
||||
:CComponent(rhs)
|
||||
, m_eType{ rhs.m_eType }
|
||||
#ifdef _DEBUG
|
||||
, m_pBatch{ rhs.m_pBatch }
|
||||
, m_pEffect{ rhs.m_pEffect }
|
||||
, m_pInputLayout{ rhs.m_pInputLayout }
|
||||
#endif
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
SAFE_ADDREF(m_pInputLayout);
|
||||
#endif
|
||||
}
|
||||
|
||||
HRESULT CCollider::Initialize_Prototype()
|
||||
{
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_pBatch = new PrimitiveBatch<VertexPositionColor>(m_pContext);
|
||||
m_pEffect = new BasicEffect(m_pDevice);
|
||||
m_pEffect->SetVertexColorEnabled(true);
|
||||
|
||||
const void* pShaderByteCode = { nullptr };
|
||||
size_t iShaderByteCodeLength = {};
|
||||
|
||||
m_pEffect->GetVertexShaderBytecode(&pShaderByteCode, &iShaderByteCodeLength);
|
||||
|
||||
if (FAILED(m_pDevice->CreateInputLayout(VertexPositionColor::InputElements, VertexPositionColor::InputElementCount,
|
||||
pShaderByteCode, iShaderByteCodeLength, &m_pInputLayout))){
|
||||
return E_FAIL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CCollider::Initialize(void* pArg)
|
||||
{
|
||||
CBounding::BOUNDING_DESC* pDesc = static_cast<CBounding::BOUNDING_DESC*>(pArg);
|
||||
m_eType = pDesc->eType;
|
||||
switch (m_eType)
|
||||
{
|
||||
case COLLIDER::AABB:
|
||||
m_pBounding = CBounding_AABB::Create(m_pDevice, m_pContext, pArg);
|
||||
break;
|
||||
case COLLIDER::OBB:
|
||||
m_pBounding = CBounding_OBB::Create(m_pDevice, m_pContext, pArg);
|
||||
break;
|
||||
case COLLIDER::SPHERE:
|
||||
m_pBounding = CBounding_Sphere::Create(m_pDevice, m_pContext, pArg);
|
||||
break;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
void CCollider::Update(_fmatrix matWorld)
|
||||
{
|
||||
m_pBounding->Update(matWorld);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
HRESULT CCollider::Render()
|
||||
{
|
||||
if (nullptr == m_pBounding)
|
||||
return E_FAIL;
|
||||
|
||||
m_pEffect->SetWorld(XMMatrixIdentity());
|
||||
m_pEffect->SetView(m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW));
|
||||
m_pEffect->SetProjection(m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ));
|
||||
|
||||
m_pContext->IASetInputLayout(m_pInputLayout);
|
||||
m_pEffect->Apply(m_pContext);
|
||||
|
||||
return m_pBounding->Render(m_pBatch, false == m_isCollide ? XMVectorSet(0.f, 1.f, 0.f, 1.f) : XMVectorSet(1.f, 0.f, 0.f, 1.f));
|
||||
}
|
||||
|
||||
HRESULT CCollider::Render(_float3 m_vColor)
|
||||
{
|
||||
if (nullptr == m_pBounding)
|
||||
return E_FAIL;
|
||||
|
||||
m_pEffect->SetWorld(XMMatrixIdentity());
|
||||
m_pEffect->SetView(m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW));
|
||||
m_pEffect->SetProjection(m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ));
|
||||
|
||||
m_pContext->IASetInputLayout(m_pInputLayout);
|
||||
m_pEffect->Apply(m_pContext);
|
||||
|
||||
return m_pBounding->Render(m_pBatch, XMLoadFloat3(&m_vColor));
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
_bool CCollider::Intersect(COLLIDER eType, CCollider* pTarget)
|
||||
{
|
||||
m_isCollide = m_pBounding->Intersect(eType, pTarget->m_pBounding);
|
||||
|
||||
return m_isCollide;
|
||||
}
|
||||
|
||||
CGameObject* CCollider::Get_Caster()
|
||||
{
|
||||
return m_pOwner;
|
||||
}
|
||||
|
||||
void CCollider::OnCollision(CGameObject* pOther)
|
||||
{
|
||||
m_pOwner->OnCollision(pOther);
|
||||
}
|
||||
|
||||
CCollider* CCollider::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CCollider* pInstance = new CCollider(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CCollider");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
CComponent* CCollider::Clone(void* pArg, class CGameObject* pOwner)
|
||||
{
|
||||
CCollider* pInstance = new CCollider(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CCollider");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
void CCollider::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
SAFE_RELEASE(m_pInputLayout);
|
||||
if (false == m_bCloned)
|
||||
{
|
||||
Safe_Delete(m_pBatch);
|
||||
Safe_Delete(m_pEffect);
|
||||
}
|
||||
#endif
|
||||
|
||||
SAFE_RELEASE(m_pBounding);
|
||||
}
|
||||
|
||||
void CCollider::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
#include "pch.h"
|
||||
#include "Component.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CComponent::CComponent(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: m_pDevice{ pDevice }
|
||||
, m_pContext{ pContext }
|
||||
, m_pGameInstance{ CGameInstance::GetInstance() }
|
||||
, m_bCloned{ false }
|
||||
{
|
||||
SAFE_ADDREF(m_pGameInstance);
|
||||
SAFE_ADDREF(m_pDevice);
|
||||
SAFE_ADDREF(m_pContext);
|
||||
}
|
||||
|
||||
CComponent::CComponent(const CComponent& rhs)
|
||||
: m_pDevice{ rhs.m_pDevice }
|
||||
, m_pContext{ rhs.m_pContext }
|
||||
, m_pGameInstance{ CGameInstance::GetInstance() }
|
||||
, m_bCloned{ true }
|
||||
{
|
||||
SAFE_ADDREF(m_pGameInstance);
|
||||
SAFE_ADDREF(m_pDevice);
|
||||
SAFE_ADDREF(m_pContext);
|
||||
}
|
||||
|
||||
HRESULT CComponent::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CComponent::Initialize(void* pArg)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CComponent::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pGameInstance);
|
||||
SAFE_RELEASE(m_pDevice);
|
||||
SAFE_RELEASE(m_pContext);
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
#include "pch.h"
|
||||
#include "ContainerObject.h"
|
||||
#include "PartObject.h"
|
||||
|
||||
CContainerObject::CContainerObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CGameObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CContainerObject::CContainerObject(const CContainerObject& rhs)
|
||||
:CGameObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CContainerObject::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CContainerObject::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CContainerObject::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CContainerObject::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
for (auto& Pair : m_PartObjects){
|
||||
Pair.second->Priority_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
void CContainerObject::Update(_float fTimeDelta)
|
||||
{
|
||||
for (auto& Pair : m_PartObjects) {
|
||||
Pair.second->Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
void CContainerObject::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
for (auto& Pair : m_PartObjects) {
|
||||
Pair.second->Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CContainerObject::Render()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CContainerObject::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
for (auto& Pair : m_PartObjects){
|
||||
SAFE_RELEASE(Pair.second);
|
||||
}
|
||||
|
||||
m_PartObjects.clear();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,280 @@
|
||||
//--------------------------------------------------------------------------------------
|
||||
// File: DebugDraw.cpp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
//-------------------------------------------------------------------------------------
|
||||
|
||||
#include "pch.h"
|
||||
#include "DebugDraw.h"
|
||||
|
||||
using namespace DirectX;
|
||||
|
||||
namespace
|
||||
{
|
||||
inline void XM_CALLCONV DrawCube(PrimitiveBatch<VertexPositionColor>* batch,
|
||||
CXMMATRIX matWorld,
|
||||
FXMVECTOR color)
|
||||
{
|
||||
static const XMVECTORF32 s_verts[8] =
|
||||
{
|
||||
{ { { -1.f, -1.f, -1.f, 0.f } } },
|
||||
{ { { 1.f, -1.f, -1.f, 0.f } } },
|
||||
{ { { 1.f, -1.f, 1.f, 0.f } } },
|
||||
{ { { -1.f, -1.f, 1.f, 0.f } } },
|
||||
{ { { -1.f, 1.f, -1.f, 0.f } } },
|
||||
{ { { 1.f, 1.f, -1.f, 0.f } } },
|
||||
{ { { 1.f, 1.f, 1.f, 0.f } } },
|
||||
{ { { -1.f, 1.f, 1.f, 0.f } } }
|
||||
};
|
||||
|
||||
static const WORD s_indices[] =
|
||||
{
|
||||
0, 1,
|
||||
1, 2,
|
||||
2, 3,
|
||||
3, 0,
|
||||
4, 5,
|
||||
5, 6,
|
||||
6, 7,
|
||||
7, 4,
|
||||
0, 4,
|
||||
1, 5,
|
||||
2, 6,
|
||||
3, 7
|
||||
};
|
||||
|
||||
VertexPositionColor verts[8];
|
||||
for (size_t i = 0; i < 8; ++i)
|
||||
{
|
||||
XMVECTOR v = XMVector3Transform(s_verts[i], matWorld);
|
||||
XMStoreFloat3(&verts[i].position, v);
|
||||
XMStoreFloat4(&verts[i].color, color);
|
||||
}
|
||||
|
||||
batch->DrawIndexed(D3D_PRIMITIVE_TOPOLOGY_LINELIST, s_indices, _countof(s_indices), verts, 8);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void XM_CALLCONV DX::Draw(PrimitiveBatch<VertexPositionColor>* batch,
|
||||
const BoundingSphere& sphere,
|
||||
FXMVECTOR color)
|
||||
{
|
||||
XMVECTOR origin = XMLoadFloat3(&sphere.Center);
|
||||
|
||||
const float radius = sphere.Radius;
|
||||
|
||||
XMVECTOR xaxis = g_XMIdentityR0 * radius;
|
||||
XMVECTOR yaxis = g_XMIdentityR1 * radius;
|
||||
XMVECTOR zaxis = g_XMIdentityR2 * radius;
|
||||
|
||||
DrawRing(batch, origin, xaxis, zaxis, color);
|
||||
DrawRing(batch, origin, xaxis, yaxis, color);
|
||||
DrawRing(batch, origin, yaxis, zaxis, color);
|
||||
}
|
||||
|
||||
|
||||
void XM_CALLCONV DX::Draw(PrimitiveBatch<VertexPositionColor>* batch,
|
||||
const BoundingBox& box,
|
||||
FXMVECTOR color)
|
||||
{
|
||||
XMMATRIX matWorld = XMMatrixScaling(box.Extents.x, box.Extents.y, box.Extents.z);
|
||||
XMVECTOR position = XMLoadFloat3(&box.Center);
|
||||
matWorld.r[3] = XMVectorSelect(matWorld.r[3], position, g_XMSelect1110);
|
||||
|
||||
DrawCube(batch, matWorld, color);
|
||||
}
|
||||
|
||||
|
||||
void XM_CALLCONV DX::Draw(PrimitiveBatch<VertexPositionColor>* batch,
|
||||
const BoundingOrientedBox& obb,
|
||||
FXMVECTOR color)
|
||||
{
|
||||
XMMATRIX matWorld = XMMatrixRotationQuaternion(XMLoadFloat4(&obb.Orientation));
|
||||
XMMATRIX matScale = XMMatrixScaling(obb.Extents.x, obb.Extents.y, obb.Extents.z);
|
||||
matWorld = XMMatrixMultiply(matScale, matWorld);
|
||||
XMVECTOR position = XMLoadFloat3(&obb.Center);
|
||||
matWorld.r[3] = XMVectorSelect(matWorld.r[3], position, g_XMSelect1110);
|
||||
|
||||
DrawCube(batch, matWorld, color);
|
||||
}
|
||||
|
||||
|
||||
void XM_CALLCONV DX::Draw(PrimitiveBatch<VertexPositionColor>* batch,
|
||||
const BoundingFrustum& frustum,
|
||||
FXMVECTOR color)
|
||||
{
|
||||
XMFLOAT3 corners[BoundingFrustum::CORNER_COUNT];
|
||||
frustum.GetCorners(corners);
|
||||
|
||||
VertexPositionColor verts[24] = {};
|
||||
verts[0].position = corners[0];
|
||||
verts[1].position = corners[1];
|
||||
verts[2].position = corners[1];
|
||||
verts[3].position = corners[2];
|
||||
verts[4].position = corners[2];
|
||||
verts[5].position = corners[3];
|
||||
verts[6].position = corners[3];
|
||||
verts[7].position = corners[0];
|
||||
|
||||
verts[8].position = corners[0];
|
||||
verts[9].position = corners[4];
|
||||
verts[10].position = corners[1];
|
||||
verts[11].position = corners[5];
|
||||
verts[12].position = corners[2];
|
||||
verts[13].position = corners[6];
|
||||
verts[14].position = corners[3];
|
||||
verts[15].position = corners[7];
|
||||
|
||||
verts[16].position = corners[4];
|
||||
verts[17].position = corners[5];
|
||||
verts[18].position = corners[5];
|
||||
verts[19].position = corners[6];
|
||||
verts[20].position = corners[6];
|
||||
verts[21].position = corners[7];
|
||||
verts[22].position = corners[7];
|
||||
verts[23].position = corners[4];
|
||||
|
||||
for (size_t j = 0; j < _countof(verts); ++j)
|
||||
{
|
||||
XMStoreFloat4(&verts[j].color, color);
|
||||
}
|
||||
|
||||
batch->Draw(D3D_PRIMITIVE_TOPOLOGY_LINELIST, verts, _countof(verts));
|
||||
}
|
||||
|
||||
|
||||
void XM_CALLCONV DX::DrawGrid(PrimitiveBatch<VertexPositionColor>* batch,
|
||||
FXMVECTOR xAxis,
|
||||
FXMVECTOR yAxis,
|
||||
FXMVECTOR origin,
|
||||
size_t xdivs,
|
||||
size_t ydivs,
|
||||
GXMVECTOR color)
|
||||
{
|
||||
xdivs = std::max<size_t>(1, xdivs);
|
||||
ydivs = std::max<size_t>(1, ydivs);
|
||||
|
||||
for (size_t i = 0; i <= xdivs; ++i)
|
||||
{
|
||||
float percent = float(i) / float(xdivs);
|
||||
percent = (percent * 2.f) - 1.f;
|
||||
XMVECTOR scale = XMVectorScale(xAxis, percent);
|
||||
scale = XMVectorAdd(scale, origin);
|
||||
|
||||
VertexPositionColor v1(XMVectorSubtract(scale, yAxis), color);
|
||||
VertexPositionColor v2(XMVectorAdd(scale, yAxis), color);
|
||||
batch->DrawLine(v1, v2);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i <= ydivs; i++)
|
||||
{
|
||||
FLOAT percent = float(i) / float(ydivs);
|
||||
percent = (percent * 2.f) - 1.f;
|
||||
XMVECTOR scale = XMVectorScale(yAxis, percent);
|
||||
scale = XMVectorAdd(scale, origin);
|
||||
|
||||
VertexPositionColor v1(XMVectorSubtract(scale, xAxis), color);
|
||||
VertexPositionColor v2(XMVectorAdd(scale, xAxis), color);
|
||||
batch->DrawLine(v1, v2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void XM_CALLCONV DX::DrawRing(PrimitiveBatch<VertexPositionColor>* batch,
|
||||
FXMVECTOR origin,
|
||||
FXMVECTOR majorAxis,
|
||||
FXMVECTOR minorAxis,
|
||||
GXMVECTOR color)
|
||||
{
|
||||
static const size_t c_ringSegments = 32;
|
||||
|
||||
VertexPositionColor verts[c_ringSegments + 1];
|
||||
|
||||
FLOAT fAngleDelta = XM_2PI / float(c_ringSegments);
|
||||
// Instead of calling cos/sin for each segment we calculate
|
||||
// the sign of the angle delta and then incrementally calculate sin
|
||||
// and cosine from then on.
|
||||
XMVECTOR cosDelta = XMVectorReplicate(cosf(fAngleDelta));
|
||||
XMVECTOR sinDelta = XMVectorReplicate(sinf(fAngleDelta));
|
||||
XMVECTOR incrementalSin = XMVectorZero();
|
||||
static const XMVECTORF32 s_initialCos =
|
||||
{
|
||||
{ { 1.f, 1.f, 1.f, 1.f } }
|
||||
};
|
||||
XMVECTOR incrementalCos = s_initialCos.v;
|
||||
for (size_t i = 0; i < c_ringSegments; i++)
|
||||
{
|
||||
XMVECTOR pos = XMVectorMultiplyAdd(majorAxis, incrementalCos, origin);
|
||||
pos = XMVectorMultiplyAdd(minorAxis, incrementalSin, pos);
|
||||
XMStoreFloat3(&verts[i].position, pos);
|
||||
XMStoreFloat4(&verts[i].color, color);
|
||||
// Standard formula to rotate a vector.
|
||||
XMVECTOR newCos = incrementalCos * cosDelta - incrementalSin * sinDelta;
|
||||
XMVECTOR newSin = incrementalCos * sinDelta + incrementalSin * cosDelta;
|
||||
incrementalCos = newCos;
|
||||
incrementalSin = newSin;
|
||||
}
|
||||
verts[c_ringSegments] = verts[0];
|
||||
|
||||
batch->Draw(D3D_PRIMITIVE_TOPOLOGY_LINESTRIP, verts, c_ringSegments + 1);
|
||||
}
|
||||
|
||||
|
||||
void XM_CALLCONV DX::DrawRay(PrimitiveBatch<VertexPositionColor>* batch,
|
||||
FXMVECTOR origin,
|
||||
FXMVECTOR direction,
|
||||
bool normalize,
|
||||
FXMVECTOR color)
|
||||
{
|
||||
VertexPositionColor verts[3];
|
||||
XMStoreFloat3(&verts[0].position, origin);
|
||||
|
||||
XMVECTOR normDirection = XMVector3Normalize(direction);
|
||||
XMVECTOR rayDirection = (normalize) ? normDirection : direction;
|
||||
|
||||
XMVECTOR perpVector = XMVector3Cross(normDirection, g_XMIdentityR1);
|
||||
|
||||
if (XMVector3Equal(XMVector3LengthSq(perpVector), g_XMZero))
|
||||
{
|
||||
perpVector = XMVector3Cross(normDirection, g_XMIdentityR2);
|
||||
}
|
||||
perpVector = XMVector3Normalize(perpVector);
|
||||
|
||||
XMStoreFloat3(&verts[1].position, XMVectorAdd(rayDirection, origin));
|
||||
perpVector = XMVectorScale(perpVector, 0.0625f);
|
||||
normDirection = XMVectorScale(normDirection, -0.25f);
|
||||
rayDirection = XMVectorAdd(perpVector, rayDirection);
|
||||
rayDirection = XMVectorAdd(normDirection, rayDirection);
|
||||
XMStoreFloat3(&verts[2].position, XMVectorAdd(rayDirection, origin));
|
||||
|
||||
XMStoreFloat4(&verts[0].color, color);
|
||||
XMStoreFloat4(&verts[1].color, color);
|
||||
XMStoreFloat4(&verts[2].color, color);
|
||||
|
||||
batch->Draw(D3D_PRIMITIVE_TOPOLOGY_LINESTRIP, verts, 2);
|
||||
}
|
||||
|
||||
|
||||
void XM_CALLCONV DX::DrawTriangle(PrimitiveBatch<VertexPositionColor>* batch,
|
||||
FXMVECTOR pointA,
|
||||
FXMVECTOR pointB,
|
||||
FXMVECTOR pointC,
|
||||
GXMVECTOR color)
|
||||
{
|
||||
VertexPositionColor verts[4];
|
||||
XMStoreFloat3(&verts[0].position, pointA);
|
||||
XMStoreFloat3(&verts[1].position, pointB);
|
||||
XMStoreFloat3(&verts[2].position, pointC);
|
||||
XMStoreFloat3(&verts[3].position, pointA);
|
||||
|
||||
XMStoreFloat4(&verts[0].color, color);
|
||||
XMStoreFloat4(&verts[1].color, color);
|
||||
XMStoreFloat4(&verts[2].color, color);
|
||||
XMStoreFloat4(&verts[3].color, color);
|
||||
|
||||
batch->Draw(D3D_PRIMITIVE_TOPOLOGY_LINESTRIP, verts, 4);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,585 @@
|
||||
#include "pch.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Prototype_Manager.h"
|
||||
#include "GameObject_Manager.h"
|
||||
#include "Graphic_Device.h"
|
||||
#include "Level_Manager.h"
|
||||
#include "Timer_Manager.h"
|
||||
#include "PipeLine.h"
|
||||
#include "Light_Manager.h"
|
||||
#include "Renderer.h"
|
||||
#include "Shadow.h"
|
||||
#include "Camera_Manager.h"
|
||||
#include "RenderTarget_Manager.h"
|
||||
#include "Key_Manager.h"
|
||||
#include "Mouse_Manager.h"
|
||||
|
||||
IMPLEMENT_SINGLETON(CGameInstance)
|
||||
|
||||
|
||||
CGameInstance::CGameInstance()
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Initialize_Engine(const ENGINE_DESC& EngineDesc, ID3D11Device** ppDevice, ID3D11DeviceContext** ppContext)
|
||||
{
|
||||
g_iStaticLevel = EngineDesc.iStaticLevel;
|
||||
m_pGraphic_Device = CGraphic_Device::Create(EngineDesc.hWnd, EngineDesc.iWinSizeX, EngineDesc.iWinSizeY, ppDevice, ppContext);
|
||||
if (nullptr == m_pGraphic_Device) {
|
||||
return E_FAIL;
|
||||
}
|
||||
{
|
||||
m_pPrototype_Manager = CPrototype_Manager::Create(EngineDesc.iNumLevels, *ppDevice, *ppContext);
|
||||
if (nullptr == m_pPrototype_Manager) {
|
||||
return E_FAIL;
|
||||
}
|
||||
{
|
||||
m_pRenderTarget_Manager = CRenderTarget_Manager::Create(*ppDevice, *ppContext);
|
||||
if (nullptr == m_pRenderTarget_Manager) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pRenderer = CRenderer::Create(*ppDevice, *ppContext);
|
||||
if (nullptr == m_pRenderer) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
m_pObject_Manager = CGameObject_Manager::Create(EngineDesc.iNumLevels);
|
||||
if (nullptr == m_pObject_Manager) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pLevel_Manager = CLevel_Manager::Create();
|
||||
if (nullptr == m_pLevel_Manager) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pTimer_Manager = CTimer_Manager::Create();
|
||||
if (nullptr == m_pTimer_Manager) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pMouse_Manager = CMouse_Manager::Create(EngineDesc.hWnd, *ppDevice, *ppContext);
|
||||
if (nullptr == m_pMouse_Manager) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pKey_Manager = CKey_Manager::Create(EngineDesc.hInstance, EngineDesc.hWnd);
|
||||
if (nullptr == m_pKey_Manager) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pPipeLine = CPipeLine::Create();
|
||||
if (nullptr == m_pPipeLine) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pLight_Manager = CLight_Manager::Create(EngineDesc.iNumLevels);
|
||||
if (nullptr == m_pLight_Manager) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pCamera_Manager = CCamera_Manager::Create(*ppDevice, *ppContext, EngineDesc.iNumLevels);
|
||||
if (nullptr == m_pCamera_Manager) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pShadow = CShadow::Create();
|
||||
if (nullptr == m_pShadow) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CGameInstance::Update_Engine(_float fTimeDelta)
|
||||
{
|
||||
m_pKey_Manager->Update();
|
||||
m_pMouse_Manager->Update();
|
||||
//m_pSound_Manager->Update();
|
||||
|
||||
m_pObject_Manager->Priority_Update(fTimeDelta);
|
||||
|
||||
m_pPipeLine->Update();
|
||||
|
||||
m_pObject_Manager->Update(fTimeDelta);
|
||||
|
||||
m_pRenderer->Refresh_Renderer();
|
||||
m_pObject_Manager->Late_Update(fTimeDelta);
|
||||
|
||||
m_pLevel_Manager->Update(fTimeDelta);
|
||||
m_pObject_Manager->Clear_DeadObj();
|
||||
//m_pObstacle_Manager->Refresh_Region();
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Draw()
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
Compute_TimeDelta(TEXT("Timer_DrawCall"));
|
||||
#endif // _DEBUG
|
||||
m_pRenderer->Render();
|
||||
|
||||
m_pLevel_Manager->Render();
|
||||
#ifdef _DEBUG
|
||||
Compute_TimeDelta(TEXT("Timer_DrawCall"));
|
||||
#endif // _DEBUG
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CGameInstance::Clear_Resources(_uint iLevelIndex)
|
||||
{
|
||||
m_pPrototype_Manager->Clear_Resource(iLevelIndex);
|
||||
m_pCamera_Manager->Clear_Cameras(iLevelIndex);
|
||||
m_pObject_Manager->Clear(iLevelIndex);
|
||||
m_pLight_Manager->Change_Level(iLevelIndex);
|
||||
}
|
||||
|
||||
_float CGameInstance::Random_Normal()
|
||||
{
|
||||
return static_cast<_float>(rand()) / RAND_MAX;
|
||||
}
|
||||
|
||||
_float CGameInstance::Random_Float(_float fMin, _float fMax)
|
||||
{
|
||||
return fMin + Random_Normal() * (fMax - fMin);
|
||||
}
|
||||
|
||||
_int CGameInstance::Random_Int(_int iMin, _int iMax)
|
||||
{
|
||||
return iMin + (_int)(Random_Normal() * (iMax - iMin));
|
||||
}
|
||||
|
||||
void CGameInstance::Render_Begin(const _float4* pClearColor)
|
||||
{
|
||||
m_pGraphic_Device->Clear_BackBuffer_View(pClearColor);
|
||||
m_pGraphic_Device->Clear_DepthStencil_View();
|
||||
}
|
||||
|
||||
void CGameInstance::Render_End()
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
Compute_TimeDelta(TEXT("Timer_Present"));
|
||||
#endif // _DEBUG
|
||||
m_pGraphic_Device->Present();
|
||||
#ifdef _DEBUG
|
||||
Compute_TimeDelta(TEXT("Timer_Present"));
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
_float CGameInstance::Get_TimeDelta(const _wstring& strTimerTag)
|
||||
{
|
||||
return m_pTimer_Manager->Get_TimeDelta(strTimerTag);
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Add_Timer(const _wstring& strTimerTag)
|
||||
{
|
||||
return m_pTimer_Manager->Add_Timer(strTimerTag);
|
||||
}
|
||||
|
||||
void CGameInstance::Compute_TimeDelta(const _wstring& strTimerTag)
|
||||
{
|
||||
m_pTimer_Manager->Compute_TimeDelta(strTimerTag);
|
||||
}
|
||||
|
||||
void CGameInstance::Compute_FrameCount()
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
m_fTimer_PriorityUpdate = Get_TimeDelta(TEXT("Timer_PriorityUpdate"));
|
||||
m_fTimer_Update = Get_TimeDelta(TEXT("Timer_Update"));
|
||||
m_fTimer_LateUpdate = Get_TimeDelta(TEXT("Timer_LateUpdate"));
|
||||
m_fTimer_DrawCall = Get_TimeDelta(TEXT("Timer_DrawCall"));
|
||||
m_fTimer_Present = Get_TimeDelta(TEXT("Timer_Present"));
|
||||
m_fTimer_FrameCount = Get_TimeDelta(TEXT("Timer_FrameCount"));
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
void CGameInstance::Present_TimeCost() const
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
_float fTotal = m_fTimer_PriorityUpdate
|
||||
+ m_fTimer_Update
|
||||
+ m_fTimer_LateUpdate
|
||||
+ m_fTimer_DrawCall
|
||||
+ m_fTimer_Present;
|
||||
|
||||
GUI::Begin("Previous_Frame_Timer");
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_PriorityUpdate / fTotal, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Priority_Update %d", int(m_fTimer_PriorityUpdate / fTotal * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Update / fTotal, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Update %d", int(m_fTimer_Update / fTotal * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_LateUpdate / fTotal, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Late_Update %d", int(m_fTimer_LateUpdate / fTotal * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_DrawCall / fTotal, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("DrawCall %d", int(m_fTimer_DrawCall / fTotal * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Present / fTotal, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Present %d", int(m_fTimer_Present / fTotal * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(fTotal / m_fTimer_FrameCount, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Timer_Occupancy %d", int(m_fTimer_Present / fTotal * 100.f));
|
||||
}
|
||||
|
||||
static float values[60] = {};
|
||||
static int values_offset = 0;
|
||||
static double refresh_time = 0.0;
|
||||
if (refresh_time == 0.0)
|
||||
refresh_time = GUI::GetTime();
|
||||
while (refresh_time < GUI::GetTime()) // Create data at fixed 60 Hz rate for the demo
|
||||
{
|
||||
values[values_offset] = m_fTimer_FrameCount;
|
||||
values_offset = (values_offset + 1) % IM_ARRAYSIZE(values);
|
||||
refresh_time += 1.0f / 60.0f;
|
||||
}
|
||||
{
|
||||
float average = 0.0f;
|
||||
for (int n = 0; n < IM_ARRAYSIZE(values); n++)
|
||||
average += values[n];
|
||||
average /= (float)IM_ARRAYSIZE(values);
|
||||
char overlay[32];
|
||||
sprintf_s(overlay, "avg %f", average);
|
||||
|
||||
float minY = 0.f;
|
||||
float maxY = 0.025f;
|
||||
//float threshold = 166.f / 250.f; // 약 0.664f
|
||||
ImVec2 graph_size(0, 80.0f);
|
||||
ImVec2 start_pos = GUI::GetCursorScreenPos();
|
||||
|
||||
GUI::PlotLines("##FrameCount", values, IM_ARRAYSIZE(values), values_offset,
|
||||
overlay, minY, maxY, ImVec2(0, 80.0f));
|
||||
|
||||
// PlotLines의 실제 표시 영역 가져오기
|
||||
ImVec2 plot_min = GUI::GetItemRectMin();
|
||||
ImVec2 plot_max = GUI::GetItemRectMax();
|
||||
|
||||
// 기준선 (60FPS)
|
||||
float threshold = 1.0f / 60.0f; // 0.0166초
|
||||
float normalized = (threshold - minY) / (maxY - minY);
|
||||
float y = plot_max.y - normalized * (plot_max.y - plot_min.y);
|
||||
|
||||
// 빨간 선 그리기
|
||||
ImDrawList* draw_list = GUI::GetWindowDrawList();
|
||||
draw_list->AddLine(
|
||||
ImVec2(plot_min.x, y),
|
||||
ImVec2(plot_max.x, y),
|
||||
IM_COL32(255, 0, 0, 255),
|
||||
2.0f
|
||||
);
|
||||
}
|
||||
{
|
||||
GUI::Text("%f\t%f", GUI::GetIO().Framerate, GUI::GetIO().DeltaTime);
|
||||
}
|
||||
GUI::End();
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Change_Level(CLevel* pNewLevel)
|
||||
{
|
||||
return m_pLevel_Manager->Change_Level(pNewLevel);
|
||||
}
|
||||
|
||||
_uint CGameInstance::Get_CurrentLevelID()
|
||||
{
|
||||
return m_pLevel_Manager->Get_Current_LevelID();
|
||||
}
|
||||
_uint CGameInstance::Get_NextLevelID()
|
||||
{
|
||||
return m_pLevel_Manager->Get_NextLevelID();
|
||||
}
|
||||
|
||||
_bool CGameInstance::Check_LevelShouldChange()
|
||||
{
|
||||
return m_pLevel_Manager->Check_LevelShouldChange();
|
||||
}
|
||||
|
||||
void CGameInstance::Set_LevelToChange()
|
||||
{
|
||||
return m_pLevel_Manager->Set_LevelToChange();
|
||||
}
|
||||
|
||||
CComponent* CGameInstance::Clone_Asset_Prototype(_uint iTargetLevel, const _wstring& strPrototypeTag, void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
return m_pPrototype_Manager->Clone_Asset_Prototype(iTargetLevel, strPrototypeTag, pArg, pOwner);
|
||||
}
|
||||
|
||||
CComponent* CGameInstance::Find_Asset_Prototype(_uint iTargetLevel, const _wstring& strPrototypeTag)
|
||||
{
|
||||
return m_pPrototype_Manager->Find_Asset_Prototype(iTargetLevel, strPrototypeTag);
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Add_Asset_Prototype(_uint iTargetLevel, const _wstring& strPrototypeTag, CComponent* pPrototype)
|
||||
{
|
||||
return m_pPrototype_Manager->Add_Asset_Prototype(iTargetLevel, strPrototypeTag, pPrototype);
|
||||
}
|
||||
|
||||
CLayer* CGameInstance::Get_Layer(_uint iLayerLevelIndex, const _wstring& strLayerTag)
|
||||
{
|
||||
return m_pObject_Manager->Get_Layer(iLayerLevelIndex, strLayerTag);
|
||||
}
|
||||
void CGameInstance::Clear_Objects_With_Layers(_uint iLevelIndex)
|
||||
{
|
||||
m_pObject_Manager->Clear(iLevelIndex);
|
||||
}
|
||||
|
||||
void CGameInstance::Refresh_Renderer()
|
||||
{
|
||||
m_pRenderer->Refresh_Renderer();
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Add_RenderGroup(RENDER eRenderGroup, CGameObject* pRenderObject, _float4& vPos, _float fCullRadius)
|
||||
{
|
||||
return m_pRenderer->Add_RenderGroup(eRenderGroup, pRenderObject, vPos, fCullRadius);
|
||||
}
|
||||
|
||||
void CGameInstance::Set_Transform(D3DTS eState, _fmatrix TransformStateMatrix)
|
||||
{
|
||||
m_pPipeLine->Set_Transform(eState, TransformStateMatrix);
|
||||
}
|
||||
|
||||
const _float4x4* CGameInstance::Get_Transform_Float4x4(D3DTS eState)
|
||||
{
|
||||
return m_pPipeLine->Get_Transform_Float4x4(eState);
|
||||
}
|
||||
|
||||
_matrix CGameInstance::Get_Transform_Matrix(D3DTS eState)
|
||||
{
|
||||
return m_pPipeLine->Get_Transform_Matrix(eState);
|
||||
}
|
||||
|
||||
const _float4* CGameInstance::Get_CamPosition()
|
||||
{
|
||||
return m_pPipeLine->Get_CamPosition();
|
||||
}
|
||||
|
||||
const _vector CGameInstance::Get_CamXMPosition()
|
||||
{
|
||||
return m_pPipeLine->Get_CamXMPosition();
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::On_Light(_uint iLevel, const _wstring& wstrLightKey, const LIGHT_DESC& LightDesc, CLight** ppOut)
|
||||
{
|
||||
return m_pLight_Manager->On_Light(iLevel, wstrLightKey, LightDesc, ppOut);
|
||||
}
|
||||
HRESULT CGameInstance::Off_Light(_uint iLevel, const _wstring& wstrLightKey)
|
||||
{
|
||||
return m_pLight_Manager->Off_Light(iLevel, wstrLightKey);
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Render_Lights(class CShader* pShader, class CVIBuffer* pVIBuffer)
|
||||
{
|
||||
return m_pLight_Manager->Render_Lights(pShader, pVIBuffer);
|
||||
}
|
||||
|
||||
|
||||
HRESULT CGameInstance::Add_RenderTarget(const _wstring& strRenderTargetKey, _uint iSizeX, _uint iSizeY, DXGI_FORMAT ePixelFormat, const _float4& vClearColor)
|
||||
{
|
||||
return m_pRenderTarget_Manager->Add_RenderTarget(strRenderTargetKey, iSizeX, iSizeY, ePixelFormat, vClearColor);
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Add_MRT(const _wstring& strMultiRenderTargetKey, const _wstring& strRenderTargetKey)
|
||||
{
|
||||
return m_pRenderTarget_Manager->Add_MRT(strMultiRenderTargetKey, strRenderTargetKey);
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Begin_MRT(const _wstring& strMRTTag, ID3D11DepthStencilView* pDSV)
|
||||
{
|
||||
return m_pRenderTarget_Manager->Begin_MRT(strMRTTag, pDSV);
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::End_MRT()
|
||||
{
|
||||
return m_pRenderTarget_Manager->End_MRT();
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Bind_RenderTarget(const _wstring& strTargetTag, CShader* pShader, const _char* pConstantName)
|
||||
{
|
||||
return m_pRenderTarget_Manager->Bind_RenderTarget(strTargetTag, pShader, pConstantName);
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Copy_RenderTarget(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D)
|
||||
{
|
||||
return m_pRenderTarget_Manager->Copy_RenderTarget(strTargetTag, pTexture2D);
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Ready_RenderTarget_Debug(const _wstring& strTargetTag, _float fX, _float fY, _float fSizeX, _float fSizeY)
|
||||
{
|
||||
return m_pRenderTarget_Manager->Ready_RenderTarget_Debug(strTargetTag, fX, fY, fSizeX, fSizeY);
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Render_RenderTarget_Debug(const _wstring& strMRTTag, CShader* pShader, CVIBuffer_Rect* pVIBuffer)
|
||||
{
|
||||
return m_pRenderTarget_Manager->Render_RenderTarget_Debug(strMRTTag, pShader, pVIBuffer);
|
||||
}
|
||||
HRESULT CGameInstance::Clear_Cameras(_uint iLevel)
|
||||
{
|
||||
return m_pCamera_Manager->Clear_Cameras(iLevel);
|
||||
}
|
||||
HRESULT CGameInstance::Release_Camera(_uint iLevel, const _wstring& wstrCameraKey)
|
||||
{
|
||||
return m_pCamera_Manager->Release_Camera(iLevel, wstrCameraKey);
|
||||
}
|
||||
HRESULT CGameInstance::Add_Camera(_uint iLevel, CCamera* pCamera, const _wstring& strCameraKey)
|
||||
{
|
||||
return m_pCamera_Manager->Add_Camera(iLevel, pCamera, strCameraKey);
|
||||
}
|
||||
HRESULT CGameInstance::Bind_Camera(_uint iLevel, const _wstring& strCameraKey, _bool bIgnorePriority)
|
||||
{
|
||||
return m_pCamera_Manager->Bind_Camera(iLevel, strCameraKey, bIgnorePriority);
|
||||
}
|
||||
HRESULT CGameInstance::IsBinded_Camera(const _wstring& strCameraKey)
|
||||
{
|
||||
return m_pCamera_Manager->IsBinded_Camera(strCameraKey);
|
||||
}
|
||||
const _float* CGameInstance::Get_CurrentCameraFar()
|
||||
{
|
||||
return m_pCamera_Manager->Get_CurrentCameraFar();
|
||||
}
|
||||
HRESULT CGameInstance::Ready_Shadow_Light(const SHADOW_LIGHT_DESC& Desc)
|
||||
{
|
||||
return m_pShadow->Ready_Shadow_Light(Desc);
|
||||
}
|
||||
HRESULT CGameInstance::Bind_Shadow_Resource(CShader* pShader, const _char* pConstantName, D3DTS eType) const
|
||||
{
|
||||
return m_pShadow->Bind_Shadow_Resource(pShader, pConstantName, eType);
|
||||
}
|
||||
const _float4x4* CGameInstance::Get_ShadowMatricesPtr()
|
||||
{
|
||||
return m_pShadow->Get_ShadowMatricesPtr();
|
||||
}
|
||||
const SHADOW_LIGHT_DESC* CGameInstance::Get_ShadowDesc()
|
||||
{
|
||||
return m_pShadow->Get_ShadowDesc();
|
||||
}
|
||||
bool CGameInstance::Key_Pressing(int _iKey)
|
||||
{
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow))) {
|
||||
return m_pKey_Manager->Key_Pressing(_iKey);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool CGameInstance::Key_Up(int _iKey)
|
||||
{
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow))) {
|
||||
return m_pKey_Manager->Key_Up(_iKey);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool CGameInstance::Key_Down(int _iKey)
|
||||
{
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow))) {
|
||||
return m_pKey_Manager->Key_Down(_iKey);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
_bool CGameInstance::Mouse_Pressing(int _iKey)
|
||||
{
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow))) {
|
||||
return m_pKey_Manager->Mouse_Pressing(_iKey);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
_bool CGameInstance::Mouse_Up(int _iKey)
|
||||
{
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow))) {
|
||||
return m_pKey_Manager->Mouse_Up(_iKey);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
_bool CGameInstance::Mouse_Down(int _iKey)
|
||||
{
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow))) {
|
||||
return m_pKey_Manager->Mouse_Down(_iKey);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
_bool CGameInstance::Mouse_StartMove()
|
||||
{
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow))) {
|
||||
return m_pKey_Manager->Mouse_StartMove();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
_bool CGameInstance::Mouse_Moving()
|
||||
{
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow))) {
|
||||
return m_pKey_Manager->Mouse_Moving();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
_bool CGameInstance::Mouse_StopMove()
|
||||
{
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow))) {
|
||||
return m_pKey_Manager->Mouse_StopMove();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
_float3 CGameInstance::Get_MouseMove()
|
||||
{
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow))) {
|
||||
_float3 vMouseMove = m_pMouse_Manager->Get_MouseMove();
|
||||
_float3 vKeyMove = m_pKey_Manager->Get_MouseMove();
|
||||
vMouseMove.z = vKeyMove.z;
|
||||
return vMouseMove;
|
||||
}
|
||||
return { 0.f, 0.f, 0.f };
|
||||
}
|
||||
|
||||
void CGameInstance::Picking()
|
||||
{
|
||||
return m_pMouse_Manager->Picking();
|
||||
}
|
||||
HRESULT CGameInstance::Ray_WorldToLocal(_fmatrix* InvWorldMatrix)
|
||||
{
|
||||
return m_pMouse_Manager->Ray_WorldToLocal(InvWorldMatrix);
|
||||
}
|
||||
_bool CGameInstance::MousePicking_InLocalSpace(const _float3& vPointA, const _float3& vPointB, const _float3& vPointC, _float3& pOut)
|
||||
{
|
||||
return m_pMouse_Manager->MousePicking_InLocalSpace(vPointA, vPointB, vPointC, pOut);
|
||||
}
|
||||
_bool CGameInstance::MousePicking_InWorldSpace(const _float3& vPointA, const _float3& vPointB, const _float3& vPointC, _float3& pOut)
|
||||
{
|
||||
return m_pMouse_Manager->MousePicking_InWorldSpace(vPointA, vPointB, vPointC, pOut);
|
||||
}
|
||||
//void CGameInstance::Mouse_Render()
|
||||
//{
|
||||
// m_pMouse_Manager->Mouse_Render();
|
||||
//}
|
||||
POINT CGameInstance::Get_MouseViewPortPos()
|
||||
{
|
||||
return m_pMouse_Manager->Get_MouseViewPortPos();
|
||||
}
|
||||
_bool CGameInstance::Toggle_MouseCenter()
|
||||
{
|
||||
return m_pMouse_Manager->Toggle_MouseCenter();
|
||||
}
|
||||
|
||||
void CGameInstance::Release_Engine()
|
||||
{
|
||||
DestroyInstance();
|
||||
|
||||
SAFE_RELEASE(m_pShadow);
|
||||
SAFE_RELEASE(m_pCamera_Manager);
|
||||
SAFE_RELEASE(m_pRenderTarget_Manager);
|
||||
SAFE_RELEASE(m_pLight_Manager);
|
||||
SAFE_RELEASE(m_pPipeLine);
|
||||
SAFE_RELEASE(m_pKey_Manager);
|
||||
SAFE_RELEASE(m_pMouse_Manager);
|
||||
SAFE_RELEASE(m_pTimer_Manager);
|
||||
SAFE_RELEASE(m_pRenderer);
|
||||
SAFE_RELEASE(m_pObject_Manager);
|
||||
SAFE_RELEASE(m_pLevel_Manager);
|
||||
SAFE_RELEASE(m_pPrototype_Manager);
|
||||
SAFE_RELEASE(m_pGraphic_Device);
|
||||
}
|
||||
|
||||
void CGameInstance::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
#include "pch.h"
|
||||
#include "GameObject.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Transform.h"
|
||||
|
||||
CGameObject::CGameObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: m_pDevice{ pDevice }
|
||||
, m_pContext{ pContext }
|
||||
, m_pGameInstance{ CGameInstance::GetInstance() }
|
||||
{
|
||||
SAFE_ADDREF(m_pGameInstance);
|
||||
SAFE_ADDREF(m_pDevice);
|
||||
SAFE_ADDREF(m_pContext);
|
||||
}
|
||||
|
||||
CGameObject::CGameObject(const CGameObject& rhs)
|
||||
: m_pDevice(rhs.m_pDevice)
|
||||
, m_pContext(rhs.m_pContext)
|
||||
, m_pGameInstance(rhs.m_pGameInstance)
|
||||
, m_bDead(rhs.m_bDead)
|
||||
{
|
||||
SAFE_ADDREF(m_pGameInstance);
|
||||
SAFE_ADDREF(m_pDevice);
|
||||
SAFE_ADDREF(m_pContext);
|
||||
}
|
||||
|
||||
HRESULT CGameObject::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGameObject::Initialize(void* pArg)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CGameObject::Compute_Depth()
|
||||
{
|
||||
_vector vCamPosition = XMLoadFloat4(m_pGameInstance->Get_CamPosition());
|
||||
|
||||
m_fCamDepth = XMVectorGetX(XMVector3LengthSq(vCamPosition - m_pTransformCom->Get_State(STATE::POSITION)));
|
||||
}
|
||||
|
||||
void CGameObject::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CGameObject::Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CGameObject::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CGameObject::OnCollision(CGameObject* pOther)
|
||||
{
|
||||
}
|
||||
void CGameObject::OnHit(CGameObject* pOther, CGameObject* pCaller)
|
||||
{
|
||||
}
|
||||
_vector CGameObject::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
|
||||
HRESULT CGameObject::Add_Asset_Component(_uint iTargetLevel, const _wstring strPrototypeTag, CComponent** ppOut, void* pArg)
|
||||
{
|
||||
CComponent* pComponent = m_pGameInstance->Clone_Asset_Prototype(iTargetLevel, strPrototypeTag, pArg, this);
|
||||
|
||||
if (nullptr == pComponent) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_Components.push_back(pComponent);
|
||||
|
||||
if (ppOut != nullptr)
|
||||
{
|
||||
*ppOut = pComponent;
|
||||
Safe_AddRef(pComponent);
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGameObject::Render()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_float CGameObject::Get_Depth()
|
||||
{
|
||||
return m_fCamDepth;
|
||||
}
|
||||
|
||||
HRESULT CGameObject::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CTransform>(g_iStaticLevel, &m_pTransformCom, pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CGameObject::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
for (auto& pComponent : m_Components) {
|
||||
SAFE_RELEASE(pComponent);
|
||||
} m_Components.clear();
|
||||
|
||||
SAFE_RELEASE(m_pTransformCom);
|
||||
SAFE_RELEASE(m_pGameInstance);
|
||||
SAFE_RELEASE(m_pDevice);
|
||||
SAFE_RELEASE(m_pContext);
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
#include "pch.h"
|
||||
#include "GameObject_Manager.h"
|
||||
|
||||
#include "Layer.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CGameObject_Manager::CGameObject_Manager()
|
||||
: m_pGameInstance{ CGameInstance::GetInstance() }
|
||||
{
|
||||
SAFE_ADDREF(m_pGameInstance);
|
||||
}
|
||||
|
||||
HRESULT CGameObject_Manager::Initialize(_uint iNumLevels)
|
||||
{
|
||||
m_iNumLevels = iNumLevels;
|
||||
|
||||
m_pLayers = new map<const _wstring, CLayer*>[iNumLevels];
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGameObject_Manager::Add_GameObject_ToLayer(_uint iLayerLevelIndex, const _wstring& strLayerTag, class CGameObject* pInstance)
|
||||
{
|
||||
CLayer* pLayer = Get_Layer(iLayerLevelIndex, strLayerTag);
|
||||
if (nullptr == pLayer)
|
||||
{
|
||||
pLayer = CLayer::Create();
|
||||
|
||||
pLayer->Add_GameObject(pInstance);
|
||||
|
||||
m_pLayers[iLayerLevelIndex].emplace(strLayerTag, pLayer);
|
||||
}
|
||||
else {
|
||||
pLayer->Add_GameObject(pInstance);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CGameObject_Manager::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_PriorityUpdate"));
|
||||
#endif // _DEBUG
|
||||
for (size_t i = 0; i < m_iNumLevels; i++)
|
||||
{
|
||||
for (auto& Pair : m_pLayers[i])
|
||||
Pair.second->Priority_Update(fTimeDelta);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_PriorityUpdate"));
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
void CGameObject_Manager::Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_Update"));
|
||||
#endif // _DEBUG
|
||||
for (size_t i = 0; i < m_iNumLevels; i++)
|
||||
{
|
||||
for (auto& Pair : m_pLayers[i])
|
||||
Pair.second->Update(fTimeDelta);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_Update"));
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
void CGameObject_Manager::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_LateUpdate"));
|
||||
#endif // _DEBUG
|
||||
for (size_t i = 0; i < m_iNumLevels; i++)
|
||||
{
|
||||
for (auto& Pair : m_pLayers[i])
|
||||
Pair.second->Late_Update(fTimeDelta);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_LateUpdate"));
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
void CGameObject_Manager::Clear(_uint iLevelIndex)
|
||||
{
|
||||
for (auto& Pair : m_pLayers[iLevelIndex])
|
||||
{
|
||||
Pair.second->Clear_Layer();
|
||||
SAFE_RELEASE(Pair.second);
|
||||
}
|
||||
|
||||
m_pLayers[iLevelIndex].clear();
|
||||
}
|
||||
|
||||
void CGameObject_Manager::Clear_DeadObj()
|
||||
{
|
||||
for (size_t i = 0; i < m_iNumLevels; i++)
|
||||
{
|
||||
for (auto& Pair : m_pLayers[i])
|
||||
{
|
||||
Pair.second->Clear_DeadObj();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CLayer* CGameObject_Manager::Get_Layer(_uint iLayerLevelIndex, const _wstring& strLayerTag)
|
||||
{
|
||||
assert(iLayerLevelIndex < m_iNumLevels);
|
||||
|
||||
auto iter = m_pLayers[iLayerLevelIndex].find(strLayerTag);
|
||||
if (iter == m_pLayers[iLayerLevelIndex].end()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return iter->second;
|
||||
}
|
||||
|
||||
CLayer* CGameObject_Manager::Find_Layer(_uint iLayerLevelIndex, const _wstring& strLayerTag)
|
||||
{
|
||||
if (iLayerLevelIndex >= m_iNumLevels)
|
||||
return nullptr;
|
||||
|
||||
auto iter = m_pLayers[iLayerLevelIndex].find(strLayerTag);
|
||||
if (iter == m_pLayers[iLayerLevelIndex].end())
|
||||
return nullptr;
|
||||
|
||||
return iter->second;
|
||||
}
|
||||
|
||||
CGameObject_Manager* CGameObject_Manager::Create(_uint iNumLevels)
|
||||
{
|
||||
CGameObject_Manager* pInstance = new CGameObject_Manager();
|
||||
|
||||
if (FAILED(pInstance->Initialize(iNumLevels)))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CGameObject_Manager");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CGameObject_Manager::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pGameInstance);
|
||||
|
||||
for (size_t i = 0; i < m_iNumLevels; i++)
|
||||
{
|
||||
for (auto& Pair : m_pLayers[i])
|
||||
SAFE_RELEASE(Pair.second);
|
||||
|
||||
m_pLayers[i].clear();
|
||||
}
|
||||
|
||||
Safe_Delete_Array(m_pLayers);
|
||||
}
|
||||
@@ -0,0 +1,236 @@
|
||||
#include "pch.h"
|
||||
#include "Graphic_Device.h"
|
||||
|
||||
CGraphic_Device::CGraphic_Device()
|
||||
: m_pDevice{ nullptr }
|
||||
, m_pDeviceContext{ nullptr }
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
HRESULT CGraphic_Device::Initialize(HWND hWnd, _uint iWinSizeX, _uint iWinSizeY, _Inout_ ID3D11Device** ppDevice, _Inout_ ID3D11DeviceContext** ppContext)
|
||||
{
|
||||
_uint iFlag = 0;
|
||||
|
||||
#ifdef _DEBUG
|
||||
iFlag = D3D11_CREATE_DEVICE_DEBUG;
|
||||
#endif
|
||||
D3D_FEATURE_LEVEL FeatureLV;
|
||||
if (FAILED(D3D11CreateDevice(nullptr, D3D_DRIVER_TYPE_HARDWARE, 0, iFlag, nullptr, 0, D3D11_SDK_VERSION, &m_pDevice, &FeatureLV, &m_pDeviceContext)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_SwapChain(hWnd, iWinSizeX, iWinSizeY)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_BackBufferRenderTargetView()))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_DepthStencilView(iWinSizeX, iWinSizeY)))
|
||||
return E_FAIL;
|
||||
|
||||
ID3D11RenderTargetView* pRTVs[] = {
|
||||
m_pBackBufferRTV,
|
||||
};
|
||||
|
||||
m_pDeviceContext->OMSetRenderTargets(1, pRTVs,
|
||||
m_pDepthStencilView);
|
||||
|
||||
D3D11_VIEWPORT ViewPortDesc;
|
||||
ZeroMemory(&ViewPortDesc, sizeof(D3D11_VIEWPORT));
|
||||
ViewPortDesc.TopLeftX = 0;
|
||||
ViewPortDesc.TopLeftY = 0;
|
||||
ViewPortDesc.Width = (_float)iWinSizeX;
|
||||
ViewPortDesc.Height = (_float)iWinSizeY;
|
||||
ViewPortDesc.MinDepth = 0.f;
|
||||
ViewPortDesc.MaxDepth = 1.f;
|
||||
|
||||
m_pDeviceContext->RSSetViewports(1, &ViewPortDesc);
|
||||
|
||||
*ppDevice = m_pDevice;
|
||||
*ppContext = m_pDeviceContext;
|
||||
|
||||
SAFE_ADDREF(m_pDevice);
|
||||
SAFE_ADDREF(m_pDeviceContext);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGraphic_Device::Clear_BackBuffer_View(const _float4* pClearColor)
|
||||
{
|
||||
if (nullptr == m_pDeviceContext)
|
||||
return E_FAIL;
|
||||
|
||||
m_pDeviceContext->ClearRenderTargetView(m_pBackBufferRTV, reinterpret_cast<const _float*>(pClearColor));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGraphic_Device::Clear_DepthStencil_View()
|
||||
{
|
||||
if (nullptr == m_pDeviceContext)
|
||||
return E_FAIL;
|
||||
|
||||
m_pDeviceContext->ClearDepthStencilView(m_pDepthStencilView, D3D11_CLEAR_DEPTH | D3D11_CLEAR_STENCIL, 1.f, 0);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGraphic_Device::Present()
|
||||
{
|
||||
if (nullptr == m_pSwapChain)
|
||||
return E_FAIL;
|
||||
|
||||
return m_pSwapChain->Present(0, 0);
|
||||
}
|
||||
|
||||
|
||||
HRESULT CGraphic_Device::Ready_SwapChain(HWND hWnd, _uint iWinCX, _uint iWinCY)
|
||||
{
|
||||
IDXGIDevice* pDevice = nullptr;
|
||||
m_pDevice->QueryInterface(__uuidof(IDXGIDevice), (void**)&pDevice);
|
||||
|
||||
IDXGIAdapter* pAdapter = nullptr;
|
||||
pDevice->GetParent(__uuidof(IDXGIAdapter), (void**)&pAdapter);
|
||||
|
||||
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; /* 세로 픽셀 수 */
|
||||
|
||||
/* 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.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED;
|
||||
SwapChain.BufferDesc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED;
|
||||
|
||||
/* 스케치북에 사과를 그릴꺼야. */
|
||||
/* RENDER_TARGET : 그림을 당하는 대상. 스케치북 */
|
||||
SwapChain.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
|
||||
SwapChain.BufferCount = 1;
|
||||
|
||||
/*스왑하는 형태 : 모니터 주사율에 따라 조절해도 됨. */
|
||||
SwapChain.BufferDesc.RefreshRate.Numerator = 60;
|
||||
SwapChain.BufferDesc.RefreshRate.Denominator = 1;
|
||||
|
||||
/* 멀티샘플링 : 안티얼라이징 (계단현상방지) */
|
||||
/* 나중에 후처리 렌더링 : 멀티샘플링 지원(x) */
|
||||
SwapChain.SampleDesc.Quality = 0;
|
||||
SwapChain.SampleDesc.Count = 1;
|
||||
|
||||
SwapChain.OutputWindow = hWnd;
|
||||
SwapChain.Windowed = static_cast<BOOL>(true);
|
||||
SwapChain.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
|
||||
|
||||
/* 백버퍼라는 텍스처(ID3D11Texture2D)를 생성했다. */
|
||||
if (FAILED(pFactory->CreateSwapChain(m_pDevice, &SwapChain, &m_pSwapChain)))
|
||||
return E_FAIL;
|
||||
|
||||
SAFE_RELEASE(pFactory);
|
||||
SAFE_RELEASE(pAdapter);
|
||||
SAFE_RELEASE(pDevice);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
HRESULT CGraphic_Device::Ready_BackBufferRenderTargetView()
|
||||
{
|
||||
if (nullptr == m_pDevice)
|
||||
return E_FAIL;
|
||||
|
||||
ID3D11Texture2D* pBackBufferTexture = nullptr;
|
||||
|
||||
if (FAILED(m_pSwapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (void**)&pBackBufferTexture)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pDevice->CreateRenderTargetView(pBackBufferTexture, nullptr, &m_pBackBufferRTV)))
|
||||
return E_FAIL;
|
||||
|
||||
SAFE_RELEASE(pBackBufferTexture);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGraphic_Device::Ready_DepthStencilView(_uint iWinCX, _uint iWinCY)
|
||||
{
|
||||
if (nullptr == m_pDevice)
|
||||
return E_FAIL;
|
||||
|
||||
ID3D11Texture2D* pDepthStencilTexture = nullptr;
|
||||
|
||||
D3D11_TEXTURE2D_DESC TextureDesc;
|
||||
ZeroMemory(&TextureDesc, sizeof(D3D11_TEXTURE2D_DESC));
|
||||
|
||||
TextureDesc.Width = iWinCX;
|
||||
TextureDesc.Height = iWinCY;
|
||||
TextureDesc.MipLevels = 1;
|
||||
TextureDesc.ArraySize = 1;
|
||||
TextureDesc.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
|
||||
|
||||
TextureDesc.SampleDesc.Quality = 0;
|
||||
TextureDesc.SampleDesc.Count = 1;
|
||||
|
||||
TextureDesc.Usage = D3D11_USAGE_DEFAULT;
|
||||
TextureDesc.BindFlags = D3D11_BIND_DEPTH_STENCIL;
|
||||
TextureDesc.CPUAccessFlags = 0;
|
||||
TextureDesc.MiscFlags = 0;
|
||||
|
||||
if (FAILED(m_pDevice->CreateTexture2D(&TextureDesc, nullptr, &pDepthStencilTexture)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pDevice->CreateDepthStencilView(pDepthStencilTexture, nullptr, &m_pDepthStencilView)))
|
||||
return E_FAIL;
|
||||
|
||||
SAFE_RELEASE(pDepthStencilTexture);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CGraphic_Device* CGraphic_Device::Create(HWND hWnd, _uint iWinSizeX, _uint iWinSizeY, _Out_ ID3D11Device** ppDevice, _Out_ ID3D11DeviceContext** ppDeviceContextOut)
|
||||
{
|
||||
CGraphic_Device* pInstance = new CGraphic_Device();
|
||||
|
||||
if (FAILED(pInstance->Initialize(hWnd, iWinSizeX, iWinSizeY, ppDevice, ppDeviceContextOut)))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CGraphic_Device");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CGraphic_Device::Free()
|
||||
{
|
||||
SAFE_RELEASE(m_pSwapChain);
|
||||
SAFE_RELEASE(m_pDepthStencilView);
|
||||
SAFE_RELEASE(m_pBackBufferRTV);
|
||||
SAFE_RELEASE(m_pDeviceContext);
|
||||
|
||||
#if defined(DEBUG) || defined(_DEBUG)
|
||||
ID3D11Debug* d3dDebug;
|
||||
HRESULT hr = m_pDevice->QueryInterface(__uuidof(ID3D11Debug), reinterpret_cast<void**>(&d3dDebug));
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
OutputDebugStringW(L"----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- \r ");
|
||||
OutputDebugStringW(L" D3D11 Live Object ref Count Checker \r ");
|
||||
OutputDebugStringW(L"----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- \r ");
|
||||
|
||||
hr = d3dDebug->ReportLiveDeviceObjects(D3D11_RLDO_DETAIL | D3D11_RLDO_IGNORE_INTERNAL);
|
||||
|
||||
OutputDebugStringW(L"----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- \r ");
|
||||
OutputDebugStringW(L" D3D11 Live Object ref Count Checker END \r ");
|
||||
OutputDebugStringW(L"----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- \r ");
|
||||
}
|
||||
if (d3dDebug != nullptr) d3dDebug->Release();
|
||||
#endif
|
||||
|
||||
|
||||
SAFE_RELEASE(m_pDevice);
|
||||
}
|
||||
@@ -0,0 +1,191 @@
|
||||
#include "pch.h"
|
||||
#include "Key_Manager.h"
|
||||
|
||||
CKey_Manager::CKey_Manager()
|
||||
{
|
||||
ZeroMemory(m_byOldKeyState, sizeof(m_byOldKeyState));
|
||||
ZeroMemory(m_byNewKeyState, sizeof(m_byNewKeyState));
|
||||
}
|
||||
|
||||
|
||||
bool CKey_Manager::Key_Pressing(int _iKey) const
|
||||
{
|
||||
// 현재프레임에 눌리고 있다면 Pressing
|
||||
if ((m_byNewKeyState[_iKey] & 0x80)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CKey_Manager::Key_Up(int _iKey) const
|
||||
{
|
||||
// 이전프레임에 눌렸고 현재프레임에 안눌렸다면 Up
|
||||
if ((m_byOldKeyState[_iKey] & 0x80) && !(m_byNewKeyState[_iKey] & 0x80)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CKey_Manager::Key_Down(int _iKey) const
|
||||
{
|
||||
// 이전프레임에 안눌렸고 현재프레임에 눌렸다면 Down
|
||||
if (!(m_byOldKeyState[_iKey] & 0x80) && (m_byNewKeyState[_iKey] & 0x80)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
_bool CKey_Manager::Mouse_Pressing(int _iKey) const
|
||||
{
|
||||
// 현재프레임에 눌리고 있다면 Pressing
|
||||
if ((m_tNewMouseState.rgbButtons[_iKey] & 0x80)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
_bool CKey_Manager::Mouse_Up(int _iKey) const
|
||||
{
|
||||
// 이전프레임에 눌렸고 현재프레임에 안눌렸다면 Up
|
||||
if ((m_tOldMouseState.rgbButtons[_iKey] & 0x80) && !(m_tNewMouseState.rgbButtons[_iKey] & 0x80)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
_bool CKey_Manager::Mouse_Down(int _iKey) const
|
||||
{
|
||||
// 이전프레임에 눌렸고 현재프레임에 안눌렸다면 Down
|
||||
if (!(m_tOldMouseState.rgbButtons[_iKey] & 0x80) && (m_tNewMouseState.rgbButtons[_iKey] & 0x80)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
_bool CKey_Manager::Mouse_StartMove() const
|
||||
{
|
||||
_int iOldMomentum = m_tOldMouseState.lX * m_tOldMouseState.lX
|
||||
+ m_tOldMouseState.lY * m_tOldMouseState.lY
|
||||
+ m_tOldMouseState.lZ * m_tOldMouseState.lZ;
|
||||
_int iNewMomentum = m_tNewMouseState.lX * m_tNewMouseState.lX
|
||||
+ m_tNewMouseState.lY * m_tNewMouseState.lY
|
||||
+ m_tNewMouseState.lZ * m_tNewMouseState.lZ;
|
||||
// 전에 안움직였고 지금 움직이면 Start
|
||||
if (iOldMomentum == 0 && iNewMomentum > 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
_bool CKey_Manager::Mouse_Moving() const
|
||||
{
|
||||
// 현재프레임에 움직이고 있다면 Moving
|
||||
_int iNewMomentum = m_tNewMouseState.lX * m_tNewMouseState.lX
|
||||
+ m_tNewMouseState.lY * m_tNewMouseState.lY
|
||||
+ m_tNewMouseState.lZ * m_tNewMouseState.lZ;
|
||||
if (iNewMomentum > 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
_bool CKey_Manager::Mouse_StopMove() const
|
||||
{
|
||||
_int iOldMomentum = m_tOldMouseState.lX * m_tOldMouseState.lX
|
||||
+ m_tOldMouseState.lY * m_tOldMouseState.lY
|
||||
+ m_tOldMouseState.lZ * m_tOldMouseState.lZ;
|
||||
_int iNewMomentum = m_tNewMouseState.lX * m_tNewMouseState.lX
|
||||
+ m_tNewMouseState.lY * m_tNewMouseState.lY
|
||||
+ m_tNewMouseState.lZ * m_tNewMouseState.lZ;
|
||||
// 전에 움직였고 지금은 안움직이면 Stop
|
||||
if (iOldMomentum > 0 && iNewMomentum == 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
_float3 CKey_Manager::Get_MouseMove() const
|
||||
{
|
||||
return _float3((_float)m_tNewMouseState.lX, (_float)m_tNewMouseState.lY, (_float)m_tNewMouseState.lZ);
|
||||
}
|
||||
|
||||
void CKey_Manager::Update()
|
||||
{
|
||||
if (GetForegroundWindow() == m_hWnd) {
|
||||
// 이전 상태 저장
|
||||
memcpy_s(m_byOldKeyState, sizeof(m_byOldKeyState), m_byNewKeyState, sizeof(m_byNewKeyState));
|
||||
memcpy_s(&m_tOldMouseState, sizeof(m_tOldMouseState), &m_tNewMouseState, sizeof(m_tNewMouseState));
|
||||
|
||||
// 장치 상태 읽기
|
||||
HRESULT hrKeyboard = m_pKeyBoard->GetDeviceState(DIK_MAX + 1, m_byNewKeyState);
|
||||
if (FAILED(hrKeyboard)) {
|
||||
m_pKeyBoard->Acquire(); // 다시 획득
|
||||
}
|
||||
|
||||
HRESULT hrMouse = m_pMouse->GetDeviceState(sizeof(m_tNewMouseState), &m_tNewMouseState);
|
||||
if (FAILED(hrMouse)) {
|
||||
m_pMouse->Acquire(); // 다시 획득
|
||||
}
|
||||
}
|
||||
else {
|
||||
// 비활성화 상태라면 그냥 무시
|
||||
ZeroMemory(m_byNewKeyState, sizeof(m_byNewKeyState));
|
||||
ZeroMemory(&m_tNewMouseState, sizeof(m_tNewMouseState));
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CKey_Manager::Initialize(HINSTANCE hInst, HWND hWnd)
|
||||
{
|
||||
m_hWnd = hWnd;
|
||||
|
||||
if (FAILED(DirectInput8Create(hInst, DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&m_pInputSDK, NULL))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
// keyboard
|
||||
if (FAILED(m_pInputSDK->CreateDevice(GUID_SysKeyboard, &m_pKeyBoard, nullptr))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pKeyBoard->SetDataFormat(&c_dfDIKeyboard);
|
||||
|
||||
m_pKeyBoard->SetCooperativeLevel(hWnd, DISCL_FOREGROUND | DISCL_NONEXCLUSIVE);
|
||||
|
||||
m_pKeyBoard->Acquire();
|
||||
|
||||
|
||||
// Mouse
|
||||
if (FAILED(m_pInputSDK->CreateDevice(GUID_SysMouse, &m_pMouse, nullptr))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pMouse->SetDataFormat(&c_dfDIMouse2);
|
||||
|
||||
m_pMouse->SetCooperativeLevel(hWnd, DISCL_FOREGROUND | DISCL_NONEXCLUSIVE);
|
||||
|
||||
m_pMouse->Acquire();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CKey_Manager* CKey_Manager::Create(HINSTANCE hInstance, HWND hWnd)
|
||||
{
|
||||
CKey_Manager* pInstance = new CKey_Manager();
|
||||
|
||||
if (FAILED(pInstance->Initialize(hInstance, hWnd)))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CKey_Manager");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CKey_Manager::Free()
|
||||
{
|
||||
__super::Free();
|
||||
SAFE_RELEASE(m_pKeyBoard);
|
||||
SAFE_RELEASE(m_pMouse);
|
||||
SAFE_RELEASE(m_pInputSDK);
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
#include "pch.h"
|
||||
#include "Layer.h"
|
||||
#include "GameObject.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CLayer::CLayer()
|
||||
{
|
||||
}
|
||||
|
||||
CLayer::~CLayer()
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CLayer::Initialize()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CLayer::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
for (auto& iter : m_ObjectList)
|
||||
{
|
||||
if (iter == nullptr)
|
||||
return;
|
||||
|
||||
iter->Priority_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
void CLayer::Update(_float fTimeDelta)
|
||||
{
|
||||
for (auto& iter : m_ObjectList)
|
||||
{
|
||||
if (iter == nullptr)
|
||||
return;
|
||||
iter->Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
void CLayer::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
for (auto& iter : m_ObjectList)
|
||||
{
|
||||
if (iter == nullptr)
|
||||
return;
|
||||
iter->Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CLayer::Add_GameObject(CGameObject* _pGameObject)
|
||||
{
|
||||
if (nullptr == _pGameObject)
|
||||
return E_FAIL;
|
||||
|
||||
m_ObjectList.push_back(_pGameObject);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
void CLayer::Clear_DeadObj()
|
||||
{
|
||||
auto iter_end = m_ObjectList.end();
|
||||
for (auto iter = m_ObjectList.begin(); iter != iter_end;)
|
||||
{
|
||||
if (true == (*iter)->isDead())
|
||||
{
|
||||
SAFE_RELEASE(*iter);
|
||||
iter = m_ObjectList.erase(iter);
|
||||
}
|
||||
else {
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
}
|
||||
HRESULT CLayer::Clear_Layer()
|
||||
{
|
||||
for (auto& iter : m_ObjectList)
|
||||
{
|
||||
SAFE_RELEASE(iter);
|
||||
}
|
||||
|
||||
m_ObjectList.clear();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
void CLayer::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
for (auto& iter : m_ObjectList)
|
||||
{
|
||||
SAFE_RELEASE(iter);
|
||||
}
|
||||
|
||||
m_ObjectList.clear();
|
||||
}
|
||||
|
||||
CLayer* CLayer::Create()
|
||||
{
|
||||
CLayer* pInstance = new CLayer();
|
||||
|
||||
if (FAILED(pInstance->Initialize()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CLayer");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
#include "pch.h"
|
||||
#include "Level.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CLevel::CLevel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, _uint iLevelID)
|
||||
: m_pDevice{ pDevice }
|
||||
, m_pContext{ pContext }
|
||||
, m_pGameInstance{ CGameInstance::GetInstance() }
|
||||
, m_iID{ iLevelID }
|
||||
{
|
||||
SAFE_ADDREF(m_pGameInstance);
|
||||
SAFE_ADDREF(m_pDevice);
|
||||
SAFE_ADDREF(m_pContext);
|
||||
}
|
||||
|
||||
HRESULT CLevel::Initialize()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CLevel::Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CLevel::Render()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CLevel::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pGameInstance);
|
||||
SAFE_RELEASE(m_pDevice);
|
||||
SAFE_RELEASE(m_pContext);
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
#include "pch.h"
|
||||
#include "Level_Manager.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
#include "Level.h"
|
||||
|
||||
CLevel_Manager::CLevel_Manager()
|
||||
: m_pGameInstance{ CGameInstance::GetInstance() }
|
||||
{
|
||||
SAFE_ADDREF(m_pGameInstance);
|
||||
}
|
||||
|
||||
HRESULT CLevel_Manager::Change_Level(CLevel* pNewLevel)
|
||||
{
|
||||
if (nullptr != m_pCurrentLevel)
|
||||
{
|
||||
m_pGameInstance->Clear_Resources(m_pCurrentLevel->Get_LevelID());
|
||||
|
||||
SAFE_RELEASE(m_pCurrentLevel);
|
||||
}
|
||||
m_bIsChangeLevel = false;
|
||||
m_pCurrentLevel = pNewLevel;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_bool CLevel_Manager::Check_LevelShouldChange() const
|
||||
{
|
||||
return m_bIsChangeLevel;
|
||||
}
|
||||
|
||||
void CLevel_Manager::Set_LevelToChange()
|
||||
{
|
||||
m_bIsChangeLevel = true;;
|
||||
}
|
||||
|
||||
_uint CLevel_Manager::Get_Current_LevelID()
|
||||
{
|
||||
if (m_pCurrentLevel == nullptr) {
|
||||
return UINT_MAX;
|
||||
}
|
||||
return m_pCurrentLevel->Get_LevelID();
|
||||
}
|
||||
|
||||
_uint CLevel_Manager::Get_NextLevelID()
|
||||
{
|
||||
if (m_pCurrentLevel == nullptr) {
|
||||
return UINT_MAX;
|
||||
}
|
||||
return m_pCurrentLevel->Get_NextLevelID();
|
||||
}
|
||||
|
||||
void CLevel_Manager::Update(_float fTimeDelta)
|
||||
{
|
||||
if (nullptr == m_pCurrentLevel){
|
||||
return;
|
||||
}
|
||||
|
||||
m_pCurrentLevel->Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CLevel_Manager::Render()
|
||||
{
|
||||
if (nullptr == m_pCurrentLevel){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return m_pCurrentLevel->Render();
|
||||
}
|
||||
|
||||
CLevel_Manager* CLevel_Manager::Create()
|
||||
{
|
||||
return new CLevel_Manager();
|
||||
}
|
||||
|
||||
void CLevel_Manager::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pCurrentLevel);
|
||||
SAFE_RELEASE(m_pGameInstance);
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
#include "pch.h"
|
||||
#include "Light.h"
|
||||
#include "Shader.h"
|
||||
#include "VIBuffer.h"
|
||||
|
||||
CLight::CLight()
|
||||
{
|
||||
}
|
||||
|
||||
_bool CLight::operator==(const CLight& rhs) const
|
||||
{
|
||||
return this->operator==(rhs.m_LightDesc);
|
||||
}
|
||||
|
||||
_bool CLight::operator==(const LIGHT_DESC& rhs) const
|
||||
{
|
||||
if (m_LightDesc.eType != rhs.eType ||
|
||||
m_LightDesc.vPosition.x != rhs.vPosition.x ||
|
||||
m_LightDesc.vPosition.y != rhs.vPosition.y ||
|
||||
m_LightDesc.vPosition.z != rhs.vPosition.z) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
HRESULT CLight::Replace_LightTo(_fvector vPosition)
|
||||
{
|
||||
//GUI::Begin("Light_Position");
|
||||
//GUI::SliderFloat("fRange", (_float*)&m_LightDesc.fRange, 0.f, 30.f);
|
||||
//GUI::SliderFloat4("vDiffuse", (_float*)&m_LightDesc.vDiffuse, 0.f, 1.f);
|
||||
//GUI::SliderFloat4("vAmbient", (_float*)&m_LightDesc.vAmbient, 0.f, 1.f);
|
||||
//GUI::SliderFloat4("vSpecular", (_float*)&m_LightDesc.vSpecular, 0.f, 1.f);
|
||||
//GUI::SliderFloat3("fAngle", (_float*)&m_LightDesc.vDirection.x, -1.f, 1.f);
|
||||
//GUI::SliderFloat("fSpotInner", (_float*)&m_LightDesc.vSpotAngles.x, 0.f, 1.f);
|
||||
//GUI::SliderFloat("fSpotOutter", (_float*)&m_LightDesc.vSpotAngles.y, 0.f, 1.f);
|
||||
//GUI::End();
|
||||
if (LIGHT::POINT == m_LightDesc.eType || LIGHT::SPOT == m_LightDesc.eType) {
|
||||
XMStoreFloat4(&m_LightDesc.vPosition, vPosition);
|
||||
return S_OK;
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
HRESULT CLight::Initialize(const LIGHT_DESC& LightDesc)
|
||||
{
|
||||
m_LightDesc = LightDesc;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLight::Render(CShader* pShader, CVIBuffer* pVIBuffer) const
|
||||
{
|
||||
_uint iPassIndex = { 0 };
|
||||
if (LIGHT::DIRECTIONAL == m_LightDesc.eType) {
|
||||
if (FAILED(pShader->Bind_RawValue("g_vLightDir", &m_LightDesc.vDirection, sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
iPassIndex = ENUM_CLASS(SHADER_PASS_DEFERRED::DIRECTIONAL);
|
||||
}
|
||||
else if (LIGHT::SPOT == m_LightDesc.eType) {
|
||||
if (FAILED(pShader->Bind_RawValue("g_vLightDir", &m_LightDesc.vDirection, sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pShader->Bind_RawValue("g_vLightPos", &m_LightDesc.vPosition, sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pShader->Bind_RawValue("g_fLightRange", &m_LightDesc.fRange, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pShader->Bind_RawValue("g_fSpotInnerAngle", &m_LightDesc.vSpotAngles.x, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pShader->Bind_RawValue("g_fSpotOuterAngle", &m_LightDesc.vSpotAngles.y, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
iPassIndex = ENUM_CLASS(SHADER_PASS_DEFERRED::SPOT);
|
||||
}
|
||||
else {
|
||||
if (FAILED(pShader->Bind_RawValue("g_vLightPos", &m_LightDesc.vPosition, sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pShader->Bind_RawValue("g_fLightRange", &m_LightDesc.fRange, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
iPassIndex = ENUM_CLASS(SHADER_PASS_DEFERRED::POINT);
|
||||
}
|
||||
|
||||
if (FAILED(pShader->Bind_RawValue("g_vLightDiffuse", &m_LightDesc.vDiffuse, sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pShader->Bind_RawValue("g_vLightAmbient", &m_LightDesc.vAmbient, sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pShader->Bind_RawValue("g_vLightSpecular", &m_LightDesc.vSpecular, sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(pShader->Begin(iPassIndex))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return pVIBuffer->Render();
|
||||
return S_OK;
|
||||
}
|
||||
CLight* CLight::Create(const LIGHT_DESC& LightDesc)
|
||||
{
|
||||
CLight* pInstance = new CLight();
|
||||
|
||||
if (FAILED(pInstance->Initialize(LightDesc)))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CLight");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CLight::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user