|
|
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
|
|