Sign in to follow this  
ronan.thibaudau

Possible to read back vertex from GPU?

Recommended Posts

I know you can pass in textures that you will populate on the GPU and readback but is it possible at all to do the same with vertex data?

 

I'm wondering if there's a way to use GPU tesselation to feed in a mesh, tesselate it as i'd do to render it in a shader, and "read back" the tesselated vertices to avoid having to do this on the CPU side (this is not for real time rendering, i have a software need for heavily tesselated meshes and doing it myself on the CPU is a lot more work than using the GPU and will be much slower, my gut feeling is it's not possible but i thought i'd ask just in case!)

Share this post


Link to post
Share on other sites

If you're doing this in OpenGL, the magic phrase to search for is "transform feedback". This is a reasonably simple way of having the primitive vertex data written to a buffer that you can then just map and read by the CPU.

 

I've never used it with tessellation (although I understand it should work fine) -- we used it for generating data to use in picking points out of a cloud. It's relatively easy to set up and conveniently takes the same inputs as a rendering pass.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this