Hi.
I have problems with the Alpha Channel of a Texture.
When I load the texture as a TGA with Alpha Channel, it works nicely.
But the TGA is 4 Megs, and even zipped still pretty huge. So I decided to save the RGB Channels as a JPG, and the Alpha Channel as a seperate JPG. To prevent lossy JPG behaviour on the Alpha Channel, I set all texels Alphabytes to zero if they are less than 10. This way the 4 Megs shrink down to less than 100 kB.
Now there's a problem, some brighter areas of the texture don't seem to be alphaed correctly. It looks like there is some kind of Bitwise overflow that makes a certain brightness half as transparent as slightly darker texels.
When I load the TGA and then apply the alpha channel as I did with the JPG, then it works perfectly. It seems setting the Alpha Bytes taken from the Alpha Channel JPG works ok. It must be something with the RGB JPG. Tho, this JPG was saved with a relative high quality, so it isn't a Lossy-Compression Problem.
Is there anyone who had the same Problem?
I have problems with the Alpha Channel of a Texture.
When I load the texture as a TGA with Alpha Channel, it works nicely.
But the TGA is 4 Megs, and even zipped still pretty huge. So I decided to save the RGB Channels as a JPG, and the Alpha Channel as a seperate JPG. To prevent lossy JPG behaviour on the Alpha Channel, I set all texels Alphabytes to zero if they are less than 10. This way the 4 Megs shrink down to less than 100 kB.
Now there's a problem, some brighter areas of the texture don't seem to be alphaed correctly. It looks like there is some kind of Bitwise overflow that makes a certain brightness half as transparent as slightly darker texels.
When I load the TGA and then apply the alpha channel as I did with the JPG, then it works perfectly. It seems setting the Alpha Bytes taken from the Alpha Channel JPG works ok. It must be something with the RGB JPG. Tho, this JPG was saved with a relative high quality, so it isn't a Lossy-Compression Problem.
Is there anyone who had the same Problem?