POV-Ray : Newsgroups : povray.advanced-users : function select logic : Re: function select logic Server Time
18 Apr 2024 20:25:38 EDT (-0400)
  Re: function select logic  
From: Bald Eagle
Date: 23 Nov 2016 10:05:01
Message: <web.5835afe1a279be30c437ac910@news.povray.org>
scott <sco### [at] scottcom> wrote:

> What do you mean by discarded? A function must always return a value,
> there is no "discarded" option. Where/how are you going to use these
> three functions and what do you want the final result to be if the input
> RGB is out of range? You could return a special value like -1 to
> indicate a "discarded" vector - but it depends what you're going to do
> next with the result.

That was my concern as well.
I thought of a similar -1 or other "flag" value - and then he could set transmit
to 1 so it's essentially invisible.


> That's just going to decide whether or not to declare the functions in
> the scene, on some unrelated RGB variables (RGB in the function
> definitions are just parameters). It won't affect the behaviour of the
> function when it is actually used later on (apart from getting an error
> that it is undefined).

Well that was the "or..." part of the "do nothing" conditional result.
#declare RGB = color rgbt <1, 1, 1, 1>;

would be a default "hide / 'discard' this out of range result"


Post a reply to this message

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