-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Support generating BindGroups directly from RenderResource trait impls #23
Description
Currently RenderResource trait impls are used to populate RenderResourceAssignments with [BindingName, RenderResource] pairs. Pipeline bind group descriptors are then passed to RenderResourceAssignments to generate the final BindGroup / RenderResourceSet.
This approach allows maximum flexibility: RenderResourceAssignments can be populated from any number of sources and those sources dont need to care about bind group layout.
The downside to this approach is that it is computationally heavy. Generating bind groups involves multiple loops / name hashes.
It makes sense to somehow allow developers to opt out of this if they dont need it. It should be possible to take a RenderResources impl and turn it directly into a BindGroup / RenderResourceSet without looking at string names at all.