Pixel.Adjust

Description

Name

class Tinman.Pixel.Adjust

Derived from

Pixel

Adjust the brightness and saturation of the target pixels.

If slopes have been computed (see Slopes), 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 Pixel.Adjust.brightness field, s is the Pixel.Adjust.saturation field. The values b' and s' are then used for adjusting the pixel color.

Fields / Required

source

Type

Pixel

Constraint

# != null

The input buffer.

Fields / Optional

brightness

Type

number

Constraint

# >= -1000 && # <= 1000

Default

0

The adjustment factor for color brightness (0 means no change).


saturation

Type

number

Constraint

# >= -1000 && # <= 1000

Default

0

The adjustment factor for color saturation (0 means no change).


slope

Type

bool

Default

false

Modulate color adjustment factors with terrain slope?