Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a stencil mask example #491

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

greggman
Copy link
Collaborator

I'm not sure this is a great sample because I'm not sure using the stencil mask for this purpose is best. It's got the advantage that it should "early out" but it has the disadvantage of, for example, using an alpha mask, that would allow more than just masked yes/no.

Stencil masks are used for shadow volumes but that techinque has fallen out of favor. Stencil masks are also used for outlines. That might be a good use but there are several other popular outline algorithmns.

So, this is demo is kind of pretty and at least shows using the a stencil buffer.

I'm not sure this is a great sample because I'm not sure using
the stencil mask for this purpose is best. It's got the advantage
that it should "early out" but it has the disadvantage of, for example,
using an alpha mask, that would allow more than just masked yes/no.

Stencil masks are used for shadow volumes but that techinque has
fallen out of favor. Stencil masks are also used for outlines.
That might be a good use but there are several other popular
outline algorithmns.

So, this is demo is kind of pretty and at least shows using the
a stencil buffer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant