UE5 - Compute Shader Direct Draw / Marching Cubes / No Async Compute

8/19/2021
Got everything working for now.
Now trying to figure out the most elegant way to tie upates to the render thread.
Moving forward i will look into LODs, RDG graph, Async compute, might implement dual marching cube as well.

8/17/2021
Single draw call and updated every frame, still no async compute, WIP as there’s a bug i need to figure out still:

8/15/2021 Update:
I am working toward Compute Shader direct/indirect drawing, meaning computed data on the GPU memory is directly used for rendering without having to copy back data to the RAM for any CPU management.

Made a short demo to showcase the marching cube i just implemented.
Really fun to be able to generated meshes using distance fields!

New Video:

**Original video** :

https://www.youtube.com/watch?v=Gfwanj8BKhQ
7 Likes

Updated the video

Really nice!

1 Like

Initial version was fairly rough, polished it and updated the video !

Hmm… would make a good rendering strategy for a claymation type game…

1 Like

Updated the video with my latest improvements:

What i have been doing initially was computing the data on the GPU reading it back/copying to the RAM for CPU usage and creating a standard procedural mesh from it.
Right now i’m trying to draw directly from the output data on the GPU without any (or minimal) readbacks. My bottleneck isn’t tied to those read backs mind you, but rather to the fact i’m not leveraging async compute for now.

1 Like

Figured out what i was missing out for the tangent buffer, updated the video. Starting to look like something !

it’s cool.hope it could be production-ready soon!

1 Like

Update for the day: for direct drawing i merged the batch into a single draw call, still not running on async compute.

The version with readbacks is capped at an animation frame once every 3 frames, while the direct drawing is drawing every frame.

Work in progress as i have a buffer size value being corrupt from time to time and creating geometry glitches as you can see.

Another update, fixed all the issues.
Now trying to figure out the most elegant way to tie upates to the render thread.

Moving forward i will look into LODs, RDG graph, Async compute, might implement dual marching cube as well.

Is this something that you will be sharing with the community or is it for your own use?