qoyooo / gltfViewer

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](https://github.com/qoyooo/Vulkan-glTF-PBR).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

glTFViewer

Description

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

Software architecture description

Dependencies

  • 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

Installation

  1. Download and install Vulkan SDK

  2. 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
    
  3. 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.

About

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](https://github.com/qoyooo/Vulkan-glTF-PBR).

License:MIT License


Languages

Language:C++ 88.2%Language:C 9.7%Language:GLSL 1.8%Language:CMake 0.3%