CPU sorting pipeline
This PR implements a cpu-based sorting pipeline. Fixes https://github.com/f3d-app/f3d/issues/1803.
I don't intend this to be merged, but hopefully it is useful code to someone if they need this feature.
I don't intend this to be merged
Why not though ? :)
@mwestphal This was written as a hack, I just needed to get correct splatting results on MacOS CLI.
Tbh I have no clue about the f3d codebase, or how this PR interacts with the rest of the app surface. I'm just a graphics person fixing my own use case.
Replacing the compute shader with an implementation that reads from GL and runs sort on CPU is going to be slow regardless, maybe not up to par for this project. Plus this is using STL with alloc on every sort/frame, not what I would do in a RT rendering pipeline. Do we want to multithread or desynchronize the render? I don't know.
And I don't really have the bandwidth to do this PR correctly to the standards I would expect for my own projects :P.
This is such a tight change though, I think anyone who knows the codebase should be able to put this code in the right place and test to make sure it works.
@avaer understood, thanks for sharing!
By the way we have a discord and a tight community of devs and users, you are welcome to join! https://discord.f3d.app
@Meakk what do you think of this impl? Wanna finish it?
Thanks @avaer I will take a look.
I'm also currently implementing stochastic transparency that works pretty well for gaussian splatting and is compatible with macOS since sorting isn't required anymore.
See #2250 in case you want to track the feature.
@Meakk should we keep this one open or not ?
Yes, it's better in order to not lose it.