2#ifndef LIBSBX_POST_FXAA_FILTER_HPP_
3#define LIBSBX_POST_FXAA_FILTER_HPP_
5#include <libsbx/post/filter.hpp>
13 inline static constexpr auto default_shader_path = std::string_view{
"engine://shaders/fxaa"};
17 fxaa_filter(
const std::vector<graphics::attachment_description>& attachments,
const std::string& in_image,
const std::filesystem::path& path = default_shader_path)
19 _in_image{in_image} { }
24 EASY_BLOCK(
"fxaa_filter::render");
25 SBX_PROFILE_SCOPE(
"fxaa_filter::render");
27 auto& pipeline = base_type::pipeline();
28 auto& descriptor_handler = base_type::descriptor_handler();
30 auto& graphics_module = core::engine::get_module<graphics::graphics_module>();
32 pipeline.bind(command_buffer);
34 descriptor_handler.push(
"image", graphics_module.attachment(_in_image));
36 if (!descriptor_handler.update(pipeline)) {
40 descriptor_handler.bind_descriptors(command_buffer);
42 command_buffer.draw(3, 1, 0, 0);
47 std::string _in_image;
48 std::string _out_image;
Definition: command_buffer.hpp:15
Definition: filter.hpp:19
Definition: fxaa_filter.hpp:9