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

Implement MaskPass #652

Open
Tracked by #600
valentinradu opened this issue Aug 27, 2024 · 2 comments
Open
Tracked by #600

Implement MaskPass #652

valentinradu opened this issue Aug 27, 2024 · 2 comments
Labels
feature request New feature request

Comments

@valentinradu
Copy link

Is your feature request related to a problem?

MaskPass seems to be missing from v7. Not sure if by design or not. Didn't find any relevant info in the roadmap.

Describe the solution you'd like

MaskPass should be in v7, I feel like the design was very clear in v6.

Describe alternatives you've considered

I'm considering implementing it myself based on the v6 example, but unsure if there's a different way to achieve the same thing (using the stencil buffer).

@valentinradu valentinradu added the feature request New feature request label Aug 27, 2024
@vanruesc
Copy link
Member

I've left out MaskPass because I wasn't sure whether it was worth porting to v7 since I haven't seen any real use cases for it in v6. I'm open to the idea of bringing it to v7 though. However, I think the implementation would need to be adapted to the I/O chaining system in v7. I'll need to give this some thought when I get a chance.

Also, any concrete use cases for stencil-based masking would be appreciated.

@vanruesc vanruesc changed the title MaskPass is missing from v7. By omission or design? Implement MaskPass Aug 28, 2024
This was referenced Aug 28, 2024
@valentinradu
Copy link
Author

valentinradu commented Aug 29, 2024

I would say the most common use case I can think of is helping with composition when some the resulting edges of some effects are not clamped. For example, blur, bloom etc. I know that theoretically they could be clamped in the shaders, but that's not always desirable or available.

Also, some really nice transition animations can be achieved with masking that's really difficult otherwise. For example, blurring objects that are far and then bringing them into focus.

Please note that I'm still a novice with webgl and there might be other ways to achieve the above, but I can't think of any.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature request
Projects
None yet
Development

No branches or pull requests

2 participants