Control of texture mask

Blitz3D Forums/Blitz3D Programming/Control of texture mask

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

c=ReadPixelFast(x,y)
If (c And $fcfcfc)<>keycolor
c=c Or $ff000000
Else
c=0
EndIf
WritePixelFast x,y,c

seems like he did alter the alpha byte. But I agree with halo, the almost-cellshaded effect can be real ugly, especially when the mesh is far away. So I would use the average color for the mask, then simply replace this color on the non-masked pixels with something very similar. THe only problem is with 16 Bit textures, probably this won't work correctly when there is only a single bit diffrence from mask color and other stuff. not sure of that.