Unravel Engine C++ Reference
Loading...
Searching...
No Matches
unravel::rendering::pipeline Class Referenceabstract

#include <pipeline.h>

Inheritance diagram for unravel::rendering::pipeline:
unravel::rendering::deferred

Classes

struct  run_params
 

Public Types

enum  visibility_query : uint32_t {
  not_specified = 1 << 0 , is_dirty = 1 << 1 , is_static = 1 << 2 , is_shadow_caster = 1 << 3 ,
  is_reflection_caster = 1 << 4
}
 Flags for visibility queries. More...
 
using uptr = std::unique_ptr<pipeline>
 
using sptr = std::shared_ptr<pipeline>
 
using wptr = std::weak_ptr<pipeline>
 
using visibility_flags = uint32_t
 Type alias for visibility flags.
 

Public Member Functions

 pipeline ()=default
 
virtual ~pipeline ()=default
 
virtual auto init (rtti::context &ctx) -> bool
 
virtual auto gather_visible_models (scene &scn, const math::frustum *frustum, visibility_flags query, const layer_mask &render_mask) -> visibility_set_models_t
 Gathers visible models from the scene based on the given query.
 
virtual auto run_pipeline (scene &scn, const camera &camera, gfx::render_view &rview, delta_t dt, const run_params &params, layer_mask render_mask=layer_mask{ layer_reserved::everything_layer}) -> gfx::frame_buffer::ptr=0
 Renders the entire scene from the camera's perspective.
 
virtual void run_pipeline (const gfx::frame_buffer::ptr &output, scene &scn, const camera &camera, gfx::render_view &rview, delta_t dt, const run_params &params, layer_mask render_mask=layer_mask{layer_reserved::everything_layer})=0
 Renders the entire scene from the camera's perspective to the specified output.
 
virtual void set_debug_pass (int pass)=0
 
virtual void ui_pass (scene &scn, const camera &camera, gfx::render_view &rview, const gfx::frame_buffer::ptr &output)
 
virtual void particle_pass (scene &scn, const camera &camera, gfx::render_view &rview, const gfx::frame_buffer::ptr &output)
 
virtual auto create_run_params (entt::handle camera_ent) const -> rendering::pipeline::run_params
 
auto get_stats () -> pipeline_stats &
 

Protected Attributes

prefilter_pass prefilter_pass_ {}
 
blit_pass blit_pass_ {}
 
atmospheric_pass atmospheric_pass_ {}
 
atmospheric_pass_perez atmospheric_pass_perez_ {}
 
atmospheric_pass_skybox atmospheric_pass_skybox_ {}
 
assao_pass assao_pass_ {}
 
fxaa_pass fxaa_pass_ {}
 
tonemapping_pass tonemapping_pass_ {}
 
ssr_pass ssr_pass_ {}
 
hiz_pass hiz_pass_ {}
 Hi-Z buffer generation pass.
 
std::unique_ptr< gpu_programparticle_program_ {}
 
std::unique_ptr< gpu_programparticle_program_instanced_ {}
 
pipeline_stats stats_ {}
 

Detailed Description

Definition at line 78 of file pipeline.h.

Member Typedef Documentation

◆ sptr

using unravel::rendering::pipeline::sptr = std::shared_ptr<pipeline>

Definition at line 82 of file pipeline.h.

◆ uptr

using unravel::rendering::pipeline::uptr = std::unique_ptr<pipeline>

Definition at line 81 of file pipeline.h.

◆ visibility_flags

Type alias for visibility flags.

Definition at line 98 of file pipeline.h.

◆ wptr

Definition at line 83 of file pipeline.h.

Member Enumeration Documentation

◆ visibility_query

Flags for visibility queries.

Enumerator
not_specified 

No specific visibility query.

is_dirty 

Query for dirty entities.

is_static 

Query for static entities.

is_shadow_caster 

Query for shadow casting entities.

is_reflection_caster 

Query for reflection casting entities.

Definition at line 89 of file pipeline.h.

Constructor & Destructor Documentation

◆ pipeline()

unravel::rendering::pipeline::pipeline ( )
default

◆ ~pipeline()

virtual unravel::rendering::pipeline::~pipeline ( )
virtualdefault

Member Function Documentation

◆ create_run_params()

auto unravel::rendering::pipeline::create_run_params ( entt::handle camera_ent) const -> rendering::pipeline::run_params
virtual

Definition at line 125 of file pipeline.cpp.

◆ gather_visible_models()

auto unravel::rendering::pipeline::gather_visible_models ( scene & scn,
const math::frustum * frustum,
visibility_flags query,
const layer_mask & render_mask ) -> visibility_set_models_t
virtual

Gathers visible models from the scene based on the given query.

