bevyengine / bevy

A refreshingly simple data-driven game engine built in Rust
https://bevyengine.org
Apache License 2.0
33.71k stars 3.27k forks source link

Compute Shader Skinning #7502

Open DGriffin91 opened 1 year ago

DGriffin91 commented 1 year ago

What problem does this solve or what need does it fill?

Currently Skinning is recomputed in many passes (prepass, main pass, shadow passes, etc...).

What solution would you like?

Utilize compute shader skinning where skinning is done beforehand in a compute shader which writes out skinned vertices to a buffer. There are a few advantages to doing this:

The use of compute shaders means that WebGL would require a separate skinning implementation.

Additional context

Article about wicked engine's implementation: https://wickedengine.net/2017/09/09/skinning-in-compute-shader/ Doom Eternal uses this: https://simoncoenen.com/blog/programming/graphics/DoomEternalStudy

nicopap commented 1 year ago

Should include computation of morph targets in the compute pass as well.

pcwalton commented 3 months ago

Unity does this too.