|
|
Am 16.03.2017 um 17:56 schrieb Bald Eagle:
> clipka <ano### [at] anonymousorg> wrote:
>
> Excellent information, as always.
> Al ways, always, always learning something new and useful here. :)
>
>> (It should be noted that `srgb <184/255, 115/255, 48/255> * Tone`
>> doesn't give you exactly what you are asking for. Theoretically it
>> should be `(srgb <184/255, 115/255, 48/255>) * Tone`, but that's
>> currently not allowed by the parser.)
>
> So something along the lines of this would be necessary:
> (untested, needs handling of optional transmit and filter values)
>
> #macro RGB2SRGB (C_linear)
...
No, what would be necessary is just the opposite: A mechanism to convert
from sRGB to linear. Because picked colours tend to be in sRGB, and what
POV-Ray needs deep down in its heart is linear.
Which is precisely what the `srgb` keyword was designed to do (presuming
you're using `assumed_gamma 1.0` like you should).
The only drawback is that you can't put `srgb` in brackets to multiply
that expression (which would be a linear colour) with a `Tone` factor.
And if you omit the bracket you get a multiplication in sRGB space
(effectively `srgb (<...>*Tone)`), which isn't exactly what you need.
Post a reply to this message
|
|