Sign in to follow this  

Multipass texturing question...

This topic is 4836 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying to figure out how to do multipass texturing as opposed to multitexture in a single pass. Currently I blend three textures according to two blend weights, one stored in the vertex diffuse alpha and the other in the vertex diffuse rgb. This way works fine, but I am trying to allow for more passes in the future. So I tried to switch it over to single texture passes that get alpha blended onto the frame buffer. But if I am outputing the texture color as the pixel output to be blended, how do I specify the blending weight? I can't use the color anymore because it contains the texture color. Surely I am missing something. I can't believe that it would be this difficult to do multipass rendering. Can anyone give me any insight into how to do this?? Thanks in advance, Jason Z

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hi jason Z,

set AlphaBlenEnable to true.
set SourceBlend to SourceAlpha.
set DestinationBlend to InvSourceAlpha.

now the previous render target image from pass 1 is blended with the output of the current pass. The blend factor is the alpha channel of the current pass.

regards,

atem

Share this post


Link to post
Share on other sites
Wouldn't the alpha channel of the current pass be the alpha of the texture on the current pass? It seems that this is the case because my first and second passes seem to produce a fairly even mix of the first two textures. Is there another state to set so that the vertex alpha gets passed through to the final output?

Thanks again,

Jason Z

Share this post


Link to post
Share on other sites

This topic is 4836 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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