Hiya,
I need to access the displaced vertex positions of a static or procedural mesh at runtime after it has been tessellated and the surface displaced by a height map so I can process the mesh outside of the game thread. Any ideas how I can get hold of this information?
Best,
Richard
afaik you cant, since the tessellation runs entirely on gpu. so there is no way for the cpu to retrieve that information.
Hmmm. I’m hoping there’s a way to hook into the stream output stage of the D3D pipeline after the geometry shader and tessellation stages without going too far down the hacking on shaders rabbit hole. Will keep browsing the API
Ok, so I’ve had a poke around in the API and found FShaderFactoryInterface::CreateGeometryShaderWithStreamOutput which is looking quite promising. If anyone has any tips for where to go next to get the displaced, tessellated vertices from a mesh I’d love to hear them, otherwise I’m going to continue chipping away in between doing stuff I’m vaguely competent at.
Oh yeah, the reason for doing this is so I can voxelize a mesh that has had a heightmap applied and also so I can export the tessellated meshes and process them outside of UE4.