One way is to create a PGraphics buffer, set the blendMode(), and each frame copy / shift pixels in the PGraphics, basing the direction of the shifting on e.g. a "wind" PVector that is set by your mouseX / mouseY location.
If you want to use a library / framework to do much of this for you, use a fluid dynamics library like PixelFlow:
Answers
@afonso_castro --
One way is to create a
PGraphics
buffer, set theblendMode()
, and each frame copy / shift pixels in the PGraphics, basing the direction of the shifting on e.g. a "wind"PVector
that is set by yourmouseX
/mouseY
location.If you want to use a library / framework to do much of this for you, use a fluid dynamics library like PixelFlow:
Thanks, I return....;)
My guess would be that another way to approach this is using a GLSL shader
although not my area of expertise. There is a channel in the forum for shader questions.
tks Jeremy