Skip to content

Commit

Permalink
Merge pull request #148 from vilbeyli/dev
Browse files Browse the repository at this point in the history
Release 0.8.0 - ImGui UI & FidelityFX Super Resolution 1.0
  • Loading branch information
vilbeyli authored Nov 8, 2021
2 parents e309621 + 65d5648 commit a0bc41f
Show file tree
Hide file tree
Showing 62 changed files with 7,907 additions and 985 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
[submodule "Data/Models"]
path = Data/Models
url = https://github.com/vilbeyli/VQModels.git
[submodule "Libs/imgui"]
path = Libs/imgui
url = https://github.com/vilbeyli/imgui.git
8 changes: 8 additions & 0 deletions Build/GenerateProjectFiles.bat
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ set SUBMODULE_FILE=CMakeLists.txt
set SUBMODULE_DIR0=..\Libs\VQUtils\
set SUBMODULE_DIR1=..\Libs\D3D12MA\
set SUBMODULE_DIR2=..\Source\Renderer\Libs\D3DX12\
set SUBMODULE_DIR3=..\Libs\imgui\
set SUBMODULE_FILE_PATH0=!SUBMODULE_DIR0!!SUBMODULE_FILE!
set SUBMODULE_FILE_PATH1=!SUBMODULE_DIR1!!SUBMODULE_FILE!
set SUBMODULE_FILE_PATH2=!SUBMODULE_DIR2!
set SUBMODULE_FILE_PATH3=!SUBMODULE_DIR3!!SUBMODULE_FILE!

:: walk thru submodule paths
set MISSING_SUBMODULE_DIRS=
Expand All @@ -90,6 +92,10 @@ if not exist !SUBMODULE_FILE_PATH2! (
set NEED_TO_INIT_SUBMODULES=1
set MISSING_SUBMODULE_DIRS=!MISSING_SUBMODULE_DIRS! !SUBMODULE_DIR2!,
)
if not exist !SUBMODULE_FILE_PATH3! (
set NEED_TO_INIT_SUBMODULES=1
set MISSING_SUBMODULE_DIRS=!MISSING_SUBMODULE_DIRS! !SUBMODULE_DIR3!,
)

