alpha on rectangles

Blitz3D Forums/Blitz3D Programming/alpha on rectangles

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.

Oopz, now I see what your getting at.

Mind you, doing this with 3D would be much faster, all you need to do is...

1. create a 3D sprite
2. position the sprite where you need it.
2. texture it with your graphics.
3. set your alpha value with EntityAlpha().
4. lock it to the camera with EntityParent().
5. use EntityOrder() with a value of -1 so its alway drawn on top.

IMHO it's better not to use 2D on top of 3D, because some graphics cards struggle with it. Also if you intend to have a choice of screen resolutions, doing it with 3D means your HUD will always fit the screen as you intended, no matter what the resolution.

And it will save a lot of process time, WritePixelFast is SLOW for realtime graphics.

BTW I'm assuming your writing a 3D game, apologies if your not ;)

Hope this helps.