![]() |
Lysa
0.0
Lysa 3D Engine
|
High-level scene renderer
Inheritance diagram for Renderer:Classes | |
| struct | FrameData |
Public Member Functions | |
| virtual std::shared_ptr< vireo::RenderTarget > | getColorAttachment (const uint32 frameIndex) const |
| auto | getDepthAttachment (const uint32 frameIndex) const |
| std::shared_ptr< vireo::RenderTarget > | getCurrentColorAttachment (uint32 frameIndex) const |
| virtual std::shared_ptr< vireo::RenderTarget > | getBrightnessAttachment (uint32 frameIndex) const = 0 |
| virtual void | resize (const vireo::Extent &extent, const std::shared_ptr< vireo::CommandList > &commandList) |
| void | updatePipelines (const SceneFrameData &scene) |
| virtual void | updatePipelines (const std::unordered_map< pipeline_id, std::vector< unique_id >> &pipelineIds) |
| virtual void | update (uint32 frameIndex) |
| void | prepare (vireo::CommandList &commandList, const SceneFrameData &scene, const vireo::Viewport &viewport, const vireo::Rect &scissors, uint32 frameIndex) |
| void | render (vireo::CommandList &commandList, const SceneFrameData &scene, const vireo::Viewport &viewport, const vireo::Rect &scissors, bool clearAttachment, uint32 frameIndex) |
| void | postprocess (vireo::CommandList &commandList, uint32 frameIndex) |
| void | addPostprocessing (PostProcessing &postProcessingPass) |
| void | removePostprocessing (const std::string &fragShaderName) |
| void | removePostprocessing (const PostProcessing &postProcessingPass) |
| TransparencyPass & | getTransparencyPass () |
| SMAAPass & | getSMAAPass () const |
| BloomPass & | getBloomPass () const |
| const auto & | getExtent () const |
| virtual | ~Renderer () = default |
| Renderer (Renderer &) = delete | |
| Renderer & | operator= (Renderer &) = delete |
Static Public Member Functions | |
| static std::unique_ptr< Renderer > | create (const RendererConfiguration &config, vireo::ImageFormat outputFormat) |
Protected Member Functions | |
| Renderer (const RendererConfiguration &config, vireo::ImageFormat outputFormat) | |
| virtual void | colorPass (vireo::CommandList &commandList, const SceneFrameData &scene, const vireo::Viewport &viewport, const vireo::Rect &scissors, bool clearAttachment, uint32 frameIndex) = 0 |
Protected Attributes | |
| const bool | withStencil |
| const RendererConfiguration | config |
| std::vector< FrameData > | framesData |
| DepthPrepass | depthPrePass |
|
virtualdefault |
|
delete |
|
protected |
| void addPostprocessing | ( | PostProcessing & | postProcessingPass | ) |
Adds a full-screen post-processing pass.
|
protectedpure virtual |
|
static |
|
inline |
|
pure virtual |
Returns the color buffer used for bloom extraction for a frame.
Implemented in lysa::DeferredRenderer::getBrightnessAttachment(), lysa::ForwardRenderer::getBrightnessAttachment()
|
inlinevirtual |
Accessor for the color render target of the current frame.
Reimplemented in lysa::DeferredRenderer::getColorAttachment()
| std::shared_ptr<vireo::RenderTarget> getCurrentColorAttachment | ( | uint32 | frameIndex | ) | const |
Returns the color attachment of the current renderer for a frame.
|
inline |
Accessor for the depth render target of the current frame.
|
inline |
|
inline |
|
inline |
|
delete |
| void postprocess | ( | vireo::CommandList & | commandList, |
| uint32 | frameIndex | ||
| ) |
Applies post-processing chain (SMAA, bloom, custom passes).
| void prepare | ( | vireo::CommandList & | commandList, |
| const SceneFrameData & | scene, | ||
| const vireo::Viewport & | viewport, | ||
| const vireo::Rect & | scissors, | ||
| uint32 | frameIndex | ||
| ) |
Pre-render stage: uploads, layout transitions, depth pre pass and shadow maps.
|
inline |
Removes a previously added post-processing pass.
| void removePostprocessing | ( | const std::string & | fragShaderName | ) |
Removes a previously added post-processing pass by fragment name.
| void render | ( | vireo::CommandList & | commandList, |
| const SceneFrameData & | scene, | ||
| const vireo::Viewport & | viewport, | ||
| const vireo::Rect & | scissors, | ||
| bool | clearAttachment, | ||
| uint32 | frameIndex | ||
| ) |
Main render stage: records opaque/transparent draw calls.
|
virtual |
Recreates attachments/pipelines after a render target resize.
| extent | New swap chain extent. |
| commandList | Command list used for any required transitions/copies. |
Reimplemented in lysa::DeferredRenderer::resize(), lysa::ForwardRenderer::resize()
|
virtual |
Performs per-frame housekeeping (e.g., pass-local data updates).
Reimplemented in lysa::ForwardRenderer::update(), lysa::DeferredRenderer::update()
| void updatePipelines | ( | const SceneFrameData & | scene | ) |
|
virtual |
Updates graphics pipelines according to the provided materials mapping.
| pipelineIds | Map of pipeline family id to materials. |
Reimplemented in lysa::DeferredRenderer::updatePipelines(), lysa::ForwardRenderer::updatePipelines()
|
protected |
|
protected |
|
protected |
|
protected |