D. H. Berlin wrote:
> 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.
You can put your textures in an array;
#declare Mytexture = array[2] {
...tex_a,
...tex_b
}
Then use something like;
object {
Myobject
texture {
Mytexture[ ((py>0.8) & (pz>1-0.1)) ]
}
}
RG
Post a reply to this message
|