POV-Ray : Newsgroups : povray.general : strange problem with srgb color in light_source : Re: strange problem with srgb color in light_source Server Time
24 Jun 2021 15:35:18 EDT (-0400)
  Re: strange problem with srgb color in light_source  
From: Cousin Ricky
Date: 1 Apr 2021 19:00:09
Message: <60665079$1@news.povray.org>
On 2021-04-01 8:55 AM (-4), Kenneth wrote:
> But there's one aspect of my example that is still mysterious to me:
> By pre-#declaring  TEMP_COLOR=srgb <.5,.3,.7> and then plugging that into the
> light as
>          color TEMP_COLOR*50000
> it would *appear* that the syntax result is again simply  srgb <.5,.3,.7>*50000
> -- or maybe a segregated   (srgb <.5,.3,.7>)*50000 ?  I'm not seeing the
> essential difference that the #declare produces. So it looks like the parser
> *is* making some kind of mathematical distinction, whatever that is.

It's not mathematical; it's procedural.  Once the srgb keyword does its
job, it goes home for the day.  So in your color TEMP_COLOR*50000, there
is no srgb calculation.

Try thinking of TEMP_COLOR as having been permanently converted to
linear rgb; once the srgb keyword conversion is applied, it has no
memory of having ever been non-linear.

Post a reply to this message

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