Texture Transparency

BlitzMax Forums/MiniB3D Module/Texture Transparency

BLaBZ(Posted 2010) [#1]
I have a png texture with alpha, I'm wondering if there's a way to make the alpha areas a specific color?

Thanks!


Leon Drake(Posted 2010) [#2]
with textureblend perhaps you might be able to pull that off.


Kryzon(Posted 2010) [#3]
Sure, just put a flat texture that has only the color you want below that png.
Whatever parts of the png are alpha'ed, the texture (meaning, color) below will show up.


BLaBZ(Posted 2010) [#4]
What do you mean by "flat" texture?


BLaBZ(Posted 2010) [#5]
I'm able to create this effect in Blitz3D with..

; Load textures
tex0=LoadTexture( "pcolor.png" )
tex1=LoadTexture( "power1text.png",2 )


; Texture cube with textures
EntityTexture cube,tex0,0,0
EntityTexture cube,tex1,0,1

;Texture Blend
TextureBlend tex0,1
TextureBlend tex1,1


But I can't seem to get the same effect in BlitzMax with MiniB3D


Kryzon(Posted 2010) [#6]
Flat texture I mean, only one color. The entire texture is filled with only one color.