POV-Ray : Newsgroups : povray.advanced-users : function select logic : function select logic Server Time
19 Apr 2024 05:56:37 EDT (-0400)
  function select logic  
From: Mike Horvath
Date: 23 Nov 2016 01:59:17
Message: <58353e45$1@news.povray.org>
I have the following three functions:

#declare correctRGB_R = function(R,G,B) {min(max(R,0),1)}
#declare correctRGB_G = function(R,G,B) {min(max(G,0),1)}
#declare correctRGB_B = function(R,G,B) {min(max(B,0),1)}

They each process input and output one component of an R,G,B color vector.

However, instead of the above, I want the entire vector discarded if 
*any* of R, G or B is less than zero or greater than one.

I'm not sure how to form the select statement. What is the best way to 
do this?

Mike


Post a reply to this message

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