8#include <hpp/small_vector.hpp>
40 cache_uniform(program.get(), s_depth,
"s_depth", gfx::uniform_type::Sampler);
41 cache_uniform(program.get(), u_hiz_params,
"u_hiz_params", gfx::uniform_type::Vec4);
46 struct hiz_downsample_program : uniforms_cache
53 cache_uniform(program.get(), u_hiz_params,
"u_hiz_params", gfx::uniform_type::Vec4);
57 hiz_generate_program hiz_generate_;
58 hiz_downsample_program hiz_downsample_;
std::shared_ptr< texture > ptr
Class representing a camera. Contains functionality for manipulating and updating a camera....
std::shared_ptr< gpu_program > ptr
void run(gfx::render_view &rview, const run_params ¶ms)
Executes the Hi-Z generation: generates mip chain from depth buffer using compute shaders.
auto init(rtti::context &ctx) -> bool
Must be called once (after bgfx::init() and after asset_manager is registered in context).
std::shared_ptr< uniform > uniform_ptr
gfx::texture::ptr depth_buffer
Source depth buffer.
const camera * cam
Camera for near/far plane information.
gfx::texture::ptr output_hiz
Output Hi-Z texture (must be R32F or R16F format with mips)