vulkan-renderer icon indicating copy to clipboard operation
vulkan-renderer copied to clipboard

[gltf] Add glTF2 loader and pbr renderer

Open IAmNotHanni opened this issue 4 years ago • 7 comments

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!

gltf

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 ShaderLoader wrapper 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 DescriptorPool wrapper
  • Refactored GpuTexture a little
  • Added OffscreenFramebuffer (required for cubemaps)
  • Fixed a bug in rendergraph
  • Added new representations (object type to string_view)
  • ...

IAmNotHanni avatar Dec 07 '20 15:12 IAmNotHanni

  • [x] Rebase onto master

IAmNotHanni avatar May 23 '21 10:05 IAmNotHanni

  • [x] Add nolints for pointer arithmetics

IAmNotHanni avatar May 23 '21 12:05 IAmNotHanni

yeetari: just taking a look at the gltf PR - we preferably want to avoid the std::vectors and such completely when loading the textures

IAmNotHanni avatar May 23 '21 12:05 IAmNotHanni

  • [x] Rebase onto master

IAmNotHanni avatar Jul 23 '21 19:07 IAmNotHanni

  • [x] Rebase onto master

IAmNotHanni avatar Jul 28 '21 18:07 IAmNotHanni

  • [x] Rebase onto master

IAmNotHanni avatar Jul 30 '21 19:07 IAmNotHanni

I cherry-picked the commits which fixed the CI (didn't want to do a full rebase onto master already).

IAmNotHanni avatar Nov 07 '21 16:11 IAmNotHanni