Jazz2::Rendering::UpscaleRenderPassWithClipping class

Upscales input image usually to a native resolution, additionaly supports 3 independent layers (background layer, clipped main layer, overlay layer).

Variant of UpscaleRenderPass that upscales three separate scene nodes (background, scissor-clipped main layer, and overlay) so the main layer can be clipped to a rectangle independently of the surrounding content.

Base classes

class UpscaleRenderPass
Upscales input image usually to a native resolution.

Constructors, destructors, conversion operators

UpscaleRenderPassWithClipping()
Creates a new instance.

Public functions

void Initialize(std::int32_t width, std::int32_t height, std::int32_t targetWidth, std::int32_t targetHeight, std::int32_t supersample = 1, bool overlay = false) override
Initializes the render pass.
void Register() override
Registers the render pass into the viewport chain.
auto GetClippedNode() const -> SceneNode*
Returns the clipped main layer node.
auto GetOverlayNode() const -> SceneNode*
Returns the overlay layer node.
void SetClipRectangle(const Recti& scissorRect)
Sets the clipping rectangle of the main layer (given in logical coordinates).

Function documentation

void Jazz2::Rendering::UpscaleRenderPassWithClipping::Initialize(std::int32_t width, std::int32_t height, std::int32_t targetWidth, std::int32_t targetHeight, std::int32_t supersample = 1, bool overlay = false) override

Initializes the render pass.

Parameters
width Width of the input image
height Height of the input image
targetWidth Width of the upscaled target image
targetHeight Height of the upscaled target image
supersample Render-resolution multiplier for the input image (1 = native); the scene is still drawn in width×height coordinates, but rasterized into a supersample× larger texture
overlay If true, renders an RGBA layer at native resolution (transparent where nothing is drawn) and composites it alpha-blended on top of everything else; used for the HUD so it stays crisp regardless of the scene's supersampling