Commit f926939c authored by Florian Oetke's avatar Florian Oetke
Browse files

Merge branch 'develop' into 'master'

GDW WS18/19

See merge request !1
parents f9699ca1 e85248b7
Pipeline #3151 passed with stage
in 12 minutes and 45 seconds
*.hpp linguist-language=c++
*.hxx linguist-language=c++
*.cpp linguist-language=c++
*.cxx linguist-language=c++
*.inl linguist-language=c++
*.h linguist-language=c
*.c linguist-language=c
dependencies/assimp/*.h linguist-language=c++
dependencies/asyncplusplus/*.h linguist-language=c++
dependencies/doctest/*.h linguist-language=c++
dependencies/moodycamel/*.h linguist-language=c++
dependencies/plog/*.h linguist-language=c++
dependencies/robin-map/*.h linguist-language=c++
*.mmf filter=lfs diff=lfs merge=lfs -text
*.ktx filter=lfs diff=lfs merge=lfs -text
......@@ -37,8 +37,6 @@ CMakeLists.txt.user
assets/*.log
assets/assets_ext
assets/extensions
assets/ImageTool.jar
......
......@@ -5,57 +5,66 @@ stages:
variables:
GIT_SUBMODULE_STRATEGY: recursive
build_gcc:
stage: build
script:
- export CC=gcc
- export CXX=g++
- mkdir -p build
- cd build
- mkdir -p bin
- rm -rf src
- cmake -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=../bin -DCMAKE_BUILD_TYPE=Release -DMIRRAGE_EXPORT_EXECUTABLE=ON ..
- cmake --build . --target src/install
- cmake --build . --target test
.cache-paths-spec: &cache-paths
- build
.linux-cache-spec: &linux-cache-spec
cache:
key: ${CI_COMMIT_REF_SLUG}-${CI_JOB_NAME}
paths: *cache-paths
.windows-cache-spec: &windows-cache-spec
cache:
paths: *cache-paths
key: "%CI_COMMIT_REF_SLUG%-%CI_JOB_NAME%-%CI_RUNNER_ID%"
.windows-task: &windows-task
tags:
- windows
only:
variables:
- $WINDOWS_CI
.artifact-spec: &artifact-spec
artifacts:
name: "mirrage"
paths:
- build/bin
- mirrage
expire_in: 1 day
cache:
key: "gcc_${CI_COMMIT_REF_SLUG}"
paths:
- build
build_clang:
.build-ninja-linux: &build-ninja-linux
stage: build
script:
- export CC=clang
- export CXX=clang++
- mkdir -p build
- cmake -E make_directory build
- cd build
- mkdir -p bin
- rm -rf src
- cmake -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=../bin -DCMAKE_BUILD_TYPE=Release -DMIRRAGE_EXPORT_EXECUTABLE=ON ..
- cmake -E remove_directory src
- cmake -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=../../mirrage -DCMAKE_BUILD_TYPE=Release -DMIRRAGE_EXPORT_EXECUTABLE=ON ..
- cmake --build .
- cmake --build . --target src/install
- cmake --build . --target test
- wget https://github.com/lowkey42/mirrage/releases/download/v0.2/model_data_lbs.tar.xz || true
- cd bin/bin
- tar xf ../../model_data_lbs.tar.xz
artifacts:
paths:
- build/bin
expire_in: 1 week
cache:
key: "clang_${CI_COMMIT_REF_SLUG}"
paths:
- build
<<: *linux-cache-spec
<<: *artifact-spec
build-gcc:
variables:
CC: "gcc"
CXX: "g++"
<<: *build-ninja-linux
build-clang:
variables:
CC: "clang"
CXX: "clang++"
<<: *build-ninja-linux
build_scanbuild:
build-scanbuild:
stage: build
script:
- export CC=clang
- export CXX=clang++
- export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc --all)
- echo "Build parallelism:" ${CMAKE_BUILD_PARALLEL_LEVEL}
- mkdir -p build
- cd build
- scan-build --use-c++=clang++ --use-cc=clang cmake -DMIRRAGE_FORCE_LIBCPP=ON -DMIRRAGE_ENABLE_COTIRE=OFF -G "Unix Makefiles" ..
......@@ -66,4 +75,33 @@ build_scanbuild:
expire_in: 1 week
when: always
build-mingw:
stage: build
script:
- cmake -E make_directory build
- cd build
- cmake -E remove_directory src
- cmake -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=../../mirrage -DCMAKE_BUILD_TYPE=Release -DMIRRAGE_ENABLE_COTIRE=OFF -DMIRRAGE_EXPORT_EXECUTABLE=ON ..
- cmake --build .
- cmake --build . --target src/install
- cmake --build . --target test
variables:
CC: "gcc"
CXX: "g++"
<<: *windows-task
<<: *windows-cache-spec
<<: *artifact-spec
build-msvc:
stage: build
script:
- cmake -E make_directory build
- cd build
- cmake -E remove_directory src
- cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_INSTALL_PREFIX:PATH=../../mirrage -DMIRRAGE_EXPORT_EXECUTABLE=ON -DMIRRAGE_ENABLE_BACKWARD=OFF ..
- cmake --build . --config Release -- /m
- cmake --build . --config Release --target src/install
- cmake --build . --config Release --target RUN_TESTS
<<: *windows-task
<<: *windows-cache-spec
<<: *artifact-spec
......@@ -3,7 +3,7 @@
url = https://github.com/bombela/backward-cpp.git
[submodule "dependencies/plog"]
path = dependencies/plog
url = https://github.com/SergiusTheBest/plog.git
url = https://github.com/lowkey42/plog.git
[submodule "dependencies/assimp"]
path = dependencies/assimp
url = https://github.com/assimp/assimp.git
......@@ -19,9 +19,6 @@
[submodule "dependencies/magic_get"]
path = dependencies/magic_get
url = https://github.com/apolukhin/magic_get.git
[submodule "dependencies/nuklear"]
path = dependencies/nuklear
url = https://github.com/vurtun/nuklear.git
[submodule "dependencies/physfs"]
path = dependencies/physfs
url = https://github.com/lowkey42/physfs.git
......@@ -37,3 +34,12 @@
[submodule "dependencies/doctest"]
path = dependencies/doctest
url = https://github.com/onqtam/doctest.git
[submodule "dependencies/SDL"]
path = dependencies/SDL
url = https://github.com/SDL-mirror/SDL.git
[submodule "dependencies/crunch"]
path = dependencies/crunch
url = https://github.com/lowkey42/crunch.git
[submodule "dependencies/imgui"]
path = dependencies/imgui
url = https://github.com/ocornut/imgui.git
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
project(mirrage LANGUAGES C CXX)
......@@ -25,3 +25,6 @@ endif()
add_subdirectory(dependencies)
add_subdirectory(src)
if(MSVC_IDE AND MIRRAGE_BUILD_DEMO)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT demo)
endif()
......@@ -5,8 +5,11 @@
## Mirrage
Mirrage (Mirrage Indirect Radiance Renderer And Game Engine) is a Vulkan based deferred renderer with bits and pieces of a simple game engine, that has been developed as part of my CS Bachelor thesis about screen-space global illumination. As such it is (at least in its current state) mostly just a fancy renderer with a simple demo application and just enough engine stuff (ECS, input, ui, glue-code) to keep that running. But in the future I will hopefully get it to an actually usefull state and use it as a basis for my future projects.
Mirrage (Mirrage Indirect Radiance Renderer And Game Engine) is a Vulkan based deferred renderer with bits and pieces of a simple game engine, that has been developed as part of my CS Bachelor thesis about screen-space global illumination. As such it is (at least in its current state) mostly just a fancy renderer with a simple demo application and just enough engine stuff (ECS, input, ui, glue-code) to keep that running. But in the future I will hopefully get it to an actually useful state and use it as a basis for my future projects.
The repository at <a href="https://github.com/lowkey42/mirrage">GitHub</a> is a read-only mirror and the main repository is located on <a href="https://gitlab.com/lowkey42/mirrage">Gitlab.com</a>.
WIP API documentation/examples: <https://gitlab.com/lowkey42/mirrage/wikis/Documentation>
### Demo
<a href="http://www.youtube.com/watch?feature=player_embedded&v=gHHLuwjDiZo" target="_blank"><img src="screenshots/video_thumbnail2.jpeg" alt="Demo Video" height="180" border="10" /></a>
......@@ -18,44 +21,56 @@ Mirrage (Mirrage Indirect Radiance Renderer And Game Engine) is a Vulkan based d
| ![](screenshots/front.jpeg) | ![](screenshots/light_cube.jpeg) |
### Dependencies
Required:
- CMake >= 3.8
- SDL2 >= 2.0.8
- CMake >= 3.9
- Vulkan + Vulkan-HPP >= 1.1.80
- GLSLC (if MIRRAGE_COMPILE_SHADERS is ON)
- GLSLC
Included in this repository:
- Assimp 3.3.1 (only for mesh-converter)
- crunch (only for mesh-converter): "Crunch Library Copyright (c) 2010-2016 Richard Geldreich, Jr., Tenacious Software, and Binomial LLC"
- glm
- gsl
- moodycamel
- nuklear
- physicsFS
- SDL2
- SF2
- stb_image (only for mesh-converter)
### Supported Compilers
- GCC >= 7
- Clang >= 5
- GCC >= 8
- Clang >= 7
- MSVC 19.14 (Visual Studio 2017 15.7)
### Build from Source
- git clone https://github.com/lowkey42/mirrage.git
- git lfs install
- git clone --recurse-submodules https://gitlab.com/lowkey42/mirrage.git
- mkdir mirrage_build
- cd mirrage_build
- cmake ../mirrage
- cmake --build .
In order to execute the compiled demo application, the src/demo/demo binary has be be executed from the working directory assets (the folder containing the archives.lst) and this folder has to contain the required models (Sponza and Conrnell-Box) in its extensions sub-directory. This assets can be downloaded from the latetest release.
The project can be further configured by setting the following CMake-Properties (-DPROP=ON/OFF):
- MIRRAGE_BUILD_DEMO: Build the demo application (Default: ON when building the engine directly, OFF when including it from another CMake-Project)
- MIRRAGE_BUILD_MESH_CONVERTER: Also build the mesh converter that can be used to converter models into the engine specific data format (Default: OFF)
- MIRRAGE_COMPILE_SHADERS: Also compile the glsl shaders into SPIR-V (requires GLSLC)
- MIRRAGE_ENABLE_BACKWARD: Enable stacktraces (Default: ON on Linux, OFF on Windows because the underlying library backward-cpp doesn't currently support Windows)
- MIRRAGE_ENABLE_CLANG_FORMAT: Includes an additional clangformat target, that can be used to automatically format all source files in the project
- MIRRAGE_ENABLE_LTO: Activates link time optimizations on gcc/clang (Default: OFF)
- MIRRAGE_SAN: Build with clang sanatizers (address, integer, undefined and address-use-after-scope) (Default: OFF)
- MIRRAGE_ENABLE_COTIRE: Enables automatic precompiled headers through cotire
- MIRRAGE_USE_LIBCPP: Uses libc++ instead of libstdc++ when compiling with clang (Default: ON)
- MIRRAGE_OPTIMIZE_NATIVE: Compile with -march=native (Default: OFF)
core_assets
demo_assets
extensions/*
cfg:input_mapping = settings/input_mapping.json
cfg:graphics = graphics-cfg.json
cfg:renderer = renderer-cfg.json
cfg:sounds = sounds-cfg.json
cfg:language = language-cfg.json
cfg:languages_info = settings/languages.json
cfg:gui = settings/gui.json
loc: = loc/
pl_cache: = pipeline_caches
font: = fonts/
font:test_font = fonts/droid_sans.ttf
shader: = shader/
vert_shader:blit = shader/bin/fullscreen.vert.spv
frag_shader:blit = shader/bin/blit.frag.spv
vert_shader:debug_draw = shader/bin/debug_draw.vert.spv
frag_shader:debug_draw = shader/bin/debug_draw.frag.spv
vert_shader:light_directional = shader/bin/fullscreen.vert.spv
frag_shader:light_directional = shader/bin/light_directional.frag.spv
vert_shader:light_point = shader/bin/light_point.vert.spv
frag_shader:light_point = shader/bin/light_point.frag.spv
vert_shader:shadow_model = shader/bin/shadow_model.vert.spv
vert_shader:shadow_model_animated = shader/bin/shadow_model_animated.vert.spv
vert_shader:shadow_model_animated_dqs = shader/bin/shadow_model_animated_dqs.vert.spv
frag_shader:shadow_model = shader/bin/shadow_model.frag.spv
vert_shader:model = shader/bin/model.vert.spv
vert_shader:model_animated = shader/bin/model_animated.vert.spv
vert_shader:model_animated_dqs = shader/bin/model_animated_dqs.vert.spv
frag_shader:model = shader/bin/model.frag.spv
frag_shader:model_emissive = shader/bin/model_emissive.frag.spv
frag_shader:model_alphatest = shader/bin/model_alphatest.frag.spv
vert_shader:ui = shader/bin/ui.vert.spv
frag_shader:ui = shader/bin/ui.frag.spv
vert_shader:taa = shader/bin/fullscreen.vert.spv
frag_shader:taa = shader/bin/taa.frag.spv
vert_shader:ssao_blur = shader/bin/ssao_blur.vert.spv
frag_shader:ssao_blur = shader/bin/ssao_blur.frag.spv
vert_shader:ssao = shader/bin/fullscreen.vert.spv
frag_shader:ssao = shader/bin/ssao.frag.spv
vert_shader:gi_blend = shader/bin/fullscreen.vert.spv
frag_shader:gi_blend = shader/bin/gi_blend.frag.spv
vert_shader:gi_diffuse_reproject = shader/bin/fullscreen.vert.spv
frag_shader:gi_diffuse_reproject = shader/bin/gi_diffuse_reproject.frag.spv
vert_shader:gi_integrate_brdf = shader/bin/gi_integrate_brdf.vert.spv
frag_shader:gi_integrate_brdf = shader/bin/gi_integrate_brdf.frag.spv
vert_shader:gi_mipgen = shader/bin/fullscreen.vert.spv
frag_shader:gi_mipgen = shader/bin/gi_mipgen.frag.spv
vert_shader:gi_sample = shader/bin/fullscreen.vert.spv
frag_shader:gi_sample = shader/bin/gi_sample.frag.spv
vert_shader:gi_sample_upsample = shader/bin/fullscreen.vert.spv
frag_shader:gi_sample_upsample = shader/bin/gi_sample_upsample.frag.spv
vert_shader:gi_sample_blend = shader/bin/fullscreen.vert.spv
frag_shader:gi_sample_blend = shader/bin/gi_sample_blend.frag.spv
vert_shader:gi_sample_spec = shader/bin/fullscreen.vert.spv
frag_shader:gi_sample_spec = shader/bin/gi_sample_spec.frag.spv
vert_shader:gi_spec_blur = shader/bin/gi_spec_blur.vert.spv
frag_shader:gi_spec_blur = shader/bin/gi_spec_blur.frag.spv
vert_shader:gi_reproject = shader/bin/fullscreen.vert.spv
frag_shader:gi_reproject = shader/bin/gi_reproject.frag.spv
vert_shader:gi_reprojection_weights = shader/bin/fullscreen.vert.spv
frag_shader:gi_reprojection_weights = shader/bin/gi_reprojection_weights.frag.spv
vert_shader:gi_weight_mipgen = shader/bin/fullscreen.vert.spv
frag_shader:gi_weight_mipgen = shader/bin/gi_weight_mipgen.frag.spv
vert_shader:median_filter = shader/bin/fullscreen.vert.spv
frag_shader:median_filter = shader/bin/median_filter.frag.spv
vert_shader:luminance = shader/bin/fullscreen.vert.spv
frag_shader:luminance = shader/bin/luminance.frag.spv
vert_shader:luminance_adapt = shader/bin/fullscreen.vert.spv
frag_shader:luminance_adapt = shader/bin/luminance_adapt.frag.spv
vert_shader:bloom_apply = shader/bin/fullscreen.vert.spv
frag_shader:bloom_apply = shader/bin/bloom_apply.frag.spv
vert_shader:bloom_blur = shader/bin/bloom_blur.vert.spv
frag_shader:bloom_blur = shader/bin/bloom_blur.frag.spv
comp_shader:tone_mapping_adjust = shader/bin/tone_mapping_adjust.comp.spv
comp_shader:tone_mapping_histogram = shader/bin/tone_mapping_histogram.comp.spv
vert_shader:tone_mapping_apply = shader/bin/fullscreen.vert.spv
frag_shader:tone_mapping_apply = shader/bin/tone_mapping_apply.frag.spv
{
"fonts": [
{"aid":"font:test_font", "size":12, "default_font":true}
]
}
{
"default_language": "en",
"supported_languages": ["en"]
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment