Jump to content
  • Advertisement
Sign in to follow this  
Jason Z

Multipass texturing question...

This topic is 5208 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!