Sign in to follow this  
mrmrcoleman

Direct 3D textures and transparency.

Recommended Posts

Hello there. I have a 2d interface which is comprised of several direct 3d textures. I need to be able to make some of these textures fade to fully transparent. Is there some simple way to do this or would I need to manipulate the pixel data in the texture? If this is the case how would I go about getting to the pixel data to decrease the alpha? Has anybody come across this problem before, it seems like something that would be a common requirement? Any help would be greatly appreciated. Mark Coleman

Share this post


Link to post
Share on other sites
1) Set the texture stage operation of stage 0 to Modulate, set argument 1 to TextureColor and argument 2 to diffuse color.
2) Change the alpha component of the diffuse color.

As you change the alpha component, the texture will either fade in or out.

Share this post


Link to post
Share on other sites
BTW, another really popular way to fade is to place an entirely transparent black square ON TOP of whatever you want to fade and then slowly decrease the alpha diffuse until the object behind it seems to fade out.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this