Skip to content

[Impeller] HAL: Allow for asymmetrical stencil configuration in Pipelines #129855

Closed
@bdero

Description

@bdero

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.

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work liste: impellerImpeller rendering backend issues and features requestsengineflutter/engine repository. See also e: labels.team-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions