Do alot of stuff
@@ -18,12 +18,17 @@ set(SOURCES
|
||||
"src/Effects/Effect.cpp"
|
||||
"src/Effects/BaseEffect.cpp"
|
||||
"src/Effects/FireEffect.cpp"
|
||||
|
||||
"src/Scenes/BaseScene.cpp"
|
||||
"src/Scenes/MainScene.cpp"
|
||||
"src/Scenes/DioramaScene.cpp"
|
||||
)
|
||||
|
||||
SET(INCLUDE_DIRS
|
||||
"src"
|
||||
"src/Math"
|
||||
"src/Effects"
|
||||
"src/Scenes"
|
||||
)
|
||||
|
||||
# Create the executable
|
||||
@@ -45,21 +50,11 @@ endif()
|
||||
|
||||
|
||||
# Copy resources to output folder
|
||||
set(RESOURCES_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/resources")
|
||||
file(GLOB_RECURSE RESOURCE_FILES
|
||||
"${RESOURCES_SOURCE_DIR}/*.jpg"
|
||||
"${RESOURCES_SOURCE_DIR}/*.png"
|
||||
"${RESOURCES_SOURCE_DIR}/*.obj"
|
||||
"${RESOURCES_SOURCE_DIR}/*.fx"
|
||||
"${RESOURCES_SOURCE_DIR}/*.mtl"
|
||||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/resources
|
||||
$<TARGET_FILE_DIR:${PROJECT_NAME}>/resources
|
||||
)
|
||||
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
|
||||
|
||||
@@ -15,7 +15,7 @@ float3 gCameraPosition : CameraPosition;
|
||||
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 PI = 3.14159f;
|
||||
static const float gSpecularReflectance = 1.f;
|
||||
@@ -61,6 +61,7 @@ VS_OUTPUT VS(VS_INPUT input){
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
float3 Phong(float ks, float exp, float3 l, float3 v, float3 n)
|
||||
{
|
||||
float3 reflected = reflect(l, n);
|
||||
@@ -92,8 +93,8 @@ float3 Shade(VS_OUTPUT input)
|
||||
float3x3 tangentSpaceAxis = float3x3(input.Tangent, binormal, input.Normal);
|
||||
|
||||
// Sample and transform normal map
|
||||
normal = float3(2.f * normalSample.x - 1.f,
|
||||
2.f * normalSample.y - 1.f,
|
||||
normal = float3(2.f * normalSample.x - 1.f,
|
||||
2.f * normalSample.y - 1.f,
|
||||
2.f * normalSample.z - 1.f);
|
||||
normal = mul(normal, tangentSpaceAxis);
|
||||
}
|
||||
@@ -110,15 +111,15 @@ float3 Shade(VS_OUTPUT input)
|
||||
float3 observedArea = float3(cosAngle, cosAngle, cosAngle);
|
||||
|
||||
// Combine lighting components
|
||||
float3 color = saturate(diffuse * observedArea + specular + gAmbient * cosAngle);
|
||||
float3 color = saturate((diffuse + specular + gAmbient) * observedArea);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
float4 PS(VS_OUTPUT input) : SV_TARGET{
|
||||
|
||||
float4 PS(VS_OUTPUT input) : SV_TARGET {
|
||||
return float4(Shade(input), 1.f);
|
||||
}
|
||||
|
||||
DepthStencilState gDepthStencilState
|
||||
{
|
||||
//enable
|
||||
@@ -133,6 +134,7 @@ DepthStencilState gDepthStencilState
|
||||
technique11 DefaultTechnique{
|
||||
pass P0 {
|
||||
SetDepthStencilState(gDepthStencilState, 0);
|
||||
SetRasterizerState(gRasterizerState);
|
||||
SetVertexShader( CompileShader( vs_5_0, VS() ) );
|
||||
SetGeometryShader( NULL );
|
||||
SetPixelShader( CompileShader( ps_5_0, PS() ) );
|
||||
|
||||
|
Before Width: | Height: | Size: 982 KiB |
|
Before Width: | Height: | Size: 340 KiB |
|
Before Width: | Height: | Size: 179 KiB |
|
Before Width: | Height: | Size: 383 KiB |
131
project/resources/brok/brok.mtl
Normal 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
BIN
project/resources/brok/tx_bloodmap1_125851c06dae57ba.png
Normal file
|
After Width: | Height: | Size: 43 KiB |
BIN
project/resources/brok/tx_bloodmap2_a5a1afc9077858aa.png
Normal file
|
After Width: | Height: | Size: 47 KiB |
BIN
project/resources/brok/tx_bloodmap3_011a1abe35a2c2db.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 1020 KiB |
|
After Width: | Height: | Size: 786 KiB |
|
After Width: | Height: | Size: 337 KiB |
|
After Width: | Height: | Size: 3.6 MiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 1.7 MiB |
|
After Width: | Height: | Size: 453 KiB |
|
After Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 2.2 MiB |
|
After Width: | Height: | Size: 8.6 MiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 557 KiB |
|
After Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 623 KiB |
|
After Width: | Height: | Size: 6.3 MiB |
|
After Width: | Height: | Size: 412 KiB |
|
After Width: | Height: | Size: 2.1 MiB |
BIN
project/resources/brok/tx_brok00_tool_m1_faceb329ee7b9d8a.png
Normal file
|
After Width: | Height: | Size: 282 KiB |
BIN
project/resources/brok/tx_brok00_tool_n_abdae47e0135e10e.png
Normal file
|
After Width: | Height: | Size: 2.0 MiB |
|
After Width: | Height: | Size: 6.8 MiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 539 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 2.6 MiB |
|
After Width: | Height: | Size: 149 KiB |
|
After Width: | Height: | Size: 2.5 MiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 122 KiB |
|
After Width: | Height: | Size: 103 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 37 KiB |
BIN
project/resources/brok/tx_leather03_diffuse_28d2717f6dca0090.png
Normal file
|
After Width: | Height: | Size: 108 KiB |
BIN
project/resources/brok/tx_leather03_gloss_6914f321d84e431a.png
Normal file
|
After Width: | Height: | Size: 105 KiB |
BIN
project/resources/brok/tx_leather03_gloss_b69e3309844f9d35.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
project/resources/brok/tx_leather03_normal_12567c038718e7c3.png
Normal file
|
After Width: | Height: | Size: 180 KiB |
BIN
project/resources/brok/tx_leather04_ao_2aa71809153eab9c.png
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
project/resources/brok/tx_leather04_diffuse_9c1b2b6ef4956b98.png
Normal file
|
After Width: | Height: | Size: 108 KiB |
BIN
project/resources/brok/tx_leather04_gloss_22af5362933b549c.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
project/resources/brok/tx_leather04_normal_d945404de0cc8d8b.png
Normal file
|
After Width: | Height: | Size: 158 KiB |
|
After Width: | Height: | Size: 579 KiB |
BIN
project/resources/brok/tx_max3regions_51e07a2eba53043a.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
project/resources/brok/tx_metal01_diffuse_c8b116b7b86c9fee.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
project/resources/brok/tx_metal01_normal_9bd53178bb4d1280.png
Normal file
|
After Width: | Height: | Size: 162 KiB |
BIN
project/resources/brok/tx_metal01b_gloss_3396937753662f4a.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
project/resources/brok/tx_metal02_gloss_38db5bef7b91a1cf.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
project/resources/brok/tx_metal02_normal_fa578c4689e15be3.png
Normal file
|
After Width: | Height: | Size: 138 KiB |
|
After Width: | Height: | Size: 214 KiB |
BIN
project/resources/brok/tx_sindri00_beard_d_dbb0fca7c35eabfd.png
Normal file
|
After Width: | Height: | Size: 737 KiB |
BIN
project/resources/brok/tx_sindri00_beard_n_0bc545985004b8e9.png
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
project/resources/brok/tx_sindri00_beard_oA_65d03a538cc143d8.png
Normal file
|
After Width: | Height: | Size: 580 KiB |
BIN
project/resources/brok/tx_sindri00_beard_o_65d03a538cc143d8.png
Normal file
|
After Width: | Height: | Size: 510 KiB |
BIN
project/resources/brok/tx_skin02_normal_e986be7d75de7936.png
Normal file
|
After Width: | Height: | Size: 179 KiB |
BIN
project/resources/brok/tx_skin03_gloss_fc01754eaa8f15bf.png
Normal file
|
After Width: | Height: | Size: 284 KiB |
BIN
project/resources/brok/tx_skin03_normal_ae65c0732338e034.png
Normal file
|
After Width: | Height: | Size: 758 KiB |
BIN
project/resources/brok/tx_smoke_dust_cd.00_8c8026eb2b72ec9e.png
Normal file
|
After Width: | Height: | Size: 922 KiB |
|
After Width: | Height: | Size: 2.0 MiB |
|
After Width: | Height: | Size: 201 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 352 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 1.6 MiB |
|
After Width: | Height: | Size: 122 KiB |
|
After Width: | Height: | Size: 112 KiB |
|
After Width: | Height: | Size: 307 KiB |
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 2.4 MiB |
BIN
project/resources/brok/tx_wood03_diffuse_2828824099f69c81.png
Normal file
|
After Width: | Height: | Size: 61 KiB |
BIN
project/resources/brok/tx_wood03_gloss_91f6b75b86332e10.png
Normal file
|
After Width: | Height: | Size: 89 KiB |
BIN
project/resources/brok/tx_wood03_normal_6c4d8807fb57716e.png
Normal file
|
After Width: | Height: | Size: 151 KiB |
|
After Width: | Height: | Size: 259 KiB |
BIN
project/resources/brok/tx_wrinklemap1_7bb6d1c3ae456621.png
Normal file
|
After Width: | Height: | Size: 2.3 MiB |
BIN
project/resources/brok/tx_wrinklemap2_e3c5d7775e137b66.png
Normal file
|
After Width: | Height: | Size: 2.3 MiB |
BIN
project/resources/brok/tx_wrinklemap3_e2c474577544ab02.png
Normal file
|
After Width: | Height: | Size: 2.3 MiB |
|
Before Width: | Height: | Size: 635 KiB After Width: | Height: | Size: 635 KiB |
|
Before Width: | Height: | Size: 663 KiB After Width: | Height: | Size: 663 KiB |
|
Before Width: | Height: | Size: 214 KiB After Width: | Height: | Size: 214 KiB |
|
Before Width: | Height: | Size: 290 KiB After Width: | Height: | Size: 290 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |