POV-Ray : Newsgroups : povray.general : Details on layered textures/materials : Re: Details on layered textures/materials Server Time
3 May 2024 08:06:59 EDT (-0400)
  Re: Details on layered textures/materials  
From: Chris R
Date: 3 Apr 2024 11:00:00
Message: <web.660d6ea45a55796453fb81ab5cc1b6e@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> SO, maybe I'm missing something here, but wouldn't just find/replace material
> with texture yield a layered texture rather than a material?
>
> I'm at work atm, so I don't have POV-Ray to test this with.
>
> But if that works, then you can also just have the macro declare a global
> texture name in the process of making the material, and use that after you
> invoke the macro.
>
> - BE

That makes my developer heart hurt... global side effects in a "function" call
:-).  Of course, macros aren't really functions in POV, but I treat them that
way when I write code.

However, I could avoid the parsing problems if I had kept the transformations in
the macro that creates the material wrapper instead of trying to force them into
the texture.  That way I don't need a wrapping texture, and maybe just declaring
a local assignment to the layered texture and returning it would not have caused
the parsing errors with CRand(0.25).

I will play with that.  The less I muck up the original code the better.

-- Chris -R


Post a reply to this message

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