Skip to main content

Module demo

Module demo 

Source
Expand description

A procedural tile source, for galleries, examples and benchmarks: an image of any size computed on worker threads, scene-referred (linear floats), with a parameter that changes the whole image.

Experimental: may change in any release (docs/stability.md).

It shows how a source behaves: requests return at once, workers skip cancelled requests, tiles come back through the sink, and a change is announced with TileSink::changed. Procedural::wait_idle blocks until every request taken has been answered or dropped: tests wait on it instead of sleeping.

Structs§

Procedural
The procedural source. Dropping it stops its workers.

Functions§

sample
The image’s colour at image point (x, y) (continuous) for a size and a shift: smooth hues, rings, and a faint one-pixel checker so 100 % and above show single pixels. Linear RGB.