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

Merge branch 'develop' into feature/particle

parents d3e3ee63 fb112296
*.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,65 @@ 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 . --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 +74,32 @@ 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 . --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
......@@ -37,3 +37,9 @@
[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
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)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT demo)
endif()
......@@ -7,6 +7,7 @@
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.
The repository at <a href="https://github.com/lowkey42/mirrage">GitHub</a> is a readonly mirror and the main repository is located on <a href="https://gitlab.com/lowkey42/mirrage">Gitlab.com</a>.
### 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>
......@@ -20,7 +21,7 @@ Mirrage (Mirrage Indirect Radiance Renderer And Game Engine) is a Vulkan based d
### Dependencies
Required:
- CMake >= 3.8
- CMake >= 3.9
- SDL2 >= 2.0.8
- Vulkan + Vulkan-HPP >= 1.1.80
- GLSLC
......@@ -28,6 +29,7 @@ Required:
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
......@@ -43,13 +45,13 @@ Included in this repository:
### Build from Source
- git clone https://github.com/lowkey42/mirrage.git
- git clone 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.
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).
The project can be further configured by setting the following CMake-Properties (-DPROP=ON/OFF):
- MIRRAGE_BUILD_MESH_CONVERTER: Also build the mesh converter that can be used to converter models into the engine specific data format (Default: OFF)
......
......@@ -3,4 +3,6 @@ blueprint:sponza = blueprints/sponza.json
blueprint:cornell = blueprints/cornell.json
blueprint:sun = blueprints/sun.json
blueprint:cube = blueprints/cube.json
blueprint:billboard = blueprints/billboard.json
blueprint:decal = blueprints/decal.json
{
"Transform":{
},
"Billboard": {
"billboards": [
{
"size": {"w":1, "h":1},
"material_aid": "mat:billboard_material.msf",
"clip_rect": {"x":0, "y":0, "z":1, "w":1},
"dynamic_lighting": true
}
]
}
}
{
"Transform":{
},
"Decal": {
"decals": [
{
"size": {"w":1, "h":1},
"material_aid": "mat:decal_material.msf",
"clip_rect": {"x":0, "y":0, "z":1, "w":1},
"thickness": 0.2,
"color": {"a":0.25}
}
]
}
}
{
"albedo_aid": "billboard.ktx",
"emission_aid": "white"
}
{
"substance_id": "emissive",
"albedo_aid": "cube_light.ktx"
"substance_id": "default",
"albedo_aid": "cube_light.ktx",
"emission_aid": "default_white.ktx"
}
{
"albedo_aid": "billboard.ktx",
"normal_aid": "sponza_bricks_normal.ktx"
}
{
"substance_id": "default",
"albedo_aid": "cornell_floor_albedo.ktx",
"normal_aid": "cornell_floor_normal.ktx",
"brdf_aid": "cornell_floor_brdf.ktx",
"emission_aid": ""
}
{
"substance_id": "default",
"albedo_aid": "cornell_leftwall_albedo.ktx",
"normal_aid": "cornell_leftwall_normal.ktx",
"brdf_aid": "cornell_leftwall_brdf.ktx",
"emission_aid": ""
}
{
"substance_id": "alphatest",
"albedo_aid": "cornell_light_albedo.ktx",
"normal_aid": "cornell_light_normal.ktx",
"brdf_aid": "cornell_light_brdf.ktx",
"emission_aid": "cornell_light_emission.ktx"
}
{
"substance_id": "default",
"albedo_aid": "cornell_rightwall_albedo.ktx",
"normal_aid": "cornell_rightwall_normal.ktx",
"brdf_aid": "cornell_rightwall_brdf.ktx",
"emission_aid": ""
}
{
"substance_id": "default",
"albedo_aid": "cornell_shortbox_albedo.ktx",
"normal_aid": "cornell_shortbox_normal.ktx",
"brdf_aid": "cornell_shortbox_brdf.ktx",
"emission_aid": ""
}
Supports Markdown
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