POV-Ray : Newsgroups : povray.newusers : How to get a texture like (y>0.8 & z>0.9) -> texture a else -> texture= b? : How to get a texture like (y>0.8 & z>0.9) -> texture a else -> texture= b? Server Time
30 Jul 2024 06:26:48 EDT (-0400)
  How to get a texture like (y>0.8 & z>0.9) -> texture a else -> texture= b?  
From: D  H  Berlin
Date: 3 Sep 2004 11:25:01
Message: <web.41388c77579d5a0c43ad080a0@news.povray.org>
I hope the title says all :)

I have tried with a function and an declare:
#declare myfu =
 function(py,pz) {
  #if ((py>0.8) & (pz>1-0.1))
    1
  #else
    0
  #end
 };

#declare stufe_holz_metal =
    texture {
      function { myfu(y,z) }
      texture_map {
        [ 0.0 tex_a ]  // tex_a and tex_b are declared elsewhere
        [ 1 tex_b ]
      }
    };

But that doesn't work.

Greetgins
Dieter


Post a reply to this message

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