You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on some discussions from the Clay discord, it would be helpful if Clay returned RenderCommands in batches based on their major z-index. This will allow GPU renderers to be more efficient and instance draw primitives from each batch.
Clay can either expose the z-index from FloatingElementConfig and let the renderer implementation do its own intermediate batching, or, as discussed in the Discord, add a configuration option to allow RenderCommands to be returned as "batched" (by major z-index) or "sorted" (current behavior).
Within these batched render commands, it would also be helpful if each primitive was sorted by type, not layout order. E.g. the batch would first return all rectangles, then all text, then all images, etc., though the render implementation can also just do intermediate groupings as well, so its not completely necessary, just would be helpful!
The text was updated successfully, but these errors were encountered:
nicbarker
changed the title
Allow RenderCommands to be returned as "batched" or "sorted"
[Core] Allow RenderCommands to be returned as "batched" or "sorted"
Jan 11, 2025
Based on some discussions from the Clay discord, it would be helpful if Clay returned RenderCommands in batches based on their major z-index. This will allow GPU renderers to be more efficient and instance draw primitives from each batch.
Clay can either expose the z-index from
FloatingElementConfig
and let the renderer implementation do its own intermediate batching, or, as discussed in the Discord, add a configuration option to allow RenderCommands to be returned as "batched" (by major z-index) or "sorted" (current behavior).Within these batched render commands, it would also be helpful if each primitive was sorted by type, not layout order. E.g. the batch would first return all rectangles, then all text, then all images, etc., though the render implementation can also just do intermediate groupings as well, so its not completely necessary, just would be helpful!
The text was updated successfully, but these errors were encountered: