|
 |
Thanks Bald Eagle / William.
Using warp is genius, and so logical when you think about it, I'm thinking too
much in OpenGL terms :)
I'm now using this, which seems to work fine.
-----------
#macro getPngMapType(idx)
#if (getPngNeedsURepeat(idx) & getPngNeedsVRepeat(idx))
map_type 0
#else
map_type 0 once
#end
#end
#macro getPngWarp(idx)
#local doU=getPngNeedsURepeat(idx);
#local doV=getPngNeedsURepeat(idx);
#if (doU | doV)
#if (doU)
warp { repeat x }
#else
warp { repeat y }
#end
#end
#end
#macro ldrawBuildTex(basePigment, baseNormal, baseFinish, pngIdx)
#if (pngIdx<0)
pigment { basePigment }
normal { baseNormal }
finish { baseFinish }
#else
#local texPigment=
pigment {
uv_mapping
image_map {
png getPngName(pngIdx)
getPngMapType(pngIdx)
interpolate 2
}
getPngWarp(pngIdx)
}
;
#local result=
texture {
pigment { basePigment }
normal { baseNormal }
finish { baseFinish }
}
texture {
pigment { texPigment }
}
;
result
#end
#end
Post a reply to this message
|
 |