POV-Ray : Newsgroups : povray.advanced-users : Color negation : Color negation Server Time
29 Jul 2024 18:20:42 EDT (-0400)
  Color negation  
From: Wlodzimierz ABX Skiba
Date: 6 Mar 2001 08:05:25
Message: <3aa4e095@news.povray.org>
Perhaps subject and some words are not the best - it's my English ...

I want achive color (1-Color) in this script :

  #macro NegativeTexture(Color)
    texture{pigment{color rgb (1-Color)}}
  #end
  #declare Color=color rgb 1;
  background{color Color}
  object{MyObject NegativeTexture(Color)

and this cause MyObject invisible
and cause warning: Suspicious expression after rgb.
But after changing inside macro :

  #macro NegativeTexture(Color)
    #local MaxColor=color rgb 1;
    texture{pigment{color rgb (MaxColor-Color)}}
  #end

rendering is fine but still with the same warning.
Is there any way to remove this warning ?
Is there any other proper way to calculate "negation" of color ?

ABX


Post a reply to this message

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