[Impeller] HAL: Allow for asymmetrical stencil configuration in Pipelines #129855
Labels
e: impeller
Impeller rendering backend issues and features requests
engine
flutter/engine repository. See also e: labels.
P1
High-priority issues at the top of the work list
team-engine
Owned by Engine team
triaged-engine
Triaged by Engine team
Currently, it's only possible to configure the stencil operation symmetrically (for frontfaces and backfaces at the same time), but all of the graphics backends Impeller supports (and will support) allow for differing configuration between frontfaces and backfaces. This can be used for some 3D rendering tricks, like Carmack's Reverse.
Specifically, this would mean adding/renaming stuff in StencilAttachmentDescriptor to allow for configuring the stencil operation separately for frontfaces and backfaces, and then making it work on Metal, OpenGL, and Vulkan.
Before making a decision about how it should look, definitely check out how this works in our backends (like Metal) or other HALs (like WebGPU).
Also, it occurs to me that we don't have anything that just shows off the raw stencil ops working, so it would be nice if we could add something to
renderer_unittests.cc
that updates the stencil and uses it to clip another draw call, for example.The text was updated successfully, but these errors were encountered: