Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@bdero
Copy link
Member

@bdero bdero commented May 19, 2022

In the common case, EntityPass stencil textures are transient, and so we don't store/share the stencil texture between EntityPasses (unless the pass is collapsed into the parent pass). And so for every non-collapsed subpass, the stencil texture always starts off in a cleared state.

This means that at render time, if the EntityPassDelegate decides that a subpass can't be collapsed, the stencil depth of all that subpass' elements need to be decreased by the subpass's recorded stencil depth (i.e. so the first rendered element of said subpass will have a stencil depth of zero).

In a nutshell, this fix makes SaveLayer calls under clips work. Without this change, SaveLayers under clips always render as fully transparent black (because the stencil test always fails).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants