vulkan-renderer
vulkan-renderer copied to clipboard
[gltf] Add glTF2 loader and pbr renderer
Closes https://github.com/inexorgame/vulkan-renderer/issues/256 Closes https://github.com/inexorgame/vulkan-renderer/issues/268 Closes https://github.com/inexorgame/vulkan-renderer/issues/429
Let there be glTF2 models
Work in progress!

I am adapting the glTF2 loader from Sascha Willem's sample repository. This work will not include model animations, physically based rendering or other components of glTF2 we're not supporting yet.
TODO
- [x] Write a glTF2 loader class using tinygltf
- [x] Modify descriptor pattern so it allows for multiple images to be passed in
- [ ] Fix all clang-tidy warnings!
- [ ] Add automatic tests (inexor-vulkan-renderer-tests)
- [ ] Add benchmarks (inexor-vulkan-renderer-benchmarks)
- [ ] Squash before opening pull request
Sorting this massive PR
I will have to make smaller pull requests out of this one, otherwise it's too big. Here is a list of things I changed:
- Added ktx dependency
- Added
ShaderLoaderwrapper and don't load shaders through TOML file - Added glTF2 data structure files...
- Added Cubemaps
- Added glTF2 loader
- Refactored rendering: separate data loading from rendering.
- Refactored rendering: Render octree in new rendergraph style
- Refactor rendergraph setup function
- Added new methods to rendergraph and other small refactorings (builder pattern)
- Added wrapper for loading glTF2 files (based on tinygltf)
- Added wrapper for glTF2 model data parsing
- Added glTF2 pbr renderer
- Added new shaders for skybox
- Added new shaders for pbr, including BRDFLUT and cubemaps
- Refactored ImGui to use ShaderLoader
- Added BRDF lookup table generator
- Fixed a bug in descriptor builder pattern (binding index!)
- Added
DescriptorPoolwrapper - Refactored GpuTexture a little
- Added
OffscreenFramebuffer(required for cubemaps) - Fixed a bug in rendergraph
- Added new representations (object type to string_view)
- ...
- [x] Rebase onto master
- [x] Add nolints for pointer arithmetics
yeetari: just taking a look at the gltf PR - we preferably want to avoid the std::vectors and such completely when loading the textures
- [x] Rebase onto master
- [x] Rebase onto master
- [x] Rebase onto master
I cherry-picked the commits which fixed the CI (didn't want to do a full rebase onto master already).