:: init submodules if necessary
if !NEED_TO_INIT_SUBMODULES! neq 0 (
Expand All @@ -102,6 +108,7 @@ if !NEED_TO_INIT_SUBMODULES! neq 0 (
git submodule update --init Libs/D3D12MA
git submodule update --init Libs/VQUtils
git submodule update --init Libs/assimp
git submodule update --init Libs/imgui
git submodule update --init Source/Renderer/Libs/D3DX12
cd Build

Expand All @@ -110,6 +117,7 @@ if !NEED_TO_INIT_SUBMODULES! neq 0 (
if not exist !SUBMODULE_FILE_PATH0! ( set NEED_TO_INIT_SUBMODULES=1 )
if not exist !SUBMODULE_FILE_PATH1! ( set NEED_TO_INIT_SUBMODULES=1 )
if not exist !SUBMODULE_FILE_PATH2! ( set NEED_TO_INIT_SUBMODULES=1 )
if not exist !SUBMODULE_FILE_PATH3! ( set NEED_TO_INIT_SUBMODULES=1 )
if !NEED_TO_INIT_SUBMODULES! neq 0 (
echo.
echo [VQBuild] Could not initialize submodule. Make sure all the submodules are initialized and updated.
Expand Down
48 changes: 36 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ set (Resource
set (Scenes
"Data/Levels/Default.xml"
"Data/Levels/Sponza.xml"
"Data/Levels/GeometryUnitTest.xml"
"Data/Levels/EnvironmentMapUnitTest.xml"
"Data/Levels/StressTest.xml"
"Source/Scenes/Scenes.h"
"Source/Scenes/DefaultScene.cpp"
"Source/Scenes/SponzaScene.cpp"
"Source/Scenes/GeometryUnitTestScene.cpp"
"Source/Scenes/EnvironmentMapUnitTestScene.cpp"
"Source/Scenes/StressTestScene.cpp"
)

Expand Down Expand Up @@ -70,6 +70,9 @@ set (Shaders
"Shaders/CubemapConvolution.hlsl"
"Shaders/GaussianBlur.hlsl"
"Shaders/AMDFidelityFX.hlsl"
"Shaders/UI.hlsl"
"Shaders/UIHDRComposite.hlsl"
"Shaders/HDR.hlsl"
)

#
Expand All @@ -90,6 +93,7 @@ set (CoreFiles
"Source/Engine/Core/Input.h"
"Source/Engine/Core/Events.h"
"Source/Engine/Core/Types.h"
"Source/Engine/Core/RenderCommands.h"
"Source/Engine/Core/Memory.h"

"Source/Engine/Core/Platform.cpp"
Expand All @@ -115,6 +119,7 @@ set (SceneFiles
"Source/Engine/Scene/Material.h"
"Source/Engine/Scene/Model.h"
"Source/Engine/Scene/GameObject.h"
"Source/Engine/Scene/Serialization.h"

"Source/Engine/Scene/Scene.cpp"
"Source/Engine/Scene/SceneLoading.cpp"
Expand All @@ -125,8 +130,12 @@ set (SceneFiles
"Source/Engine/Scene/Model.cpp"
"Source/Engine/Scene/GameObject.cpp"
"Source/Engine/Scene/Transform.cpp"
"Source/Engine/Scene/Quaternion.cpp"

"Source/Engine/Scene/Quaternion.cpp"
)

set (PostProcessFiles
"Source/Engine/PostProcess/PostProcess.h"
"Source/Engine/PostProcess/PostProcess.cpp"
)

set (SourceVQE
Expand All @@ -138,12 +147,16 @@ set (SourceVQE
"Source/Engine/Geometry.h"
"Source/Engine/AssetLoader.h"
"Source/Engine/GPUMarker.h"
"Source/Engine/VQUI.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/VQEngine_Input.cpp"
"Source/Engine/VQEngine_Simulation.cpp"
"Source/Engine/VQUI.cpp"
"Source/Engine/EnvironmentMap.cpp"
"Source/Engine/Geometry.cpp"
"Source/Engine/Math.cpp"
Expand All @@ -152,12 +165,18 @@ set (SourceVQE
"Source/Engine/GPUMarker.cpp"
)

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

set (FFX_FSR_Shaders
"Shaders/AMDFidelityFX/FSR1.0/ffx_a.h"
"Shaders/AMDFidelityFX/FSR1.0/ffx_fsr1.h"
)
set (FFX_SPD_Shaders
"Shaders/FidelityFX/SPD/ffx_a.h"
"Shaders/FidelityFX/SPD/ffx_spd.h"
)
set (LibsIncl
"Libs/"
)
Expand Down Expand Up @@ -191,25 +210,29 @@ add_subdirectory(Source/Renderer)
# -DASSIMP_INSTALL=OFF
#)
add_subdirectory(Libs/assimp)
add_subdirectory(Libs/imgui)

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 ${FidelityFXShaders})
source_group("Shaders\\AMD-FidelityFX\\CAS" FILES ${FFX_CAS_Shaders})
source_group("Shaders\\AMD-FidelityFX\\FSR1" FILES ${FFX_FSR_Shaders})
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\\PostProcess" FILES ${PostProcessFiles})
source_group("Source" FILES ${SourceVQE})
source_group("Libs\\AMDFidelityFX\\CACAO" FILES ${LibFFX})
source_group("Libs\\AMD-FidelityFX\\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(${FidelityFXShaders} PROPERTIES VS_TOOL_OVERRIDE "Text")
set_source_files_properties(${FFX_CAS_Shaders} PROPERTIES VS_TOOL_OVERRIDE "Text")
set_source_files_properties(${FFX_FSR_Shaders} 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")
Expand All @@ -224,7 +247,7 @@ 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} ${SourceVQE} ${Config} ${Scenes} ${Resource} ${Shaders} ${Materials} ${FidelityFXShaders} ${LibFFX} ${RenderPassFiles} ${CoreFiles} ${SceneFiles})
add_executable( ${PROJECT_NAME} ${SourceVQE} ${Config} ${Scenes} ${Resource} ${Shaders} ${Materials} ${FFX_FSR_Shaders} ${FFX_CAS_Shaders} ${LibFFX} ${RenderPassFiles} ${CoreFiles} ${PostProcessFiles} ${SceneFiles})

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

Expand Down Expand Up @@ -252,12 +275,13 @@ set_target_properties(zlibstatic PROPERTIES FOLDER Libs/assimp)
#set_target_properties(VQRenderer PROPERTIES FOLDER Libs)
#set_target_properties(VQUtils PROPERTIES FOLDER Libs)
set_target_properties(D3D12MA PROPERTIES FOLDER Libs)
set_target_properties(ImGUI 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} ${LibsIncl})

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


add_custom_command(TARGET ${PROJECT_NAME} PRE_BUILD
Expand Down
4 changes: 2 additions & 2 deletions Data/EngineSettings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ RenderScale=1.0
TripleBuffer=true
AntiAliasing=true
MaxFrameRate=0
HDR=false
HDR=true

[Engine]
Width=1600
Height=900
DisplayMode=Windowed
PreferredDisplay=0
Scene=GeometryUnitTest
Scene=0

DebugWindow=false
DebugWindowWidth=450
Expand Down
35 changes: 23 additions & 12 deletions Data/Levels/Default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@
</FirstPerson>
</Camera>

<!-- GROUND PLANE -->
<GameObject>
<Transform>
<Position>0 -5.5 0</Position>
<Scale>100 0.01 100</Scale>
</Transform>
<Model>
<Mesh>Cube</Mesh>
<MaterialName>Checkerboard</MaterialName>
</Model>
</GameObject>

<!-- OBJECTS -->
<GameObject>
<Transform>
Expand Down Expand Up @@ -118,8 +130,7 @@
</GameObject>

<!-- Models -->

<!-- Bottom Row Objects -->
<!--
<GameObject>
<Transform>
<Position>-60 60 0</Position>
Expand Down Expand Up @@ -176,15 +187,15 @@
<Name>Suzanne</Name>
</Model>
</GameObject>

-->

<!-- LIGHTS -->
<Light> <!-- Directional Light -->
<Enabled>true</Enabled>
<Mobility> Stationary </Mobility>
<Color>0.9 0.9 0.85</Color>
<Color>1 1 1</Color>
<Range> 100 </Range>
<Brightness> 3 </Brightness>
<Brightness> 0.90 </Brightness>
<Shadows>
<DepthBias> 0.00045 </DepthBias>
<NearPlane> 0.1 </NearPlane>
Expand All @@ -194,9 +205,9 @@
<Rotation> 0 0 40 </Rotation>
</Transform>
<Directional>
<ViewPortX> 64 </ViewPortX>
<ViewPortY> 64 </ViewPortY>
<Distance> 100 </Distance>
<ViewPortX> 256 </ViewPortX>
<ViewPortY> 256 </ViewPortY>
<Distance> 120 </Distance>
</Directional>
</Light>

Expand Down Expand Up @@ -246,9 +257,9 @@
<Light> <!-- Spot Light -->
<Mobility> Static </Mobility>
<Enabled>true</Enabled>
<Color>0.0 0.9 0.9</Color>
<Color>0.9 0.9 0.9</Color>
<Range> 35 </Range>
<Brightness> 300 </Brightness>
<Brightness> 1500 </Brightness>
<Shadows>
<DepthBias> 0.000009 </DepthBias>
<NearPlane> 0.001 </NearPlane>
Expand All @@ -261,7 +272,7 @@
</Transform>
<Spot>
<OuterConeAngleDegrees>22</OuterConeAngleDegrees>
<InnerConeAngleDegrees>18</InnerConeAngleDegrees>
<InnerConeAngleDegrees>20</InnerConeAngleDegrees>
</Spot>
</Light>
<Light>
Expand All @@ -270,7 +281,7 @@
<Enabled>true</Enabled>
<Color>0.4 0.4 0.15</Color>
<Range> 35 </Range>
<Brightness> 1500 </Brightness>
<Brightness> 1000 </Brightness>
<Shadows>
<DepthBias> 0.000005 </DepthBias>
<NearPlane> 0.001 </NearPlane>
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion Data/Levels/StressTest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</EnvironmentMap>
-->
<Camera>
<Position> 0.0 24.0 -93 </Position>
<Position> 7.872289 -16.696192 -100.599899 </Position>
<Pitch> 15 </Pitch>
<Yaw> 0 </Yaw>
<Projection>Perspective</Projection>
Expand Down
8 changes: 4 additions & 4 deletions Data/Resources/VQE.rc
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ IDI_ICON1 ICON "..\\Icons\\VQE32.ico"
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,7,0,0
PRODUCTVERSION 0,7,0,0
FILEVERSION 0,8,0,0
PRODUCTVERSION 0,8,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -79,11 +79,11 @@ BEGIN
BEGIN
VALUE "CompanyName", "Volkan Ilbeyli @vilbeyli - GitHub/VQE"
VALUE "FileDescription", "VQEngine Renderer Application"
VALUE "FileVersion", "0.7.0.0"
VALUE "FileVersion", "0.8.0.0"
VALUE "InternalName", "VQE.exe"
VALUE "OriginalFilename", "VQE.exe"
VALUE "ProductName", "VQEngine"
VALUE "ProductVersion", "0.7.0.0"
VALUE "ProductVersion", "0.8.0.0"
END
END
BLOCK "VarFileInfo"
Expand Down
2 changes: 1 addition & 1 deletion Data/Scenes.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[SceneMapping]
Default=0
Sponza=1
GeometryUnitTest=2
EnvironmentMapUnitTest=2
StressTest=3
2 changes: 1 addition & 1 deletion Libs/VQUtils
Submodule VQUtils updated 1 files
+4 −4 Source/utils.h
1 change: 1 addition & 0 deletions Libs/imgui
Submodule imgui added at 4f204d
Loading

0 comments on commit a0bc41f

Please sign in to comment.