POV-Ray : Newsgroups : povray.beta-test : Calling a macro in layered texture : Re: Calling a macro in layered texture Server Time
4 Jul 2024 13:31:30 EDT (-0400)
  Re: Calling a macro in layered texture  
From: Thorsten Froehlich
Date: 29 Jan 2010 15:53:56
Message: <4B634AE3.50907@trf.de>
On 29.01.10 14:29, Thomas de Groot wrote:
> I wonder if this is a bug or not. Happens as well in 3.7 as in 3.6:
>
> The following code works fine:
>
> #declare MyTex =
> texture{ pigment {color GammaColor(<0.83,0.83,0.83>,Gamma) }}
> texture{ pigment{uv_mapping p_map16 transmit  0.17}}
>
> The following gives a parse error stating that it cannot find the closing
> pigment brace but finds a macro identifier instead:
>
> #declare MyTex =
> texture{ pigment{uv_mapping p_map16 }}
> texture{ pigment {color GammaColor(<0.83,0.83,0.83>,Gamma) transmit  0.17}}
>
>
> What do you think? If not a bug, why does this happen?

The question is: What does the macro return? A vector? - If so, that vector 
is interpreted to be a 5-component vector (or extended accordingly). If a 
vector is returned, the error message is correct 
(http://www.povray.org/documentation/view/3.6.1/230/) because the transmit 
would be a second color you are specifying, which is of course "unexpected".

	Thorsten


Post a reply to this message

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