2D image transparency?
Well what about having transparency on a 3d triangle? I'm having a problem trying to load a texturemap and have an alpha component at the same time. I tried what was stated above, loading a 32-bit tga file from photoshop, but the alpha channel wasn't loaded. I'm trying to blend a 3d triangle based on the alpha value in the texture map, but can't seem to get the alpha component to work. Is there a built in function in Irrlicht that lets you 'add' the alpha channel to an existing texture image once its been loaded??
once the texture is loaded you can get a pointer to the image data viasoconne wrote:Well what about having transparency on a 3d triangle? I'm having a problem trying to load a texturemap and have an alpha component at the same time. I tried what was stated above, loading a 32-bit tga file from photoshop, but the alpha channel wasn't loaded. I'm trying to blend a 3d triangle based on the alpha value in the texture map, but can't seem to get the alpha component to work. Is there a built in function in Irrlicht that lets you 'add' the alpha channel to an existing texture image once its been loaded??
Code: Select all
DWORD* pPixel = (DWORD*)image->lock(); // Get the pointer to the surface
Code: Select all
BYTE alpha = ((*pPixel) >> 24);
-
- Posts: 23
- Joined: Thu Jan 29, 2004 4:07 pm
- Location: Birmingham, UK
- Contact: