Jazz2::Rendering::BlurRenderPass class

Applies blur to a scene.

Post-processing pass that renders a source texture through a downsample or directional Gaussian blur shader into its own off-screen target. Several instances are chained per PlayerViewport to build the half- and quarter-resolution blur buffers used for bloom and underwater effects.

Base classes

class nCine::SceneNode
Base node of the scene graph transformation hierarchy.

Constructors, destructors, conversion operators

BlurRenderPass(PlayerViewport* owner)
Creates a new instance attached to a given viewport.

Public functions

void Initialize(Texture* source, std::int32_t width, std::int32_t height, Vector2f direction)
Initializes the render pass.
void Register()
Registers the render pass into the viewport chain.
void Dispose()
Releases all allocated resources.
auto OnDraw(RenderQueue& renderQueue) -> bool override
Called when the node needs to be drawn, returning true if a command was added.
auto GetTarget() const -> Texture*
Returns the resulting target texture.

Function documentation

void Jazz2::Rendering::BlurRenderPass::Initialize(Texture* source, std::int32_t width, std::int32_t height, Vector2f direction)

Initializes the render pass.

Parameters
source Source texture to blur
width Width of the target texture
height Height of the target texture
direction Blur direction (zero vector performs only downsampling)