Draw shiny lines

I friends,

How can I do shiny lines like that in P2D mode (it’s an image from the last Aphex Twin clip) ?
afx

For the yellow line, I would draw an orange gradient from transparent to opaque to transparent.
Then I would blur it a lot.
And finally I would add the yellow line on top of it.
Maybe also blurring that line a bit so it would fuse better with the orange part :thinking:

Ok thanks but blur() really slow down the framerate because it fit on the all screen.
There is a way to put it only on some element.

You can store your line in a PGraphic the size of your line maybe?

Perhaps a one-pixel high image the width of your line and blur, white in the middle blurring to alpha on the edges? Draw the strokes using tint()and image(), translating and rotating where you need to.

Are you using a GLSL shader blur operation?

Even with a pgGraphics only for my lines the programs slow down.
I’m using processing filter(BLUR, 4) function. With GLSL it’s faster ?

Ok I have better result with GLSL shaders, no lagging time. I just have to found the right one.
Thanks !

You shouldn’t use the standard filter options with P2D or P3D, but the filter method that takes a PShader.

Actually looking at your image again, you might want to look at a bloom filter - eg. GitHub - cansik/processing-bloom-filter: An example of a bloom filter as post fx in processing3.

Funny, I wanted to write you that I found this one. I will try with the library