2#ifndef LIBSBX_MODELS_STATIC_MESH_SHADOW_SUBRENDERER_HPP_
3#define LIBSBX_MODELS_STATIC_MESH_SHADOW_SUBRENDERER_HPP_
6#include <unordered_map>
9#include <vulkan/vulkan.h>
11#include <libsbx/memory/tracking_allocator.hpp>
13#include <libsbx/core/engine.hpp>
15#include <libsbx/graphics/subrenderer.hpp>
16#include <libsbx/graphics/graphics_module.hpp>
17#include <libsbx/graphics/pipeline/graphics_pipeline.hpp>
18#include <libsbx/graphics/buffers/push_handler.hpp>
19#include <libsbx/graphics/descriptor/descriptor_handler.hpp>
21#include <libsbx/assets/assets_module.hpp>
22#include <libsbx/scenes/scenes_module.hpp>
24#include <libsbx/models/models.hpp>
25#include <libsbx/models/material_draw_list.hpp>
26#include <libsbx/models/static_mesh_material_draw_list.hpp>
28namespace sbx::models {
33 .depth = graphics::depth::read_write,
34 .uses_transparency =
false,
36 .polygon_mode = graphics::polygon_mode::fill,
37 .cull_mode = graphics::cull_mode::none,
38 .front_face = graphics::front_face::counter_clockwise
42 inline static constexpr auto default_pipeline_path = std::string_view{
"engine://shaders/shadow"};
46 static_mesh_shadow_subrenderer(
const std::vector<graphics::attachment_description>& attachments,
const std::filesystem::path& base_pipeline = default_pipeline_path);
54 struct pipeline_data {
63 struct descriptor_data {
77 inline static const auto _entry_point = std::array<std::string, 3u>{
83 std::vector<graphics::attachment_description> _attachments;
84 std::filesystem::path _base_pipeline;
86 inline static std::unordered_map<models::material_key, pipeline_data, models::material_key_hash> _pipeline_cache{};
88 std::unordered_map<graphics::graphics_pipeline_handle, descriptor_data> _descriptor_cache{};
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: static_mesh_shadow_subrenderer.hpp:30
Definition: graphics_pipeline.hpp:106
Definition: graphics_pipeline.hpp:67
Definition: material.hpp:87