indigo icon indicating copy to clipboard operation
indigo copied to clipboard

Layer Masking

Open davesmith00000 opened this issue 7 months ago • 0 comments

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.

davesmith00000 avatar Jul 16 '24 08:07 davesmith00000