Jump to content
  • Advertisement
Sign in to follow this  
CastorX

Data transfer inside video memory

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

Hy! Is it possible to transfer data from a render target texture into a vertex buffer without a system memory copy? Right now I do it like this: tPositionTexture0.GetTexture().GetData<Vector4>(posTmpArray); vbPosition.SetData<Vector4>(posTmpArray, 0, numParticles); This code is part of a GPU managed particle system with WH geometry instancing. Currently I'm testing it with ~250.000 particles. (20-30 fps) But I want to decrease the CPU load. Any ideas how to do it, or how to avoid the system-mem copy?

Share this post


Link to post
Share on other sites
Advertisement
The most common way to use rendered-data as part of your vertex stream is probably to just use vertex-texture-fetch (i.e. sample from the texture in your vertex shader), but there's also the R2VB trick.

In the last particle system I used, it was implemented using both of these techniques (1 or the other) -- a VTF code-path for most cards, and a R2VB code-path on a few other cards.

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!