Oxygen Engine
Modern C++ 3D Engine using OpenGL
Loading...
Searching...
No Matches
oe::render::Pipeline Class Reference
Inheritance diagram for oe::render::Pipeline:
[legend]
Collaboration diagram for oe::render::Pipeline:
[legend]

Classes

struct  PbrOptions
 Options to use in Pipeline::configureForPbrRendering. More...
 

Public Member Functions

 Pipeline ()=default
 Build an empty rendering Pipeline.
 
 Pipeline (const PbrOptions &)
 Build an Pipeline for PBR rendering.
 
void setResultFramebuffer (oe::render::Framebuffer &target)
 Set the final framebuffer which be written by the pipeline.
 
oe::render::FramebuffergetResultFramebuffer ()
 Get the final framebuffer which be written by the pipeline.
 
void setDimensions (const glm::ivec2 &dimensions)
 Set the final framebuffer dimensions.
 
glm::ivec2 getDimensions () const noexcept
 Get the final framebuffer dimensions.
 
std::shared_ptr< oe::render::FramebuffergenerateFramebuffer ()
 Generate a framebuffer for postprocessing effects.
 
std::shared_ptr< oe::render::FramebuffergenerateFramebuffer (const glm::ivec2 &size)
 Generate a framebuffer for postprocessing effects.
 
void configureForPbrRendering (const PbrOptions &options)
 Initialize the pipeline to act as a complete render pipeline ready for PBR rendering.
 
void configureForPbrRendering (scene::Manager &scene_manager, const PbrOptions &options)
 Initialize the pipeline to act as a complete render pipeline ready for PBR rendering.
 
- Public Member Functions inherited from oe::util::Pipeline< PipelineInput, PipelineOutput >
 Pipeline (Args &&... args)
 
PipelineaddPipe (const std::string &name, Args &&...args)
 
void init ()
 
void clean ()
 
PipelineOutput run (const PipelineInput &request)
 
PipelineOutput getDefaultResponse ()
 
void generateDefaultResponse (Types... args)
 
T * getPipeByName (const std::string &name)
 
void enableStepByStepMode ()
 
void disableStepByStepMode ()
 
bool isStepByStepMode ()
 
std::pair< PipelineOutput, bool > step (const PipelineInput &request)
 

Additional Inherited Members

- Protected Member Functions inherited from oe::util::Pipeline< PipelineInput, PipelineOutput >
void _rebuildPipeOrder ()
 
- Protected Attributes inherited from oe::util::Pipeline< PipelineInput, PipelineOutput >
std::vector< std::unique_ptr< PipeHandler > > _pipes
 
PipelineOutput _default_response
 
std::map< std::string, PipeHandler * > _pipes_by_name
 
std::optional< int32_t > _last_step_pipe
 

Constructor & Destructor Documentation

◆ Pipeline()

oe::render::Pipeline::Pipeline ( const PbrOptions )

Build an Pipeline for PBR rendering.

Note
the lighting component is mandatory
See also
configureForPbrRendering() for more documentation about passes

Member Function Documentation

◆ configureForPbrRendering() [1/2]

void oe::render::Pipeline::configureForPbrRendering ( const PbrOptions options)

Initialize the pipeline to act as a complete render pipeline ready for PBR rendering.

The following passes are added (in order):

  • geometry (pipeline::GeometryPass) Fill Geometry Buffer from deferred geometry (= solid and alpha-clip geometry)
  • ssao (pipeline::SsaoPass) Compute SSAO (Screen Space Ambient Occlusion) from deferred geometry
  • reflections (pipeline::ReflectionsPass) Compute deferred geometry reflections using SSR (Screen Space Reflections) and cubemaps
  • lighting (pipeline::LightingPass) Compute surface lighting response for deferred geometry + apply reflections and SSAO
  • refractions (pipeline::RefractionsPass) Generate different levels of blur from the lighting pass to be used as source in forward pass to render refractive transparent objects
  • forward (pipeline::ForwardPass) Render forward rendering geometry (glass, effects, etc...)
  • debug (pipeline::DebugPass) Render debug objects filled with oe::render::Debug (only added if options.add_debug_render is enabled)
  • final (pipeline::FinalPass) Apply final effects to the image (Bloom + Tonemap + Anti-aliasing) and blit it into the target framebuffer
Note
You can freely change each passes settings after by fetching the pass by name
Parameters
optionsOptions to customise pipeline settings

◆ configureForPbrRendering() [2/2]

void oe::render::Pipeline::configureForPbrRendering ( scene::Manager scene_manager,
const PbrOptions options 
)

Initialize the pipeline to act as a complete render pipeline ready for PBR rendering.

Deprecated:
This is kept only for compatibility, you should prefer to fill directly the Lighting component into PbrOptions

◆ generateFramebuffer() [1/2]

std::shared_ptr< oe::render::Framebuffer > oe::render::Pipeline::generateFramebuffer ( )

Generate a framebuffer for postprocessing effects.

Note
uses the main framebuffer size

◆ generateFramebuffer() [2/2]

std::shared_ptr< oe::render::Framebuffer > oe::render::Pipeline::generateFramebuffer ( const glm::ivec2 &  size)

Generate a framebuffer for postprocessing effects.

Parameters
sizeframebuffer size

◆ setResultFramebuffer()

void oe::render::Pipeline::setResultFramebuffer ( oe::render::Framebuffer target)

Set the final framebuffer which be written by the pipeline.

Parameters
targetframebuffer

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