Am 13.12.2015 um 16:43 schrieb Cousin Ricky:
> Mike Horvath <mik### [at] gmailcom> wrote:
>> One quick note: you shouldn't use hex for colors because then you can't
>> perform precise calculations. Better to use float like we do now.
> How about just translating it to the standard 5-D float vector at parse time, as
> is done with the srgb keyword series in POV-Ray 3.7?
My idea would be to use HTML colour format for colours in sRGB space,
and some other syntax to specify linear colours; internally, they'd both
be translated to a vector-like linear format, and math operations could
be done on them.
Colours would /not/ be treated as strings internally.
As for translating colours to "standard 5-D float vectors", that won't
(1) Vectors are vectors, and colours are colours. In my book, using one
and the same type for them is one of the biggest blunders in POV-Ray's
(2) The RGBFT format is another one of the biggest blunders in the
history of POV-Ray, and unfortunately it's more deeply entrenched in the
rendering engine. Wherever any transparency is involved, internal math
should use two RGB values, one representing the opaque component and
another the transmissive one.
Post a reply to this message