Skip to content

Implement MaskPass #652

Open

Description

@valentinradu

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

Activity

  1. vanruesc commented on Aug 28, 2024

    @vanruesc
    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.

  2. changed the title [-]`MaskPass` is missing from v7. By omission or design?[/-] [+]Implement MaskPass[/+] on Aug 28, 2024
  3. valentinradu commented on Aug 29, 2024

    @valentinradu
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions