masked techniques

Blitz3D Forums/Blitz3D Programming/masked techniques

Cronos(Posted 2003) [#1]
as painting a transparent pixel with

WritePixel x,y,argb,[buffer]

inside a texture to create smooth masked


Cronos(Posted 2003) [#2]
which is the format of a pixel argb

a = alpha ???
r = red 0-255 ( $00 - $ff )
g = green 0-255 ( $00 - $ff )
b = blue 0-255 ( $00 - $ff )


jfk EO-11110(Posted 2003) [#3]
yes, alpha is from 0 to $ff. 0 is full transparent, $ff is opaque.

I prefere to use the tga Format in Photoshop. Look at this Glass:


Unlike alpha-loaded BMP the transparency is not taken from the greyscale brightness of the pixel, but from the alpha Byte that is stored in the 32 Bit TGA Format. The Alpha Byte is a seperate Channel that can be edited individually, this way I added some dust in the corners of the windows and a little bit of white airbrush across the glass. (one window has 4 Tris: 2 Quads with one surface each, one inside and one outside the house)

If you take care for not using multiple alpha Entities that are visible BEHIND EACHOTHER you can prevent the z-order problems easily.


Cronos(Posted 2003) [#4]
thank you for the help ( jfk )