• Advertisement
Sign in to follow this  

Data transfer inside video memory

This topic is 2912 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
Thanks a lot! With vertex-texture-fetch it runs !4! times faster.

Share this post


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

  • Advertisement