I can probably take a look at this tonight.
In the meantime, try using TGA. PNG works for alpha transparency, but Photoshop is a little weird about it. TGA is simpler to deal with.
Also, a couple years ago Anthony Flack devised an ingenious way to combine alpha channel with masked transparency. Here's the code:
In the meantime, try using TGA. PNG works for alpha transparency, but Photoshop is a little weird about it. TGA is simpler to deal with.
Also, a couple years ago Anthony Flack devised an ingenious way to combine alpha channel with masked transparency. Here's the code:
texture=LoadTexture("image.png",1+2+16+32) readalpha(texture) texture=LoadTexture("image.png",1+4+8+16+32) writealpha(texture) ;----------------------------------------------------------------------------- ; function for extracting the alpha Function ReadAlpha(tex) t=TextureBuffer(tex) LockBuffer t For y=0 To TextureHeight(tex)-1 For x=0 To TextureWidth(tex)-1 pix=ReadPixelFast(x,y,t) pix=(pix And $ff000000) Shr 24 alphainfo(x,y)=pix Next Next UnlockBuffer t End Function ;----------------------------------------------------------------------------- ;----------------------------------------------------------------------------- ; function for putting the alpha back on Function WriteAlpha(tex) t=TextureBuffer(tex) LockBuffer t For y=0 To TextureHeight(tex)-1 For x=0 To TextureWidth(tex)-1 pix=ReadPixelFast(x,y,t) pix=(pix And $ffffff) Or (alphainfo(x,y) Shl 24) WritePixelFast (x,y,pix,t) Next Next UnlockBuffer t End Function ;-----------------------------------------------------------------------------