POV-Ray : Newsgroups : povray.binaries.images : Another of Gamma's Smoking Guns : Re: Another of Gamma's Smoking Guns Server Time
4 May 2024 18:33:17 EDT (-0400)
  Re: Another of Gamma's Smoking Guns  
From: clipka
Date: 27 Dec 2016 17:26:16
Message: <5862ea88$1@news.povray.org>
Am 27.12.2016 um 21:28 schrieb Kenneth:

>> BTW, there's a caveat when using "srgb" in light sources: To modify the
>> brightness without affecting the hue, you need to use
>>
>>     colour (srgb <R,G,B>)*Brightness

I'm just noticing that this syntax actually doesn't work; you'll need to use

    #declare C = srgb <R,G,B>;
    colour C * Brightness

>> rather than
>>
>>     colour srgb <R,G,B>*Brightness
>>
>> because the latter would be interpreted as
>>
>>     colour srgb (<R,G,B>*Brightness)
>>
> 
> Wow, that's a subtle difference that I wasn't aware of. Thanks! I'm curious--
> would the same logic apply to colors in MEDIA? Or does the above formula apply
> *only* to lights?

It applies anywhere you want to change the "magnitude" (be it
brightness, density or whatever) of a colour by a factor while retaining
the same hue and saturation.


What /is/ perfectly ok is dividing sRGB colour data for the purpose of
normalizing it to the range [0..1] when the "raw" data is normalized for
another range, e.g.:

    srgb <0,192,255>/255


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.