2#ifndef LIBSBX_POST_FILTERS_BLOOM_FILTER_HPP_
3#define LIBSBX_POST_FILTERS_BLOOM_FILTER_HPP_
5#include <libsbx/utility/enum.hpp>
7#include <libsbx/math/vector2.hpp>
9#include <libsbx/post/filter.hpp>
20 bloom_filter(
const std::vector<graphics::attachment_description>& attachments,
const std::filesystem::path& path,
const std::string& attachment_name, std::float_t threshold, std::float_t intensity)
21 :
base{attachments, path, base::default_pipeline_definition},
22 _push_handler{base::pipeline()},
23 _attachment_name{attachment_name},
24 _threshold{threshold},
25 _intensity{intensity} { }
30 EASY_BLOCK(
"bloom_filter::render");
32 auto& pipeline = base::pipeline();
33 auto& descriptor_handler = base::descriptor_handler();
35 auto& graphics_module = core::engine::get_module<graphics::graphics_module>();
37 pipeline.bind(command_buffer);
43 descriptor_handler.push(
"image", graphics_module.attachment(_attachment_name));
45 if (!descriptor_handler.update(pipeline)) {
49 descriptor_handler.bind_descriptors(command_buffer);
52 command_buffer.draw(3, 1, 0, 0);
59 std::string _attachment_name;
Definition: command_buffer.hpp:15
Definition: push_handler.hpp:18
A vector in two-dimensional space.
Definition: vector2.hpp:28
Definition: bloom_filter.hpp:14
Definition: filter.hpp:19