I am showing sprites on the screen with Alpha Channels, but the sprite shows a horizontal band at the top of it, as if it doesn't see the alpha channel on the first line. Has anyone else experienced this and is there a way around it?
Alpha Channel Problem
Blitz3D Forums/Blitz3D Programming/Alpha Channel Problem Could it be wrapping the texture, and picking up the colour off the bottom of the texture? Often UV co-ordinates overlap the top of the texture map. Try giving the sprite a couple of pixels transparent alpha border to avoid this.
Don't worry, I fixed it myself. The answer was to clamp down the uv textures thus:
spritetexture=LoadTexture(file$,50)
where the 50 means:
2 - Alpha Channel
16 - Clamp Down U
32 - Clamp Down V
It was wrapping the texture around. The horizontal line was coming from the bottom of my texture and wrapping round to the top.
spritetexture=LoadTexture(file$,50)
where the 50 means:
2 - Alpha Channel
16 - Clamp Down U
32 - Clamp Down V
It was wrapping the texture around. The horizontal line was coming from the bottom of my texture and wrapping round to the top.
Ah, I wasn't aware of UV Clamping! I'll have to look into that. Thanks for posting your solution!