Do alot of stuff

This commit is contained in:
2024-12-26 21:09:52 +01:00
parent 9f90739b90
commit 033909656a
151 changed files with 599059 additions and 157 deletions

View File

@@ -18,12 +18,17 @@ set(SOURCES
"src/Effects/Effect.cpp" "src/Effects/Effect.cpp"
"src/Effects/BaseEffect.cpp" "src/Effects/BaseEffect.cpp"
"src/Effects/FireEffect.cpp" "src/Effects/FireEffect.cpp"
"src/Scenes/BaseScene.cpp"
"src/Scenes/MainScene.cpp"
"src/Scenes/DioramaScene.cpp"
) )
SET(INCLUDE_DIRS SET(INCLUDE_DIRS
"src" "src"
"src/Math" "src/Math"
"src/Effects" "src/Effects"
"src/Scenes"
) )
# Create the executable # Create the executable
@@ -45,21 +50,11 @@ endif()
# Copy resources to output folder # Copy resources to output folder
set(RESOURCES_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/resources") add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
file(GLOB_RECURSE RESOURCE_FILES COMMAND ${CMAKE_COMMAND} -E copy_directory
"${RESOURCES_SOURCE_DIR}/*.jpg" ${CMAKE_CURRENT_SOURCE_DIR}/resources
"${RESOURCES_SOURCE_DIR}/*.png" $<TARGET_FILE_DIR:${PROJECT_NAME}>/resources
"${RESOURCES_SOURCE_DIR}/*.obj"
"${RESOURCES_SOURCE_DIR}/*.fx"
"${RESOURCES_SOURCE_DIR}/*.mtl"
) )
set(RESOURCES_OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/resources/")
file(MAKE_DIRECTORY ${RESOURCES_OUT_DIR})
foreach(RESOURCE ${RESOURCE_FILES})
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${RESOURCE}
${RESOURCES_OUT_DIR})
endforeach(RESOURCE)
# Simple Directmedia Layer # Simple Directmedia Layer

View File

