glTF Model Viewer, a PBR(Physically-Based Rendering) example implementation with image based lighting in Vulkan using glTF 2.0 models. The lighting equation is based on the reference glTF PBR implementation from Khronos.
This project is based on Vulkan-glTF-PBR.
Software architecture description
- draco : Draco is a library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.
- glfw : A multi-platform library for OpenGL, OpenGL ES, Vulkan, window and input.
- gli : OpenGL Image (GLI).
- glm : OpenGL Mathematics (GLM).
- imgui : Dear ImGui: Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies.
- imguizmo : Immediate mode 3D gizmo for scene editing and other controls based on Dear Imgui.
- spdlog : Fast C++ logging library.
- stb : Single-file public domain (or MIT licensed) libraries for C/C++.
- tinyfiledialogs : one C file + header (add them to your C or C++ project) for file dialog.
- tinygltf : Header only C++11 tiny glTF 2.0 library
-
Download and install Vulkan SDK
-
Clone the repository: this repository contains submodules for some of the external dependencies, so when doing a fresh clone you need to clone recursively:
git clone --recursive https://gitee.com/xuanyishenzhen/glTFViewer.git
or
git clone https://gitee.com/xuanyishenzhen/glTFViewer.git git submodule init git submodule update
-
Building & Running
-
MacOS
cd glTFViewer mkdir build cd build cmake .. make ./glTFViewer
Attention: it must be in 'build' directory to run glTFViewer, because the shader and resources use relative path.
-
Window
cd glTFViewer mkdir build cd build cmake -G "Visual Studio 16 2019" .. msbuild glTFViewer.sln ./Debug/glTFViewer.exe
Attention: it must be in 'build' directory to run glTFViewer, because the shader and resources use relative path.