2#ifndef LIBSBX_ANIMATIONS_SKINNED_MESH_MATERIAL_SUBRENDERER_HPP_
3#define LIBSBX_ANIMATIONS_SKINNED_MESH_MATERIAL_SUBRENDERER_HPP_
6#include <unordered_set>
11#include <easy/profiler.h>
13#include <range/v3/view/enumerate.hpp>
15#include <libsbx/core/engine.hpp>
17#include <libsbx/memory/observer_ptr.hpp>
19#include <libsbx/graphics/graphics_module.hpp>
20#include <libsbx/graphics/subrenderer.hpp>
21#include <libsbx/graphics/pipeline/pipeline.hpp>
22#include <libsbx/graphics/pipeline/graphics_pipeline.hpp>
23#include <libsbx/graphics/descriptor/descriptor_handler.hpp>
25#include <libsbx/assets/assets_module.hpp>
27#include <libsbx/scenes/scenes_module.hpp>
28#include <libsbx/scenes/scene.hpp>
30#include <libsbx/scenes/components/skinned_mesh.hpp>
32#include <libsbx/models/material_draw_list.hpp>
34#include <libsbx/animations/mesh.hpp>
35#include <libsbx/animations/animator.hpp>
37#include <libsbx/animations/skinned_mesh_material_draw_list.hpp>
38#include <libsbx/animations/skinning_task.hpp>
40namespace sbx::animations {
45 .depth = graphics::depth::read_write,
46 .uses_transparency =
false,
48 .polygon_mode = graphics::polygon_mode::fill,
49 .cull_mode = graphics::cull_mode::back,
50 .front_face = graphics::front_face::counter_clockwise
54 inline static constexpr auto default_pipeline_path = std::string_view{
"engine://shaders/deferred_pbr_material"};
58 skinned_mesh_material_subrenderer(
const std::vector<graphics::attachment_description>& attachments,
const skinned_mesh_material_draw_list::bucket bucket,
const std::filesystem::path& base_pipeline = default_pipeline_path);
66 struct pipeline_data {
75 struct descriptor_data {
89 inline static const auto _fs_entry = std::array<std::string, 3u>{
95 std::vector<graphics::attachment_description> _attachments;
96 std::filesystem::path _base_pipeline;
97 skinned_mesh_material_draw_list::bucket _bucket;
99 inline static std::unordered_map<models::material_key, pipeline_data, models::material_key_hash> _pipeline_cache{};
101 std::unordered_map<graphics::graphics_pipeline_handle, descriptor_data> _descriptor_cache{};
Definition: skinned_mesh_material_subrenderer.hpp:42
Definition: command_buffer.hpp:15
Definition: descriptor_handler.hpp:26
Definition: push_handler.hpp:18
Definition: resource_storage.hpp:18
Definition: subrenderer.hpp:14
Definition: graphics_pipeline.hpp:106
Definition: graphics_pipeline.hpp:67
Definition: material.hpp:87