enum ColorOp
Enumeration of color operations.
The following table lists all iemts of this enum type, including their string tags (if defined).
Blend
Blends the color values according to their alpha channel values (second over first).
The following computations are performed, assuming color channel values in the range [0..1]:
temp := first.a * (1 - second.a) result.a := second.a + temp result.rgb := (first.rgb * temp + second.rgb * second.a) / result.a;
When the first color is opaque, the computation reduces to this:
result.a := 1 result.rgb := first.rgb * (1 - second.a) + second.rgb * second.a;
Mul
Multiplies the color channel components of the given color values.
For each color component, the following computation is performed, assuming color channel values in the range [0..1]:
result := first * second;
Add
Adds the color channel components of the given color values.
result := min(first + second, 1);
Sub
Subtracts the color channel components of the given color values.
result := max(first - second, 0);
The following table shows all usages of this config type.
class Tinman.Heightmap.Combine . textureOp
class Tinman.Image.Op . op
class Tinman.Noise.Color.Op . op
class Tinman.Pixel.Combine . op
class Tinman.Pyramid.Combine . op
struct Tinman.Pyramid.MapShape . op