Description
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.