Compositor: Rewrite and optimize Double Edge Mask node #117545

Merged
Omar Emara merged 4 commits from OmarEmaraDev/blender:rewrite-double-edge-mask-node into main 2024-01-30 19:49:47 +01:00

4 Commits

Author SHA1 Message Date
Omar Emara ba2c9a9e27 Match outer mask boundary between CPU and GPU 2024-01-30 16:11:52 +02:00
Omar Emara 2261ecb90d Merge branch 'main' into rewrite-double-edge-mask-node 2024-01-30 13:28:47 +02:00
Omar Emara 6f838711e5 Address review 2024-01-26 17:06:33 +02:00
Omar Emara 5da37b43e6 Compositor: Rewrite and optimize Double Edge Mask node
This patch rewrites and optimizes the Double Edge Mask node to be orders
of magnitude faster. For a 1k complex mask, it is 650x faster, while for
a 1k simple mask, it is only 50x faster.

This improvement is attributed to the use of a new Jump Flooding
algorithm as well as multi-threading, matching the GPU implementation.

The result of the new implementation differs if the Inner Edge option is
set to Adjacent Only and the Inner Mask is not inside the Outer Mask.
The difference is due the condition that identifies the edges of the
Inner Mask.
2024-01-26 15:32:46 +02:00