Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index-/VertexBuffer from FilamentAsset #8242

Open
27justin opened this issue Oct 30, 2024 · 0 comments
Open

Index-/VertexBuffer from FilamentAsset #8242

27justin opened this issue Oct 30, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@27justin
Copy link

Is your feature request related to a problem? Please describe.
AFAIK the default createInstancedAsset / createInstance functions that FilamentAsset provides may not be sufficient for use-cases where the user requires GPU instancing.

Ideally I'd want Filament to expose the VertexBuffer(s) and IndexBuffer(s) of a given asset transparently to the user, so that he can build a Renderable with RenderableBuilder::Builder::instances(size_t) to render large quantities of the same asset over a scene.

Describe the solution you'd like
I'm currently using a patched version of Filament that exposes two new functions on FilamentAsset:

	const std::vector<VertexBuffer*> &getVertexBuffers() const noexcept;
	const std::vector<IndexBuffer*> &getIndexBuffers() const noexcept;

Describe alternatives you've considered
I tried using the createInstancedAsset function as well as createInstance to render ~20.000 blades of grass.
However the performance was ~10-20x worse than using the RenderableBuilder::Builder::instances(size_t) approach.

OS and backend
N/A

@pixelflinger pixelflinger added the enhancement New feature or request label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants