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

Layer Masking #752

Open
davesmith00000 opened this issue Jul 16, 2024 · 0 comments
Open

Layer Masking #752

davesmith00000 opened this issue Jul 16, 2024 · 0 comments

Comments

@davesmith00000
Copy link
Member

There might be an issue open for this but just wanted to capture quickly.

I've been putting off masking on the excuse that we need render targets first, and that's sort of true, but I think there's probably a work around:

  1. Add another field to Layer.Content that is identical to nodes, called mask.
  2. Render the layer twice:
  3. First you render the mask, and at the last moment, render it to a new mask buffer
  4. Render the layer as normal.
  5. Update the blending process to accept the new mask buffer as a fixed input.
  6. Use the mask during the blend process to decide how much of each pixel to draw. (Alpha values are ok)
  7. Clean the mask before the next layer is rendered.
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

No branches or pull requests

1 participant