IPixelLayer
Description
- Derived from
- Extended by
-
PixelLayer abstract
Base interface for pixel layers.
A IPixelLayer object reads data from zero or more input heightmap layers of the input buffer (see PaintingBuffer), performs some implementation-dependent computations and finally outputs resp. updates pixel data in the output buffer (see ColorBuffer).
Public / Attributes
Padding
The amount of padding samples that this pixel layer requires in order to produce seamless output.
The following figure shows an 8x8
pixel layer with a padding of 2
, which yields a size of 4x4
for the inner region that contains seamless data:
+---+---+---+---+---+---+---+---+ | | | | | | | | | +---+---+---+---+---+---+---+---+ | | | | | | | | | +---+---+---+---+---+---+---+---+ | | |###|###|###|###| | | +---+---+---+---+---+---+---+---+ | | |###|###|###|###| | | +---+---+---+---+---+---+---+---+ | | |###|###|###|###| | | +---+---+---+---+---+---+---+---+ | | |###|###|###|###| | | +---+---+---+---+---+---+---+---+ | | | | | | | | | +---+---+---+---+---+---+---+---+ | | | | | | | | | +---+---+---+---+---+---+---+---+
Extensions
Adjust
Adjust the brightness and saturation of the output pixels.
If slopes have been computed (i.e. PaintingBuffer.Slopes is not null
), the adjustment factors for each pixel are computed as follows:
90° >= slope >= 0° b' = slope / 90 * b s' = slope / 90 * s
where slope
is the slope angle of the pixel, b
is the brightness in parameter, s
is the saturation opt parameter. The values b'
and s'
are then passed to Colors.Adjust.
- See also
Modulate
Modulates the alpha channel of the output pixels with the HeightmapRegion.Coverage layer of PaintingBuffer.Samples.
Shade
Applies a color shade to the output pixels, depending on the elevation values in PaintingBuffer.Samples
For shading, terrain altitude values in vertical units are used (see IHeightmap.Vertical).