Skip to main content
GameDev.net gamedev.net
🔒 Locked

Alpha Blending

Started by Pederson Jan 12, 2005 at 11:02 PM 3 replies 800+ views
Original Post
Pederson
Pederson
I cant seem to get alpha blending for the life of me.....what i have is two maps....both 32bit bitmaps one is setup to be a mask with black and white and the other is the color....does anyone have a good resource for doing this...or possible a piece of sample code showing the RenderState setup as well as TextureStageState setup.....because i cant seem to get this to work at all... Jeremy
smitty1276
smitty1276
If you are using DirectX, you may want to stick this in the Direct3D forum. More people who are "in the know" will see it that way.

Do you have any source you can post?
bit64
bit64
I assume you are doing this on DX?
Do you need to have two different textures? Could you instead use a .tga with an alpha layer?
Don't be afraid to be yourself. Nobody else ever will be.
Pederson
Pederson
yeah what i was trying to do was swap in a mask for an image(multiple masks)but now instead of using a mask as a texturestage i am gonna just change the alpha values of the loaded texture to meet the need of the specific mask....but now my question is whats a good way to convert RGB values to a grayscale value?(alpha value)

Jeremy
Pederson
Pederson
Nevermind found a resource on the site for grayscale which uses an average of RGB...seems to work ok..pretty much done here...thansk for your replies:-)

Jeremy

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.