This is my code. The two blocks paint a bright circle with emulated glow (by using a darker red with BLUR). But it looks like filter(BLUR, 3) is applied to everything before it. How can I have the two smaller ellipses not be blurred, and the two bigger ones be blurred?
This works - drawing the two ellipses to a separate image and then drawing the image twice. But probably this is not the most efficient if I want to render thousands of these “glowing” shapes.
A way to achieve what you want is by first drawing the two bigger ellipses before calling filter(BLUR, 3), followed by drawing the two smaller ones right after. For example:
As you can see I’ve made some adjustments to your code. It might be a good exercise for you to figure out what these changes are and how these work (in case you didn’t know it already: the reference page is a great place to gather such information).