|
![](/i/fill.gif) |
High!
I'm currently trying to build a gradient y texture to generate a 16 bit
heightfield from an isosurface terrain. Here's the code:
#declare HF16 =
texture
{
pigment
{
gradient y
pigment_map
{
#declare a=0;
#while (a<127)
[a/256
pigment // here the error occurs
{
gradient y
color_map
{
[0 rgb <a/255, 0, 0>]
[1 rgb <a/255, 1, 0>]
}
scale 1/256
}
]
[(a+1)/256
pigment
{
gradient y
color_map
{
[0 rgb <a/255, 0, 0>]
[1 rgb <a/255, 1, 0>]
}
scale 1/256
}
]
#declare a=a+1;
#end
}
}
finish { ambient 1 diffuse 0 }
}
Everytime I try to start my small test scene, I get the error message "Parse
Error: expected "[", pigment found instead". Why?
See you on www.khyberspace.de !
Yadgar
Post a reply to this message
|
![](/i/fill.gif) |