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
As of v9.0, parameters.clearColor is no longer supported by Deck because WebGPU's clear color is per-render-pass and cannot be specified as a parameter. This change cost the ability to achieve certain color blending effects.
Proposal
Each View currently has an optional clear flag that defines the clear behavior. We could expand this to support finer-grained control over the clearing:
I prefer to avoid nested props for a few reasons, so option 1.
Also we technically may not need the clear flag as omitting the color could be enough.
I am assuming that we do clear the framebuffer once before we start rendering the views, regardless of what the views state. I.e. the clear flags in the views are for controlling the composition of multiple views.
For reference, I updated the luma.gl RenderPass docs to reflect the current situation there, though changes to that API have been briefly discussed, so maybe we shouldn't try too hard to match it.
Notable is that the depthBuffer clear value can be specified, rather than just true or false. But that probably doesn't make sense for views as they all would need to follow the same depth buffer conventions.
FYI this will need to be in 9.1 because currently, we use a single render pass to draw all views. There are overlaps between LayersPassRenderOptions and the proposed view options (clearColor, clearCanvas). I suspect there will be some tricky corner cases in conflict resolution as we test the implementation.
Target Use Case
As of v9.0,
parameters.clearColor
is no longer supported by Deck because WebGPU's clear color is per-render-pass and cannot be specified as a parameter. This change cost the ability to achieve certain color blending effects.Proposal
Each
View
currently has an optionalclear
flag that defines the clear behavior. We could expand this to support finer-grained control over the clearing:Option 1
Option 2
The text was updated successfully, but these errors were encountered: