Constants - Serabe/rinzelight GitHub Wiki
Every constant is a macro, and they are defined by one of the following macro:
rinze-constant
rinze-int-constant
rinze-double-constant
The only difference between them is that the last two forces a primitive type (int
and double
respectively).
The ideas behind most of them come from ImageMagick.
(quantum-range)
is the maximum value a channel can take. In Java it is 255, but use this macro instead of the proper value.
Value for the alpha channel of an opaque pixel. In rinzelight, it is the same as (quantum-range)
but, for example, in Image Magick it is 0.
Same as before, but for a transparent pixel. In rinzelight, it is 0.
Inverse of (quantum-range)
.
Smallest value different than zero considered by rinzelight. Useful for calculating the proper gamma when normalizing a kernel, for example. When you are dividing by a number that is likely to be really small, compare first to (epsilon)
.
Square root of two times PI.