Render targets and image composition¶
For usage and examples, see Render targets and image composition.
Requirements¶
An image source shall clear its image to opaque black on each execution by default, so drawing starts with defined contents. |
Applications shall be able to select the color used to clear a target. |
Applications shall be able to preserve a target’s existing contents as the background for later drawing in the graph. |
Both Gaussian splatting backends shall draw over a target’s existing background, preserving uncovered pixels and blending covered pixels with it. |
Applications shall be able to replace target pixels with a source image or blend it over them using source alpha. Placement shall support stretching, fitting the whole source with its aspect ratio preserved, and filling the target by cropping the source with its aspect ratio preserved. Pixels outside the placed source shall retain the target’s contents. |
Several execution paths shall be able to read the same image without modifying it. After all readers have finished, applications shall be able to replace its contents for subsequent executions without recompiling the graph. |
Transparent images produced by either Gaussian backend shall be composable over another image without applying opacity twice. Resizing shall preserve the contributions of colors at transparent edges. The existing straight-alpha composition test does not verify this requirement. |
A compiled rendering graph shall support repeated execution on the same offscreen target with clearing disabled, preserving its contents and handling the layout required by the next execution. The existing preservation test submits an image source without a Gaussian renderer. |
Specifications¶
|
The raster backend uses |
|
|
|
Tests¶
Fills an image with white, then runs its source and checks every pixel is opaque black. |
Clears an uncleared source through |
Fills a target with white and checks that submitting its image source with clearing disabled preserves it. This does not exercise repeated rendering. |
Renders Gaussians over black and blue with both backends, checks uncovered pixels and background contributions, and compares the resulting images. |
Checks replacement, fitting, filling and a straight-alpha source blended over an opaque background. This does not cover transparent Gaussian output. |
Fits a tall pattern into a square target, checking every source pixel and the untouched margins. |
Fills a square target from a wide pattern, checking that both sides are cropped equally and that the remaining pixels are in the correct positions. |
Upscales four distinct opaque colors and checks edge pixels and interpolated interior values. Transparent-edge filtering remains part of the open alpha requirement. |
Copies one shared image into three per-path targets through an image forward. Replaces the shared contents between completed runs, checks all paths see each update, and checks that the shared image itself is unchanged by readers. |