Skip to content

Commit

Permalink
Merge pull request #139 from vilbeyli/staging
Browse files Browse the repository at this point in the history
Release 0.7.0 - Multi-threaded command recording & frustum culling, SM6, Ambient Occlusion
  • Loading branch information
vilbeyli authored Jul 4, 2021
2 parents b68ff89 + a767400 commit e309621
Show file tree
Hide file tree
Showing 121 changed files with 17,343 additions and 3,183 deletions.
12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# Precompiled Headers
*.gch
*.pch
Libs/AMDFidelityFX/CACAO/PrecompiledShadersDXIL/*

# Compiled Dynamic libraries
*.so
Expand Down Expand Up @@ -62,8 +63,7 @@ bld/
[Oo]bj/
[Ll]og/
Build/_artifacts/
ShaderCache/
PSOCache/
Cache/
Data/Textures/PBR/*/*.png

# Visual Studio 2015 cache/options directory
Expand Down Expand Up @@ -349,4 +349,10 @@ $RECYCLE.BIN/
!Tools/wget.exe
!Libs/WinPixEventRuntime/bin
!Libs/WinPixEventRuntime/bin/x64/
!Libs/WinPixEventRuntime/bin/x64/*
!Libs/WinPixEventRuntime/bin/x64/*
!Libs/DirectXCompiler/lib
!Libs/DirectXCompiler/lib/x64/
!Libs/DirectXCompiler/lib/x64/*
!Libs/DirectXCompiler/bin
!Libs/DirectXCompiler/bin/x64/
!Libs/DirectXCompiler/bin/x64/*
183 changes: 125 additions & 58 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ add_compile_options(/MP)

set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${PROJECT_NAME})

#
# DATA
#
set (Resource
"Data/Resources/VQE.rc"
"Data/Resources/resource.h"
Expand Down Expand Up @@ -44,6 +47,9 @@ set (Materials
"Data/Materials/DefaultMaterials.xml"
)

#
# SHADERS
#
set (Shaders
"Shaders/hello-triangle.hlsl"
"Shaders/hello-cube.hlsl"
Expand All @@ -58,74 +64,110 @@ set (Shaders
"Shaders/Lighting.hlsl"
"Shaders/LightingConstantBufferData.h"
"Shaders/Unlit.hlsl"
"Shaders/DepthPass.hlsl"
"Shaders/ShadowDepthPass.hlsl"
"Shaders/DepthPrePass.hlsl"
"Shaders/DepthResolve.hlsl"
"Shaders/CubemapConvolution.hlsl"
"Shaders/GaussianBlur.hlsl"
"Shaders/AMDFidelityFX.hlsl"
)

set (HeaderVQE
"Source/Application/Platform.h"
"Source/Application/Window.h"
"Source/Application/Settings.h"
"Source/Application/Types.h"
"Source/Application/Math.h"
"Source/Application/VQEngine.h"
"Source/Application/Events.h"
"Source/Application/Mesh.h"
"Source/Application/Material.h"
"Source/Application/Model.h"
"Source/Application/Geometry.h"
"Source/Application/Transform.h"
"Source/Application/Quaternion.h"
"Source/Application/Camera.h"
"Source/Application/Input.h"
"Source/Application/AssetLoader.h"
"Source/Application/Scene.h"
"Source/Application/Light.h"
"Source/Application/GameObject.h"
"Source/Application/Memory.h"
"Source/Application/GPUMarker.h"
#
# SOURCE
#
set (RenderPassFiles
"Source/Engine/RenderPass/RenderPass.h"
"Source/Engine/RenderPass/AmbientOcclusion.h"
"Source/Engine/RenderPass/DepthPrePass.h"

"Source/Engine/RenderPass/AmbientOcclusion.cpp"
"Source/Engine/RenderPass/DepthPrePass.cpp"
)

set (CoreFiles
"Source/Engine/Core/Platform.h"
"Source/Engine/Core/Window.h"
"Source/Engine/Core/Input.h"
"Source/Engine/Core/Events.h"
"Source/Engine/Core/Types.h"
"Source/Engine/Core/Memory.h"

"Source/Engine/Core/Platform.cpp"
"Source/Engine/Core/Window.cpp"
"Source/Engine/Core/Input.cpp"
"Source/Engine/Core/Events.cpp"
"Source/Engine/Core/VQEngine_WindowEvents.cpp"
"Source/Engine/Core/VQEngine_EventHandlers.cpp"
"Source/Engine/Core/FileParser.cpp"
"Source/Engine/Core/Memory.cpp"

)

set (SceneFiles
"Shaders/LightingConstantBufferData.h"

"Source/Engine/Scene/Transform.h"
"Source/Engine/Scene/Quaternion.h"
"Source/Engine/Scene/Scene.h"
"Source/Engine/Scene/Light.h"
"Source/Engine/Scene/Camera.h"
"Source/Engine/Scene/Mesh.h"
"Source/Engine/Scene/Material.h"
"Source/Engine/Scene/Model.h"
"Source/Engine/Scene/GameObject.h"

"Source/Engine/Scene/Scene.cpp"
"Source/Engine/Scene/SceneLoading.cpp"
"Source/Engine/Scene/Light.cpp"
"Source/Engine/Scene/Camera.cpp"
"Source/Engine/Scene/Mesh.cpp"
"Source/Engine/Scene/Material.cpp"
"Source/Engine/Scene/Model.cpp"
"Source/Engine/Scene/GameObject.cpp"
"Source/Engine/Scene/Transform.cpp"
"Source/Engine/Scene/Quaternion.cpp"

)

set (SourceVQE
"Source/Application/Platform.cpp"
"Source/Application/Window.cpp"
"Source/Application/Main.cpp"
"Source/Application/VQEngine_Main.cpp"
"Source/Application/VQEngine_Render.cpp"
"Source/Application/VQEngine_Update.cpp"
"Source/Application/VQEngine_WindowEvents.cpp"
"Source/Application/VQEngine_EventHandlers.cpp"
"Source/Application/EnvironmentMap.cpp"
"Source/Application/FileParser.cpp"
"Source/Application/Events.cpp"
"Source/Application/Mesh.cpp"
"Source/Application/Material.cpp"
"Source/Application/Model.cpp"
"Source/Application/Geometry.cpp"
"Source/Application/Transform.cpp"
"Source/Application/Math.cpp"
"Source/Application/Quaternion.cpp"
"Source/Application/Camera.cpp"
"Source/Application/Input.cpp"
"Source/Application/AssetLoader.cpp"
"Source/Application/Scene.cpp"
"Source/Application/Light.cpp"
"Source/Application/GameObject.cpp"
"Source/Application/Memory.cpp"
"Source/Application/GPUMarker.cpp"
"Source/Engine/VQEngine.h"
"Source/Engine/VQEngine_RenderCommon.h"
"Source/Engine/Settings.h"
"Source/Engine/Math.h"
"Source/Engine/Culling.h"
"Source/Engine/Geometry.h"
"Source/Engine/AssetLoader.h"
"Source/Engine/GPUMarker.h"

"Source/Engine/Main.cpp"
"Source/Engine/VQEngine_Main.cpp"
"Source/Engine/VQEngine_Render.cpp"
"Source/Engine/VQEngine_RenderCommands.cpp"
"Source/Engine/VQEngine_Update.cpp"
"Source/Engine/EnvironmentMap.cpp"
"Source/Engine/Geometry.cpp"
"Source/Engine/Math.cpp"
"Source/Engine/Culling.cpp"
"Source/Engine/AssetLoader.cpp"
"Source/Engine/GPUMarker.cpp"
)

set (FidelityFX
"Shaders/FidelityFX/ffx_a.h"
"Shaders/FidelityFX/CAS/ffx_cas.h"
set (FidelityFXShaders
"Shaders/AMDFidelityFX/CAS/ffx_a.h"
"Shaders/AMDFidelityFX/CAS/ffx_cas.h"
# "Shaders/FidelityFX/SPD/ffx_spd.h"
)

set (PIXIncl
"Libs/WinPixEventRuntime/Include"
set (LibsIncl
"Libs/"
)

set (LibFFX
"Libs/AMDFidelityFX/CACAO/ffx_cacao_defines.h"
"Libs/AMDFidelityFX/CACAO/ffx_cacao.cpp"
"Libs/AMDFidelityFX/CACAO/ffx_cacao.h"
"Libs/AMDFidelityFX/CACAO/ffx_cacao_impl.cpp"
"Libs/AMDFidelityFX/CACAO/ffx_cacao_impl.h"
)

# ouput exe to bin directory
Expand Down Expand Up @@ -154,23 +196,35 @@ source_group("Config" FILES ${Config})
source_group("Resource" FILES ${Resource})
source_group("Icons" FILES ${Icons})
source_group("Shaders" FILES ${Shaders})
source_group("Shaders\\AMD-FidelityFX" FILES ${FidelityFX})
source_group("Shaders\\AMD-FidelityFX" FILES ${FidelityFXShaders})
source_group("Scenes" FILES ${Scenes})
source_group("Materials" FILES ${Materials})
source_group("Source\\RenderPass" FILES ${RenderPassFiles})
source_group("Source\\Core" FILES ${CoreFiles})
source_group("Source\\Scene" FILES ${SceneFiles})
source_group("Source" FILES ${SourceVQE})
source_group("Libs\\AMDFidelityFX\\CACAO" FILES ${LibFFX})

set_source_files_properties(${Config} PROPERTIES VS_TOOL_OVERRIDE "Text")
set_source_files_properties(${Materials} PROPERTIES VS_TOOL_OVERRIDE "Text")
set_source_files_properties(${Scenes} PROPERTIES VS_TOOL_OVERRIDE "Text")
set_source_files_properties(${Shaders} PROPERTIES VS_TOOL_OVERRIDE "Text")
set_source_files_properties(${FidelityFX} PROPERTIES VS_TOOL_OVERRIDE "Text")
set_source_files_properties(${FidelityFXShaders} PROPERTIES VS_TOOL_OVERRIDE "Text")
set_source_files_properties(${CoreFiles} PROPERTIES VS_TOOL_OVERRIDE "Text")
set_source_files_properties(${RenderPassFiles} PROPERTIES VS_TOOL_OVERRIDE "Text")
set_source_files_properties(${SceneFiles} PROPERTIES VS_TOOL_OVERRIDE "Text")
set_source_files_properties(${LibFFX} PROPERTIES VS_TOOL_OVERRIDE "Text")
set_source_files_properties(Data/Resources/VQE.rc PROPERTIES VS_TOOL_OVERRIDE "Resource compiler")
set_source_files_properties(Data/Icons/VQE32.ico PROPERTIES VS_TOOL_OVERRIDE "Image")

link_directories(${CMAKE_CURRENT_SOURCE_DIR}/Libs/VQUtils/Bin/)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/Libs/WinPixEventRuntime/bin/x64)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/Libs/DirectXCompiler/lib/x64)

add_definitions(-DFFX_CACAO_ENABLE_D3D12)

# Create a library with the project name that is build with the Headers and Source files
add_executable( ${PROJECT_NAME} ${HeaderVQE} ${SourceVQE} ${Config} ${Scenes} ${Resource} ${Shaders} ${Materials} ${FidelityFX})
add_executable( ${PROJECT_NAME} ${SourceVQE} ${Config} ${Scenes} ${Resource} ${Shaders} ${Materials} ${FidelityFXShaders} ${LibFFX} ${RenderPassFiles} ${CoreFiles} ${SceneFiles})

set_target_properties(${PROJECT_NAME} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY} )

Expand Down Expand Up @@ -201,13 +255,26 @@ set_target_properties(D3D12MA PROPERTIES FOLDER Libs)

# Make sure the compiler can find include files for the libraries
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${Includes})
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${PIXIncl})
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${LibsIncl})

target_link_libraries(${PROJECT_NAME} PRIVATE VQUtils VQRenderer assimp WinPixEventRuntime)


add_custom_command(TARGET ${PROJECT_NAME} PRE_BUILD
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/Libs/AMDFidelityFX/CACAO/build_shaders_dxil.bat)

add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/Libs/WinPixEventRuntime/bin/x64/WinPixEventRuntime.dll"
$<TARGET_FILE_DIR:${PROJECT_NAME}>
)
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/Libs/DirectXCompiler/bin/x64/dxcompiler.dll"
$<TARGET_FILE_DIR:${PROJECT_NAME}>
)
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/Libs/DirectXCompiler/bin/x64/dxil.dll"
$<TARGET_FILE_DIR:${PROJECT_NAME}>
)
8 changes: 0 additions & 8 deletions Data/EnvironmentMaps.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[Shanghai]
Path=Data/Textures/HDRI/shanghai_bund_8k.hdr
MaxCLL=20374

[VondelPark]
Path=Data/Textures/HDRI/sunny_vondelpark_8k.hdr
MaxCLL=11987
Expand All @@ -17,7 +13,3 @@ MaxCLL=340
[GymEntrance]
Path=Data/Textures/HDRI/gym_entrance_8k.hdr
MaxCLL=26293

[WinterEvening]
Path=Data/Textures/HDRI/winter_evening_8k.hdr
MaxCLL=10247
Loading

0 comments on commit e309621

Please sign in to comment.