diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl
index 3f63e5e6f..6e5d2ad4c 100644
--- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl
+++ b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl
@@ -16,6 +16,7 @@ Texture2D g_Texture;
float g_fLightRange;
float g_fSpotInnerAngle;
float g_fSpotOuterAngle;
+
vector g_vLightDir;
vector g_vLightPos;
vector g_vCamPosition;
@@ -29,6 +30,7 @@ Texture2D g_ShadowTexture;
Texture2D g_PreShadowTexture;
Texture2D g_BlurTexture;
Texture2D g_BlurXTexture;
+Texture2D g_BlurWeightTexture;
@@ -36,6 +38,8 @@ vector g_vLightDiffuse;
vector g_vLightAmbient;
vector g_vLightSpecular;
+
+
struct VS_IN
{
float3 vPosition : POSITION;
@@ -219,13 +223,15 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
return Out;
}
-float g_fWeights[13] =
+float g_fWeights[32] =
{
- 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
+ 0.000400, 0.000700, 0.001200, 0.002000, 0.003200, 0.005000, 0.007500, 0.011000,
+ 0.015700, 0.021700, 0.029000, 0.037300, 0.046200, 0.055200, 0.063600, 0.070800,
+ 0.075900, 0.078500, 0.078500, 0.075900, 0.070800, 0.063600, 0.055200, 0.046200,
+ 0.037300, 0.029000, 0.021700, 0.015700, 0.011000, 0.007500, 0.005000, 0.003200
};
+
PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
{
PS_OUT_BACKBUFFER Out;
@@ -295,15 +301,31 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
//{
// Out.vBackBuffer *= 0.5f;
//}
-
float4 vColor = 0.f;
- for (int i = -6; i < 7; ++i)
+ //int iBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r * 32.f;
+
+ //int iBlurMin;
+ //int iBlurMax;
+
+ //if (iBlurWeight % 2 == 0)
+ //{
+ // iBlurMin = -1 * iBlurWeight / 2;
+ // iBlurMax = iBlurWeight / 2;
+ //}
+ //else
+ //{
+ // iBlurMin = -iBlurWeight / 2;
+ // iBlurMax = iBlurWeight / 2 + 1;
+ //}
+
+ //[loop] // 변수로 루프ë�Œë¦¬ë ¤ë©´ 반드시 필요함
+ for (int i = -15; i < 16; ++i)
{
vTexcoord.x = In.vTexcoord.x;
- vTexcoord.y = In.vTexcoord.y + (float)i / g_vResolution.y;
+ vTexcoord.y = In.vTexcoord.y + (float) i / g_vResolution.y;
- vColor += g_fWeights[i + 6] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
+ vColor += g_fWeights[i + 15] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
}
Out.vBackBuffer += vColor;
@@ -324,12 +346,32 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X(PS_IN In)
float2 vTexcoord;
float4 vColor = 0.f;
- for (int i = -6; i < 7; ++i)
+ //TODO 블러 ì¡°ì ˆ í•´ë³´ë ¤í–‡ëŠ”ë�° 실패함..
+
+ //int iBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r * 32.f;
+
+ //int iBlurMin;
+ //int iBlurMax;
+
+ //if (iBlurWeight % 2 == 0)
+ //{
+ // iBlurMin = -1 * iBlurWeight / 2;
+ // iBlurMax = iBlurWeight / 2;
+ //}
+ //else
+ //{
+ // iBlurMin = -iBlurWeight / 2;
+ // iBlurMax = iBlurWeight / 2 + 1;
+ //}
+
+ //[loop] // 변수로 루프ë�Œë¦¬ë ¤ë©´ 반드시 필요함
+
+ for (int i = -15; i < 16; ++i)
{
vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x;
vTexcoord.y = In.vTexcoord.y;
- vColor += g_fWeights[i + 6] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
+ vColor += g_fWeights[i + 15] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
}
Out.vBlurX = vColor;
diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl
index e8dd37940..5170f9c7a 100644
--- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl
+++ b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl
@@ -50,10 +50,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
Out.vBackBuffer = float4(0.f, 0.f, 0.f, 0.f);
- vector vColorTexture = g_ColorTexture.Sample(DefaultSampler, In.vTexcoord);
-
- vector vDiffuseTexture = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
-
+ vector vColorTexture = g_ColorTexture.Sample(ClampSampler, In.vTexcoord);
if (0.f == vColorTexture.a)
{
@@ -66,7 +63,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
switch (iOption)
{
case 1:
- Out.vBackBuffer.rgb = vColorTexture.rgb;
+ Out.vBackBuffer.rgb /= vColorTexture.rgb;
break;
case 2:
Out.vBackBuffer.rgb += vColorTexture.rgb;
@@ -78,7 +75,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
Out.vBackBuffer.rgb *= vColorTexture.rgb;
break;
case 5:
- Out.vBackBuffer.rgb /= vColorTexture.rgb;
+ Out.vBackBuffer.rgb = vColorTexture.rgb;
break;
default:
break;
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/ContainerTest.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/ContainerTest.xml
index ec0e10dae..210855c23 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/ContainerTest.xml
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/ContainerTest.xml
@@ -1,500 +1,24 @@
-
+
-
- Prototype_GameObject_SM_HM_3Broom_Ext_Awning_Trim
- Prototype_GameObject_SM_HM_3Broom_Ext_Awning_Trim_Lod1
- Prototype_GameObject_SM_HM_3Broom_Ext_Awning_Trim_Lod2
- Prototype_GameObject_SM_HM_3Broom_Ext_Awning_Trim_Lod3
+
+ Prototype_GameObject_SM_HW_GH_ArchSmall
+ Prototype_GameObject_SM_HW_GH_ArchSmall_Lod1
+ Prototype_GameObject_SM_HW_GH_ArchSmall_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HW_GH_ArchSmall
+ Prototype_GameObject_SM_HW_GH_ArchSmall_Lod1
+ Prototype_GameObject_SM_HW_GH_ArchSmall_Lod2
-
- Prototype_GameObject_SM_HM_3Broom_ext_barrels
- Prototype_GameObject_SM_HM_3Broom_ext_barrels_Lod1
- Prototype_GameObject_SM_HM_3Broom_ext_barrels_Lod2
- Prototype_GameObject_SM_HM_3Broom_ext_barrels_Lod3
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_ext_barrels_sign
- Prototype_GameObject_SM_HM_3Broom_ext_barrels_sign_Lod1
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_ext_barrel_stands
- Prototype_GameObject_SM_HM_3Broom_ext_barrel_stands_Lod1
- Prototype_GameObject_SM_HM_3Broom_ext_barrel_stands_Lod2
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_ext_chimneys_B
- Prototype_GameObject_SM_HM_3Broom_ext_chimneys_B_Lod1
- Prototype_GameObject_SM_HM_3Broom_ext_chimneys_B_Lod2
- Prototype_GameObject_SM_HM_3Broom_ext_chimneys_B_Lod3
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_ext_decals
- Prototype_GameObject_SM_HM_3Broom_ext_decals_Lod1
- Prototype_GameObject_SM_HM_3Broom_ext_decals_Lod2
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_ext_Decals_A
- Prototype_GameObject_SM_HM_3Broom_ext_Decals_A_Lod1
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_Ext_DoorFrameSide
- Prototype_GameObject_SM_HM_3Broom_Ext_DoorFrameSide_Lod1
- Prototype_GameObject_SM_HM_3Broom_Ext_DoorFrameSide_Lod2
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_ext_Dormer_Wood_Slats
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_ext_roof
- Prototype_GameObject_SM_HM_3Broom_ext_roof_Lod1
- Prototype_GameObject_SM_HM_3Broom_ext_roof_Lod2
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_ext_roof_copper_tops
- Prototype_GameObject_SM_HM_3Broom_ext_roof_copper_tops_Lod1
- Prototype_GameObject_SM_HM_3Broom_ext_roof_copper_tops_Lod2
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_ext_roof_decals
- Prototype_GameObject_SM_HM_3Broom_ext_roof_decals_Lod1
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_ext_side_garden_box
- Prototype_GameObject_SM_HM_3Broom_ext_side_garden_box_Lod1
- Prototype_GameObject_SM_HM_3Broom_ext_side_garden_box_Lod2
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_ext_trim
- Prototype_GameObject_SM_HM_3Broom_ext_trim_Lod1
- Prototype_GameObject_SM_HM_3Broom_ext_trim_Lod2
- Prototype_GameObject_SM_HM_3Broom_ext_trim_Lod3
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_ext_trim_stone
- Prototype_GameObject_SM_HM_3Broom_ext_trim_stone_Lod1
- Prototype_GameObject_SM_HM_3Broom_ext_trim_stone_Lod2
- Prototype_GameObject_SM_HM_3Broom_ext_trim_stone_Lod3
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_ext_walls
- Prototype_GameObject_SM_HM_3Broom_ext_walls_Lod1
- Prototype_GameObject_SM_HM_3Broom_ext_walls_Lod2
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_ext_wood_Corbels
- Prototype_GameObject_SM_HM_3Broom_ext_wood_Corbels_Lod1
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_fireplace
- Prototype_GameObject_SM_HM_3Broom_fireplace_Lod1
- Prototype_GameObject_SM_HM_3Broom_fireplace_Lod2
- Prototype_GameObject_SM_HM_3Broom_fireplace_Lod3
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_Door_L
- Prototype_GameObject_SM_HM_3Broom_Door_L_Lod1
- Prototype_GameObject_SM_HM_3Broom_Door_L_Lod2
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_Door_R
- Prototype_GameObject_SM_HM_3Broom_Door_R_Lod1
- Prototype_GameObject_SM_HM_3Broom_Door_R_Lod2
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_DoorFrame
- Prototype_GameObject_SM_HM_3Broom_DoorFrame_Lod1
- Prototype_GameObject_SM_HM_3Broom_DoorFrame_Lod2
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_Window_Glass
- Prototype_GameObject_SM_HM_3Broom_Window_Glass_Lod1
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_Roof_Debris_A
- Prototype_GameObject_SM_HM_3Broom_Roof_Debris_A_Lod1
- Prototype_GameObject_SM_HM_3Broom_Roof_Debris_A_Lod2
- Prototype_GameObject_SM_HM_3Broom_Roof_Debris_A_Lod3
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_Roof_Debris_B
- Prototype_GameObject_SM_HM_3Broom_Roof_Debris_B_Lod1
- Prototype_GameObject_SM_HM_3Broom_Roof_Debris_B_Lod2
- Prototype_GameObject_SM_HM_3Broom_Roof_Debris_B_Lod3
-
-
-
-
-
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_int_Bar
- Prototype_GameObject_SM_HM_3Broom_int_Bar_Lod1
- Prototype_GameObject_SM_HM_3Broom_int_Bar_Lod2
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_int_floors
- Prototype_GameObject_SM_HM_3Broom_int_floors_Lod1
- Prototype_GameObject_SM_HM_3Broom_int_floors_Lod2
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_int_stairs_A
- Prototype_GameObject_SM_HM_3Broom_int_stairs_A_Lod1
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_int_stairs_B
- Prototype_GameObject_SM_HM_3Broom_int_stairs_B_Lod1
- Prototype_GameObject_SM_HM_3Broom_int_stairs_B_Lod2
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_int_stairs_D
- Prototype_GameObject_SM_HM_3Broom_int_stairs_D_Lod1
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_int_Stairs_Upper_Floors
- Prototype_GameObject_SM_HM_3Broom_int_Stairs_Upper_Floors_Lod1
- Prototype_GameObject_SM_HM_3Broom_int_Stairs_Upper_Floors_Lod2
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_int_walls
- Prototype_GameObject_SM_HM_3Broom_int_walls_Lod1
- Prototype_GameObject_SM_HM_3Broom_int_walls_Lod2
- Prototype_GameObject_SM_HM_3Broom_int_walls_Lod3
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_int_windows
- Prototype_GameObject_SM_HM_3Broom_int_windows_Lod1
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_int_wood_A
- Prototype_GameObject_SM_HM_3Broom_int_wood_A_Lod1
- Prototype_GameObject_SM_HM_3Broom_int_wood_A_Lod2
- Prototype_GameObject_SM_HM_3Broom_int_wood_A_Lod3
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_int_wood_B
- Prototype_GameObject_SM_HM_3Broom_int_wood_B_Lod1
- Prototype_GameObject_SM_HM_3Broom_int_wood_B_Lod2
- Prototype_GameObject_SM_HM_3Broom_int_wood_B_Lod3
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_int_wood_C
- Prototype_GameObject_SM_HM_3Broom_int_wood_C_Lod1
- Prototype_GameObject_SM_HM_3Broom_int_wood_C_Lod2
- Prototype_GameObject_SM_HM_3Broom_int_wood_C_Lod3
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_int_wood_Stairs
- Prototype_GameObject_SM_HM_3Broom_int_wood_Stairs_Lod1
- Prototype_GameObject_SM_HM_3Broom_int_wood_Stairs_Lod2
-
-
-
-
-
- Prototype_GameObject_SM_Broom_01
- Prototype_GameObject_SM_Broom_01_Lod1
- Prototype_GameObject_SM_Broom_01_Lod2
-
-
-
-
-
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_ext_barrel_stands
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_ext_barrel_stands
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_ext_barrels
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_Door_R
-
-
-
-
-
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_Door_L
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_ext_Decals_A
-
-
-
-
-
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_FloorMain
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_FloorEnd
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_Sconce_Gryffindor
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_WallIntWindowB
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_WallIntWindowB
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_WallIntWindowC
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_WallPaneling
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_WallInt_FlatCeilingB
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_Sconce_Gryffindor
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_Sconce_HufflePuff
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_Sconce_Slytherin
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_ShadowCaster
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_Table
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_Table
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_Table
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_TableRunnerGryff
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_TableRunnerHufflePuff
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_TableRunnerRaven
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_WallColumnAB
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_WallColumnAC
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_WallColumnC
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_WallDoor
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_WallDoorB
-
-
-
-
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/MapTest.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/MapTest.xml
index 98d8b1513..6aeafba8b 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/MapTest.xml
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/MapTest.xml
@@ -1,123 +1,56 @@
-
- Prototype_GameObject_SM_HM_3Broom_Ext_Awning_Trim.mo
-
+
+
-
-
- Prototype_GameObject_SM_HM_3Broom_Ext_DoorFrameSide.mo
-
+
+ Prototype_GameObject_SM_HW_GH_ArchSmall
+ Prototype_GameObject_SM_HW_GH_ArchSmall_Lod1
+ Prototype_GameObject_SM_HW_GH_ArchSmall_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HW_GH_ArchSmall
+ Prototype_GameObject_SM_HW_GH_ArchSmall_Lod1
+ Prototype_GameObject_SM_HW_GH_ArchSmall_Lod2
+
+
+
+
+
+
-
- Prototype_GameObject_SM_HM_3Broom_MERGED_Entry_Base_Stones.mo
-
+
+
-
- Prototype_GameObject_SM_HM_3Broom_MERGED_Side_Stone_Steps.mo
-
+
+
-
- Prototype_GameObject_SM_HM_3Broom_MERGED_Winter_Kit_Icicles.mo
-
+
+
+
-
- Prototype_GameObject_SM_HM_3Broom_MERGED_Winter_Kit_Snow.mo
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_Roof_Debris_A.mo
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_Roof_Debris_A_Decal.mo
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_Roof_Debris_B_Decal.mo
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_Roof_Snow_Winter.mo
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_Window_Glass.mo
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_Wood_Steps_B.mo
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_Wood_Steps_C.mo
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_int_walls.mo
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_int_wood_A.mo
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_int_wood_B.mo
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_int_wood_Stairs.mo
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_int_windows.mo
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_int_walls.mo
-
-
-
-
-
- Prototype_GameObject_SM_HM_3Broom_int_Stairs_Upper_Floors.mo
-
-
-
-
+
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Head/Male/Head.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Head/Male/Head.bin
deleted file mode 100644
index 92616bccf..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Head/Male/Head.bin and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Head/Male/T_NPC_Young_M_Head_Ivory_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Head/Male/T_NPC_Young_M_Head_Ivory_N.png
new file mode 100644
index 000000000..c3389ac13
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Head/Male/T_NPC_Young_M_Head_Ivory_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/KeyFrame.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/KeyFrame.bin
new file mode 100644
index 000000000..9aa7769ec
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/KeyFrame.bin differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/Dragon.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/Dragon.bin
new file mode 100644
index 000000000..0b29a6ca9
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/Dragon.bin differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/Dragon.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/Dragon.fbx
new file mode 100644
index 000000000..711c86923
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/Dragon.fbx
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:32b6b5101a39633cf35d7ebcf5711940a0cea66b3164290113e775c5c96ba86f
+size 61962812
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/T_ConjuredDragon_Body_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/T_ConjuredDragon_Body_D.png
new file mode 100644
index 000000000..bb962c0a0
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/T_ConjuredDragon_Body_D.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/T_ConjuredDragon_Body_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/T_ConjuredDragon_Body_N.png
new file mode 100644
index 000000000..f76d5553e
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/T_ConjuredDragon_Body_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/T_ConjuredDragon_Wings_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/T_ConjuredDragon_Wings_D.png
new file mode 100644
index 000000000..b2ce38a89
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/T_ConjuredDragon_Wings_D.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/T_ConjuredDragon_Wings_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/T_ConjuredDragon_Wings_N.png
new file mode 100644
index 000000000..8e8b5c6c1
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/T_ConjuredDragon_Wings_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/T_DragonEye_Iris_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/T_DragonEye_Iris_D.png
new file mode 100644
index 000000000..059dcf656
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/T_DragonEye_Iris_D.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/T_HebrideanBlack_Body_Harness_Corruption_A.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/T_HebrideanBlack_Body_Harness_Corruption_A.png
new file mode 100644
index 000000000..3e1189762
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/T_HebrideanBlack_Body_Harness_Corruption_A.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/T_HebrideanBlack_Wing_Harness_Corruption_A.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/T_HebrideanBlack_Wing_Harness_Corruption_A.png
new file mode 100644
index 000000000..380d236c9
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Dragon/T_HebrideanBlack_Wing_Harness_Corruption_A.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/GoblinBody.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/GoblinBody.bin
deleted file mode 100644
index f42644300..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/GoblinBody.bin and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/GoblinBody.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/GoblinBody.fbx
deleted file mode 100644
index 97a31fa83..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/GoblinBody.fbx
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a49d1ffea2e4743cdb6f6520d4cf6103ee1aeccd4e1da6fbd39eb75aacdeeb18
-size 2030252
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/GoblinHead.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/GoblinHead.bin
deleted file mode 100644
index 0fe47e66b..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/GoblinHead.bin and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/GoblinHead.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/GoblinHead.fbx
deleted file mode 100644
index f3701907d..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/GoblinHead.fbx
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:f07bf5432d1e2481ee5219779cfce430c9537c37d1e8efa3a54ab32fdb461e92
-size 2300860
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOB_M_Sniper_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOB_M_Sniper_D.png
deleted file mode 100644
index ee01a4efc..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOB_M_Sniper_D.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOB_Mage_Head_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOB_Mage_Head_D.png
deleted file mode 100644
index 72d3d63fc..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOB_Mage_Head_D.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector01_Upper_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector01_Upper_D.png
deleted file mode 100644
index fc0fbca3d..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector01_Upper_D.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector01_Upper_E.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector01_Upper_E.png
deleted file mode 100644
index f8a7c9c89..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector01_Upper_E.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector01_Upper_MROA.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector01_Upper_MROA.png
deleted file mode 100644
index e16ba8af8..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector01_Upper_MROA.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector01_Upper_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector01_Upper_N.png
deleted file mode 100644
index 6ac83780f..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector01_Upper_N.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_1001_E.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_1001_E.png
deleted file mode 100644
index 1d7adae32..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_1001_E.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_1001_MRO.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_1001_MRO.png
deleted file mode 100644
index ccb0bca48..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_1001_MRO.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_1001_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_1001_N.png
deleted file mode 100644
index 8bbbb218a..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_1001_N.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_1002_E.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_1002_E.png
deleted file mode 100644
index 85f9805c2..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_1002_E.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_1002_MRO.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_1002_MRO.png
deleted file mode 100644
index 98d5357db..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_1002_MRO.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_1002_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_1002_N.png
deleted file mode 100644
index 4ebccf04d..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_1002_N.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_1_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_1_D.png
deleted file mode 100644
index 2fe1ffc6f..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_1_D.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_2_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_2_D.png
deleted file mode 100644
index de7e79e09..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_GOL_TombProtector_2_D.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_Spline_clouds_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_Spline_clouds_D.png
deleted file mode 100644
index 508965f7a..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_Spline_clouds_D.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_TombProtector_DistortionPattern_A_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_TombProtector_DistortionPattern_A_D.png
deleted file mode 100644
index cdfe02952..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_TombProtector_DistortionPattern_A_D.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_TombProtector_DistortionPattern_B_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_TombProtector_DistortionPattern_B_D.png
deleted file mode 100644
index ff8a490c8..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/T_TombProtector_DistortionPattern_B_D.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/TombProtector.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/TombProtector.fbx
deleted file mode 100644
index 28a4cecb1..000000000
--- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/Goblin/TombProtector.fbx
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:8e8ab9ac98cc040e967bfae8c42e2d57be4957844399b245973f08c7eda6c82d
-size 48326476
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Broom/Broom.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Broom/Broom.bin
new file mode 100644
index 000000000..587cb6eb8
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Broom/Broom.bin differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Broom/Broom.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Broom/Broom.fbx
new file mode 100644
index 000000000..9bb677d77
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Broom/Broom.fbx
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2d071b22f597d86953d9e1751b79a9ae97fffdd2367856ee03f6bf3c500c7b40
+size 3138924
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Broom/T_FlightClassBroom_01_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Broom/T_FlightClassBroom_01_D.png
new file mode 100644
index 000000000..9079fb61a
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Broom/T_FlightClassBroom_01_D.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Broom/T_FlightClassBroom_01_E.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Broom/T_FlightClassBroom_01_E.png
new file mode 100644
index 000000000..ebd0dd6d0
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Broom/T_FlightClassBroom_01_E.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Broom/T_FlightClassBroom_01_N.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Broom/T_FlightClassBroom_01_N.png
new file mode 100644
index 000000000..5d6771a93
Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Object/Broom/T_FlightClassBroom_01_N.png differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/TombProtector/T_GOL_TombProtector_1_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/TombProtector/T_GOL_TombProtector_1_D.png
deleted file mode 100644
index 2fe1ffc6f..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/TombProtector/T_GOL_TombProtector_1_D.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/TombProtector/T_GOL_TombProtector_2_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/TombProtector/T_GOL_TombProtector_2_D.png
deleted file mode 100644
index de7e79e09..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/TombProtector/T_GOL_TombProtector_2_D.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/TombProtector/T_Spline_clouds_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/TombProtector/T_Spline_clouds_D.png
deleted file mode 100644
index 508965f7a..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/TombProtector/T_Spline_clouds_D.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/TombProtector/T_TombProtector_DistortionPattern_A_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/TombProtector/T_TombProtector_DistortionPattern_A_D.png
deleted file mode 100644
index cdfe02952..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/TombProtector/T_TombProtector_DistortionPattern_A_D.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/TombProtector/T_TombProtector_DistortionPattern_B_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/TombProtector/T_TombProtector_DistortionPattern_B_D.png
deleted file mode 100644
index ff8a490c8..000000000
Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Models/TombProtector/T_TombProtector_DistortionPattern_B_D.png and /dev/null differ
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl
index 3f63e5e6f..6e5d2ad4c 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl
@@ -16,6 +16,7 @@ Texture2D g_Texture;
float g_fLightRange;
float g_fSpotInnerAngle;
float g_fSpotOuterAngle;
+
vector g_vLightDir;
vector g_vLightPos;
vector g_vCamPosition;
@@ -29,6 +30,7 @@ Texture2D g_ShadowTexture;
Texture2D g_PreShadowTexture;
Texture2D g_BlurTexture;
Texture2D g_BlurXTexture;
+Texture2D g_BlurWeightTexture;
@@ -36,6 +38,8 @@ vector g_vLightDiffuse;
vector g_vLightAmbient;
vector g_vLightSpecular;
+
+
struct VS_IN
{
float3 vPosition : POSITION;
@@ -219,13 +223,15 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
return Out;
}
-float g_fWeights[13] =
+float g_fWeights[32] =
{
- 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
+ 0.000400, 0.000700, 0.001200, 0.002000, 0.003200, 0.005000, 0.007500, 0.011000,
+ 0.015700, 0.021700, 0.029000, 0.037300, 0.046200, 0.055200, 0.063600, 0.070800,
+ 0.075900, 0.078500, 0.078500, 0.075900, 0.070800, 0.063600, 0.055200, 0.046200,
+ 0.037300, 0.029000, 0.021700, 0.015700, 0.011000, 0.007500, 0.005000, 0.003200
};
+
PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
{
PS_OUT_BACKBUFFER Out;
@@ -295,15 +301,31 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
//{
// Out.vBackBuffer *= 0.5f;
//}
-
float4 vColor = 0.f;
- for (int i = -6; i < 7; ++i)
+ //int iBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r * 32.f;
+
+ //int iBlurMin;
+ //int iBlurMax;
+
+ //if (iBlurWeight % 2 == 0)
+ //{
+ // iBlurMin = -1 * iBlurWeight / 2;
+ // iBlurMax = iBlurWeight / 2;
+ //}
+ //else
+ //{
+ // iBlurMin = -iBlurWeight / 2;
+ // iBlurMax = iBlurWeight / 2 + 1;
+ //}
+
+ //[loop] // 변수로 루프ë�Œë¦¬ë ¤ë©´ 반드시 필요함
+ for (int i = -15; i < 16; ++i)
{
vTexcoord.x = In.vTexcoord.x;
- vTexcoord.y = In.vTexcoord.y + (float)i / g_vResolution.y;
+ vTexcoord.y = In.vTexcoord.y + (float) i / g_vResolution.y;
- vColor += g_fWeights[i + 6] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
+ vColor += g_fWeights[i + 15] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
}
Out.vBackBuffer += vColor;
@@ -324,12 +346,32 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X(PS_IN In)
float2 vTexcoord;
float4 vColor = 0.f;
- for (int i = -6; i < 7; ++i)
+ //TODO 블러 ì¡°ì ˆ í•´ë³´ë ¤í–‡ëŠ”ë�° 실패함..
+
+ //int iBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r * 32.f;
+
+ //int iBlurMin;
+ //int iBlurMax;
+
+ //if (iBlurWeight % 2 == 0)
+ //{
+ // iBlurMin = -1 * iBlurWeight / 2;
+ // iBlurMax = iBlurWeight / 2;
+ //}
+ //else
+ //{
+ // iBlurMin = -iBlurWeight / 2;
+ // iBlurMax = iBlurWeight / 2 + 1;
+ //}
+
+ //[loop] // 변수로 루프ë�Œë¦¬ë ¤ë©´ 반드시 필요함
+
+ for (int i = -15; i < 16; ++i)
{
vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x;
vTexcoord.y = In.vTexcoord.y;
- vColor += g_fWeights[i + 6] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
+ vColor += g_fWeights[i + 15] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
}
Out.vBlurX = vColor;
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl
index e8dd37940..5170f9c7a 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl
@@ -50,10 +50,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
Out.vBackBuffer = float4(0.f, 0.f, 0.f, 0.f);
- vector vColorTexture = g_ColorTexture.Sample(DefaultSampler, In.vTexcoord);
-
- vector vDiffuseTexture = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
-
+ vector vColorTexture = g_ColorTexture.Sample(ClampSampler, In.vTexcoord);
if (0.f == vColorTexture.a)
{
@@ -66,7 +63,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
switch (iOption)
{
case 1:
- Out.vBackBuffer.rgb = vColorTexture.rgb;
+ Out.vBackBuffer.rgb /= vColorTexture.rgb;
break;
case 2:
Out.vBackBuffer.rgb += vColorTexture.rgb;
@@ -78,7 +75,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
Out.vBackBuffer.rgb *= vColorTexture.rgb;
break;
case 5:
- Out.vBackBuffer.rgb /= vColorTexture.rgb;
+ Out.vBackBuffer.rgb = vColorTexture.rgb;
break;
default:
break;
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl
index 53a0c18eb..3cded6ce1 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxAnimMesh.hlsl
@@ -304,9 +304,6 @@ PS_OUT PS_MAIN_TEST(PS_IN In)
return Out;
}
-
-
-
technique11 DefaultTechnique
{
pass Default
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl
index 7fc93fc95..cdfff192f 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxModelInstance.hlsl
@@ -1,5 +1,6 @@
#include "Engine_Shader_Defines.hlsli"
+float PI = 3.141592;
struct ParticleValue
{
@@ -41,10 +42,18 @@ float2 g_vMaskingUVGainAmount;
float2 g_vDiffuseNoiseUVGainAmount;
float2 g_vMaskNoiseUVGainAmount;
+//
+int g_iMaskMoveLerpOption;
+int g_iDiffuseMoveLerpOption;
+int g_iMaskNoiseMoveLerpOption;
+int g_iDiffuseNoiseMoveLerpOption;
+//
+
float2 g_vUVCutting;
float2 g_vUVMaskCutting;
+int g_iBlurWeight; // 블러 강�
float g_fBlurIntensity; //블러 세기
float g_fNoiseDistortionIntensity; // 노�즈 왜곡 세기
@@ -62,6 +71,47 @@ bool g_isMaskUVMove;
float g_fFar;
+float2 SelectLerpUV(float2 fAmount, float _fRatio, int iSelectOption)
+{
+ if (iSelectOption < 0)
+ return float2(0 , 0);
+
+ float fRatio = _fRatio;
+ switch (iSelectOption)
+ {
+ case 0:
+ fRatio = fRatio; // Linear
+ break;
+ case 1:
+ fRatio = fRatio * fRatio; // EaseInQuad 후반� �� �가
+ break;
+ case 2:
+ fRatio = 1 - (1 - fRatio * fRatio); // EaseOutQuad 초반� �� �가
+ break;
+ case 3:
+ fRatio = fRatio * fRatio * fRatio; // EaseInCubic � 강하게 후반 �� �가
+ break;
+ case 4:
+ fRatio = 1 - (1 - fRatio * fRatio * fRatio); // EaseOutCubic � 강하게 초반 �� �가
+ break;
+ case 5:
+ fRatio = 0.5f * (1 - cos(PI * fRatio)); // EaseInOutSin 사ì�¸ 곡ì„
+ break;
+ case 6:
+ fRatio = sin(13 * PI * fRatio) * (1 - fRatio) * (1 - fRatio); // EaseInBack 뒤로갔다가 앞으로
+ break;
+ case 7:
+ fRatio = pow(2, 10 * (fRatio - 1)); // Expo 지수 함수
+ break;
+ case 8:
+ fRatio = 1 - pow(1 - fRatio * fRatio, 0.5); // ì›�형 궤ì �
+ break;
+ }
+
+ return fAmount * fRatio;
+
+}
+
struct VS_IN
{
@@ -188,14 +238,15 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
UV = UV_Cutting(In.vTexcoord, g_vUVCutting, int(fAnimIndex.x));
if (g_isDiffuseUVMove)
- {
- UV += (g_vDiffuseUVGainAmount / g_vUVCutting) * (vDiffuseTime.x / vDiffuseTime.y);
+ {
+ UV += SelectLerpUV((g_vDiffuseUVGainAmount / g_vUVCutting), (vDiffuseTime.x / vDiffuseTime.y), g_iDiffuseMoveLerpOption);
}
/* 노�즈 */
if (g_isNoise == true)
{
- float2 vNoiseUV = In.vTexcoord + (g_vDiffuseNoiseUVGainAmount) * (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y);
+
+ float2 vNoiseUV = In.vTexcoord + SelectLerpUV(g_vDiffuseNoiseUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iDiffuseNoiseMoveLerpOption);
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vNoiseUV);
@@ -235,8 +286,8 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
if (g_isNoise == true)
{
float2 UV; // �미지� UV값
-
- float2 vNoiseUV = In.vTexcoord + (g_vMaskNoiseUVGainAmount) * (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y);
+
+ float2 vNoiseUV = In.vTexcoord + SelectLerpUV(g_vMaskNoiseUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iMaskNoiseMoveLerpOption);
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vNoiseUV);
@@ -247,7 +298,7 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
if (g_isMaskUVMove)
{
if (vMaskingTime.y > 0)
- vMaskTexcoord += g_vMaskingUVGainAmount * (vMaskingTime.x / vMaskingTime.y);
+ vMaskTexcoord += SelectLerpUV(g_vMaskingUVGainAmount / g_vUVMaskCutting, (vMaskingTime.x / vMaskingTime.y), g_iMaskMoveLerpOption);
}
vMtrlMask = g_MaskingTexture.Sample(PointSampler, vMaskTexcoord);
@@ -324,6 +375,7 @@ struct PS_BLUR_IN
struct PS_BLUR_OUT
{
float4 vDiffuse : SV_TARGET0;
+ float4 vBlurWeight : SV_TARGET1;
};
@@ -332,6 +384,7 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
PS_BLUR_OUT Out;
+
vector vMtrlDiffuse;
vector vMtrlMask;
vector vMtrlNoise;
@@ -344,31 +397,20 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
if (g_isDiffuse == true)
{
- float2 UV = In.vTexcoord; // �미지� UV값
-
- int iTotalFrame = g_vUVCutting.x * g_vUVCutting.y; // ì�´ë¯¸ì§€ì�˜ 최대 í”„ë ˆìž„ (몇 곱하기 몇ì�¸ì§€)
-
- int iCurrentFrame = int(fAnimIndex.x); // 현재 í”„ë ˆìž„ì�´ ì–´ë”” 위치ì�¸ì§€
-
- int iFrameX = iCurrentFrame % (int) g_vUVCutting.x; // 현재 x축� 위치(현재 �미지� 몇번째 칸� 보여줄 지)
- int iFrameY = iCurrentFrame / (int) g_vUVCutting.x; // 현재 y축� 위치(현재 �미지� 몇번째 줄� 보여줄 지)
-
- float fFreamWidth = 1.0 / g_vUVCutting.x; // 1.0 나누기 ì�´ë¯¸ì§€ 갯수를 해서 한칸ì—� 얼마나 갈지 ì •í•´ì¤€ë‹¤.
- float fFreamHeight = 1.0 / g_vUVCutting.y; // 1.0 나누기 ì�´ë¯¸ì§€ 갯수를 해서 한줄ì—� 얼마나 갈지 ì •í•´ì¤€ë‹¤.
-
- UV.x = UV.x * fFreamWidth + iFrameX * fFreamWidth; // ë¨¼ì € uv를 0~1ì�´ 아닌 0~fFrameWidth로 ë§Œë“ ë‹¤ì�Œì—� 한칸씩 옆으로 밀어준다.
- UV.y = UV.y * fFreamHeight + iFrameY * fFreamHeight; // ë¨¼ì € uv를 0~1ì�´ 아닌 0~fFrameHeight로 ë§Œë“ ë‹¤ì�Œì—� 한줄씩 밑으로 ë‚´ë ¤ì¤€ë‹¤.
-
+ float2 UV; // �미지� UV값
+
+ UV = UV_Cutting(In.vTexcoord, g_vUVCutting, int(fAnimIndex.x));
if (g_isDiffuseUVMove)
{
- UV += (g_vDiffuseUVGainAmount / g_vUVCutting) * (vDiffuseTime.x / vDiffuseTime.y);
+ UV += SelectLerpUV((g_vDiffuseUVGainAmount / g_vUVCutting), (vDiffuseTime.x / vDiffuseTime.y), g_iDiffuseMoveLerpOption);
}
/* 노�즈 */
if (g_isNoise == true)
{
- float2 vNoiseUV = In.vTexcoord + (g_vDiffuseNoiseUVGainAmount) * (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y);
+
+ float2 vNoiseUV = In.vTexcoord + SelectLerpUV(g_vDiffuseNoiseUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iDiffuseNoiseMoveLerpOption);
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vNoiseUV);
@@ -387,7 +429,8 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
/* 최종 색깔 */
vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, UV);
- vMtrlDiffuse += g_vColor;
+ if (g_vColor.a > 0)
+ vMtrlDiffuse += g_vColor;
if (vMtrlDiffuse.a < 0.3f)
discard;
@@ -402,10 +445,13 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
{
float2 vMaskTexcoord = In.vTexcoord;
+ vMaskTexcoord = UV_Cutting(In.vTexcoord, g_vUVMaskCutting, int(fAnimIndex.x));
+
if (g_isNoise == true)
{
-
- float2 vNoiseUV = In.vTexcoord + (g_vMaskNoiseUVGainAmount) * (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y);
+ float2 UV; // �미지� UV값
+
+ float2 vNoiseUV = In.vTexcoord + SelectLerpUV(g_vMaskNoiseUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iMaskNoiseMoveLerpOption);
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vNoiseUV);
@@ -416,7 +462,7 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
if (g_isMaskUVMove)
{
if (vMaskingTime.y > 0)
- vMaskTexcoord += g_vMaskingUVGainAmount * (vMaskingTime.x / vMaskingTime.y);
+ vMaskTexcoord += SelectLerpUV(g_vMaskingUVGainAmount / g_vUVMaskCutting, (vMaskingTime.x / vMaskingTime.y), g_iMaskMoveLerpOption);
}
vMtrlMask = g_MaskingTexture.Sample(PointSampler, vMaskTexcoord);
@@ -428,6 +474,17 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
+ vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlMask.r);
+
+ if (g_isDissolve == true)
+ {
+ vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, In.vTexcoord);
+
+ if (vMtrlDissolve.r < (In.vLifeTime.x / In.vLifeTime.y))
+ discard;
+ }
+
+
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlMask.r);
if (g_isDissolve == true)
@@ -439,6 +496,7 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
}
Out.vDiffuse = vMtrlDiffuse * g_fBlurIntensity;
+ Out.vBlurWeight.r = g_iBlurWeight / 32.f;
return Out;
}
@@ -477,3 +535,7 @@ technique11 DefaultTechnique
}
}
+
+
+
+
diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj
index ffc59e6ae..5fee516e1 100644
--- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj
+++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj
@@ -189,8 +189,6 @@
-
-
@@ -256,7 +254,6 @@
-
@@ -265,7 +262,6 @@
-
diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
index 88d1d739d..762ab4e89 100644
--- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
+++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
@@ -67,12 +67,6 @@
{b5d188ff-5925-40bd-8da4-2ed00c89f730}
-
- {0ebb9c08-69b0-49b6-bac3-c827ca13319a}
-
-
- {69af10ea-e8f1-4455-9435-93857b7eb198}
-
{a04e88c3-dabb-4a91-8b9f-ce7f5562def6}
@@ -252,18 +246,12 @@
50.UI\Mouse_Cursor
-
- 02.GameObjects\Dummy_Goblin
-
01.Level\20.ObjectViewer
02.GameObjects\Dummys\DummyCube
-
- 02.GameObjects\Dummy_Goblin\Dummy_Goblin_Head
-
02.GameObjects\ModelParts\Body
@@ -448,18 +436,12 @@
50.UI\Mouse_Cursor
-
- 02.GameObjects\Dummy_Goblin
-
01.Level\20.ObjectViewer
02.GameObjects\Dummys\DummyCube
-
- 02.GameObjects\Dummy_Goblin\Dummy_Goblin_Head
-
02.GameObjects\ModelParts\Body
diff --git a/Jusin154_Team3D/Editor/Private/BuildingContainer.cpp b/Jusin154_Team3D/Editor/Private/BuildingContainer.cpp
index 08a091a3e..30dd371fc 100644
--- a/Jusin154_Team3D/Editor/Private/BuildingContainer.cpp
+++ b/Jusin154_Team3D/Editor/Private/BuildingContainer.cpp
@@ -4,6 +4,7 @@
#include "Terrain.h"
#include "Layer.h"
#include "VIBuffer_Terrain.h"
+#include "PartObject.h"
CBuildingContainer::CBuildingContainer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CMapContainer(pDevice, pContext)
@@ -139,7 +140,6 @@ void CBuildingContainer::Describe_Entity()
{
pTerrain->Get_Component()->Picking(pTerrain->Get_Component(), m_vPosition);
}
-
}
GUI::Text("----- Rotation ----");
diff --git a/Jusin154_Team3D/Editor/Private/Dummy_Goblin.cpp b/Jusin154_Team3D/Editor/Private/Dummy_Goblin.cpp
deleted file mode 100644
index 4ddcb8891..000000000
--- a/Jusin154_Team3D/Editor/Private/Dummy_Goblin.cpp
+++ /dev/null
@@ -1,171 +0,0 @@
-#include "pch.h"
-#include "Dummy_Goblin.h"
-
-#include "GameInstance.h"
-#include "DebugCamera.h"
-
-CDummy_Goblin::CDummy_Goblin(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
- : CGameObject( pDevice, pContext )
-{
-}
-
-CDummy_Goblin::CDummy_Goblin(const CDummy_Goblin& Prototype)
- : CGameObject( Prototype )
-{
-}
-
-HRESULT CDummy_Goblin::Initialize_Prototype()
-{
- return S_OK;
-}
-
-HRESULT CDummy_Goblin::Initialize(void* pArg)
-{
- if (FAILED(__super::Initialize(pArg)))
- return E_FAIL;
-
-
- if (FAILED(Ready_Components()))
- return E_FAIL;
-
- return S_OK;
-}
-
-void CDummy_Goblin::Priority_Update(_float fTimeDelta)
-{
-
-}
-
-void CDummy_Goblin::Update(_float fTimeDelta)
-{
- //m_pModelCom->Play_Animation(fTimeDelta);
-}
-
-void CDummy_Goblin::Late_Update(_float fTimeDelta)
-{
- _float4 vPos;
- XMStoreFloat4(&vPos, Get_WorldPostion());
- m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this, vPos, 20.f);
-}
-
-HRESULT CDummy_Goblin::Render()
-{
- if (FAILED(Bind_ShaderResources())) {
- return E_FAIL;
- }
-
- _uint iNumMeshes = m_pModelCom->Get_NumMeshes();
-
- //m_pShaderCom->Bind_SRV("g_NormalTexture", nullptr);
- for (_uint i = 0; i < iNumMeshes; i++)
- {
- if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_DiffuseTexture", aiTextureType_DIFFUSE, 0))) {
- return E_FAIL;
- }
- if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_NormalTexture", aiTextureType_NORMALS, 0))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT)))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pModelCom->Render(i))) {
- return E_FAIL;
- }
- }
-
- return S_OK;
-}
-
-HRESULT CDummy_Goblin::Ready_Components()
-{
- /* Com_Model */
- if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_GoblinBody_Model"),
- reinterpret_cast(&m_pModelCom))))
- return E_FAIL;
-
- /* Com_Shader */
- if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_ANIMMESH,
- reinterpret_cast(&m_pShaderCom))))
- return E_FAIL;
-
- m_pModelCom->Change_AnimationIndex(0, true, 0.4f, true);
-
- return S_OK;
-}
-
-HRESULT CDummy_Goblin::Bind_ShaderResources()
-{
- if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))){
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))){
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))){
- return E_FAIL;
- }
-
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
- return E_FAIL;
- }
- //if (FAILED(m_pShaderCom->Bind_RawValue("g_vCamPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float4)))) {
- // return E_FAIL;
- //}
- //if (FAILED(m_pShaderCom->Bind_RawValue("g_bRimLight", &m_bRimLight, sizeof(_bool)))) {
- // return E_FAIL;
- //}
- //if (FAILED(m_pShaderCom->Bind_RawValue("g_fRimStrength", &m_fRimLightStrength, sizeof(_float)))) {
- // return E_FAIL;
- //}
- //if (FAILED(m_pShaderCom->Bind_RawValue("g_fRimPower", &m_fRimLightPower, sizeof(_float)))) {
- // return E_FAIL;
- //}
- //if (FAILED(m_pShaderCom->Bind_RawValue("g_vRimColor", &m_vRimLightColor, sizeof(_float3)))) {
- // return E_FAIL;
- //}
- return S_OK;
-}
-
-CDummy_Goblin* CDummy_Goblin::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
-{
- CDummy_Goblin* pInstance = new CDummy_Goblin(pDevice, pContext);
-
- if (FAILED(pInstance->Initialize_Prototype()))
- {
- MSG_BOX("Failed to Created : CDummy_Goblin");
- Safe_Release(pInstance);
- }
-
- return pInstance;
-}
-
-CGameObject* CDummy_Goblin::Clone(void* pArg, CGameObject* pOwner)
-{
- CDummy_Goblin* pInstance = new CDummy_Goblin(*this);
-
- if (FAILED(pInstance->Initialize(pArg)))
- {
- MSG_BOX("Failed to Cloned : CDummy_Goblin");
- Safe_Release(pInstance);
- }
-
- return pInstance;
-}
-
-void CDummy_Goblin::Free()
-{
- __super::Free();
-
- Safe_Release(m_pShaderCom);
- Safe_Release(m_pModelCom);
-}
-
-void CDummy_Goblin::Describe_Entity()
-{
-}
diff --git a/Jusin154_Team3D/Editor/Private/Dummy_Goblin_Head.cpp b/Jusin154_Team3D/Editor/Private/Dummy_Goblin_Head.cpp
deleted file mode 100644
index 298f60e1a..000000000
--- a/Jusin154_Team3D/Editor/Private/Dummy_Goblin_Head.cpp
+++ /dev/null
@@ -1,170 +0,0 @@
-#include "pch.h"
-#include "Dummy_Goblin_Head.h"
-
-#include "GameInstance.h"
-#include "DebugCamera.h"
-
-CDummy_Goblin_Head::CDummy_Goblin_Head(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
- : CGameObject(pDevice, pContext)
-{
-}
-
-CDummy_Goblin_Head::CDummy_Goblin_Head(const CDummy_Goblin_Head& Prototype)
- : CGameObject(Prototype)
-{
-}
-
-HRESULT CDummy_Goblin_Head::Initialize_Prototype()
-{
- return S_OK;
-}
-
-HRESULT CDummy_Goblin_Head::Initialize(void* pArg)
-{
- if (FAILED(__super::Initialize(pArg)))
- return E_FAIL;
-
- if (FAILED(Ready_Components()))
- return E_FAIL;
-
- return S_OK;
-}
-
-void CDummy_Goblin_Head::Priority_Update(_float fTimeDelta)
-{
-
-}
-
-void CDummy_Goblin_Head::Update(_float fTimeDelta)
-{
- m_pOwner->Get_Component()->Play_Animation(fTimeDelta);
- m_pModelCom->Play_Animation(fTimeDelta);
-}
-
-void CDummy_Goblin_Head::Late_Update(_float fTimeDelta)
-{
- _float4 vPos;
- XMStoreFloat4(&vPos, Get_WorldPostion());
- m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this, vPos, 20.f);
-}
-
-HRESULT CDummy_Goblin_Head::Render()
-{
- if (FAILED(Bind_ShaderResources())) {
- return E_FAIL;
- }
-
- _uint iNumMeshes = m_pModelCom->Get_NumMeshes();
-
- for (_uint i = 0; i < iNumMeshes; i++)
- {
- if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_DiffuseTexture", aiTextureType_DIFFUSE, 0))) {
- return E_FAIL;
- }
- if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_NormalTexture", aiTextureType_NORMALS, 0))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT)))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pModelCom->Render(i))) {
- return E_FAIL;
- }
- }
-
- return S_OK;
-}
-
-HRESULT CDummy_Goblin_Head::Ready_Components()
-{
- /* Com_Model */
- if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_GoblinHead_Model"),
- reinterpret_cast(&m_pModelCom))))
- return E_FAIL;
-
- /* Com_Shader */
- if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_ANIMMESH,
- reinterpret_cast(&m_pShaderCom))))
- return E_FAIL;
-
- m_pModelCom->Change_AnimationIndex(0, true, 0.4f, true);
-
- return S_OK;
-}
-
-HRESULT CDummy_Goblin_Head::Bind_ShaderResources()
-{
- if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
- return E_FAIL;
- }
- if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
- return E_FAIL;
- }
-
- if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
- return E_FAIL;
- }
- //if (FAILED(m_pShaderCom->Bind_RawValue("g_vCamPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float4)))) {
- // return E_FAIL;
- //}
- //if (FAILED(m_pShaderCom->Bind_RawValue("g_bRimLight", &m_bRimLight, sizeof(_bool)))) {
- // return E_FAIL;
- //}
- //if (FAILED(m_pShaderCom->Bind_RawValue("g_fRimStrength", &m_fRimLightStrength, sizeof(_float)))) {
- // return E_FAIL;
- //}
- //if (FAILED(m_pShaderCom->Bind_RawValue("g_fRimPower", &m_fRimLightPower, sizeof(_float)))) {
- // return E_FAIL;
- //}
- //if (FAILED(m_pShaderCom->Bind_RawValue("g_vRimColor", &m_vRimLightColor, sizeof(_float3)))) {
- // return E_FAIL;
- //}
- return S_OK;
-}
-
-CDummy_Goblin_Head* CDummy_Goblin_Head::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
-{
- CDummy_Goblin_Head* pInstance = new CDummy_Goblin_Head(pDevice, pContext);
-
- if (FAILED(pInstance->Initialize_Prototype()))
- {
- MSG_BOX("Failed to Created : CDummy_Goblin_Head");
- Safe_Release(pInstance);
- }
-
- return pInstance;
-}
-
-CGameObject* CDummy_Goblin_Head::Clone(void* pArg, CGameObject* pOwner)
-{
- CDummy_Goblin_Head* pInstance = new CDummy_Goblin_Head(*this);
- pInstance->m_pOwner = pOwner;
- if (FAILED(pInstance->Initialize(pArg)))
- {
- MSG_BOX("Failed to Cloned : CDummy_Goblin_Head");
- Safe_Release(pInstance);
- }
-
- return pInstance;
-}
-
-void CDummy_Goblin_Head::Free()
-{
- __super::Free();
-
- Safe_Release(m_pShaderCom);
- Safe_Release(m_pModelCom);
-}
-
-void CDummy_Goblin_Head::Describe_Entity()
-{
-}
diff --git a/Jusin154_Team3D/Editor/Private/EditEffect.cpp b/Jusin154_Team3D/Editor/Private/EditEffect.cpp
index 4569661d7..400b07a45 100644
--- a/Jusin154_Team3D/Editor/Private/EditEffect.cpp
+++ b/Jusin154_Team3D/Editor/Private/EditEffect.cpp
@@ -39,7 +39,7 @@ void CEditEffect::Priority_Update(_float fTimeDelta)
void CEditEffect::Update(_float fTimeDelta)
{
- Reference_Mat_For_EditEffect();
+
if (m_isBillboard)
m_pGameInstance->BillBoard(m_pTransformCom);
@@ -69,7 +69,7 @@ void CEditEffect::Late_Update(_float fTimeDelta)
void CEditEffect::Reference_Mat_For_EditEffect()
{
- ImGui::Begin("Reference Material");
+
const char* pCompute[] = { "DIFFUSE" , "MASK", "NOISE", "DISSOLVE" };
@@ -93,7 +93,7 @@ void CEditEffect::Reference_Mat_For_EditEffect()
default:
break;
}
- ImGui::End();
+
}
@@ -148,12 +148,7 @@ void CEditEffect::Describe_Entity()
{
//¿©±â¼ ¸ðµ¨, ÅØ½ºÃÄ, ¼±ÅÃÇÒ ¼ö ÀÖµµ·Ï ÇÔ
- //Æ®·¹ÀÏ ¸¸µé±â
- //»çÀÎ ·¯ÇÁ
- //¸ÓÅ׸®¾ó ¹ÙÀεù
- //ºí·¯°¡ µðÁ¹ºê¿¡ ¾È»ç¶óÁü
- //·çÇÁ ºôº¸µå
-
+ const char* pLerp[] = { "Linear" , "EaseInQuad", "EaseOutQuad", "EaseInCubic" , "EaseOutCubic" , "EaseInOutSin" , "EaseInBack" , "Expo" , "Circle" };
const char* pRenderNames[] = { "PRIORITY" , "SHADOW", "NONBLEND", "BLUR" , "NONLIGHT" ,"EFFECT", "BLEND" , "UI" };
_int iCurrentItem = static_cast<_int>(m_eRenderOrder);
@@ -169,7 +164,7 @@ void CEditEffect::Describe_Entity()
GUI::Checkbox("Masking", &m_isMasking);
GUI::Checkbox("Dissolve", &m_isDissolve);
GUI::Checkbox("Noise", &m_isNoise);
- GUI::Checkbox("Blur", &m_isBlur);
+
if (GUI::Checkbox("Billboard", &m_isBillboard))
{
@@ -184,8 +179,13 @@ void CEditEffect::Describe_Entity()
if (GUI::TreeNode("BLUR"))
{
+ GUI::Checkbox("Blur", &m_isBlur);
+
ImGui::PushItemWidth(80);
GUI::DragFloat("BlurIntensity", &m_fBlurIntensity, 0.005f, 0.f, 1.f);
+ GUI::DragInt("BlurWeight", &m_iBlurWeight, 1.f, 0, 32);
+
+
ImGui::PopItemWidth();
GUI::TreePop();
@@ -194,11 +194,11 @@ void CEditEffect::Describe_Entity()
if (GUI::TreeNode("EMISSIVE"))
{
- const char* pCompute[] = { "EQUL" , "PLUS", "SUBSTRACT", "MULTY" , "DIV" };
+ const char* pCompute[] = {"NONE", "DIV" , "PLUS", "SUBSTRACT", "MULTY" , "EQUL" };
_int iColorOption = (_int)m_fColorOption;
- if (ImGui::Combo("OPTION", &iColorOption, pCompute, 5))
+ if (ImGui::Combo("OPTION", &iColorOption, pCompute , 6))
{
m_fColorOption = (_float)iColorOption;
}
@@ -243,12 +243,28 @@ void CEditEffect::Describe_Entity()
GUI::Checkbox("DiffuseUVMove", &m_isDiffuseUVMove);
GUI::InputFloat2("DiffuseUVCutting", (_float*)&m_vUVCutting);
+ GUI::Spacing();
+
GUI::DragFloat2("DiffuseUVGainAmount", (_float*)&m_vDiffuseUVGainAmount, 0.01f);
- GUI::DragFloat2("DiffuseNoiseUVGainAmount", (_float*)&m_vDiffuseNoiseUVGainAmount, 0.01f);
+
+
+
+ _int iDiffuseMoveLerpOption = (_int)m_iDiffuseMoveLerpOption;
+
+ if (ImGui::Combo("Lerp DiffuseMove Option", &iDiffuseMoveLerpOption, pLerp, 9))
+ {
+ m_iDiffuseMoveLerpOption = iDiffuseMoveLerpOption;
+ }
+
+ GUI::Spacing();
ImGui::PopItemWidth();
- m_pGameInstance->Asset_Description(ENUM_CLASS(LEVEL::EFFECT), "DIFFUSE_TEXTURE", (CComponent**)&m_pDiffuse_TextureCom, nullptr, this);
+ if (GUI::TreeNode("DIFFUSE_TEX"))
+ {
+ m_pGameInstance->Asset_Description(ENUM_CLASS(LEVEL::EFFECT), "DIFFUSE_TEXTURE", (CComponent**)&m_pDiffuse_TextureCom, nullptr, this);
+ GUI::TreePop();
+ }
GUI::Separator(); GUI::Spacing();
@@ -267,11 +283,27 @@ void CEditEffect::Describe_Entity()
ImGui::PushItemWidth(80);
GUI::DragFloat2("MaskingUVGainAmount", (_float*)&m_vMaskingUVGainAmount, 0.01f);
- GUI::DragFloat2("MaskNoiseUVGainAmount", (_float*)&m_vMaskNoiseUVGainAmount, 0.01f);
ImGui::PopItemWidth();
- m_pGameInstance->Asset_Description(ENUM_CLASS(LEVEL::EFFECT), "MASKING_TEXTURE", (CComponent**)&m_pMasking_TextureCom, nullptr, this);
+ GUI::Spacing();
+
+
+ _int iMaskMoveLerpOption = (_int)m_iMaskMoveLerpOption;
+
+ if (ImGui::Combo("Lerp MaskMove Option", &iMaskMoveLerpOption, pLerp, 9))
+ {
+ m_iMaskMoveLerpOption = iMaskMoveLerpOption;
+ }
+
+
+ GUI::Spacing();
+
+ if (GUI::TreeNode("MASKING_TEX"))
+ {
+ m_pGameInstance->Asset_Description(ENUM_CLASS(LEVEL::EFFECT), "MASKING_TEXTURE", (CComponent**)&m_pMasking_TextureCom, nullptr, this);
+ GUI::TreePop();
+ }
GUI::Separator(); GUI::Spacing();
GUI::TreePop();
@@ -282,8 +314,11 @@ void CEditEffect::Describe_Entity()
{
if (GUI::TreeNode("DISSOLVE"))
{
- m_pGameInstance->Asset_Description(ENUM_CLASS(LEVEL::EFFECT), "DISSOLVE_TEXTURE", (CComponent**)&m_pDissolve_TextureCom, nullptr, this);
-
+ if (GUI::TreeNode("DISSOLV_TEX"))
+ {
+ m_pGameInstance->Asset_Description(ENUM_CLASS(LEVEL::EFFECT), "DISSOLVE_TEXTURE", (CComponent**)&m_pDissolve_TextureCom, nullptr, this);
+ GUI::TreePop();
+ }
GUI::Separator(); GUI::Spacing();
GUI::TreePop();
@@ -295,11 +330,40 @@ void CEditEffect::Describe_Entity()
if (GUI::TreeNode("NOISE"))
{
ImGui::PushItemWidth(80);
+
GUI::DragFloat("NoiseDistortionIntensity", &m_fNoiseDistortionIntensity, 0.005f, 0.f, 1.f);
+
+ GUI::Spacing();
+
+ GUI::DragFloat2("DiffuseNoiseUVGainAmount", (_float*)&m_vDiffuseNoiseUVGainAmount, 0.01f);
+
+ _int iDiffuseNoiseMoveLerpOption = (_int)m_iDiffuseNoiseMoveLerpOption;
+
+ if (ImGui::Combo("Lerp DiffuseNoiseMove Option", &iDiffuseNoiseMoveLerpOption, pLerp, 9))
+ {
+ m_iDiffuseNoiseMoveLerpOption = iDiffuseNoiseMoveLerpOption;
+ }
+
+ GUI::Spacing();
+
+ GUI::DragFloat2("MaskNoiseUVGainAmount", (_float*)&m_vMaskNoiseUVGainAmount, 0.01f);
+
+ _int iMaskNoiseMoveLerpOption = (_int)m_iMaskNoiseMoveLerpOption;
+
+ if (ImGui::Combo("Lerp MaskNoiseMove Option", &iMaskNoiseMoveLerpOption, pLerp, 9))
+ {
+ m_iMaskNoiseMoveLerpOption = iMaskNoiseMoveLerpOption;
+ }
+
+ GUI::Spacing();
+
ImGui::PopItemWidth();
-
- m_pGameInstance->Asset_Description(ENUM_CLASS(LEVEL::EFFECT), "NOISE_TEXTURE", (CComponent**)&m_pNoise_TextureCom, nullptr, this);
+ if (GUI::TreeNode("NOISE_TEX"))
+ {
+ m_pGameInstance->Asset_Description(ENUM_CLASS(LEVEL::EFFECT), "NOISE_TEXTURE", (CComponent**)&m_pNoise_TextureCom, nullptr, this);
+ GUI::TreePop();
+ }
GUI::Separator(); GUI::Spacing();
diff --git a/Jusin154_Team3D/Editor/Private/EffectObject.cpp b/Jusin154_Team3D/Editor/Private/EffectObject.cpp
index aa63cf92b..de7a5df24 100644
--- a/Jusin154_Team3D/Editor/Private/EffectObject.cpp
+++ b/Jusin154_Team3D/Editor/Private/EffectObject.cpp
@@ -3,12 +3,12 @@
#include "GameInstance.h"
CEffectObject::CEffectObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
- :CGameObject(pDevice, pContext)
+ :CPartObject(pDevice, pContext)
{
}
CEffectObject::CEffectObject(const CEffectObject& rhs)
- :CGameObject(rhs)
+ :CPartObject(rhs)
{
}
@@ -66,6 +66,12 @@ HRESULT CEffectObject::Render_Blur()
return E_FAIL;
}
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iBlurWeight", &m_iBlurWeight, sizeof(_int)))) {
+ return E_FAIL;
+ }
+
+
+
for (_uint i = 0; i < m_pInstance_ModelCom->Get_NumMeshes(); i++)
{
@@ -174,6 +180,26 @@ HRESULT CEffectObject::Bind_ShaderResources()
return E_FAIL;
}
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iMaskMoveLerpOption", &m_iMaskMoveLerpOption, sizeof(_int)))) {
+ return E_FAIL;
+ }
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iDiffuseMoveLerpOption", &m_iDiffuseMoveLerpOption, sizeof(_int)))) {
+ return E_FAIL;
+ }
+
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iMaskNoiseMoveLerpOption", &m_iMaskNoiseMoveLerpOption, sizeof(_int)))) {
+ return E_FAIL;
+ }
+
+
+ if (FAILED(m_pShaderCom->Bind_RawValue("g_iDiffuseNoiseMoveLerpOption", &m_iDiffuseNoiseMoveLerpOption, sizeof(_int)))) {
+ return E_FAIL;
+ }
+
+
+
if (m_pDiffuse_TextureCom != nullptr)
{
diff --git a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp
index 67738eb3c..422a6134d 100644
--- a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp
+++ b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp
@@ -8,12 +8,12 @@
#include
CEffect_Editor::CEffect_Editor(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
- : CEffectObject{ pDevice, pContext }
+ : CContainerObject{ pDevice, pContext }
{
}
CEffect_Editor::CEffect_Editor(const CEffect_Editor& rhs)
- : CEffectObject(rhs)
+ : CContainerObject(rhs)
, m_MatFiles(rhs.m_MatFiles)
{
@@ -23,8 +23,8 @@ HRESULT CEffect_Editor::Initialize_Prototype()
{
- ReadMaterials("../Bin/Resources/VFX/ParticleMaterials/Base_Mat");
- ReadMaterials("../Bin/Resources/VFX/ParticleMaterials/Mat_Instance");
+ ReadMaterials("../Bin/Resources/VFX/Particles/Magic/Protego");
+
for (auto iter : m_MatFiles)
{
@@ -38,6 +38,7 @@ HRESULT CEffect_Editor::Initialize_Prototype()
}
}
+
return S_OK;
}
@@ -60,17 +61,19 @@ HRESULT CEffect_Editor::Initialize(void* pArg)
void CEffect_Editor::Priority_Update(_float fTimeDelta)
{
-
+ __super::Priority_Update(fTimeDelta);
}
void CEffect_Editor::Update(_float fTimeDelta)
{
Describe_Entity();
+ __super::Update(fTimeDelta);
+
}
void CEffect_Editor::Late_Update(_float fTimeDelta)
{
-
+ __super::Late_Update(fTimeDelta);
}
HRESULT CEffect_Editor::Ready_Components(void* pArg)
@@ -84,9 +87,20 @@ HRESULT CEffect_Editor::Ready_Components(void* pArg)
HRESULT CEffect_Editor::Ready_Child()
{
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::EFFECT), NEXT_LEVEL, LAYER_EFFECT, nullptr, this, reinterpret_cast(&m_pEditEffect))))
+
+
+ CPartObject::PARTOBJECT_DESC PartsDesc{};
+
+ PartsDesc.pParentTransform = m_pTransformCom;
+
+ if (FAILED(Add_PartObject("EffectObject" + to_string(m_iNumPart++), ENUM_CLASS(LEVEL::EFFECT), &m_pEditEffect, &PartsDesc)))
return E_FAIL;
+ m_strCurrentEffectName = "EffectObject0";
+ SAFE_RELEASE(m_pEditEffect);
+
+
+
return S_OK;
}
@@ -310,17 +324,136 @@ CGameObject* CEffect_Editor::Clone(void* pArg, CGameObject* pOwner)
void CEffect_Editor::Free()
{
__super::Free();
+
+ SAFE_RELEASE(m_pEditEffect);
}
void CEffect_Editor::Describe_Entity()
{
ImGui::Begin("Effect Editor");
+ GUI::TextColored(ImVec4(1.f, 0.f, 1.f, 1.f), m_strCurrentEffectName.c_str());
if (m_pEditEffect != nullptr)
m_pEditEffect->Describe_Entity();
ImGui::End();
+ ImGui::Begin("Reference Material");
+ if (m_pEditEffect != nullptr)
+ m_pEditEffect->Reference_Mat_For_EditEffect();
+
+ ImGui::End();
+
+ ImGui::Begin("Effect Hierarchy");
+
+#pragma region PopUp
+
+ if (ImGui::IsItemClicked(ImGuiMouseButton_Right))
+ ImGui::OpenPopup("Effect Hierarchy");
+
+
+ if (ImGui::BeginPopup("Effect Hierarchy"))
+ {
+ if (ImGui::MenuItem("Create Effect"))
+ {
+
+ CPartObject::PARTOBJECT_DESC PartsDesc{};
+
+ PartsDesc.pParentTransform = m_pTransformCom;
+
+ if (FAILED(Add_PartObject("EffectObject" + to_string(m_iNumPart++), ENUM_CLASS(LEVEL::EFFECT), nullptr, &PartsDesc)))
+ return;
+
+
+ }
+
+ ImGui::EndPopup();
+ }
+#pragma endregion
+
+
+ _int iIndex = {};
+
+ for (auto& pPartObject : m_PartObjects)
+ {
+ _string strName = "EffectObject" + to_string(iIndex);
+
+ if (GUI::TreeNode(strName.c_str()))
+ {
+
+#pragma region PopUp
+
+ if (GUI::IsItemClicked(ImGuiMouseButton_Right))
+ GUI::OpenPopup(strName.c_str());
+
+
+ if (GUI::BeginPopup(strName.c_str()))
+ {
+
+ if (ImGui::MenuItem("Delete Effect"))
+ {
+ auto iter = m_PartObjects.begin();
+ advance(iter, iIndex); // ÀÌÅÍ·¹ÀÌÅ͸¦ Áõ°¡½ÃŲ´Ù
+
+ SAFE_RELEASE(pPartObject.second);
+ m_PartObjects.erase(iter);
+
+ GUI::EndPopup();
+ GUI::TreePop();
+ break;
+ }
+
+
+ GUI::EndPopup();
+ }
+
+#pragma endregion
+
+ if (GUI::IsItemClicked()) // ¼±ÅÃâ¿¡ ¶ç¿ì±â
+ {
+ CEditEffect* pSelectedEffectObject = dynamic_cast(pPartObject.second);
+
+ if (pSelectedEffectObject == nullptr)
+ {
+ GUI::TreePop();
+ continue;
+
+ }
+
+
+ if (m_pEditEffect == pSelectedEffectObject)
+ {
+ GUI::TreePop();
+ continue;
+
+ }
+
+
+
+ Safe_Release(m_pEditEffect);
+
+ m_pEditEffect = pSelectedEffectObject;
+
+ Safe_AddRef(pSelectedEffectObject);
+
+ m_strCurrentEffectName = strName;
+
+ }
+
+ GUI::TreePop();
+ }
+
+ iIndex++;
+ }
+
+
+
+ ImGui::End();
+}
+
+HRESULT CEffect_Editor::Bind_ShaderResources()
+{
+ return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp
index d3a279216..bf8300d89 100644
--- a/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp
+++ b/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp
@@ -11,6 +11,7 @@
#include "Layer.h"
#include "GameObject.h"
#include "DummyObject.h"
+#include "DummySkyBox.h"
CLevel_ObjectViewer::CLevel_ObjectViewer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
@@ -46,7 +47,9 @@ void CLevel_ObjectViewer::Update(_float fTimeDelta)
Show_AnimList();
- Object_Setting();
+ Dummy_Object_Setting();
+
+ Parts_Object_Setting();
}
HRESULT CLevel_ObjectViewer::Render()
@@ -76,19 +79,20 @@ void CLevel_ObjectViewer::Add_Parts()
{
if (GUI::BeginTabBar("##MaleTabBar"))
{
- if (GUI::BeginTabItem("Head"))
+ if (GUI::BeginTabItem("Body"))
{
- Category_PartsModelList("Human/Head/Male", "Head");
+ Category_PartsModelList("Human/Body/Male", "Body");
GUI::EndTabItem();
}
+
_bool bDisabled = {};
if (m_HumanRoot)
bDisabled = (m_HumanRoot->Get_MainModel());
if (!bDisabled) GUI::BeginDisabled();
- if (GUI::BeginTabItem("Body"))
+ if (GUI::BeginTabItem("Head"))
{
- Category_PartsModelList("Human/Body/Male", "Body");
+ Category_PartsModelList("Human/Head/Male", "Head");
GUI::EndTabItem();
}
@@ -97,6 +101,9 @@ void CLevel_ObjectViewer::Add_Parts()
{
Category_PartsModelList("Human/Hair/Male", "Hair");
+ if (m_HumanRoot)
+ m_HumanRoot->Get_ModelParts(ENUM_CLASS(CRootModelPart::PARTSTYPE::HAIR))->Describe_Entity();
+
GUI::EndTabItem();
}
if (!bDisabled) GUI::EndDisabled();
@@ -109,19 +116,20 @@ void CLevel_ObjectViewer::Add_Parts()
{
if (GUI::BeginTabBar("##FeMaleTabBar"))
{
- if (GUI::BeginTabItem("Head"))
+ if (GUI::BeginTabItem("Body"))
{
- Category_PartsModelList("Human/Head/FeMale", "Head");
+ Category_PartsModelList("Human/Body/FeMale", "Body");
GUI::EndTabItem();
}
+
_bool bDisabled = {};
if (m_HumanRoot)
bDisabled = (m_HumanRoot->Get_MainModel());
if (!bDisabled) GUI::BeginDisabled();
- if (GUI::BeginTabItem("Body"))
+ if (GUI::BeginTabItem("Head"))
{
- Category_PartsModelList("Human/Body/FeMale", "Body");
+ Category_PartsModelList("Human/Head/FeMale", "Head");
GUI::EndTabItem();
}
@@ -130,6 +138,9 @@ void CLevel_ObjectViewer::Add_Parts()
{
Category_PartsModelList("Human/Hair/FeMale", "Hair");
+ if (m_HumanRoot)
+ m_HumanRoot->Get_ModelParts(ENUM_CLASS(CRootModelPart::PARTSTYPE::HAIR))->Describe_Entity();
+
GUI::EndTabItem();
}
if (!bDisabled) GUI::EndDisabled();
@@ -149,6 +160,8 @@ void CLevel_ObjectViewer::Show_ModelFilePath()
Category_ModelList("Monster");
Category_ModelList("Human");
+
+ Category_ModelList("Object");
}
GUI::EndTabBar();
GUI::End();
@@ -214,8 +227,6 @@ void CLevel_ObjectViewer::Category_PartsModelList(const _char* Category, const _
{
if (GUI::Button(szCategory))
{
- Save_LayerName(Layer);
-
CGameObject* pTempObject = { nullptr };
CDummyObject::PARTS_OBJECT_DESC Desc = {};
@@ -225,10 +236,10 @@ void CLevel_ObjectViewer::Category_PartsModelList(const _char* Category, const _
m_HumanRoot->Set_ModelName(szCategory);
_uint iIndex = 0;
- if (strstr(szCategory,"Head"))
- iIndex = ENUM_CLASS(CRootModelPart::PARTSTYPE::HEAD);
- else if (strstr(szCategory,"Body"))
+ if (strstr(szCategory,"Body"))
iIndex = ENUM_CLASS(CRootModelPart::PARTSTYPE::BODY);
+ else if (strstr(szCategory,"Head"))
+ iIndex = ENUM_CLASS(CRootModelPart::PARTSTYPE::HEAD);
else if (strstr(szCategory,"Hair"))
iIndex = ENUM_CLASS(CRootModelPart::PARTSTYPE::HAIR);
@@ -250,6 +261,7 @@ void CLevel_ObjectViewer::Show_AnimList()
if (GUI::Button(pModel->Get_AnimList(i)))
{
pModel->Set_AnimationIndex(i);
+ pModel->Set_CurrentTrackPosition(0.f);
}
}
}
@@ -281,7 +293,7 @@ void CLevel_ObjectViewer::Show_ObjectList()
}
}
-void CLevel_ObjectViewer::Object_Setting()
+void CLevel_ObjectViewer::Dummy_Object_Setting()
{
GUI::Begin("Object_Info");
if (!m_Objects.empty())
@@ -308,15 +320,20 @@ void CLevel_ObjectViewer::Object_Setting()
}
}
GUI::End();
+}
+void CLevel_ObjectViewer::Parts_Object_Setting()
+{
GUI::Begin("PartsObject_Info");
if (m_HumanRoot)
{
CModel* pModel = m_HumanRoot->Get_MainModel();
if (pModel)
{
- _float AnimTrack = pModel->Get_CurrentTrackPosition();
- GUI::DragFloat("AnimTrack", &AnimTrack);
+ GUI::Button(pModel->Get_AnimList(pModel->Get_AnimIndex()));
+
+ _float KeyFrame = pModel->Get_CurrentTrackPosition();
+ GUI::DragFloat("KeyFrame", &KeyFrame);
_float AnimSpeed = pModel->Get_AnimSpeed();
GUI::DragFloat("AnimSpeed", &AnimSpeed, 0.1f);
@@ -328,36 +345,64 @@ void CLevel_ObjectViewer::Object_Setting()
pModel->Set_PlayAnim(bPlayAnim);
}
- if (GUI::Button("Add Event"))
+ if (GUI::Button("Load KeyFrame"))
{
- m_fAnimFrame = m_HumanRoot->Get_MainModel()->Get_CurrentTrackPosition();
+ Load_KeyFrame();
}
- GUI::DragFloat("Anim Frame", &m_fAnimFrame);
- GUI::SameLine();
- if(GUI::Button("Event"))
- {
+ static _char EventName[64] = {};
+ GUI::InputText("EventName", EventName, sizeof(EventName));
+ GUI::SameLine();
+
+ if (GUI::Button("Save KeyFrame"))
+ {
+ if (m_HumanRoot && m_HumanRoot->Get_MainModel())
+ {
+ _float fKeyFrame = m_HumanRoot->Get_MainModel()->Get_CurrentTrackPosition();
+ m_KeyFrame.push_back(fKeyFrame);
+ m_Events.emplace_back(EventName);
+
+ FILE* fp = nullptr;
+ fopen_s(&fp, "../Bin/Resources/Models/KeyFrame.bin", "wb");
+ if (!fp) return;
+
+ _uint KeyFrameSize = (_uint)m_KeyFrame.size();
+
+ fwrite(&KeyFrameSize, sizeof(_uint), 1, fp);
+
+ for (size_t i = 0; i < m_KeyFrame.size(); i++)
+ {
+ _uint EventSize = (_uint)m_Events[i].size();
+ fwrite(&m_KeyFrame[i], sizeof(_float), 1, fp);
+ fwrite(&EventSize, sizeof(_uint), 1, fp);
+ fwrite(&m_Events[i], sizeof(_string), 1, fp);
+ }
+
+
+ fclose(fp);
+
+ EventName[0] = '\0';
+ }
+ }
+
+ for (_uint i = 0; i < m_KeyFrame.size(); ++i)
+ {
ImDrawList* draw = ImGui::GetForegroundDrawList();
ImVec2 center = ImGui::GetMainViewport()->GetCenter();
float scale = 50.f;
- draw->AddLine(center, ImVec2(center.x + scale, center.y), IM_COL32(255, 0, 0, 255), 2.0f);
- draw->AddLine(center, ImVec2(center.x, center.y - scale), IM_COL32(0, 255, 0, 255), 2.0f);
- draw->AddLine(center, ImVec2(center.x + scale * 0.5f, center.y + scale * 0.5f), IM_COL32(0, 0, 255, 255), 2.0f);
+ GUI::DragFloat(m_Events[i].c_str(), &m_KeyFrame[i]);
}
+
if (GUI::Button("Delete"))
{
m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_Root"))->Clear_Layer();
m_HumanRoot = nullptr;
+ m_KeyFrame.clear();
}
}
-
- if (m_HumanRoot)
-
- m_HumanRoot->Get_ModelParts(ENUM_CLASS(CRootModelPart::PARTSTYPE::HAIR))->Describe_Entity();
-
}
GUI::End();
@@ -386,6 +431,30 @@ _wchar* CLevel_ObjectViewer::Save_ModelName(const _char* Category)
return m_wszName;
}
+void CLevel_ObjectViewer::Load_KeyFrame()
+{
+ FILE* fp = nullptr;
+ fopen_s(&fp, "../Bin/Resources/Models/KeyFrame.bin", "rb");
+ if (!fp) return;
+
+ _uint KeyFameSize = {};
+ _uint EventLen = {};
+
+ fread(&KeyFameSize, sizeof(_uint), 1, fp);
+
+ for (size_t i = 0; i < KeyFameSize; i++)
+ {
+ fread(&m_fKeyFrame, sizeof(_float), 1, fp);
+ fread(&EventLen, sizeof(_uint), 1, fp);
+ fread(&m_strEvent, sizeof(_string), 1, fp);
+
+ m_Events.push_back(m_strEvent);
+ m_KeyFrame.push_back(m_fKeyFrame);
+ }
+
+ fclose(fp);
+}
+
HRESULT CLevel_ObjectViewer::Ready_Layer_Camera(const _wstring& strLayerTag)
{
CDebugCamera::CAMERA_DEBUG_DESC CameraDesc{};
@@ -428,7 +497,7 @@ HRESULT CLevel_ObjectViewer::Ready_Layer_UI(const _wstring& strLayerTag)
HRESULT CLevel_ObjectViewer::Ready_Layer_Dummy(const _wstring& strLayerTag)
{
- if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CUBE)))
+ if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CUBE)))
return E_FAIL;
return S_OK;
diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp
index 161c8d62a..036e8ed73 100644
--- a/Jusin154_Team3D/Editor/Private/Loader.cpp
+++ b/Jusin154_Team3D/Editor/Private/Loader.cpp
@@ -12,7 +12,6 @@
#include "Head.h"
#include "Body.h"
#include "Hair.h"
-#include "Dummy_Goblin.h"
#include "DummySkyBox.h"
#include "DummyObject.h"
#include
@@ -50,6 +49,8 @@
#include "MapObject_Static.h"
#include "MapObject_LOD.h"
#include "MapObject_Manager.h"
+#include "MapElement_Interactable.h"
+#include "MapElement_Static.h"
#pragma endregion
@@ -436,7 +437,7 @@ HRESULT CLoader::Loading_For_Effect()
Asset_FileLoad("../Bin/Resources/Models/Effect/ParticleMesh", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) {
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::EFFECT), wstrFileName,
- CInstance_Model::Create(m_pDevice, m_pContext, pFilePath, MODEL::NONANIM, XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity(), 0))))
+ CInstance_Model::Create(m_pDevice, m_pContext, pFilePath, MODEL::NONANIM, XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixIdentity(), 0))))
return E_FAIL;
return S_OK;
@@ -713,16 +714,9 @@ HRESULT CLoader::Loading_For_ObjectViewer()
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_F_Hair1_Model"),
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Hair/FeMale/F_Hair1/F_Hair1.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
return E_FAIL;
-
#pragma endregion
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinHead_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin/GoblinHead.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
- return E_FAIL;
-
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinBody_Model"),
- CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin/GoblinBody.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
- return E_FAIL;
+#pragma region MONSTER
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_TombProtector_Model"),
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/TombProtector/TombProtector.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
@@ -732,6 +726,21 @@ HRESULT CLoader::Loading_For_ObjectViewer()
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Troll/Troll.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
return E_FAIL;
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Dragon_Model"),
+ CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Dragon/Dragon.bin", XMMatrixScaling(0.0005f, 0.0005f, 0.0005f) * XMMatrixIdentity()))))
+ return E_FAIL;
+
+#pragma endregion
+
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Broom_Model"),
+ CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Broom/Broom.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
+ return E_FAIL;
+
+ /* For.Prototype_Component_SkyboxModel */
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_SkyboxModel"),
+ CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/SkyBox/SkyBox.fbx", XMMatrixIdentity()))))
+ return E_FAIL;
+
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Desc_Box"),
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Box/Box.bin", XMMatrixIdentity()))))
@@ -767,8 +776,8 @@ HRESULT CLoader::Loading_For_ObjectViewer()
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummyObject::Create(m_pDevice, m_pContext))))
return E_FAIL;
- /* For.Prototype_GameObject_Dummy_Cube */
- if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummy_Cube::Create(m_pDevice, m_pContext))))
+ /* For.Prototype_GameObject_DummySkyBox */
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDummySkyBox::Create(m_pDevice, m_pContext))))
return E_FAIL;
m_strMessage = TEXT("Loading Success!");
@@ -875,6 +884,14 @@ HRESULT CLoader::Loading_For_MapViewer()
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMapObject_LOD::Create(m_pDevice, m_pContext))))
return E_FAIL;
+ /* For.Prototype_GameObject_MapElement_Interactable */
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMapElement_Interactable::Create(m_pDevice, m_pContext))))
+ return E_FAIL;
+
+ /* For.Prototype_GameObject_MapElement_Static */
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMapElement_Static::Create(m_pDevice, m_pContext))))
+ return E_FAIL;
+
/* For.Prototype_GameObject_Terrain */
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTerrain::Create(m_pDevice, m_pContext))))
return E_FAIL;
diff --git a/Jusin154_Team3D/Editor/Private/MapContainer.cpp b/Jusin154_Team3D/Editor/Private/MapContainer.cpp
index 484d616cb..b4520a259 100644
--- a/Jusin154_Team3D/Editor/Private/MapContainer.cpp
+++ b/Jusin154_Team3D/Editor/Private/MapContainer.cpp
@@ -70,6 +70,7 @@ HRESULT CMapContainer::Save_PartObjects(tinyxml2::XMLDocument& Doc, tinyxml2::XM
//
tinyxml2::XMLElement* PartObject = Doc.NewElement("PartObject");
PartObject->SetAttribute("Lod_Level", pMapObject->Get_LodLevel());
+ PartObject->SetAttribute("Key_Index", pMapObject->Get_iKeyIndex());
Container->InsertEndChild(PartObject);
for (_uint i = 0; i < pMapObject->Get_LodLevel() + 1; ++i)
@@ -110,7 +111,6 @@ HRESULT CMapContainer::Save_PartObjects(tinyxml2::XMLDocument& Doc, tinyxml2::XM
RotationElem->SetAttribute("y", vRotation.y);
RotationElem->SetAttribute("z", vRotation.z);
PartObject->InsertEndChild(RotationElem);
-
}
return S_OK;
diff --git a/Jusin154_Team3D/Editor/Private/MapElement.cpp b/Jusin154_Team3D/Editor/Private/MapElement.cpp
index 499097f8a..1ed1d51e1 100644
--- a/Jusin154_Team3D/Editor/Private/MapElement.cpp
+++ b/Jusin154_Team3D/Editor/Private/MapElement.cpp
@@ -13,6 +13,14 @@ CMapElement::CMapElement(const CMapElement& rhs)
{
}
+const _wstring& CMapElement::Get_PrototypeTag(_uint iIndex)
+{
+ if (m_iMaxLodLevel < iIndex)
+ return m_ModelPrototypeTags[0];
+
+ return m_ModelPrototypeTags[iIndex];
+}
+
void CMapElement::Priority_Update(_float fTimeDelta)
{
}
diff --git a/Jusin154_Team3D/Editor/Private/MapElement_Interactable.cpp b/Jusin154_Team3D/Editor/Private/MapElement_Interactable.cpp
index 1b44bfded..bd8a892ab 100644
--- a/Jusin154_Team3D/Editor/Private/MapElement_Interactable.cpp
+++ b/Jusin154_Team3D/Editor/Private/MapElement_Interactable.cpp
@@ -2,6 +2,9 @@
#include "MapElement_Interactable.h"
#include "GameInstance.h"
+#include "Terrain.h"
+#include "Layer.h"
+#include "VIBuffer_Terrain.h"
CMapElement_Interactable::CMapElement_Interactable(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CMapElement{ pDevice, pContext }
@@ -20,12 +23,33 @@ HRESULT CMapElement_Interactable::Initialize_Prototype()
HRESULT CMapElement_Interactable::Initialize(void* pArg)
{
+ MAPOBJECT_LOD_DESC* pDesc = static_cast(pArg);
+
+ m_iMaxLodLevel = pDesc->iMaxLodLevel;
+
+ for (_uint i = 0; i < m_iMaxLodLevel + 1; i++)
+ {
+ m_ModelPrototypeTags.push_back(pDesc->ModelPrototypeTags[i]);
+ //m_ModelPathIndices.push_back((*pDesc->pModelPathIndices)[i]);
+ }
+
if (FAILED(__super::Initialize(pArg)))
return E_FAIL;
if (FAILED(Ready_Components(pArg)))
return E_FAIL;
+#ifdef _DEBUG
+ m_bSelected = false;
+ m_vPosition = pDesc->vPosition;
+ m_vScale = pDesc->vScale;
+ m_vRotation = pDesc->vRotation;
+
+ m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
+ m_pTransformCom->Set_Scale(m_vScale);
+ m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
+#endif // _DEBUG
+
return S_OK;
}
@@ -58,6 +82,9 @@ void CMapElement_Interactable::Late_Update(_float fTimeDelta)
HRESULT CMapElement_Interactable::Render()
{
+ if (FAILED(Bind_ShaderResources()))
+ return E_FAIL;
+
_uint iNumMeshes = m_pModelComs[m_iLodIndex]->Get_NumMeshes();
for (_uint i = 0; i < iNumMeshes; i++)
@@ -96,6 +123,23 @@ HRESULT CMapElement_Interactable::Ready_Components(void* pArg)
return E_FAIL;
}
+ for (_uint i = 0; i < m_iMaxLodLevel + 1; ++i)
+ {
+ CModel* pModel = { nullptr };
+
+ /* Com_Model */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_ModelPrototypeTags[i],
+ reinterpret_cast(&pModel))))
+ return E_FAIL;
+
+ m_pModelComs.push_back(pModel);
+ }
+
+ /* Com_Shader */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
+ reinterpret_cast(&m_pShaderCom))))
+ return E_FAIL;
+
return S_OK;
}
@@ -147,6 +191,10 @@ CGameObject* CMapElement_Interactable::Clone(void* pArg, CGameObject* pOwner)
void CMapElement_Interactable::Free()
{
__super::Free();
+
+ SAFE_RELEASE(m_pShaderCom);
+ for (auto& pModel : m_pModelComs)
+ SAFE_RELEASE(pModel);
}
void CMapElement_Interactable::Describe_Entity()
@@ -165,7 +213,7 @@ void CMapElement_Interactable::Describe_Entity()
GUI::InputFloat("Y##Position", &m_vPosition.y, 0.1f, 1.f);
GUI::InputFloat("Z##Position", &m_vPosition.z, 0.1f, 1.f);
- /*if (m_pGameInstance->Mouse_Down(DIM_LBUTTON) && m_pGameInstance->Key_Pressing(DIK_LSHIFT))
+ if (m_pGameInstance->Mouse_Down(DIM_LBUTTON) && m_pGameInstance->Key_Pressing(DIK_LSHIFT))
{
CTerrain* pTerrain = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Terrain"))->Get_Object();
if (nullptr != pTerrain)
@@ -173,7 +221,7 @@ void CMapElement_Interactable::Describe_Entity()
pTerrain->Get_Component()->Picking(pTerrain->Get_Component(), m_vPosition);
}
- }*/
+ }
GUI::Text("----- Rotation ----");
GUI::InputFloat("X##Rotation", &m_vRotation.x, 10.f, 45.f);
diff --git a/Jusin154_Team3D/Editor/Private/MapElement_Static.cpp b/Jusin154_Team3D/Editor/Private/MapElement_Static.cpp
index 26d7d3b37..256ccd3f3 100644
--- a/Jusin154_Team3D/Editor/Private/MapElement_Static.cpp
+++ b/Jusin154_Team3D/Editor/Private/MapElement_Static.cpp
@@ -3,6 +3,10 @@
#include "GameInstance.h"
+#include "Terrain.h"
+#include "Layer.h"
+#include "VIBuffer_Terrain.h"
+
CMapElement_Static::CMapElement_Static(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CMapElement{ pDevice, pContext }
{
@@ -20,12 +24,33 @@ HRESULT CMapElement_Static::Initialize_Prototype()
HRESULT CMapElement_Static::Initialize(void* pArg)
{
+ MAPOBJECT_LOD_DESC* pDesc = static_cast(pArg);
+
+ m_iMaxLodLevel = pDesc->iMaxLodLevel;
+
+ for (_uint i = 0; i < m_iMaxLodLevel + 1; i++)
+ {
+ m_ModelPrototypeTags.push_back(pDesc->ModelPrototypeTags[i]);
+ //m_ModelPathIndices.push_back((*pDesc->pModelPathIndices)[i]);
+ }
+
if (FAILED(__super::Initialize(pArg)))
return E_FAIL;
if (FAILED(Ready_Components(pArg)))
return E_FAIL;
+#ifdef _DEBUG
+ m_bSelected = false;
+ m_vPosition = pDesc->vPosition;
+ m_vScale = pDesc->vScale;
+ m_vRotation = pDesc->vRotation;
+
+ m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
+ m_pTransformCom->Set_Scale(m_vScale);
+ m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
+#endif // _DEBUG
+
return S_OK;
}
@@ -58,6 +83,9 @@ void CMapElement_Static::Late_Update(_float fTimeDelta)
HRESULT CMapElement_Static::Render()
{
+ if (FAILED(Bind_ShaderResources()))
+ return E_FAIL;
+
_uint iNumMeshes = m_pModelComs[m_iLodIndex]->Get_NumMeshes();
for (_uint i = 0; i < iNumMeshes; i++)
@@ -95,6 +123,23 @@ HRESULT CMapElement_Static::Ready_Components(void* pArg)
return E_FAIL;
}
+ for (_uint i = 0; i < m_iMaxLodLevel + 1; ++i)
+ {
+ CModel* pModel = { nullptr };
+
+ /* Com_Model */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_ModelPrototypeTags[i],
+ reinterpret_cast(&pModel))))
+ return E_FAIL;
+
+ m_pModelComs.push_back(pModel);
+ }
+
+ /* Com_Shader */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
+ reinterpret_cast(&m_pShaderCom))))
+ return E_FAIL;
+
return S_OK;
}
@@ -146,6 +191,10 @@ CGameObject* CMapElement_Static::Clone(void* pArg, CGameObject* pOwner)
void CMapElement_Static::Free()
{
__super::Free();
+
+ SAFE_RELEASE(m_pShaderCom);
+ for (auto& pModel : m_pModelComs)
+ SAFE_RELEASE(pModel);
}
void CMapElement_Static::Describe_Entity()
@@ -164,7 +213,7 @@ void CMapElement_Static::Describe_Entity()
GUI::InputFloat("Y##Position", &m_vPosition.y, 0.1f, 1.f);
GUI::InputFloat("Z##Position", &m_vPosition.z, 0.1f, 1.f);
- /*if (m_pGameInstance->Mouse_Down(DIM_LBUTTON) && m_pGameInstance->Key_Pressing(DIK_LSHIFT))
+ if (m_pGameInstance->Mouse_Down(DIM_LBUTTON) && m_pGameInstance->Key_Pressing(DIK_LSHIFT))
{
CTerrain* pTerrain = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Terrain"))->Get_Object();
if (nullptr != pTerrain)
@@ -172,7 +221,7 @@ void CMapElement_Static::Describe_Entity()
pTerrain->Get_Component()->Picking(pTerrain->Get_Component(), m_vPosition);
}
- }*/
+ }
GUI::Text("----- Rotation ----");
GUI::InputFloat("X##Rotation", &m_vRotation.x, 10.f, 45.f);
diff --git a/Jusin154_Team3D/Editor/Private/MapObject.cpp b/Jusin154_Team3D/Editor/Private/MapObject.cpp
index 183b29636..2bcb7908e 100644
--- a/Jusin154_Team3D/Editor/Private/MapObject.cpp
+++ b/Jusin154_Team3D/Editor/Private/MapObject.cpp
@@ -57,6 +57,11 @@ _wstring CMapObject::Get_PrototypeTag(_uint iLodIndex)
return _wstring();
}
+_uint CMapObject::Get_LodLevel()
+{
+ return m_iMaxLodLevel;
+}
+
HRESULT CMapObject::Initialize_Prototype()
{
return S_OK;
diff --git a/Jusin154_Team3D/Editor/Private/MapObject_LOD.cpp b/Jusin154_Team3D/Editor/Private/MapObject_LOD.cpp
index b3906ca55..0f9956dc8 100644
--- a/Jusin154_Team3D/Editor/Private/MapObject_LOD.cpp
+++ b/Jusin154_Team3D/Editor/Private/MapObject_LOD.cpp
@@ -32,9 +32,7 @@ HRESULT CMapObject_LOD::Initialize(void* pArg)
for (_uint i = 0; i < m_iMaxLodLevel + 1; i++)
{
m_ModelPrototypeTags.push_back(pDesc->ModelPrototypeTags[i]);
- }
- for (_uint i = 0; i < pDesc->ModelPrototypeTags.size(); ++i) {
- m_ModelPathIndices.push_back((*pDesc->pModelPathIndices)[i]);
+ //m_ModelPathIndices.push_back((*pDesc->pModelPathIndices)[i]);
}
if (FAILED(__super::Initialize(pArg)))
diff --git a/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp b/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp
index 378b512ea..cdf549911 100644
--- a/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp
+++ b/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp
@@ -8,6 +8,8 @@
#include "MapObject_LOD.h"
#include "MapObject_Static.h"
#include "BuildingContainer.h"
+#include "MapElement_Static.h"
+#include "MapElement_Interactable.h"
CMapObject_Manager::CMapObject_Manager(ID3D11Device * pDevice, ID3D11DeviceContext * pContext)
@@ -20,6 +22,7 @@ CMapObject_Manager::CMapObject_Manager(const CMapObject_Manager& rhs)
, m_ModelPrototypeTags{ rhs.m_ModelPrototypeTags }
, m_LODModelPrototypeTags{ rhs.m_LODModelPrototypeTags }
, m_ModelPrototypePaths{ rhs.m_ModelPrototypePaths }
+ , m_PartObjectKeyCount{ rhs.m_PartObjectKeyCount }
{
}
@@ -32,6 +35,10 @@ HRESULT CMapObject_Manager::Initialize_Prototype(vector<_wstring>& ModelPrototyp
{
m_LODModelPrototypeTags.push_back(ModelPrototypeTags[i]);
}
+ else
+ {
+ m_PartObjectKeyCount.emplace(ModelPrototypeTags[i], 0);
+ }
m_ModelPrototypeTags.push_back(ModelPrototypeTags[i]);
m_ModelPrototypePaths.push_back(ModelPrototypePaths[i]);
@@ -65,20 +72,34 @@ void CMapObject_Manager::Priority_Update(_float fTimeDelta)
void CMapObject_Manager::Update(_float fTimeDelta)
{
GUI::Begin("File");
+ const char* ModeNames[3] =
+ {
+ "CONTAINER",
+ "ELEMENT_STATIC",
+ "ELEMENT_INTERACT"
+ };
+ GUI::Combo("MODE", (_int*)(&m_eType), ModeNames, IM_ARRAYSIZE(ModeNames));
+
+ GUI::InputText("MapFileName", m_szSaveFileName, MAX_PATH);
if (GUI::Button("Save_Map"))
{
- Save_MapData("Test");
+ Save_MapData(m_szSaveFileName);
}
if (GUI::Button("Load_Map"))
{
- Load_MapData("Test");
+ Load_MapData(m_szSaveFileName);
}
+
GUI::InputText("Containter Name", m_szSaveContainerName, MAX_PATH);
- if (GUI::Button("Save_Container"))
+
+ if (ADD_TYPE::CONTAINER == m_eType)
{
- Save_ContainerData("ContainerTest", m_szSaveContainerName);
+ if (GUI::Button("Save_Container"))
+ {
+ Save_ContainerData("ContainerTest", m_szSaveContainerName);
+ }
}
if (GUI::Button("Load_Container"))
{
@@ -90,9 +111,15 @@ void CMapObject_Manager::Update(_float fTimeDelta)
Update_ObjectList();
- Update_Edit();
+ if (ADD_TYPE::CONTAINER != m_eType)
+ {
+ Update_Edit();
+ }
- Update_ContainerObject();
+ if (ADD_TYPE::CONTAINER == m_eType)
+ {
+ Update_ContainerObject();
+ }
for (auto* pObject : m_MapObjects)
{
@@ -148,22 +175,13 @@ HRESULT CMapObject_Manager::Save_MapData(const _char* pFileName)
tinyxml2::XMLError loadResult = doc.LoadFile(strPath.c_str());
- tinyxml2::XMLElement* land = {};
- tinyxml2::XMLElement* container = {};
+ doc.Clear();
+ doc.InsertFirstChild(doc.NewDeclaration());
- if (loadResult != tinyxml2::XML_SUCCESS)
- {
- doc.InsertFirstChild(doc.NewDeclaration());
-
- land = doc.NewElement("Land");
- doc.InsertEndChild(land);
-
- }
- else
- {
- land = doc.FirstChildElement("Land");
- }
+ tinyxml2::XMLElement* land = doc.NewElement("Land");
+ doc.InsertEndChild(land);
+#pragma region SAVE_BUILDING
CLayer* pLayer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Building"));
if (nullptr == pLayer)
@@ -171,7 +189,6 @@ HRESULT CMapObject_Manager::Save_MapData(const _char* pFileName)
const list* pList = pLayer->Get_Objects();
-
for (auto pGamObject : *pList)
{
CBuildingContainer* pContainerObject = dynamic_cast(pGamObject);
@@ -196,7 +213,6 @@ HRESULT CMapObject_Manager::Save_MapData(const _char* pFileName)
vRotation.y = XMConvertToDegrees(vRotation.y);
vRotation.z = XMConvertToDegrees(vRotation.z);
-
#pragma region CONTAINER_TRANSFORM
tinyxml2::XMLElement* Position = doc.NewElement("Position");
Position->SetAttribute("x", vPosition.x);
@@ -217,16 +233,148 @@ HRESULT CMapObject_Manager::Save_MapData(const _char* pFileName)
container->InsertEndChild(Rotation);
#pragma endregion
-
-
#pragma region SAVE_PARTOBJECT
if (FAILED(pContainerObject->Save_PartObjects(doc, container)))
return E_FAIL;
+#pragma endregion
}
#pragma endregion
- // ÀúÀå
+#pragma region ELEMENT_STATIC
+ pLayer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Element_Static"));
+
+ if (nullptr != pLayer)
+ {
+ const list* pList = pLayer->Get_Objects();
+
+ for (auto pGamObject : *pList)
+ {
+ CMapElement* pElement = dynamic_cast(pGamObject);
+
+ if (nullptr == pElement)
+ return E_FAIL;
+
+ _uint iLodLevel = pElement->Get_LodLevel();
+
+ tinyxml2::XMLElement* object = doc.NewElement("Object");
+ object->SetAttribute("Type", ENUM_CLASS(MAPOBJECT_TYPE::ELEMENT_STATIC));
+ object->SetAttribute("Lod_Level", iLodLevel);
+ land->InsertEndChild(object);
+
+#pragma region PROTOTYPETAG
+ for (_uint i = 0; i < iLodLevel + 1; ++i)
+ {
+ tinyxml2::XMLElement* prototype = doc.NewElement("PrototypeTag");
+ prototype->SetText(CMyTools::ToString(pElement->Get_PrototypeTag(i)).c_str());
+ object->InsertEndChild(prototype);
+ }
+#pragma endregion
+
+
+#pragma region TRANSFORM
+ _float3 vPosition = {};
+ XMStoreFloat3(&vPosition, pGamObject->Get_Component()->Get_State(STATE::POSITION));
+
+ _float3 vScale = pGamObject->Get_Component()->Get_Scale();
+
+ _float3 vRotation = {};
+ XMStoreFloat3(&vRotation, pGamObject->Get_Component()->Get_RollPitchYawVector());
+ vRotation.x = XMConvertToDegrees(vRotation.x);
+ vRotation.y = XMConvertToDegrees(vRotation.y);
+ vRotation.z = XMConvertToDegrees(vRotation.z);
+
+ tinyxml2::XMLElement* Position = doc.NewElement("Position");
+ Position->SetAttribute("x", vPosition.x);
+ Position->SetAttribute("y", vPosition.y);
+ Position->SetAttribute("z", vPosition.z);
+ object->InsertEndChild(Position);
+
+ tinyxml2::XMLElement* Scale = doc.NewElement("Scale");
+ Scale->SetAttribute("x", vScale.x);
+ Scale->SetAttribute("y", vScale.y);
+ Scale->SetAttribute("z", vScale.z);
+ object->InsertEndChild(Scale);
+
+ tinyxml2::XMLElement* Rotation = doc.NewElement("Rotation");
+ Rotation->SetAttribute("x", vRotation.x);
+ Rotation->SetAttribute("y", vRotation.y);
+ Rotation->SetAttribute("z", vRotation.z);
+ object->InsertEndChild(Rotation);
+#pragma endregion
+
+
+ }
+ }
+#pragma endregion
+
+#pragma region ELEMENT_INTERACTABEL
+ pLayer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Element_Interactable"));
+
+ if (nullptr != pLayer)
+ {
+ const list* pList = pLayer->Get_Objects();
+
+ for (auto pGamObject : *pList)
+ {
+ CMapElement* pElement = dynamic_cast(pGamObject);
+
+ if (nullptr == pElement)
+ return E_FAIL;
+
+ _uint iLodLevel = pElement->Get_LodLevel();
+
+ tinyxml2::XMLElement* object = doc.NewElement("Object");
+ object->SetAttribute("Type", ENUM_CLASS(MAPOBJECT_TYPE::ELEMENT_INTERACT));
+ object->SetAttribute("Lod_Level", iLodLevel);
+ land->InsertEndChild(object);
+
+#pragma region PROTOTYPETAG
+ for (_uint i = 0; i < iLodLevel + 1; ++i)
+ {
+ tinyxml2::XMLElement* prototype = doc.NewElement("PrototypeTag");
+ prototype->SetText(CMyTools::ToString(pElement->Get_PrototypeTag(i)).c_str());
+ object->InsertEndChild(prototype);
+ }
+#pragma endregion
+
+#pragma region TRANSFORM
+ _float3 vPosition = {};
+ XMStoreFloat3(&vPosition, pGamObject->Get_Component()->Get_State(STATE::POSITION));
+
+ _float3 vScale = pGamObject->Get_Component()->Get_Scale();
+
+ _float3 vRotation = {};
+ XMStoreFloat3(&vRotation, pGamObject->Get_Component()->Get_RollPitchYawVector());
+ vRotation.x = XMConvertToDegrees(vRotation.x);
+ vRotation.y = XMConvertToDegrees(vRotation.y);
+ vRotation.z = XMConvertToDegrees(vRotation.z);
+
+ tinyxml2::XMLElement* Position = doc.NewElement("Position");
+ Position->SetAttribute("x", vPosition.x);
+ Position->SetAttribute("y", vPosition.y);
+ Position->SetAttribute("z", vPosition.z);
+ object->InsertEndChild(Position);
+
+ tinyxml2::XMLElement* Scale = doc.NewElement("Scale");
+ Scale->SetAttribute("x", vScale.x);
+ Scale->SetAttribute("y", vScale.y);
+ Scale->SetAttribute("z", vScale.z);
+ object->InsertEndChild(Scale);
+
+ tinyxml2::XMLElement* Rotation = doc.NewElement("Rotation");
+ Rotation->SetAttribute("x", vRotation.x);
+ Rotation->SetAttribute("y", vRotation.y);
+ Rotation->SetAttribute("z", vRotation.z);
+ object->InsertEndChild(Rotation);
+#pragma endregion
+
+ }
+ }
+#pragma endregion
+
+
+ // ÀúÀå
if (doc.SaveFile(strPath.c_str()) != tinyxml2::XML_SUCCESS) {
MSG_BOX("Failed to Save File");
}
@@ -235,11 +383,6 @@ HRESULT CMapObject_Manager::Save_MapData(const _char* pFileName)
MSG_BOX("Succeed to Save File");
}
- return S_OK;
-
-
-
-
return S_OK;
}
@@ -300,12 +443,15 @@ HRESULT CMapObject_Manager::Save_ContainerData(const _char* pFileName, const _ch
{
//
tinyxml2::XMLElement* PartObject = doc.NewElement("PartObject");
- PartObject->SetAttribute("Lod_Level", pMapObject->Get_LodLevel());
+ _uint iLodLvel = pMapObject->Get_LodLevel();
+
+ PartObject->SetAttribute("Lod_Level", iLodLvel);
+ PartObject->SetAttribute("Key_Index", pMapObject->Get_iKeyIndex());
container->InsertEndChild(PartObject);
for (_uint i = 0; i < pMapObject->Get_LodLevel() + 1; ++i)
{
- // ÅØ½ºÆ®
+ // ÅØ½ºÆ®
tinyxml2::XMLElement* proto = doc.NewElement("PrototypeTag");
proto->SetText(CMyTools::ToString(pMapObject->Get_PrototypeTag(i)).c_str());
PartObject->InsertEndChild(proto);
@@ -352,7 +498,7 @@ HRESULT CMapObject_Manager::Save_ContainerData(const _char* pFileName, const _ch
m_pSelectObject = nullptr;
#pragma endregion
- // ÀúÀå
+ // ÀúÀå
if (doc.SaveFile(strPath.c_str()) != tinyxml2::XML_SUCCESS) {
MSG_BOX("Failed to Save File");
}
@@ -417,86 +563,96 @@ HRESULT CMapObject_Manager::Load_MapData(const _char* pFileName)
for (auto* PartObject = Container->FirstChildElement("PartObject"); PartObject; PartObject = PartObject->NextSiblingElement("PartObject"))
{
_uint iLodLevel = {};
+ _uint iKeyIndex = {};
PartObject->QueryUnsignedAttribute("Lod_Level", &iLodLevel);
-
-#pragma region MAPOBJECT_STATIC
- if (0 == iLodLevel) /* MapObject_Static */
- {
- MAPOBJECT_STATIC_DESC Desc = {};
- string strTag = {};
- auto* PrototypeTag = PartObject->FirstChildElement("PrototypeTag");
-
- strTag = PrototypeTag->GetText();
-
- Desc.strModelPrototypeTag = CMyTools::ToWstring(strTag);
-
- Desc.pParentTransform = pContainerObject->Get_Component();
- const string strKey = strTag;
-
- /* Position */
- tinyxml2::XMLElement* Position = PartObject->FirstChildElement("Position");
- Position->QueryFloatAttribute("x", &Desc.vPosition.x);
- Position->QueryFloatAttribute("y", &Desc.vPosition.y);
- Position->QueryFloatAttribute("z", &Desc.vPosition.z);
-
- /* Scale */
- tinyxml2::XMLElement* Scale = PartObject->FirstChildElement("Scale");
- Scale->QueryFloatAttribute("x", &Desc.vScale.x);
- Scale->QueryFloatAttribute("y", &Desc.vScale.y);
- Scale->QueryFloatAttribute("z", &Desc.vScale.z);
-
- /* Rotation */
- tinyxml2::XMLElement* Rotation = PartObject->FirstChildElement("Rotation");
- Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
- Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
- Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
-
- pContainerObject->Add_Part(strKey, g_iStaticLevel, nullptr, &Desc);
- }
-#pragma endregion
+ PartObject->QueryUnsignedAttribute("Key_Index", &iKeyIndex);
#pragma region MAPOBJECT_LOD
- else
+ MAPOBJECT_LOD_DESC Desc = {};
+ string strTag = {};
+ for (auto* PrototypeTag = PartObject->FirstChildElement("PrototypeTag"); PrototypeTag; PrototypeTag = PrototypeTag->NextSiblingElement("PrototypeTag"))
{
- MAPOBJECT_LOD_DESC Desc = {};
- string strTag = {};
- for (auto* PrototypeTag = PartObject->FirstChildElement("PrototypeTag"); PrototypeTag; PrototypeTag = PrototypeTag->NextSiblingElement("PrototypeTag"))
- {
- strTag = PrototypeTag->GetText();
+ strTag = PrototypeTag->GetText();
- Desc.ModelPrototypeTags.push_back(CMyTools::ToWstring(strTag));
- }
-
- Desc.pParentTransform = pContainerObject->Get_Component();
- const string strKey = strTag;
-
- /* Position */
- tinyxml2::XMLElement* Position = PartObject->FirstChildElement("Position");
- Position->QueryFloatAttribute("x", &Desc.vPosition.x);
- Position->QueryFloatAttribute("y", &Desc.vPosition.y);
- Position->QueryFloatAttribute("z", &Desc.vPosition.z);
-
- /* Scale */
- tinyxml2::XMLElement* Scale = PartObject->FirstChildElement("Scale");
- Scale->QueryFloatAttribute("x", &Desc.vScale.x);
- Scale->QueryFloatAttribute("y", &Desc.vScale.y);
- Scale->QueryFloatAttribute("z", &Desc.vScale.z);
-
- /* Rotation */
- tinyxml2::XMLElement* Rotation = PartObject->FirstChildElement("Rotation");
- Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
- Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
- Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
-
- pContainerObject->Add_Part(strKey, g_iStaticLevel, nullptr, &Desc);
+ Desc.ModelPrototypeTags.push_back(CMyTools::ToWstring(strTag));
}
+
+ Desc.iMaxLodLevel = iLodLevel;
+ Desc.pParentTransform = pContainerObject->Get_Component();
+ const string strKey = CMyTools::ToString(Desc.ModelPrototypeTags.front()) + to_string(iKeyIndex);
+
+ /* Position */
+ tinyxml2::XMLElement* Position = PartObject->FirstChildElement("Position");
+ Position->QueryFloatAttribute("x", &Desc.vPosition.x);
+ Position->QueryFloatAttribute("y", &Desc.vPosition.y);
+ Position->QueryFloatAttribute("z", &Desc.vPosition.z);
+
+ /* Scale */
+ tinyxml2::XMLElement* Scale = PartObject->FirstChildElement("Scale");
+ Scale->QueryFloatAttribute("x", &Desc.vScale.x);
+ Scale->QueryFloatAttribute("y", &Desc.vScale.y);
+ Scale->QueryFloatAttribute("z", &Desc.vScale.z);
+
+ /* Rotation */
+ tinyxml2::XMLElement* Rotation = PartObject->FirstChildElement("Rotation");
+ Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
+ Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
+ Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
+
+ CMapObject_LOD* pMapObject;
+
+ if (FAILED(pContainerObject->Add_Part(strKey, g_iStaticLevel, &pMapObject, &Desc)))
+ return E_FAIL;
+
+ pMapObject->Set_KeyIndex(iKeyIndex);
+
+ SAFE_RELEASE(pMapObject);
#pragma endregion
}
#pragma endregion
}
+ for (auto* Object = root->FirstChildElement("Object"); Object; Object = Object->NextSiblingElement("Object"))
+ {
+ MAPOBJECT_LOD_DESC Desc = {};
+
+ MAPOBJECT_TYPE eType = {};
+
+ Object->QueryUnsignedAttribute("Type", (_uint*)(&eType));
+ Object->QueryUnsignedAttribute("Lod_Level", &Desc.iMaxLodLevel);
+
+ auto* Position = Object->FirstChildElement("Position");
+ Position->QueryFloatAttribute("x", &Desc.vPosition.x);
+ Position->QueryFloatAttribute("y", &Desc.vPosition.y);
+ Position->QueryFloatAttribute("z", &Desc.vPosition.z);
+
+ auto* Scale = Object->FirstChildElement("Scale");
+ Scale->QueryFloatAttribute("x", &Desc.vScale.x);
+ Scale->QueryFloatAttribute("y", &Desc.vScale.y);
+ Scale->QueryFloatAttribute("z", &Desc.vScale.z);
+
+ auto* Rotation = Object->FirstChildElement("Rotation");
+ Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
+ Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
+ Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
+
+ string strTag = {};
+
+ for (auto* PrototypeTag = Object->FirstChildElement("PrototypeTag"); PrototypeTag; PrototypeTag = PrototypeTag->NextSiblingElement("PrototypeTag"))
+ {
+ strTag = PrototypeTag->GetText();
+
+ Desc.ModelPrototypeTags.push_back(CMyTools::ToWstring(strTag));
+ }
+
+ if(MAPOBJECT_TYPE::ELEMENT_STATIC == eType)
+ m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Element_Static"), &Desc);
+ else if(MAPOBJECT_TYPE::ELEMENT_INTERACT == eType)
+ m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Element_Interact"), &Desc);
+ }
+
return S_OK;
}
@@ -568,48 +724,12 @@ HRESULT CMapObject_Manager::Load_ContainerData(const _char* pFileName, const _ch
for (auto* PartObject = TargetContainer->FirstChildElement("PartObject"); PartObject; PartObject = PartObject->NextSiblingElement("PartObject"))
{
_uint iLodLevel = {};
+ _uint iKeyIndex = {};
PartObject->QueryUnsignedAttribute("Lod_Level", &iLodLevel);
-
-#pragma region MAPOBJECT_STATIC
- if (0 == iLodLevel) /* MapObject_Static */
- {
- MAPOBJECT_STATIC_DESC Desc = {};
- string strTag = {};
- auto* PrototypeTag = PartObject->FirstChildElement("PrototypeTag");
-
- strTag = PrototypeTag->GetText();
-
- Desc.strModelPrototypeTag = CMyTools::ToWstring(strTag);
- Desc.iMaxLodLevel = iLodLevel;
- Desc.pParentTransform = pContainerObject->Get_Component();
- const string strKey = strTag;
-
- /* Position */
- tinyxml2::XMLElement* Position = PartObject->FirstChildElement("Position");
- Position->QueryFloatAttribute("x", &Desc.vPosition.x);
- Position->QueryFloatAttribute("y", &Desc.vPosition.y);
- Position->QueryFloatAttribute("z", &Desc.vPosition.z);
-
- /* Scale */
- tinyxml2::XMLElement* Scale = PartObject->FirstChildElement("Scale");
- Scale->QueryFloatAttribute("x", &Desc.vScale.x);
- Scale->QueryFloatAttribute("y", &Desc.vScale.y);
- Scale->QueryFloatAttribute("z", &Desc.vScale.z);
-
- /* Rotation */
- tinyxml2::XMLElement* Rotation = PartObject->FirstChildElement("Rotation");
- Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
- Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
- Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
-
- pContainerObject->Add_Part(strKey, g_iStaticLevel, nullptr, &Desc);
- }
-#pragma endregion
+ PartObject->QueryUnsignedAttribute("Key_Index", &iKeyIndex);
#pragma region MAPOBJECT_LOD
- else
- {
MAPOBJECT_LOD_DESC Desc = {};
string strTag = {};
for (auto* PrototypeTag = PartObject->FirstChildElement("PrototypeTag"); PrototypeTag; PrototypeTag = PrototypeTag->NextSiblingElement("PrototypeTag"))
@@ -620,7 +740,7 @@ HRESULT CMapObject_Manager::Load_ContainerData(const _char* pFileName, const _ch
}
Desc.iMaxLodLevel = iLodLevel;
Desc.pParentTransform = pContainerObject->Get_Component();
- const string strKey = strTag;
+ const string strKey = CMyTools::ToString(Desc.ModelPrototypeTags.front()) + to_string(iKeyIndex);
/* Position */
tinyxml2::XMLElement* Position = PartObject->FirstChildElement("Position");
@@ -641,7 +761,6 @@ HRESULT CMapObject_Manager::Load_ContainerData(const _char* pFileName, const _ch
Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
pContainerObject->Add_Part(strKey, g_iStaticLevel, nullptr, &Desc);
- }
#pragma endregion
}
@@ -661,69 +780,29 @@ void CMapObject_Manager::Update_PrototypeList()
{
auto& Tag = m_ModelPrototypeTags[i];
- if (_wstring::npos != Tag.find(L"Lod")){
+ if (_wstring::npos != Tag.find(L"Lod")) {
continue;
}
if (ImGui::Button(CMyTools::ToString(Tag).c_str()))
{
- vector<_uint> LodModelIndices;
-
- if(false == Find_Lod_Prototype(Tag, LodModelIndices))
+ switch (m_eType)
{
- MAPOBJECT_STATIC_DESC Desc = {};
+ case Editor::CMapObject_Manager::ADD_TYPE::CONTAINER:
+ Create_PartObject(Tag);
+ break;
- Desc.strModelPrototypeTag = Tag;
- Desc.pParentTransform = m_pTransformCom;
- Desc.vPosition = _float3(0.f, 0.f, 0.f);
- Desc.vRotation = _float3(0.f, 0.f, 0.f);
- Desc.vScale = _float3(1.f, 1.f, 1.f);
- Desc.iModelPathIndex = i;
+ case Editor::CMapObject_Manager::ADD_TYPE::ELEMENT_STATIC:
+ Create_Elemnt_Static(Tag);
+ break;
- CMapObject_Static* pMapObject = { nullptr };
- const string strKey = CMyTools::ToString(Tag);
-
- pMapObject = m_pGameInstance->Clone_Prototype(g_iStaticLevel, &Desc);
-
- /* if(FAILED(m_pContainer->Add_Part(strKey, 0, &pMapObject, &Desc)))
- break;*/
-
- m_MapObjects.push_back(pMapObject);
- }
- else
- {
- MAPOBJECT_LOD_DESC Desc = {};
-
- vector<_wstring> PrototypeTags;
-
- PrototypeTags.push_back(Tag);
- Desc.iMaxLodLevel = 0;
- Desc.ModelPrototypeTags = PrototypeTags;
- Desc.pParentTransform = m_pTransformCom;
- Desc.vPosition = _float3(0.f, 0.f, 0.f);
- Desc.vRotation = _float3(0.f, 0.f, 0.f);
- Desc.vScale = _float3(1.f, 1.f, 1.f);
- Desc.pModelPathIndices = &LodModelIndices;
-
- CMapObject_LOD* pMapObject = { nullptr };
- const string strKey = CMyTools::ToString(Tag);
-
- pMapObject = m_pGameInstance->Clone_Prototype(g_iStaticLevel, &Desc);
-
- //if (FAILED(m_pContainer->Add_Part(strKey, 0, &pMapObject, &Desc)))
- // break;
-
- m_MapObjects.push_back(pMapObject);
-
- for (_uint i = 0; i < LodModelIndices.size(); ++i)
- {
- _wstring strLodTag = Tag + L"_Lod" + to_wstring(i + 1);
-
- pMapObject->Add_LodModel(strLodTag.c_str());
- }
-
-
+ case Editor::CMapObject_Manager::ADD_TYPE::ELEMENT_INTERACT:
+ Create_Elemnt_Interact(Tag);
+ break;
+ default:
+ break;
}
+
}
}
GUI::End();
@@ -732,10 +811,7 @@ void CMapObject_Manager::Update_PrototypeList()
void CMapObject_Manager::Update_ObjectList()
{
- //CLayer* pLayer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_MapObject"));
-
- //if (nullptr == pLayer)
- // return;
+ CLayer* pLayer = { nullptr };
//m_pMapObjects = pLayer->Get_Objects();
@@ -744,41 +820,93 @@ void CMapObject_Manager::Update_ObjectList()
_uint iObjectIndex = {};
string strSrc;
- if (false == m_MapObjects.empty())
+ if(ADD_TYPE::CONTAINER == m_eType)
{
- for (auto pMapObject : m_MapObjects)
+ if (false == m_MapObjects.empty())
{
- CMapObject* pCurrentMapObject = static_cast(pMapObject);
+ for (auto pMapObject : m_MapObjects)
+ {
+ CMapObject* pCurrentMapObject = static_cast(pMapObject);
+
+ if (nullptr == pCurrentMapObject)
+ continue;
+
+ wstring strPrototypeTag = pCurrentMapObject->Get_PrototypeTag();
+
+ strSrc = CMyTools::ToString(strPrototypeTag) + to_string(iObjectIndex) + "##" + to_string(iObjectIndex++);
+
+ if (ImGui::Button(strSrc.c_str()))
+ {
+ m_pSelectObject = pCurrentMapObject;
+ }
+ }
+ }
+ }
+ else
+ {
+ if (ADD_TYPE::ELEMENT_STATIC == m_eType)
+ pLayer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Element_Static"));
+ else if (ADD_TYPE::ELEMENT_INTERACT == m_eType)
+ pLayer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Element_Interact"));
+
+ if (nullptr == pLayer)
+ {
+ GUI::End();
+ return;
+ }
+
+ const list* pObjectList = pLayer->Get_Objects();
+
+ for (auto pObject : *pObjectList)
+ {
+ CMapElement* pCurrentMapObject = static_cast(pObject);
if (nullptr == pCurrentMapObject)
continue;
- wstring strPrototypeTag = pCurrentMapObject->Get_PrototypeTag();
+ wstring strPrototypeTag = pCurrentMapObject->Get_PrototypeTag(0);
strSrc = CMyTools::ToString(strPrototypeTag) + to_string(iObjectIndex) + "##" + to_string(iObjectIndex++);
if (ImGui::Button(strSrc.c_str()))
{
- m_pSelectObject = pCurrentMapObject;
+ m_pSelectElemnt = pCurrentMapObject;
}
}
}
+
GUI::End();
}
void CMapObject_Manager::Update_Edit()
{
GUI::Begin("Edit");
- if (m_pGameInstance->Mouse_Down(DIM_4))
- m_pSelectObject = nullptr;
- if (nullptr != m_pSelectObject)
+ if (ADD_TYPE::CONTAINER == m_eType)
{
- m_pSelectObject->Describe_Entity();
- if (m_pSelectObject->isDead())
+ if (m_pGameInstance->Mouse_Down(DIM_4))
m_pSelectObject = nullptr;
+ if (nullptr != m_pSelectObject)
+ {
+ m_pSelectObject->Describe_Entity();
+ if (m_pSelectObject->isDead())
+ m_pSelectObject = nullptr;
+
+ }
+ }
+ else
+ {
+ if (m_pGameInstance->Mouse_Down(DIM_4))
+ m_pSelectElemnt = nullptr;
+
+ if (nullptr != m_pSelectElemnt)
+ {
+ m_pSelectElemnt->Describe_Entity();
+ if (m_pSelectElemnt->isDead())
+ m_pSelectElemnt = nullptr;
+ }
}
GUI::End();
@@ -823,12 +951,111 @@ void CMapObject_Manager::Update_ContainerObject()
GUI::End();
}
+void CMapObject_Manager::Create_PartObject(_wstring& strPrototypeTag)
+{
+ vector<_uint> LodModelIndices;
+
+ MAPOBJECT_LOD_DESC Desc = {};
+
+ vector<_wstring> PrototypeTags;
+
+ Find_Lod_Prototype(strPrototypeTag, LodModelIndices);
+
+ PrototypeTags.push_back(strPrototypeTag);
+
+ for (_uint i = 0; i < LodModelIndices.size(); ++i)
+ {
+ _wstring strLodTag = strPrototypeTag + L"_Lod" + to_wstring(i + 1);
+ PrototypeTags.push_back(strLodTag);
+ }
+
+ Desc.iMaxLodLevel = (_uint)LodModelIndices.size() - 1;
+ Desc.ModelPrototypeTags = PrototypeTags;
+ Desc.pParentTransform = m_pTransformCom;
+ Desc.vPosition = _float3(0.f, 0.f, 0.f);
+ Desc.vRotation = _float3(0.f, 0.f, 0.f);
+ Desc.vScale = _float3(1.f, 1.f, 1.f);
+ Desc.pModelPathIndices = &LodModelIndices;
+
+ CMapObject_LOD* pMapObject = { nullptr };
+ const string strKey = CMyTools::ToString(strPrototypeTag);
+
+ pMapObject = m_pGameInstance->Clone_Prototype(g_iStaticLevel, &Desc);
+ pMapObject->Set_KeyIndex(Get_KeyCount(strPrototypeTag));
+
+ m_MapObjects.push_back(pMapObject);
+}
+
+void CMapObject_Manager::Create_Elemnt_Static(_wstring& strPrototypeTag)
+{
+ vector<_uint> LodModelIndices;
+
+ MAPOBJECT_LOD_DESC Desc = {};
+
+ vector<_wstring> PrototypeTags;
+
+ Find_Lod_Prototype(strPrototypeTag, LodModelIndices);
+
+ PrototypeTags.push_back(strPrototypeTag);
+
+ for (_uint i = 0; i < LodModelIndices.size(); ++i)
+ {
+ _wstring strLodTag = strPrototypeTag + L"_Lod" + to_wstring(i + 1);
+ PrototypeTags.push_back(strLodTag);
+ }
+
+ Desc.iMaxLodLevel = (_uint)LodModelIndices.size() - 1;
+ Desc.ModelPrototypeTags = PrototypeTags;
+ Desc.pParentTransform = m_pTransformCom;
+ Desc.vPosition = _float3(0.f, 0.f, 0.f);
+ Desc.vRotation = _float3(0.f, 0.f, 0.f);
+ Desc.vScale = _float3(1.f, 1.f, 1.f);
+ Desc.pModelPathIndices = &LodModelIndices;
+
+ CMapElement_Static* pMapObject = { nullptr };
+ const string strKey = CMyTools::ToString(strPrototypeTag);
+
+ m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Element_Static"), &Desc);
+}
+
+void CMapObject_Manager::Create_Elemnt_Interact(_wstring& strPrototypeTag)
+{
+ vector<_uint> LodModelIndices;
+
+ MAPOBJECT_LOD_DESC Desc = {};
+
+ vector<_wstring> PrototypeTags;
+
+ Find_Lod_Prototype(strPrototypeTag, LodModelIndices);
+
+ PrototypeTags.push_back(strPrototypeTag);
+
+ for (_uint i = 0; i < LodModelIndices.size(); ++i)
+ {
+ _wstring strLodTag = strPrototypeTag + L"_Lod" + to_wstring(i + 1);
+ PrototypeTags.push_back(strLodTag);
+ }
+
+ Desc.iMaxLodLevel = (_uint)LodModelIndices.size() - 1;
+ Desc.ModelPrototypeTags = PrototypeTags;
+ Desc.pParentTransform = m_pTransformCom;
+ Desc.vPosition = _float3(0.f, 0.f, 0.f);
+ Desc.vRotation = _float3(0.f, 0.f, 0.f);
+ Desc.vScale = _float3(1.f, 1.f, 1.f);
+ Desc.pModelPathIndices = &LodModelIndices;
+
+ CMapElement_Interactable* pMapObject = { nullptr };
+ const string strKey = CMyTools::ToString(strPrototypeTag);
+
+ m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Element_Interact"), &Desc);
+}
+
_bool CMapObject_Manager::Find_Lod_Prototype(_wstring strPrototypeTag, vector<_uint>& LodModelIndices)
{
// for (auto& Tag : m_LODModelPrototypeTags)
for(_uint i = 0 ; i < m_ModelPrototypeTags.size(); ++i)
{
- if (_wstring::npos != m_ModelPrototypeTags[i].find(strPrototypeTag))
+ if (_wstring::npos != m_ModelPrototypeTags[i].find(strPrototypeTag) && 5 > (m_ModelPrototypeTags[i].size() - strPrototypeTag.size()))
LodModelIndices.push_back(i);
}
if (0 < LodModelIndices.size()) {
@@ -839,6 +1066,16 @@ _bool CMapObject_Manager::Find_Lod_Prototype(_wstring strPrototypeTag, vector<_u
// return true;
}
+_uint CMapObject_Manager::Get_KeyCount(_wstring strPrototypeTag)
+{
+ auto iter = m_PartObjectKeyCount.find(strPrototypeTag);
+
+ if (iter == m_PartObjectKeyCount.end())
+ return 0;
+
+ return iter->second++;
+}
+
CMapObject_Manager* CMapObject_Manager::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, vector<_wstring>& ModelPrototypeTags, vector& ModelPrototypePaths)
{
diff --git a/Jusin154_Team3D/Editor/Private/ModelParts.cpp b/Jusin154_Team3D/Editor/Private/ModelParts.cpp
index 55933a3af..c85302a2a 100644
--- a/Jusin154_Team3D/Editor/Private/ModelParts.cpp
+++ b/Jusin154_Team3D/Editor/Private/ModelParts.cpp
@@ -130,6 +130,7 @@ HRESULT CModelParts::Bind_ShaderResources()
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
return E_FAIL;
}
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/RootModelPart.cpp b/Jusin154_Team3D/Editor/Private/RootModelPart.cpp
index 10bbe6599..dee210e73 100644
--- a/Jusin154_Team3D/Editor/Private/RootModelPart.cpp
+++ b/Jusin154_Team3D/Editor/Private/RootModelPart.cpp
@@ -101,17 +101,18 @@ void CRootModelPart::Change_Model(_uint iIndex)
pModel->Set_CurrentTrackPosition(m_fTrackPosition);
pModel->Play_Animation(0.f);
-
- if (iIndex == ENUM_CLASS(PARTSTYPE::HEAD))
+ if (iIndex == ENUM_CLASS(PARTSTYPE::BODY))
{
Set_MainModel(m_ModelParts[iIndex]->Get_Component());
}
+
}
void CRootModelPart::Set_Animation(_uint iAnimIndex)
{
m_pMainModel->Set_AnimationIndex(iAnimIndex);
-
+ m_pMainModel->Set_CurrentTrackPosition(0.f);
+ m_pMainModel->Play_Animation(0.f);
for (auto& PartObject : m_ModelParts)
{
CModel* pModel = PartObject->Get_Component();
@@ -119,6 +120,7 @@ void CRootModelPart::Set_Animation(_uint iAnimIndex)
{
pModel->Set_AnimationIndex(m_pMainModel->Get_AnimIndex());
pModel->Set_CurrentTrackPosition(m_pMainModel->Get_CurrentTrackPosition());
+ pModel->Play_Animation(0.f);
}
}
}
@@ -139,12 +141,12 @@ HRESULT CRootModelPart::Ready_PartObjects()
CModelParts* pModelPartsObject = { nullptr };
- if (FAILED(Add_PartObject("Human_Head", ENUM_CLASS(LEVEL::STATIC), reinterpret_cast(&pModelPartsObject), &PartsDesc)))
+ if (FAILED(Add_PartObject("Human_Body", ENUM_CLASS(LEVEL::STATIC), reinterpret_cast(&pModelPartsObject), &PartsDesc)))
return E_FAIL;
m_ModelParts.push_back(pModelPartsObject);
- if (FAILED(Add_PartObject("Human_Body", ENUM_CLASS(LEVEL::STATIC), reinterpret_cast(&pModelPartsObject), &PartsDesc)))
+ if (FAILED(Add_PartObject("Human_Head", ENUM_CLASS(LEVEL::STATIC), reinterpret_cast(&pModelPartsObject), &PartsDesc)))
return E_FAIL;
m_ModelParts.push_back(pModelPartsObject);
diff --git a/Jusin154_Team3D/Editor/Public/BuildingContainer.h b/Jusin154_Team3D/Editor/Public/BuildingContainer.h
index 3dcd25980..bf4694f2d 100644
--- a/Jusin154_Team3D/Editor/Public/BuildingContainer.h
+++ b/Jusin154_Team3D/Editor/Public/BuildingContainer.h
@@ -7,8 +7,6 @@ NS_BEGIN(Editor)
class CBuildingContainer final : public CMapContainer
{
-
-
public:
CBuildingContainer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CBuildingContainer(const CBuildingContainer& rhs);
diff --git a/Jusin154_Team3D/Editor/Public/Dummy_Goblin.h b/Jusin154_Team3D/Editor/Public/Dummy_Goblin.h
deleted file mode 100644
index 9a81deb47..000000000
--- a/Jusin154_Team3D/Editor/Public/Dummy_Goblin.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#pragma once
-
-#include "Editor_Define.h"
-#include "GameObject.h"
-
-NS_BEGIN(Engine)
-class CShader;
-class CModel;
-NS_END
-
-NS_BEGIN(Editor)
-
-class CDummy_Goblin final : public CGameObject
-{
-private:
- CDummy_Goblin(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- CDummy_Goblin(const CDummy_Goblin& Prototype);
- virtual ~CDummy_Goblin() = default;
-
-public:
- virtual HRESULT Initialize_Prototype() override;
- virtual HRESULT Initialize(void* pArg) override;
- virtual void Priority_Update(_float fTimeDelta) override;
- virtual void Update(_float fTimeDelta) override;
- virtual void Late_Update(_float fTimeDelta) override;
- virtual HRESULT Render() override;
-
-private:
- CShader* m_pShaderCom = { nullptr };
- CModel* m_pModelCom = { nullptr };
- _bool m_bRimLight = { true };
- _float m_fRimLightPower = { 3.2f };
- _float m_fRimLightStrength = { 3.04f };
- _float3 m_vRimLightColor = { 69.f / 255.f, 5.f / 255.f, 10.f / 255.f };
-
-private:
- HRESULT Ready_Components();
- HRESULT Bind_ShaderResources();
-
-public:
- static CDummy_Goblin* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
- virtual void Free() override;
- virtual void Describe_Entity() override;
-};
-
-NS_END
\ No newline at end of file
diff --git a/Jusin154_Team3D/Editor/Public/Dummy_Goblin_Head.h b/Jusin154_Team3D/Editor/Public/Dummy_Goblin_Head.h
deleted file mode 100644
index 1be73f872..000000000
--- a/Jusin154_Team3D/Editor/Public/Dummy_Goblin_Head.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#pragma once
-
-#include "Editor_Define.h"
-#include "GameObject.h"
-
-NS_BEGIN(Engine)
-class CShader;
-class CModel;
-NS_END
-
-NS_BEGIN(Editor)
-
-class CDummy_Goblin_Head final : public CGameObject
-{
-private:
- CDummy_Goblin_Head(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- CDummy_Goblin_Head(const CDummy_Goblin_Head& Prototype);
- virtual ~CDummy_Goblin_Head() = default;
-
-public:
- virtual HRESULT Initialize_Prototype() override;
- virtual HRESULT Initialize(void* pArg) override;
- virtual void Priority_Update(_float fTimeDelta) override;
- virtual void Update(_float fTimeDelta) override;
- virtual void Late_Update(_float fTimeDelta) override;
- virtual HRESULT Render() override;
-
-private:
- CShader* m_pShaderCom = { nullptr };
- CModel* m_pModelCom = { nullptr };
- _bool m_bRimLight = { true };
- _float m_fRimLightPower = { 3.2f };
- _float m_fRimLightStrength = { 3.04f };
- _float3 m_vRimLightColor = { 69.f / 255.f, 5.f / 255.f, 10.f / 255.f };
-
-private:
- HRESULT Ready_Components();
- HRESULT Bind_ShaderResources();
-
-public:
- static CDummy_Goblin_Head* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
- virtual void Free() override;
- virtual void Describe_Entity() override;
-};
-
-NS_END
\ No newline at end of file
diff --git a/Jusin154_Team3D/Editor/Public/EffectObject.h b/Jusin154_Team3D/Editor/Public/EffectObject.h
index 829fa7421..7ab131a7b 100644
--- a/Jusin154_Team3D/Editor/Public/EffectObject.h
+++ b/Jusin154_Team3D/Editor/Public/EffectObject.h
@@ -1,7 +1,7 @@
#pragma once
#include "Editor_Define.h"
-#include "GameObject.h"
+#include "PartObject.h"
NS_BEGIN(Engine)
class CInstance_Model;
@@ -11,7 +11,7 @@ NS_END
NS_BEGIN(Editor)
-class CEffectObject abstract : public CGameObject
+class CEffectObject abstract : public CPartObject
{
protected:
CEffectObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
@@ -51,6 +51,13 @@ class CEffectObject abstract : public CGameObject
_float2 m_vUVCutting = { 1.f ,1.f };
_float2 m_vUVMaskCutting = { 1.f ,1.f };
+ _int m_iMaskMoveLerpOption = { 0 };
+ _int m_iDiffuseMoveLerpOption = { 0 };
+ _int m_iMaskNoiseMoveLerpOption = { 0 };
+ _int m_iDiffuseNoiseMoveLerpOption = { 0 };
+ _int m_iBlurWeight = { 0 };
+
+
_bool m_isDiffuse = {};
_bool m_isMasking = {};
_bool m_isDissolve = {};
diff --git a/Jusin154_Team3D/Editor/Public/Effect_Editor.h b/Jusin154_Team3D/Editor/Public/Effect_Editor.h
index 200b76cc3..f79d06dc0 100644
--- a/Jusin154_Team3D/Editor/Public/Effect_Editor.h
+++ b/Jusin154_Team3D/Editor/Public/Effect_Editor.h
@@ -1,7 +1,7 @@
#pragma once
#include "Editor_Define.h"
-#include "EffectObject.h"
+#include "ContainerObject.h"
NS_BEGIN(Engine)
class CModel;
@@ -10,7 +10,7 @@ NS_END
NS_BEGIN(Editor)
-class CEffect_Editor final : public CEffectObject
+class CEffect_Editor final : public CContainerObject
{
private:
CEffect_Editor(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
@@ -30,18 +30,24 @@ class CEffect_Editor final : public CEffectObject
virtual HRESULT Initialize(void* pArg) override;
virtual HRESULT Ready_Components(void* pArg) override;
HRESULT Ready_Child();
+ HRESULT Bind_ShaderResources() override;
private:
void ReadMaterials(const char* pDirectoryName);
void ReadMaterial(_wstring wstrFileName, const char* pFilePath);
private:
- CGameObject* m_pEditEffect = { nullptr };
- map<_wstring, vector>> m_MatFiles = {}; // map<¸ÓÅ׸®¾ó À̸§, vector<ÅØ½ºÃÄÀ̸§ , ÅØ½ºÃÄ °æ·Î>>
+ _string m_strCurrentEffectName = {};
+ _uint m_iNumPart = { 0 };
+ class CEditEffect* m_pEditEffect = { nullptr };
+ map<_wstring, vector>> m_MatFiles = {}; // map<¸ÓÅ׸®¾ó À̸§, vector<ÅØ½ºÃÄÀ̸§ , ÅØ½ºÃÄ °æ·Î>>
+
public:
static CEffect_Editor* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
virtual void Free() override;
void Describe_Entity() override;
+
+
};
NS_END
\ No newline at end of file
diff --git a/Jusin154_Team3D/Editor/Public/Level_ObjectViewer.h b/Jusin154_Team3D/Editor/Public/Level_ObjectViewer.h
index e8cbe99ff..f1ec917af 100644
--- a/Jusin154_Team3D/Editor/Public/Level_ObjectViewer.h
+++ b/Jusin154_Team3D/Editor/Public/Level_ObjectViewer.h
@@ -34,9 +34,12 @@ class CLevel_ObjectViewer final : public CLevel
void Category_PartsModelList(const _char* Category, const _char* Layer);
void Show_AnimList();
void Show_ObjectList();
- void Object_Setting();
+ void Dummy_Object_Setting();
+ void Parts_Object_Setting();
void Save_LayerName(const _char* Layer);
_wchar* Save_ModelName(const _char* Category);
+ void Load_KeyFrame();
+
private:
vector m_Objects;
@@ -44,8 +47,10 @@ class CLevel_ObjectViewer final : public CLevel
class CRootModelPart* m_HumanRoot = { nullptr };
_int m_iObjectIndex = { 0 };
_int m_iPartsObjectIndex = { 0 };
-
- _float m_fAnimFrame = {};
+ _float m_fKeyFrame = {};
+ vector<_float> m_KeyFrame;
+ vector<_string> m_Events;
+ _string m_strEvent;
_char m_szName[MAX_PATH];
_wchar m_wszName[MAX_PATH];
_wchar m_wszLayer[MAX_PATH];
diff --git a/Jusin154_Team3D/Editor/Public/MapElement.h b/Jusin154_Team3D/Editor/Public/MapElement.h
index f4ff533ae..d88aa7df9 100644
--- a/Jusin154_Team3D/Editor/Public/MapElement.h
+++ b/Jusin154_Team3D/Editor/Public/MapElement.h
@@ -17,6 +17,10 @@ class CMapElement abstract : public CGameObject
CMapElement(const CMapElement& rhs);
virtual ~CMapElement() = default;
+public:
+ _uint Get_LodLevel() const{ return m_iMaxLodLevel; }
+ const _wstring& Get_PrototypeTag(_uint iIndex);
+
public:
virtual void Priority_Update(_float fTimeDelta) override;
virtual void Update(_float fTimeDelta) override;
diff --git a/Jusin154_Team3D/Editor/Public/MapObject.h b/Jusin154_Team3D/Editor/Public/MapObject.h
index cd10f0da4..157f5a3e2 100644
--- a/Jusin154_Team3D/Editor/Public/MapObject.h
+++ b/Jusin154_Team3D/Editor/Public/MapObject.h
@@ -25,7 +25,8 @@ class CMapObject abstract : public CPartObject
public:
virtual _wstring Get_PrototypeTag(_uint iLodIndex = 0);
- virtual _uint Get_LodLevel() { return m_iMaxLodLevel; }
+ _uint Get_LodLevel();
+ _uint Get_iKeyIndex() const { return m_iKeyIndex; }
protected:
@@ -39,6 +40,7 @@ class CMapObject abstract : public CPartObject
protected:
_bool m_bSelected = {};
+ _uint m_iKeyIndex = {};
_uint m_iMaxLodLevel = {};
_float3 m_vPosition = {};
diff --git a/Jusin154_Team3D/Editor/Public/MapObject_LOD.h b/Jusin154_Team3D/Editor/Public/MapObject_LOD.h
index 194fbb031..b936eacdd 100644
--- a/Jusin154_Team3D/Editor/Public/MapObject_LOD.h
+++ b/Jusin154_Team3D/Editor/Public/MapObject_LOD.h
@@ -23,12 +23,14 @@ class CMapObject_LOD final : public CMapObject // LOD
public:
virtual _wstring Get_PrototypeTag(_uint iLodIndex = 0);
HRESULT Add_LodModel(const _tchar* pModelPrototypeTag);
+ void Set_KeyIndex(_uint iIndex) {
+ m_iKeyIndex = iIndex;
+ }
private:
CShader* m_pShaderCom = { nullptr };
vector m_pModelComs;
- _uint m_iMaxLodLevel = {};
_uint m_iLodIndex = {};
vector<_wstring> m_ModelPrototypeTags;
diff --git a/Jusin154_Team3D/Editor/Public/MapObject_Manager.h b/Jusin154_Team3D/Editor/Public/MapObject_Manager.h
index 5ca6933d7..6d717337c 100644
--- a/Jusin154_Team3D/Editor/Public/MapObject_Manager.h
+++ b/Jusin154_Team3D/Editor/Public/MapObject_Manager.h
@@ -12,6 +12,8 @@ NS_BEGIN(Editor)
class CMapObject_Manager final : public CGameObject
{
+ enum class ADD_TYPE {CONTAINER, ELEMENT_STATIC, ELEMENT_INTERACT};
+
private:
CMapObject_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CMapObject_Manager(const CMapObject_Manager& Prototype);
@@ -28,15 +30,20 @@ class CMapObject_Manager final : public CGameObject
const filesystem::path Get_PrototypePath(_uint iModelIndex);
private:
+ ADD_TYPE m_eType = {};
+
class CMapObject* m_pSelectObject = { nullptr };
+ class CMapElement* m_pSelectElemnt = { nullptr };
list m_MapObjects = {};
vector<_wstring> m_ModelPrototypeTags;
+ map<_wstring, _uint> m_PartObjectKeyCount;
vector<_wstring> m_LODModelPrototypeTags;
vector m_ModelPrototypePaths;
_uint m_iContainerObjectIndex = {};
class CBuildingContainer* m_pContainer = { nullptr };
+ _char m_szSaveFileName[MAX_PATH] = {};
_char m_szSaveContainerName[MAX_PATH] = {};
private:
HRESULT Ready_Components();
@@ -44,8 +51,9 @@ class CMapObject_Manager final : public CGameObject
#pragma region SAVE_LOAD
HRESULT Save_MapData(const _char* pFileName);
- HRESULT Save_ContainerData(const _char* pFileName, const _char* pContainerName);
HRESULT Load_MapData(const _char* pFileName);
+
+ HRESULT Save_ContainerData(const _char* pFileName, const _char* pContainerName);
HRESULT Load_ContainerData(const _char* pFileName, const _char* pContainerName);
#pragma endregion
@@ -54,8 +62,12 @@ class CMapObject_Manager final : public CGameObject
void Update_Edit();
void Update_ContainerObject();
- _bool Find_Lod_Prototype(_wstring strPrototypeTag, vector<_uint>& LodModelIndices);
+ void Create_PartObject(_wstring& strPrototypeTag);
+ void Create_Elemnt_Static(_wstring& strPrototypeTag);
+ void Create_Elemnt_Interact(_wstring& strPrototypeTag);
+ _bool Find_Lod_Prototype(_wstring strPrototypeTag, vector<_uint>& LodModelIndices);
+ _uint Get_KeyCount(_wstring strPrototypeTag);
public:
static CMapObject_Manager* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, vector<_wstring>& ModelPrototypeTags, vector& ModelPrototypePaths);
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
diff --git a/Jusin154_Team3D/Editor/Public/RootModelPart.h b/Jusin154_Team3D/Editor/Public/RootModelPart.h
index 9d816aa33..cdd168e8c 100644
--- a/Jusin154_Team3D/Editor/Public/RootModelPart.h
+++ b/Jusin154_Team3D/Editor/Public/RootModelPart.h
@@ -12,8 +12,7 @@ class CRootModelPart final : public CContainerObject
{
public:
- enum class PARTSTYPE{HEAD,BODY,HAIR,END};
-
+ enum class PARTSTYPE{ BODY,HEAD,HAIR,END};
public:
void Set_PrototypeModelName(const _wchar* PrototypeModelName) { m_PrototypeModelName = PrototypeModelName; }
void Set_ModelName(const _char* Name) { m_ModelName = Name; }
diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl
index 3f63e5e6f..6e5d2ad4c 100644
--- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl
+++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Deferred.hlsl
@@ -16,6 +16,7 @@ Texture2D g_Texture;
float g_fLightRange;
float g_fSpotInnerAngle;
float g_fSpotOuterAngle;
+
vector g_vLightDir;
vector g_vLightPos;
vector g_vCamPosition;
@@ -29,6 +30,7 @@ Texture2D g_ShadowTexture;
Texture2D g_PreShadowTexture;
Texture2D g_BlurTexture;
Texture2D g_BlurXTexture;
+Texture2D g_BlurWeightTexture;
@@ -36,6 +38,8 @@ vector g_vLightDiffuse;
vector g_vLightAmbient;
vector g_vLightSpecular;
+
+
struct VS_IN
{
float3 vPosition : POSITION;
@@ -219,13 +223,15 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
return Out;
}
-float g_fWeights[13] =
+float g_fWeights[32] =
{
- 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
+ 0.000400, 0.000700, 0.001200, 0.002000, 0.003200, 0.005000, 0.007500, 0.011000,
+ 0.015700, 0.021700, 0.029000, 0.037300, 0.046200, 0.055200, 0.063600, 0.070800,
+ 0.075900, 0.078500, 0.078500, 0.075900, 0.070800, 0.063600, 0.055200, 0.046200,
+ 0.037300, 0.029000, 0.021700, 0.015700, 0.011000, 0.007500, 0.005000, 0.003200
};
+
PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
{
PS_OUT_BACKBUFFER Out;
@@ -295,15 +301,31 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
//{
// Out.vBackBuffer *= 0.5f;
//}
-
float4 vColor = 0.f;
- for (int i = -6; i < 7; ++i)
+ //int iBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r * 32.f;
+
+ //int iBlurMin;
+ //int iBlurMax;
+
+ //if (iBlurWeight % 2 == 0)
+ //{
+ // iBlurMin = -1 * iBlurWeight / 2;
+ // iBlurMax = iBlurWeight / 2;
+ //}
+ //else
+ //{
+ // iBlurMin = -iBlurWeight / 2;
+ // iBlurMax = iBlurWeight / 2 + 1;
+ //}
+
+ //[loop] // 변수로 루프ë�Œë¦¬ë ¤ë©´ 반드시 필요함
+ for (int i = -15; i < 16; ++i)
{
vTexcoord.x = In.vTexcoord.x;
- vTexcoord.y = In.vTexcoord.y + (float)i / g_vResolution.y;
+ vTexcoord.y = In.vTexcoord.y + (float) i / g_vResolution.y;
- vColor += g_fWeights[i + 6] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
+ vColor += g_fWeights[i + 15] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
}
Out.vBackBuffer += vColor;
@@ -324,12 +346,32 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X(PS_IN In)
float2 vTexcoord;
float4 vColor = 0.f;
- for (int i = -6; i < 7; ++i)
+ //TODO 블러 ì¡°ì ˆ í•´ë³´ë ¤í–‡ëŠ”ë�° 실패함..
+
+ //int iBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r * 32.f;
+
+ //int iBlurMin;
+ //int iBlurMax;
+
+ //if (iBlurWeight % 2 == 0)
+ //{
+ // iBlurMin = -1 * iBlurWeight / 2;
+ // iBlurMax = iBlurWeight / 2;
+ //}
+ //else
+ //{
+ // iBlurMin = -iBlurWeight / 2;
+ // iBlurMax = iBlurWeight / 2 + 1;
+ //}
+
+ //[loop] // 변수로 루프ë�Œë¦¬ë ¤ë©´ 반드시 필요함
+
+ for (int i = -15; i < 16; ++i)
{
vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x;
vTexcoord.y = In.vTexcoord.y;
- vColor += g_fWeights[i + 6] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
+ vColor += g_fWeights[i + 15] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
}
Out.vBlurX = vColor;
diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl
index e8dd37940..5170f9c7a 100644
--- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl
+++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_LastColor.hlsl
@@ -50,10 +50,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
Out.vBackBuffer = float4(0.f, 0.f, 0.f, 0.f);
- vector vColorTexture = g_ColorTexture.Sample(DefaultSampler, In.vTexcoord);
-
- vector vDiffuseTexture = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
-
+ vector vColorTexture = g_ColorTexture.Sample(ClampSampler, In.vTexcoord);
if (0.f == vColorTexture.a)
{
@@ -66,7 +63,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
switch (iOption)
{
case 1:
- Out.vBackBuffer.rgb = vColorTexture.rgb;
+ Out.vBackBuffer.rgb /= vColorTexture.rgb;
break;
case 2:
Out.vBackBuffer.rgb += vColorTexture.rgb;
@@ -78,7 +75,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
Out.vBackBuffer.rgb *= vColorTexture.rgb;
break;
case 5:
- Out.vBackBuffer.rgb /= vColorTexture.rgb;
+ Out.vBackBuffer.rgb = vColorTexture.rgb;
break;
default:
break;
diff --git a/Jusin154_Team3D/Engine/Private/Channel.cpp b/Jusin154_Team3D/Engine/Private/Channel.cpp
index 5bd73a07c..a5ec4fa99 100644
--- a/Jusin154_Team3D/Engine/Private/Channel.cpp
+++ b/Jusin154_Team3D/Engine/Private/Channel.cpp
@@ -144,7 +144,8 @@ void CChannel::Update_TransformationMatirx(const vector& Bones, _float f
}
_matrix BoneTransformationMatrix = XMMatrixAffineTransformation(vScale, XMVectorSet(0.f, 0.f, 0.f, 1.f), vRotation, vTranslation);
- Bones[m_iBoneIndex]->Set_TransformationMatrix(BoneTransformationMatrix);
+ if(Bones.size()>m_iBoneIndex)
+ Bones[m_iBoneIndex]->Set_TransformationMatrix(BoneTransformationMatrix);
}
diff --git a/Jusin154_Team3D/Engine/Private/ComputeShader.cpp b/Jusin154_Team3D/Engine/Private/ComputeShader.cpp
index 9f4da840d..76d9b05c8 100644
--- a/Jusin154_Team3D/Engine/Private/ComputeShader.cpp
+++ b/Jusin154_Team3D/Engine/Private/ComputeShader.cpp
@@ -345,6 +345,7 @@ void CComputeShader::Free()
Safe_Release(m_pOutputUAV[i]);
Safe_Release(m_pOutputBuffer[i]);
Safe_Release(m_pOutputSRV[i]);
+ Safe_Release(m_pOutputStagingBuffer[i]);
}
diff --git a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp
index 8ec22aca5..06e7fcd3a 100644
--- a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp
+++ b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp
@@ -4,6 +4,7 @@
#include "Mesh.h"
#include "GameInstance.h"
#include "ComputeShader.h"
+#include "Bone.h"
CInstance_Model::CInstance_Model(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CComponent{ pDevice , pContext }
@@ -427,6 +428,9 @@ void CInstance_Model::Free()
for (auto& pMesh : m_Meshes)
Safe_Release(pMesh);
+ for (auto& pBone : m_Bones)
+ Safe_Release(pBone);
+
Safe_Release(m_pComputeShader);
Safe_Release(m_pConstantBuffer);
Safe_Release(m_pParticleValueBuffer);
diff --git a/Jusin154_Team3D/Engine/Private/Renderer.cpp b/Jusin154_Team3D/Engine/Private/Renderer.cpp
index f73cf03e9..8a240eaab 100644
--- a/Jusin154_Team3D/Engine/Private/Renderer.cpp
+++ b/Jusin154_Team3D/Engine/Private/Renderer.cpp
@@ -113,8 +113,8 @@ void CRenderer::Render()
Render_Effect();
Render_NonLight();
Render_Blend();
- Render_UI();
Render_LastColor();
+ Render_UI();
#ifdef _DEBUG
if(m_pGameInstance->Key_Pressing(DIK_F10))
@@ -301,6 +301,10 @@ void CRenderer::Render_Combined()
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Blur_X"), m_pShader, "g_BlurXTexture"))) {
return;
}
+ if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Blur_Weight"), m_pShader, "g_BlurWeightTexture"))) {
+ return;
+ }
+
}
m_pShader->Begin(ENUM_CLASS(SHADER_PASS_DEFERRED::COMBINED));
@@ -379,6 +383,11 @@ void CRenderer::Render_Blur()
return;
}
+ if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Blur_Weight"), m_pShader, "g_BlurWeightTexture"))) {
+ return;
+ }
+
+
m_pShader->Begin(ENUM_CLASS(SHADER_PASS_DEFERRED::BLUR));
m_pVIBuffer->Bind_Resources();
@@ -588,6 +597,12 @@ HRESULT CRenderer::Initialize()
}
/* Target_Blur */
+
+ if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Blur_Weight"), (_uint)Viewport.Width, (_uint)Viewport.Height,
+ DXGI_FORMAT_R8G8B8A8_UNORM, _float4(0.0f, 0.0f, 0.0f, 1.0f)))) {
+ return E_FAIL;
+ }
+
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Blur"), (_uint)Viewport.Width, (_uint)Viewport.Height,
DXGI_FORMAT_R8G8B8A8_UNORM, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) {
return E_FAIL;
@@ -648,6 +663,10 @@ HRESULT CRenderer::Initialize()
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Blur"), TEXT("Target_Blur_Weight")))) {
+ return E_FAIL;
+ }
+
/* MRT_Blur_X */
if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Blur_X"), TEXT("Target_Blur_X")))) {
return E_FAIL;
@@ -695,25 +714,27 @@ HRESULT CRenderer::Initialize()
//if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Specular"), 225.f, 225.f, 150.0f, 150.0f))) {
// return E_FAIL;
//}
-
- //if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Color"), 375.f, 225.f, 450.f, 450.0f))) {
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Color"),75.f , 1080 - 75.f, 150.f, 150.f))) {
+ return E_FAIL;
+ }
//if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Shadow"), Viewport.Width - 150.0f, 150.0f, 300.f, 300.f))) {
// return E_FAIL;
//}
//if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_PreShadow"), Viewport.Width - 150.0f, Viewport.Height - 150.0f, 300.f, 300.f))) {
// return E_FAIL;
- //}
+
+ if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Blur_Weight"), 75.f, 75.f, 150.0f, 150.0f))) {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Blur"), 150.0f, Viewport.Height - 150.0f, 300.f, 300.f))) {
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Blur"), 75.f, 225.f, 150.0f, 150.0f))) {
+ return E_FAIL;
+ }
- //if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Blur_X"), Viewport.Width * 0.75f, Viewport.Height * 0.75f, Viewport.Width * 0.5f, Viewport.Height * 0.5f))) {
- // return E_FAIL;
- //}
+ if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Blur_X"), 225.f, 75.f, 150.0f, 150.0f))) {
+ return E_FAIL;
+ }
diff --git a/Jusin154_Team3D/Engine/Public/GameInstance.h b/Jusin154_Team3D/Engine/Public/GameInstance.h
index ea310f523..0433ef372 100644
--- a/Jusin154_Team3D/Engine/Public/GameInstance.h
+++ b/Jusin154_Team3D/Engine/Public/GameInstance.h
@@ -66,7 +66,7 @@ class ENGINE_DLL CGameInstance final : public CBase
}
template
- void Asset_Description(_uint iLevel, const _char* pComponentName, CComponent** ppOut, void* pDesc, class CGameObject* pOwner = nullptr, _wstring wstrGroupName = L"")
+ void Asset_Description(_uint iLevel, const _char* pComponentName, Engine::CComponent** ppOut, void* pDesc, class CGameObject* pOwner = nullptr, _wstring wstrGroupName = L"")
{
return m_pPrototype_Manager->CPrototype_Manager::Asset_Description(iLevel, pComponentName, ppOut, pDesc, pOwner, wstrGroupName);
}
diff --git a/Jusin154_Team3D/Engine/Public/Instance_Model.h b/Jusin154_Team3D/Engine/Public/Instance_Model.h
index 0c17b0ab8..58dea1a6d 100644
--- a/Jusin154_Team3D/Engine/Public/Instance_Model.h
+++ b/Jusin154_Team3D/Engine/Public/Instance_Model.h
@@ -96,7 +96,7 @@ class ENGINE_DLL CInstance_Model final : public CComponent
HRESULT Create_SubResource_Buffer();
private:
- ID3D11Buffer* m_pVBInstance = { nullptr };
+ ID3D11Buffer* m_pVBInstance = { nullptr };
INSTANCE_DESC m_InstanceDesc = {};
@@ -114,9 +114,9 @@ class ENGINE_DLL CInstance_Model final : public CComponent
vector m_Bones = {}; // ³ªÁß¿¡ Ȥ½Ã ¾Ö´Ô¸Þ½¬¸¦ ÀνºÅÏ½Ì ÇÒ ÀÏÀÌ ÀÖÀ»Áöµµ ¸ð¸£´Ï ³²°Ü³õÀ½
private:
- class CComputeShader* m_pComputeShader = {};
- ID3D11Buffer* m_pConstantBuffer = { nullptr }; // ÄÄǻƮ ½¦À̵å Àü¿ë »ó¼ö¹öÆÛ
- ID3D11Buffer* m_pParticleValueBuffer = { nullptr }; // ÄÄǻƮ ½¦ÀÌµå µÎ¹øÂ° ¹öÆÛ (½ºÇǵå, ·ÎÅ×À̼Ç)
+ class CComputeShader* m_pComputeShader = {};
+ ID3D11Buffer* m_pConstantBuffer = { nullptr }; // ÄÄǻƮ ½¦À̵å Àü¿ë »ó¼ö¹öÆÛ
+ ID3D11Buffer* m_pParticleValueBuffer = { nullptr }; // ÄÄǻƮ ½¦ÀÌµå µÎ¹øÂ° ¹öÆÛ (½ºÇǵå, ·ÎÅ×À̼Ç)
public:
#ifdef EDITOR_PROJECT
diff --git a/Jusin154_Team3D/Engine/Public/Model.h b/Jusin154_Team3D/Engine/Public/Model.h
index 2cdd0b66f..511a48fb4 100644
--- a/Jusin154_Team3D/Engine/Public/Model.h
+++ b/Jusin154_Team3D/Engine/Public/Model.h
@@ -20,19 +20,19 @@ class ENGINE_DLL CModel final : public CComponent
virtual HRESULT Render_Indexed(_uint iMeshIndex, _uint IndexCount, _uint StartIndexLocation, _uint BaseVertexLocation);
#pragma endregion
#pragma region Animation
- void Change_AnimationIndex(_int iAnimationIndex, _bool bIsLoop, _float fLerpDuration, _bool bIgnoreCurrentIndex = false); // ¾Ö´Ï¸ÞÀ̼ÇÀ» ´Ù¸¥ À妽º·Î º¯°æÇÔ
- _bool Play_Animation(_float fTimeDelta); // ¾Ö´Ï¸ÞÀ̼ǿ¡ µ¨Å¸Å¸ÀÓÀ» ³Ö¾îÁÜ
- void RefreshAnim(); // ¾Ö´ÔÀ» ÇöÀç ¾Ö´ÔÀÇ Ãʱâ»óÅ·ΠµÇµ¹¸²
+ void Change_AnimationIndex(_int iAnimationIndex, _bool bIsLoop, _float fLerpDuration, _bool bIgnoreCurrentIndex = false); // ì• ë‹ˆë©”ì�´ì…˜ì�„ 다른 ì�¸ë�±ìŠ¤ë¡œ 변경함
+ _bool Play_Animation(_float fTimeDelta); // ì• ë‹ˆë©”ì�´ì…˜ì—� ë�¸íƒ€íƒ€ìž„ì�„ 넣어줌
+ void RefreshAnim(); // ì• ë‹˜ì�„ 현재 ì• ë‹˜ì�˜ 초기ìƒ�태로 ë�˜ë�Œë¦¼
void Set_AnimationIndex(_uint iIndex, _bool isLoop = true);
- void Stop_Animation(); // ¾Ö´Ï¸ÞÀ̼ÇÀ» Á¤Áö (Ãʱâ»óÅ·Î)
+ void Stop_Animation(); // ì• ë‹ˆë©”ì�´ì…˜ì�„ ì •ì§€ (초기ìƒ�태로)
_bool IsFinishedAnim() const { return m_bIsFinishedAnim; }
_bool IsFinishedLerp() const { return m_bIsFinishedLerp; }
_float Get_AnimProgressRatio();
_int Get_AnimProgressPostion(const char* pAnimChannelName);
_float Get_AnimEstimatedDuration();
void Set_AnimProgressPostion(const _char* pChannelName, _uint iPosition);
- void Set_AnimPauseState(_bool bValue);// ¾Ö´ÔÀ» ÇöÀç»óÅ·ΠÁ¤Áö
- void ReallocateResources(class CTransform* pTransform = nullptr); // ¾Ö´Ô À̵¿ÀÇ ´ë»ó Æ®·£½ºÆû(À̵¿½ÃÄѾßÇÒ Æ®·£½ºÆû)À» ÀçÁöÁ¤ÇÔ
+ void Set_AnimPauseState(_bool bValue);// ì• ë‹˜ì�„ 현재ìƒ�태로 ì •ì§€
+ void ReallocateResources(class CTransform* pTransform = nullptr); // ì• ë‹˜ ì�´ë�™ì�˜ 대ìƒ� 트랜스í�¼(ì�´ë�™ì‹œì¼œì•¼í• 트랜스í�¼)ì�„ ìž¬ì§€ì •í•¨
void Set_CurrentTrackPosition(_float TrackPosition);
const _char* Get_AnimList(_uint iIndex);
size_t Get_AnimSize() { return m_Animations.size(); }
@@ -54,7 +54,7 @@ class ENGINE_DLL CModel final : public CComponent
const _float4x4* Get_BoneMatrixPtr(const _char* pBoneName) const;
_int Get_RootBoneIndex() const { return m_iRootBoneIndex; }
void Set_RootBoneIndex(_int iIndex) { m_iRootBoneIndex = iIndex; }
-static _int Get_BoneIndex(const _char* pBoneName, vector Bones); // º»ÀÇ º¤ÅÍ¿Í À̸§À» ³Ñ°ÜÁÖ¸é À妽º¸¦ ³Ñ°ÜÁÜ ( n ¼øÈ¸ )
+static _int Get_BoneIndex(const _char* pBoneName, vector Bones); // 본� 벡터와 �름� 넘겨주면 ��스를 넘겨줌 ( n 순회 )
_int Get_BoneIndex(const _char* pBoneName) const;
_matrix Get_BoneMatrix(_uint iBoneIndex);
#pragma endregion
@@ -74,7 +74,7 @@ static _int Get_BoneIndex(const _char* pBoneName, vector Bones); /
HRESULT Ready_Materials_FromFile(const aiScene* pAIScene, const _char* pModelFilePath);
HRESULT Ready_Animations(const aiScene* pAIScene);
HRESULT Ready_Bones(const aiNode* pAINode, _int iParentIndex);
- // ¹ÙÀ̳ʸ®
+ // 바�너리
_bool SaveAssimpModel(const _char* filename);
_int SaveNodeRecursive(const aiNode* pAINode, std::vector& outNodes, _int parentIndex);
//
@@ -88,49 +88,49 @@ static _int Get_BoneIndex(const _char* pBoneName, vector Bones); /
#endif
private:
- MODEL m_eType = {}; // ¸ðµ¨ÀÇ Å¸ÀÔ
- _float4x4 m_PreTransformMatrix = {}; // »çÀü¿¡ ·çÆ®º»¿¡ °öÇØÁÙ ¸ÅÆ®¸¯½º
+ MODEL m_eType = {}; // 모�� 타입
+ _float4x4 m_PreTransformMatrix = {}; // ì‚¬ì „ì—� 루트본ì—� 곱해줄 매트ë¦ìФ
- _uint m_iNumMeshes = {}; // ¸Þ½¬ÀÇ °¹¼ö
- vector m_Meshes; // ¸Þ½¬ÀÇ º¤ÅÍ
- _uint m_iNumPhysXMeshes = {}; // ÇÇÁ÷½º ¸Þ½¬ÀÇ °¹¼ö
- vector m_TriMeshes = {}; // ÇÇÁ÷½º ¸Þ½¬ÀÇ °¹¼ö
+ _uint m_iNumMeshes = {}; // 메쉬� 갯수
+ vector m_Meshes; // 메쉬� 벡터
+ _uint m_iNumPhysXMeshes = {}; // 피�스 메쉬� 갯수
+ vector m_TriMeshes = {}; // 피�스 메쉬� 갯수
- _uint m_iNumMaterials = {}; // ¸ÓÅ׸®¾óÀÇ °¹¼ö
- vector m_Materials; // ¸ÓÅ׸®¾óÀÇ º¤ÅÍ
+ _uint m_iNumMaterials = {}; // 머테리얼� 갯수
+ vector m_Materials; // 머테리얼� 벡터
- vector m_Bones; // º»ÀÇ º¤ÅÍ, Á¤·Ä¼ø¼´Â ·çÆ®º»ºÎÅÍ Æ®¸®ÀÇ ¸¶Áö¸· ³ëµå±îÁö
+ vector m_Bones; // 본ì�˜ 벡터, ì •ë ¬ìˆœì„œëŠ” 루트본부터 트리ì�˜ 마지막 노드까지
- _int m_iCurrentAnimIndex = { -1 }; // ÇöÀç ¼±ÅÃµÈ ¾Ö´Ï¸ÞÀÌ¼Ç ( m_AnimationsÀÇ À妽º )
- _uint m_iNumAnimations = {}; // ¾Ö´Ï¸ÞÀ̼ÇÀÇ Á¾·ù
- _bool m_bIsLoop = { false }; // ·çÇÁ¾Ö´Ï¸ÞÀ̼ÇÀÎÁö
- _bool m_bIsFinishedAnim = { false }; // ´ë»ó ¾Ö´Ï¸ÞÀ̼ÇÀÌ ³¡³µ´ÂÁö
- _bool m_bIsFinishedLerp = { false }; // ·²ÇÁ ¾Ö´Ï¸ÞÀ̼ÇÀÌ ³¡³µ´ÂÁö
+ _int m_iCurrentAnimIndex = { -1 }; // 현재 ì„ íƒ�ë�œ ì• ë‹ˆë©”ì�´ì…˜ ( m_Animationsì�˜ ì�¸ë�±ìФ )
+ _uint m_iNumAnimations = {}; // ì• ë‹ˆë©”ì�´ì…˜ì�˜ 종류
+ _bool m_bIsLoop = { false }; // ë£¨í”„ì• ë‹ˆë©”ì�´ì…˜ì�¸ì§€
+ _bool m_bIsFinishedAnim = { false }; // 대ìƒ� ì• ë‹ˆë©”ì�´ì…˜ì�´ ë��났는지
+ _bool m_bIsFinishedLerp = { false }; // 럴프 ì• ë‹ˆë©”ì�´ì…˜ì�´ ë��났는지
_bool m_bPlayAnim = { true };
- vector m_Animations; // ¾Ö´Ï¸ÞÀ̼ÇÀÇ º¤ÅÍ,
+ vector m_Animations; // ì• ë‹ˆë©”ì�´ì…˜ì�˜ 벡터,
- class CLerpAnim* m_pLerpAnim = { nullptr }; // ·²ÇÁÀü¿ë ¾Ö´Ï¸ÞÀ̼Ç
+ class CLerpAnim* m_pLerpAnim = { nullptr }; // ëŸ´í”„ì „ìš© ì• ë‹ˆë©”ì�´ì…˜
- _int m_iRootBoneIndex = { -1 }; // ·çÆ®º»ÀÇ À妽º
- _matrix m_PrevAnimationMatrix = XMMatrixIdentity(); // ·çÆ®º»ÀÇ ÀÌÀü À§Ä¡
- _matrix m_DeltaAnimationMatrix = {}; // ·çÆ®º»ÀÇ µ¨Å¸¾Ö´Ï¸ÞÀ̼Ç
- class CTransform* m_pTransform = { nullptr }; // ¸ðµ¨ ´ë»óÀÇ Æ®·£½ºÆû
+ _int m_iRootBoneIndex = { -1 }; // 루트본� ��스
+ _matrix m_PrevAnimationMatrix = XMMatrixIdentity(); // 루트본ì�˜ ì�´ì „ 위치
+ _matrix m_DeltaAnimationMatrix = {}; // 루트본ì�˜ ë�¸íƒ€ì• 니메ì�´ì…˜
+ class CTransform* m_pTransform = { nullptr }; // 모� 대�� 트랜스�
- // ¹ÙÀ̳ʸ®
+ // 바�너리
SaveModel* m_pSaveModel = { nullptr };
list m_SaveModel;
//
private:
- // ¹ÙÀ̳ʸ®
+ // 바�너리
virtual HRESULT Initialize_Prototype(MODEL eType, const _char* pModelFilePath, _fmatrix PreTransformMatrix);
bool LoadData(const _char* filename);
//
virtual HRESULT Initialize(void* pArg) override;
private:
- // ¹ÙÀ̳ʸ®
+ // 바�너리
HRESULT Ready_Meshes();
HRESULT Ready_Materials(const _char* pModelFilePath);
HRESULT Ready_Bones(const std::vector& allNodes, _int currentIndex, _int parentIndex);
@@ -138,7 +138,7 @@ static _int Get_BoneIndex(const _char* pBoneName, vector Bones); /
//
public:
- // ¹ÙÀ̳ʸ®
+ // 바�너리
static CModel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, MODEL eType, const _char* pModelFilePath, _fmatrix PreTransformMatrix = XMMatrixIdentity());
//
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr);
diff --git a/Jusin154_Team3D/Engine/Public/Prototype_Manager.h b/Jusin154_Team3D/Engine/Public/Prototype_Manager.h
index be94291b7..ddf1ceeb8 100644
--- a/Jusin154_Team3D/Engine/Public/Prototype_Manager.h
+++ b/Jusin154_Team3D/Engine/Public/Prototype_Manager.h
@@ -71,7 +71,7 @@ class CPrototype_Manager final : public CBase
//¸¸µé°í ¼±ÅÃÇÒ ½Ã¿¡ ³» ppOut¿¡ Ŭ·ÐÇÏ´Â ±â´ÉÀ» ´ã´ç
template
- void Asset_Description(_uint iLevel, const _char* pComponentName, CComponent** ppOut, void* pDesc, class CGameObject* pOwner = nullptr, _wstring wstrGroupName = L"")
+ void Asset_Description(_uint iLevel, const _char* pComponentName, Engine::CComponent** ppOut, void* pDesc, class CGameObject* pOwner = nullptr, _wstring wstrGroupName = L"")
{
vector pComponentNames = {};
vector<_string> strNames = {};
@@ -131,26 +131,67 @@ class CPrototype_Manager final : public CBase
return;
}
- static _int s_iCurrentItem = -1;
+ static _int s_iCurrentItem = 0;
+ static ImGuiTextFilter filter;
// ´Ù¸¥ ¾î¼ÂÀÏ °æ¿ì ÄÞº¸·Î ¶ç¿ì±â
- if (GUI::Combo(pComponentName, &s_iCurrentItem, pComponentNames.data(), (_int)pComponentNames.size()))
+ if(GUI::BeginCombo(pComponentName, (s_iCurrentItem >= 0 && s_iCurrentItem < pComponentNames.size())
+ ? pComponentNames[s_iCurrentItem] : "NONE"))
{
- if (*ppOut != nullptr)
- Safe_Release(*ppOut);
+ if (ImGui::IsWindowAppearing())
+ {
+ ImGui::SetKeyboardFocusHere();
+ filter.Clear();
+ }
- _string strComponentName = pComponentNames[s_iCurrentItem];
- _wstring wstrComponentName = CMyTools::ToWstring(strComponentName);
- auto iter = m_pAssets[iLevel].find(wstrComponentName);
+ filter.Draw("##Filter", -FLT_MIN);
+
+
+ for (_uint i = 0; i < pComponentNames.size(); i++)
+ {
+ bool is_selected = (s_iCurrentItem == i);
+
+ if (filter.PassFilter(pComponentNames[i]))
+ {
+
+ if (GUI::Selectable(pComponentNames[i], is_selected))
+ {
+ s_iCurrentItem = i;
+ }
+
+ if (is_selected)
+ {
+
+ ImGui::SetItemDefaultFocus();
+ }
+
+ }
+
+ }
+
+ GUI::EndCombo();
+ }
+
+ if (GUI::Button("Select"))
+ {
+ auto iter = m_pAssets[iLevel].find(CMyTools::ToWstring(pComponentNames[s_iCurrentItem]));
if (iter == m_pAssets[iLevel].end()) {
+
+
+ GUI::EndCombo();
+
return;
}
+ if (*ppOut != nullptr)
+ Safe_Release(*ppOut);
+
*ppOut = iter->second->Clone(pDesc, pOwner);
}
+
}
#endif
diff --git a/Jusin154_Team3D/Engine/Public/Renderer.h b/Jusin154_Team3D/Engine/Public/Renderer.h
index 0bf44c262..1a2be66ad 100644
--- a/Jusin154_Team3D/Engine/Public/Renderer.h
+++ b/Jusin154_Team3D/Engine/Public/Renderer.h
@@ -61,8 +61,9 @@ class CRenderer final : public CBase
void Render_Effect();
void Render_NonLight();
void Render_Blend();
- void Render_UI();
void Render_LastColor();
+ void Render_UI();
+
#ifdef _DEBUG
private: