BackBufferToTex with mask?

BlitzMax Forums/MiniB3D Module/BackBufferToTex with mask?

salric(Posted 2007) [#1]
Does anyone know of a way to create a masked texture (with flag=4), render to the texture with BackBufferToTex and have the mask preserved so that the texture is transparent for the color black when applied to an object?

I tried to modify the render to texture demo provided with MiniB3D, simply adding the flag 4 to the createtexture command does not work.

Any ideas?


LAB[au](Posted 2007) [#2]
You could set Entity Blend to Add (on the mapped object) to have Black becoming transparent (on black background) but that's not the perfect solution.

Backbuffer has no alpha channel as far as I know, so you will have to perform and additional step on the texture before displaying it, I am afraid you will have to dive into more low level code to get this working properly.