Open github-actions[bot] opened 9 months ago
@mosure How could I go about working on this issue? Is this related to issue #12. I see your note about entry_buffer_a but don't know what that means. I'd love to help!
@MiniMinerX I appreciate the help!
the gaussian splat forward rasterization requires per-view (camera) depth sort.
in the current implementation, the sort buffers are instantiated once per gaussian cloud entity. this is a problem for the current sort strategies (radix sort is a render-graph level compute node, CPU sort is done in the main world), since there is only one buffer, fix-sized to 1x number of gaussians, see CPU sort where multiple cameras write to the same memory: https://github.com/mosure/bevy_gaussian_splatting/blob/08f6e4a955c86a14dd50cf844258d51ced21bffc/src/sort/std.rs#L61
there are two strategies:
sorted_bind_group
) would need to be created per View:
https://github.com/mosure/bevy_gaussian_splatting/blob/08f6e4a955c86a14dd50cf844258d51ced21bffc/src/render/mod.rs#L812the single sorted_entry_buffer would need to be sized based on the number of cameras in the scene: https://github.com/mosure/bevy_gaussian_splatting/blob/08f6e4a955c86a14dd50cf844258d51ced21bffc/src/render/mod.rs#L821
the sorted_bind_group would need to be set with dynamic index, example of setting dynamic index here: https://github.com/mosure/bevy_gaussian_splatting/blob/08f6e4a955c86a14dd50cf844258d51ced21bffc/src/render/mod.rs#L987
in either case, writing to SortedEntries
(on CPU) or (on GPU) would need to be aware of the buffer layout/indexing strategy.
the error in #111 would also need to be addressed. I think it refers to a bug in queue_gaussian_view_bind_groups
, for some reason, the view_binding
in Res<ViewUniforms>
is not correlated correctly with the ViewUniformOffset
. It might be good to log which entity has the invalid offset for further debugging.
separate entry_buffer_a binding into unique a bind group to optimize buffer updates
https://github.com/mosure/bevy_gaussian_splatting/blob/5c9a20a3478b8cca2dd3df2f49fd26232087fa42/src/sort/mod.rs#L214