Creating transparent textures ???
Moderator: Moderators
bdbodger, your shader is doing white blending, scrolling and scaling. It would be awfully slow for a simple transparency, as it requires multiple texture passes.
mcunha98, I would not use nomipmaps / nopicmip unless it is a very small and fine texture (like a wire fence). These values will prevent the texture from culling at a distance, which hurts performance and can look kind of odd.
Wacko, my version of Photoshop is fairly old, but it is possible to create a 32 bit TGA, using CMYK channels. This is true 32 bit color and is not supported by MOHAA (or any other game). You have to create the TGA as RGB channels (24 bit) and add an alpha channel to make it 32 bit. Maybe your version of Photoshop defaults to creating RGB and an alpha channel, mine doesn't. In any case, you should edit the alpha channel and clean up the black and white areas for best transparent results.
mcunha98, I would not use nomipmaps / nopicmip unless it is a very small and fine texture (like a wire fence). These values will prevent the texture from culling at a distance, which hurts performance and can look kind of odd.
Wacko, my version of Photoshop is fairly old, but it is possible to create a 32 bit TGA, using CMYK channels. This is true 32 bit color and is not supported by MOHAA (or any other game). You have to create the TGA as RGB channels (24 bit) and add an alpha channel to make it 32 bit. Maybe your version of Photoshop defaults to creating RGB and an alpha channel, mine doesn't. In any case, you should edit the alpha channel and clean up the black and white areas for best transparent results.
CMYK would be true 32bit, u're right and that's why everybody is saying it won't work in MOHAA. I'm using Photoshop 7, and here I even cannot save a CMYK image as Targa: This option simply doesn't show up if the image is CMYK. Also, in my version, I can make layers semi transparent and this information would be saved in an alpha channel automatically by saving the image as 32bit Targa. As an example, u can d/l a shadow texture (both psd and tga) and try it with the shader below. This image got no alpha channel, just one layer with a gradient in opacity.Balr14 wrote:Wacko, my version of Photoshop is fairly old, but it is possible to create a 32 bit TGA, using CMYK channels. This is true 32 bit color and is not supported by MOHAA (or any other game). You have to create the TGA as RGB channels (24 bit) and add an alpha channel to make it 32 bit. Maybe your version of Photoshop defaults to creating RGB and an alpha channel, mine doesn't. In any case, you should edit the alpha channel and clean up the black and white areas for best transparent results.
Code: Select all
textures/test/shadow
{
qer_editorimage textures/test/shadow.tga
qer_keyword utility
surfaceparm alphashadow
surfaceparm nonsolid
surfaceparm trans
polygonOffset //makes it float above the face to prevent z-fighting
{
map textures/test/shadow.tga
blendFunc blend
depthWrite
}
}
