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 auto create_run_params (entt::handle camera_ent) const -> rendering::pipeline::run_params
 

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.
 

Detailed Description

Definition at line 59 of file pipeline.h.

Member Typedef Documentation

◆ sptr

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

Definition at line 63 of file pipeline.h.

◆ uptr

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

Definition at line 62 of file pipeline.h.

◆ visibility_flags

Type alias for visibility flags.

Definition at line 79 of file pipeline.h.

◆ wptr

Definition at line 64 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 70 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 118 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 48 of file pipeline.cpp.

◆ init()

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

Reimplemented in unravel::rendering::deferred.

Definition at line 22 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_mask{layer_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 177 of file pipeline.cpp.

Member Data Documentation

◆ assao_pass_

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

Definition at line 156 of file pipeline.h.

◆ atmospheric_pass_

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

Definition at line 153 of file pipeline.h.

◆ atmospheric_pass_perez_

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

Definition at line 154 of file pipeline.h.

◆ atmospheric_pass_skybox_

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

Definition at line 155 of file pipeline.h.

◆ blit_pass_

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

Definition at line 152 of file pipeline.h.

◆ fxaa_pass_

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

Definition at line 157 of file pipeline.h.

◆ hiz_pass_

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

Hi-Z buffer generation pass.

Definition at line 160 of file pipeline.h.

◆ prefilter_pass_

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

Definition at line 151 of file pipeline.h.

◆ ssr_pass_

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

Definition at line 159 of file pipeline.h.

◆ tonemapping_pass_

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

Definition at line 158 of file pipeline.h.


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