PDA

View Full Version : Adding alpha value to texture



02-03-2002, 03:41 AM
Hi, I have two textures which I want to draw above each other. One is the ground, the second one is a house (all in 2D). Now I set everything outside the house red, and now want to load the texture and let every red pixel have an alpha value from 0.0f. How can I do that or am I trying to do it the complete wrong way?

nexusone
02-03-2002, 04:57 AM
You use the alpha channel to create a mask of the area's that you want to see through.

I use paint shop pro to make TGA images with the alpha channel, I am not sure about how to do it with other paint programs.

this site has a good tutor on doing it, lession 33 or tutor 33. Show how do load and mask areas on an object.

nehe.gamedev.net


Originally posted by The stupid Beginner:
Hi, I have two textures which I want to draw above each other. One is the ground, the second one is a house (all in 2D). Now I set everything outside the house red, and now want to load the texture and let every red pixel have an alpha value from 0.0f. How can I do that or am I trying to do it the complete wrong way?

Leyder Dylan
02-03-2002, 08:19 AM
Hi,

On my site, you'll find a simple progream for displaying a tree with alpha chanel.
http://ibelgique.ifrance.com/Slug-Production/