Alpha Channel Problem

Blitz3D Forums/Blitz3D Programming/Alpha Channel Problem

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.

Ok, fixed it. It was a stupid bug:

rgb1=readpixelfast(x,y,buffer1)
rgb2=readpixelfast(x,y,buffer2) and $FFFFFF
rgb3=rgb1 or ((rgb2 and $FF)shl 24)
writepixelfast x,y,rgb3,buffer1

should be
rgb1=readpixelfast(x,y,buffer1) and $FFFFFF
rgb2=readpixelfast(x,y,buffer2) and $FFFFFF
rgb3=rgb1 or ((rgb2 and $FF)shl 24)
writepixelfast x,y,rgb3,buffer1


Reading the RGB Pixel from Buffer1 without to mask out the Alpha Channel, and then ORing the Alphabyte of buffer2 to it gave me these strange Alpha values. Kind of a typo.