Parameters
scnThe scene to gather models from.
frustumThe frustum used for visibility determination.
queryThe visibility query flags.
render_maskRender mask to filter entities by layers.
Returns
A vector of handles to the visible models.

Definition at line 55 of file pipeline.cpp.

◆ get_stats()

auto unravel::rendering::pipeline::get_stats ( ) -> pipeline_stats&
inline

Definition at line 178 of file pipeline.h.

◆ init()

auto unravel::rendering::pipeline::init ( rtti::context & ctx) -> bool
virtual

Reimplemented in unravel::rendering::deferred.

Definition at line 25 of file pipeline.cpp.

◆ particle_pass()

void unravel::rendering::pipeline::particle_pass ( scene & scn,
const camera & camera,
gfx::render_view & rview,
const gfx::frame_buffer::ptr & output )
virtual

Definition at line 215 of file pipeline.cpp.

◆ run_pipeline() [1/2]

virtual void unravel::rendering::pipeline::run_pipeline ( const gfx::frame_buffer::ptr & output,
scene & scn,
const camera & camera,
gfx::render_view & rview,
delta_t dt,
const run_params & params,
layer_mask render_mask = layer_mask{layer_reserved::everything_layer} )
pure virtual

Renders the entire scene from the camera's perspective to the specified output.

Parameters
outputThe output frame buffer.
scnThe scene to render.
cameraThe camera to render from.
storageThe camera storage.
render_viewThe render view.
dtThe delta time.
queryThe visibility query flags.

Implemented in unravel::rendering::deferred.

◆ run_pipeline() [2/2]

virtual auto unravel::rendering::pipeline::run_pipeline ( scene & scn,
const camera & camera,
gfx::render_view & rview,
delta_t dt,
const run_params & params,
layer_mask render_mask = layer_masklayer_reserved::everything_layer} ) -> gfx::frame_buffer::ptr
pure virtual

Renders the entire scene from the camera's perspective.

Parameters
scnThe scene to render.
cameraThe camera to render from.
storageThe camera storage.
render_viewThe render view.
dtThe delta time.
queryThe visibility query flags.
Returns
A shared pointer to the frame buffer containing the rendered scene.

Implemented in unravel::rendering::deferred.

◆ set_debug_pass()

virtual void unravel::rendering::pipeline::set_debug_pass ( int pass)
pure virtual

◆ ui_pass()

void unravel::rendering::pipeline::ui_pass ( scene & scn,
const camera & camera,
gfx::render_view & rview,
const gfx::frame_buffer::ptr & output )
virtual

Definition at line 184 of file pipeline.cpp.

Member Data Documentation

◆ assao_pass_

assao_pass unravel::rendering::pipeline::assao_pass_ {}
protected

Definition at line 189 of file pipeline.h.

◆ atmospheric_pass_

atmospheric_pass unravel::rendering::pipeline::atmospheric_pass_ {}
protected

Definition at line 186 of file pipeline.h.

◆ atmospheric_pass_perez_

atmospheric_pass_perez unravel::rendering::pipeline::atmospheric_pass_perez_ {}
protected

Definition at line 187 of file pipeline.h.

◆ atmospheric_pass_skybox_

atmospheric_pass_skybox unravel::rendering::pipeline::atmospheric_pass_skybox_ {}
protected

Definition at line 188 of file pipeline.h.

◆ blit_pass_

blit_pass unravel::rendering::pipeline::blit_pass_ {}
protected

Definition at line 185 of file pipeline.h.

◆ fxaa_pass_

fxaa_pass unravel::rendering::pipeline::fxaa_pass_ {}
protected

Definition at line 190 of file pipeline.h.

◆ hiz_pass_

hiz_pass unravel::rendering::pipeline::hiz_pass_ {}
protected

Hi-Z buffer generation pass.

Definition at line 193 of file pipeline.h.

◆ particle_program_

std::unique_ptr<gpu_program> unravel::rendering::pipeline::particle_program_ {}
protected

Definition at line 195 of file pipeline.h.

◆ particle_program_instanced_

std::unique_ptr<gpu_program> unravel::rendering::pipeline::particle_program_instanced_ {}
protected

Definition at line 196 of file pipeline.h.

◆ prefilter_pass_

prefilter_pass unravel::rendering::pipeline::prefilter_pass_ {}
protected

Definition at line 184 of file pipeline.h.

◆ ssr_pass_

ssr_pass unravel::rendering::pipeline::ssr_pass_ {}
protected

Definition at line 192 of file pipeline.h.

◆ stats_

pipeline_stats unravel::rendering::pipeline::stats_ {}
protected

Definition at line 198 of file pipeline.h.

◆ tonemapping_pass_

tonemapping_pass unravel::rendering::pipeline::tonemapping_pass_ {}
protected

Definition at line 191 of file pipeline.h.


The documentation for this class was generated from the following files: