Misc renderer improvements:

- Reuse renderer and gltf loader between scenes
- Use puish descriptors to simplify the management of descriptor sets in the scene renderer
- Don't keep the imgui swapchain in the scene classes
- Fix alpha blending, add alpha masking
- Fix mipmaps not being used in renderer
- Add cache when loading images and models
- Only premultiply the colours if required
- Add support for gltTF animations

Allow removing an object and its descendants from the scene, allow loading from a memory buffer
This commit is contained in:
Guillaume Meunier
2025-10-23 21:39:12 +02:00
parent 1f6ea0d4ca
commit aad1bb6a1b
21 changed files with 918 additions and 375 deletions
+4 -3
View File
@@ -18,6 +18,7 @@
#pragma once
#include <entt/core/fwd.hpp>
#include <filesystem>
#include <vulkan/vulkan_raii.hpp>
@@ -40,8 +41,8 @@ public:
queue_family_index(queue_family_index),
default_material(default_material)
{}
scene_loader(const scene_loader &) = default;
entt::registry operator()(const std::filesystem::path & gltf_path);
void add_prefab(entt::registry & scene, const entt::registry & prefab, entt::entity root = entt::null);
std::shared_ptr<entt::registry> operator()(const std::filesystem::path & gltf_path);
std::shared_ptr<entt::registry> operator()(std::span<const std::byte> data, const std::string & name = "", const std::filesystem::path & parent_path = "");
};