Antkeeper
0.0.1
|
Physically-based bloom render pass. More...
#include <bloom-pass.hpp>
Public Member Functions | |
bloom_pass (gl::pipeline *pipeline, resource_manager *resource_manager) | |
Constructs a bloom pass. More... | |
void | render (render::context &ctx) override |
Renders a bloom texture. More... | |
void | resize () |
Resizes the mip chain resolution according to the resolution of the source texture. More... | |
void | set_source_texture (std::shared_ptr< gl::texture_2d > texture) |
Sets the bloom source texture. More... | |
void | set_mip_chain_length (unsigned int length) |
Sets the mip chain length. More... | |
void | set_filter_radius (float radius) |
Sets the upsample filter radius. More... | |
std::shared_ptr< gl::texture_2d > | get_bloom_texture () const |
Returns the texture containing the bloom result. More... | |
![]() | |
pass (gl::pipeline *pipeline, const gl::framebuffer *framebuffer) | |
virtual | ~pass () |
void | set_enabled (bool enabled) |
constexpr bool | is_enabled () const noexcept |
void | set_framebuffer (const gl::framebuffer *framebuffer) |
void | set_clear_mask (std::uint8_t mask) noexcept |
void | set_clear_value (const gl::clear_value &value) noexcept |
void | clear () |
Additional Inherited Members | |
![]() | |
gl::pipeline * | m_pipeline |
const gl::framebuffer * | m_framebuffer |
std::uint8_t | m_clear_mask {} |
gl::clear_value | m_clear_value |
Physically-based bloom render pass.
Definition at line 44 of file bloom-pass.hpp.
render::bloom_pass::bloom_pass | ( | gl::pipeline * | pipeline, |
resource_manager * | resource_manager | ||
) |
Constructs a bloom pass.
pipeline | Graphics pipeline. |
resource_manager | Resource manager. |
Definition at line 36 of file bloom-pass.cpp.
|
inline |
Returns the texture containing the bloom result.
Definition at line 92 of file bloom-pass.hpp.
|
overridevirtual |
Renders a bloom texture.
ctx | Render context. |
queue | Render queue. |
Implements render::pass.
Definition at line 73 of file bloom-pass.cpp.
void render::bloom_pass::resize | ( | ) |
Resizes the mip chain resolution according to the resolution of the source texture.
void render::bloom_pass::set_filter_radius | ( | float | radius | ) |
Sets the upsample filter radius.
radius | Upsample filter radius, in texture coordinates. |
Definition at line 101 of file bloom-pass.cpp.
void render::bloom_pass::set_mip_chain_length | ( | unsigned int | length | ) |
Sets the mip chain length.
A length of 1
indicates a single stage bloom.
length | Mip chain length. |
Definition at line 94 of file bloom-pass.cpp.
void render::bloom_pass::set_source_texture | ( | std::shared_ptr< gl::texture_2d > | texture | ) |
Sets the bloom source texture.
texture | Bloom source texture. |
Definition at line 82 of file bloom-pass.cpp.