Add depth sorting to the vector graphics renderer #153

Open
opened 2023-10-02 15:12:38 +00:00 by bvisness · 0 comments
Owner

It would be very convenient if the vector graphics renderer allowed for some amount of depth sorting. Currently I have to reorder things in my code in order to draw things in the correct order, which feels unnecessary when working with a command list behind the scenes as we currently do.

@MartinFouilleul indicated to me on Discord that he used to have such a system in the vector renderer anyway, so maybe it's as easy as reintroducing that?

One random point of design - people sometimes want both "local" and "global" z-orders. The MDN article on "stacking contexts" gives an idea of the potential complexity in the space. In particular, draw order (and draw groups) might have challenging interactions with opacity and clipping.

This is certainly not to say that the vector renderer needs to absorb all this complexity, but I think these will almost certainly be concerns we have to deal with someday.

It would be very convenient if the vector graphics renderer allowed for some amount of depth sorting. Currently I have to reorder things in my code in order to draw things in the correct order, which feels unnecessary when working with a command list behind the scenes as we currently do. @MartinFouilleul indicated to me on Discord that he used to have such a system in the vector renderer anyway, so maybe it's as easy as reintroducing that? One random point of design - people sometimes want both "local" and "global" z-orders. The MDN article on ["stacking contexts"](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_positioned_layout/Understanding_z-index/Stacking_context) gives an idea of the potential complexity in the space. In particular, draw order (and draw _groups_) might have challenging interactions with opacity and clipping. This is certainly not to say that the vector renderer needs to absorb all this complexity, but I think these will almost certainly be concerns we have to deal with someday.
Sign in to join this conversation.
No Label
macOS
windows
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: hmn/orca#153
No description provided.