you can write your own texture masking function easily.
eg:
function MaskTexture(tex,r,g,b)
setbuffer texturebuffer(tex)
lockbuffer()
for j=0 to textureheight(tex)-1
for i=0 to texturewidth(tex)-1
rgb=readpixelfast(i,j) and $FFFFFF
r2=rgb shr 16
g2=(rgb shr 8) and $FF
b2=rgb and $FF
if (r=r2) and (g=g2) and (b=b2)
alpha=0
else
alpha=$FF ;(=255)
endif
writepixelfast i,j,(alpha shl 24) or rgb
next
next
unlockbuffer()
setbuffer backbuffer()
end function
(not tested, just out of my head)
of course, instead of checking for exact matching you can also use a color range, or a certain brightness range, or only the blue tone, or whatever.
|