Jump to content
  • Advertisement
Sign in to follow this  
Quat

is this operation legal?

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

On one pass I render I render information into the red component of a floating-point render target. On a second pass I sample the red component and write additional information to the green and blue components (i.e., green and blue data depends on red). I use alpha blend ADD operation: First pass (r, 0, 0, 0) Second pass (0, g, b, 0) alpha ADD: (r, g, b, 0). However, then I remembered reading something that you cannot use a render target as a target and sample it at the same time. But, the above seems to actually work correctly. So my question is, is the above legal since I write to different color components. (i.e., I am not reading from red and writing to red.) I have a geforce 6800 GT.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Quat
However, then I remembered reading something that you cannot use a render
target as a target and sample it at the same time.

But, the above seems to actually work correctly. So my question is, is the
above legal since I write to different color components. (i.e., I am not
reading from red and writing to red.)

I have a geforce 6800 GT.

The results are undefined. i.e. It might work on a particular card/driver configuration, but it might as well blow up on a different driver version and/or card. Don't do it [smile]

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!