@@ -15,7 +15,7 @@ float3 gCameraPosition : CameraPosition;
bool gUseNormal : UseNormal; bool gUseNormal : UseNormal;
static const float3 gAmbient = float3(.03f, .03f, .03f); static const float3 gAmbient = float3(.025f, .025f, .025f);
static const float gLightIntensity = 7.f; static const float gLightIntensity = 7.f;
static const float PI = 3.14159f; static const float PI = 3.14159f;
static const float gSpecularReflectance = 1.f; static const float gSpecularReflectance = 1.f;
@@ -61,6 +61,7 @@ VS_OUTPUT VS(VS_INPUT input){
return output; return output;
} }
float3 Phong(float ks, float exp, float3 l, float3 v, float3 n) float3 Phong(float ks, float exp, float3 l, float3 v, float3 n)
{ {
float3 reflected = reflect(l, n); float3 reflected = reflect(l, n);
@@ -110,15 +111,15 @@ float3 Shade(VS_OUTPUT input)
float3 observedArea = float3(cosAngle, cosAngle, cosAngle); float3 observedArea = float3(cosAngle, cosAngle, cosAngle);
// Combine lighting components // Combine lighting components
float3 color = saturate(diffuse * observedArea + specular + gAmbient * cosAngle); float3 color = saturate((diffuse + specular + gAmbient) * observedArea);
return color; return color;
} }
float4 PS(VS_OUTPUT input) : SV_TARGET{
float4 PS(VS_OUTPUT input) : SV_TARGET {
return float4(Shade(input), 1.f); return float4(Shade(input), 1.f);
} }
DepthStencilState gDepthStencilState DepthStencilState gDepthStencilState
{ {
//enable //enable
@@ -133,6 +134,7 @@ DepthStencilState gDepthStencilState
technique11 DefaultTechnique{ technique11 DefaultTechnique{
pass P0 { pass P0 {
SetDepthStencilState(gDepthStencilState, 0); SetDepthStencilState(gDepthStencilState, 0);
SetRasterizerState(gRasterizerState);
SetVertexShader( CompileShader( vs_5_0, VS() ) ); SetVertexShader( CompileShader( vs_5_0, VS() ) );
SetGeometryShader( NULL ); SetGeometryShader( NULL );
SetPixelShader( CompileShader( ps_5_0, PS() ) ); SetPixelShader( CompileShader( ps_5_0, PS() ) );

Binary file not shown.

Before

Width:  |  Height:  |  Size: 982 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 383 KiB

View File

@@ -0,0 +1,131 @@
# Blender 4.3.2 MTL File: 'None'
# www.blender.org
newmtl mesh_13_0_0
Ns 200.000000
Ka 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.500000
illum 2
map_Kd -o 0 -1 0 tx_standardeye00_lacrimal_d_4a42ce4b3816b625.png
map_d -o 0 -1 0 tx_standardeye00_lacrimal_d_4a42ce4b3816b625.png
map_Bump -o 0 -1 0 -bm 1.000000 tx_standardeye00_lacrimal_n_b72cf570302e4924.png
newmtl mesh_15_0_0
Ns 200.000000
Ka 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.500000
illum 2
map_Kd -o 0 -1 0 tx_brok00_head_[0_3]_diffuse_087be559a0f5f848.png
map_d -o 0 -1 0 tx_brok00_head_[0_3]_diffuse_087be559a0f5f848.png
map_Bump -o 0 -1 0 -bm 1.000000 tx_brok00_head_[0_3]_normal_af63b407c6423cdc.png
newmtl mesh_16_0_0
Ns 200.000000
Ka 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.500000
illum 2
map_Kd -o 0 -1 0 tx_brok00_arms_m_[0_3]_diffuse_fa9fad94bbde9e6d.png
map_d -o 0 -1 0 tx_brok00_arms_m_[0_3]_diffuse_fa9fad94bbde9e6d.png
map_Bump -o 0 -1 0 -bm 1.000000 tx_brok00_arms_m_[0_3]_normal_78e78e44b26446e1.png
newmtl mesh_17_0_0
Ns 200.000000
Ka 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.500000
illum 2
map_Kd -o 0 -1 0 tx_brok00_waist_m_diffuse_8384755d057ca24a.png
map_d -o 0 -1 0 tx_brok00_waist_m_diffuse_8384755d057ca24a.png
map_Bump -o 0 -1 0 -bm 1.000000 tx_brok00_waist_m_normal_1c428be548c16292.png
newmtl mesh_20_0_0
Ns 200.000000
Ka 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.500000
illum 2
map_Kd -o 0 -1 0 tx_brok00_shoulder_m_[0_7]_diffuse_87a8bc4d2ba17ec4.png
map_d -o 0 -1 0 tx_brok00_shoulder_m_[0_7]_diffuse_87a8bc4d2ba17ec4.png
newmtl mesh_21_0_0
Ns 200.000000
Ka 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.500000
illum 2
map_Kd -o 0 -1 0 tx_standardmouthnpc_tongue_diffuse_451cf06f9c6f553e.png
map_d -o 0 -1 0 tx_standardmouthnpc_tongue_diffuse_451cf06f9c6f553e.png
newmtl mesh_23_0_0
Ns 200.000000
Ka 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.500000
illum 2
map_Kd -o 0 -1 0 tx_brok00_acc_m_[0_4]_diffuse_56e1cb9971610b5d.png
map_d -o 0 -1 0 tx_brok00_acc_m_[0_4]_diffuse_56e1cb9971610b5d.png
map_Bump -o 0 -1 0 -bm 1.000000 tx_brok00_acc_m_[0_4]_normal_bdfccfa7c86dfa80.png
newmtl mesh_30_0_0
Ns 200.000000
Ka 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.500000
illum 2
map_Kd -o 0 -1 0 tx_standardeye00_inner_d_c98494d83a212377.png
map_d -o 0 -1 0 tx_standardeye00_inner_d_c98494d83a212377.png
map_Bump -o 0 -1 0 -bm 1.000000 tx_standardeye00_inner_n_ecd844c7e5e8e751.png
newmtl mesh_33_0_0
Ns 200.000000
Ka 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.500000
illum 2
map_Kd -o 0 -1 0 tx_standardmouthnpc_teeth_diffuse_8003afa28d9520cb.png
map_d -o 0 -1 0 tx_standardmouthnpc_teeth_diffuse_8003afa28d9520cb.png
newmtl mesh_34_0_0
Ns 200.000000
Ka 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.500000
illum 2
map_Kd -o 0 -1 0 tx_brok00_bracelet_m_[0_7]_diffuse_f7b0058507157ee2.png
map_d -o 0 -1 0 tx_brok00_bracelet_m_[0_7]_diffuse_f7b0058507157ee2.png
map_Bump -o 0 -1 0 -bm 1.000000 tx_brok00_bracelet_m_[0_7]_normal_49d9bf6b72fc8871.png
newmtl mesh_36_0_0
Ns 200.000000
Ka 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.500000
illum 2
map_Kd -o 0 -1 0 tx_brok00_boots_m_diffuse_84487f786f3db581.png
map_d -o 0 -1 0 tx_brok00_boots_m_diffuse_84487f786f3db581.png
map_Bump -o 0 -1 0 -bm 1.000000 tx_brok00_boots_m_normal_1151653da14226c4.png
newmtl mesh_9_0_0
Ns 200.000000
Ka 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.500000
illum 2
map_Kd -o 0 -1 0 tx_sindri00_beard_d_dbb0fca7c35eabfd.png
map_d -o 0 -1 0 tx_sindri00_beard_d_dbb0fca7c35eabfd.png
map_Bump -o 0 -1 0 -bm 1.000000 tx_sindri00_beard_n_0bc545985004b8e9.png

286260
project/resources/brok/brok.obj Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1020 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 786 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 623 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 579 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 758 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 922 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

View File

Before

Width:  |  Height:  |  Size: 635 KiB

After

Width:  |  Height:  |  Size: 635 KiB

View File

Before

Width:  |  Height:  |  Size: 663 KiB

After

Width:  |  Height:  |  Size: 663 KiB

View File

Before

Width:  |  Height:  |  Size: 214 KiB

After

Width:  |  Height:  |  Size: 214 KiB

View File

Before

Width:  |  Height:  |  Size: 290 KiB

After

Width:  |  Height:  |  Size: 290 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Some files were not shown because too many files have changed in this diff Show More