• Advertisement
Sign in to follow this  

Passing data between passes in PS1.1

This topic is 4830 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

Is there any way to pass data between two render passes? I need the first pass to calculate the lighting amount and the second to calculate the color, then I have to multiply them with eachother to get the correct result. If I could only somehow get the result from the last pass, be it by reading the destination pixel value or some other way. Right now the only way I know how to combine passes is through SRCBLEND, DESTBLEND etc, leaving me with only the ability to add or subtract. Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Render the light pass to the rendertarget, then set the blending to multiply and then render the color.

Share this post


Link to post
Share on other sites
What API?
In OpenGL, Google turned this up on glBlendFunc:
http://www.mevis.de/~uwe/opengl/glBlendFunc.html
The idea with ogl blending is that you get the source and destination colors and can operate on them pretty freely, everything pretty much covered on that site.
I know nothing about Direct3D, so I can give no info on that.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement