![]() |
Lysa
0.0
Lysa 3D Engine
|
Deferred rendering path.
Renders geometry into a G-Buffer (position, normal, albedo, emissive), then performs lighting as a full-screen pass, followed by transparency and post-processing passes.
Inheritance diagram for DeferredRenderer:Public Member Functions | |
| DeferredRenderer (const RendererConfiguration &config, vireo::ImageFormat outputFormat) | |
| void | update (uint32 frameIndex) override |
| void | updatePipelines (const std::unordered_map< pipeline_id, std::vector< unique_id >> &pipelineIds) override |
| void | resize (const vireo::Extent &extent, const std::shared_ptr< vireo::CommandList > &commandList) override |
| std::shared_ptr< vireo::Image > | getBrightnessAttachment (const uint32 frameIndex) const override |
| std::shared_ptr< vireo::RenderTarget > | getColorRenderTarget (const uint32 frameIndex) const override |
| GBufferPass & | getGBufferPass () |
| FullScreenCompute & | getAOPass () const |
| TAAPass & | getTAAPass () const |
| FullScreenCompute & | getSSAOBlurPass () const |
Public Member Functions inherited from Renderer | |
| auto | getColorAttachment (const uint32 frameIndex) const |
| auto | getDepthAttachment (const uint32 frameIndex) const |
| std::shared_ptr< vireo::Image > | getCurrentColorAttachment (uint32 frameIndex) const |
| void | updatePipelines (const SceneFrameData &scene) |
| void | prepare (const std::shared_ptr< vireo::CommandList > &commandList, const SceneFrameData &scene, const vireo::Viewport &viewport, const vireo::Rect &scissors, uint32 frameIndex) |
| void | render (const std::shared_ptr< vireo::CommandList > &commandList, const SceneFrameData &scene, const vireo::Viewport &viewport, const vireo::Rect &scissors, bool clearAttachment, uint32 frameIndex) |
| std::shared_ptr< vireo::Image > | postprocessBloom (const std::shared_ptr< vireo::CommandList > &commandList, uint32 frameIndex) const |
| std::shared_ptr< vireo::Image > | postprocess (const std::shared_ptr< vireo::CommandList > &commandList, const std::shared_ptr< vireo::Image > &colorAttachment, uint32 frameIndex) |
| std::shared_ptr< vireo::Image > | postprocessAA (const std::shared_ptr< vireo::CommandList > &commandList, const std::shared_ptr< vireo::Image > &colorAttachment, uint32 frameIndex) const |
| void | renderCustomRenderPasses (const std::shared_ptr< vireo::CommandList > &commandList, const SceneFrameData &scene, RenderingPhase stage, uint32 frameIndex) |
| void | addPostprocessing (FullScreenCompute &postProcessingPass) |
| void | removePostprocessing (const std::string &fragShaderName) |
| void | removePostprocessing (const FullScreenCompute &postProcessingPass) |
| void | addRenderPass (RenderingPhase phase, CustomRenderpass &pass) |
| void | removeRenderPass (RenderingPhase phase, const CustomRenderpass &pass) |
| TransparencyPass & | getTransparencyPass () |
| FXAAPass & | getFXAAPass () const |
| SMAAPass & | getSMAAPass () const |
| BloomPass & | getBloomPass () const |
| GammaCorrectionPass & | getGammaCorrectionPass () const |
| vireo::ImageFormat | getOutputFormat () const |
| const auto & | getExtent () const |
| virtual | ~Renderer () = default |
| Renderer (Renderer &) = delete | |
| Renderer & | operator= (Renderer &) = delete |
Protected Member Functions | |
| void | colorPass (const std::shared_ptr< vireo::CommandList > &commandList, const SceneFrameData &scene, const vireo::Viewport &viewport, const vireo::Rect &scissors, bool clearAttachment, uint32 frameIndex) override |
Protected Member Functions inherited from Renderer | |
| Renderer (const RendererConfiguration &config, vireo::ImageFormat outputFormat) | |
Additional Inherited Members | |
Static Public Member Functions inherited from Renderer | |
| static std::unique_ptr< Renderer > | create (const RendererConfiguration &config, vireo::ImageFormat outputFormat) |
Protected Attributes inherited from Renderer | |
| const bool | withStencil |
| True if stencil testing must be enabled. More... | |
| const RendererConfiguration | config |
| Global rendering configuration. More... | |
| vireo::ImageFormat | outputFormat |
| Final output format after the gamma/tonemapping pass. More... | |
| std::vector< FrameData > | framesData |
| Per-frame attachment data, one entry per frame in flight. More... | |
| DepthPrepass | depthPrePass |
| Depth-only pre-pass shared by forward and deferred renderers. More... | |
| DeferredRenderer | ( | const RendererConfiguration & | config, |
| vireo::ImageFormat | outputFormat | ||
| ) |
Constructs a deferred renderer instance.
| config | Rendering configuration (attachments, frames in flight). |
| outputFormat | Output attachment color format |
|
overrideprotectedvirtual |
Records the pipeline-specific color pass for the concrete renderer. Implementations dispatch scene draws into colorAttachment and depthAttachment.
| commandList | Command list to record into. |
| scene | Per-frame scene data. |
| viewport | Viewport rectangle for this frame. |
| scissors | Scissor rectangle for this frame. |
| clearAttachment | If true, the color attachment is cleared before rendering. |
| frameIndex | Index of the frame in flight. |
Implements lysa::Renderer::colorPass()
|
inline |
|
inlineoverridevirtual |
Returns the brightness buffer used as input for the bloom extraction pass.
| frameIndex | Index of the frame in flight. |
Implements lysa::Renderer::getBrightnessAttachment()
|
inlineoverridevirtual |
Returns the color render target for a given frame. Overridden by subclasses that apply a TAA or sharpening pass as the final step.
| frameIndex | Index of the frame in flight. |
Reimplemented from lysa::Renderer::getColorRenderTarget()
|
inline |
|
inline |
|
inline |
|
overridevirtual |
Recreates attachments and pipelines after a render target resize.
| extent | New swap chain extent. |
| commandList | Command list used for any required layout transitions or copies. |
Reimplemented from lysa::Renderer::resize()
|
overridevirtual |
Performs per-frame housekeeping such as pass-local data uploads.
| frameIndex | Index of the frame in flight. |
Reimplemented from lysa::Renderer::update()
|
overridevirtual |
Updates graphics pipelines according to the provided materials mapping.
| pipelineIds | Map of pipeline family id to the list of material unique ids. |
Reimplemented from lysa::Renderer::updatePipelines()