How to do a zoom centered on mouse on a fbo project?

Hi,

I was able to successfully implement everything by copying this project: B-One Consulting except for the zoom centered on the mouse cursor.

I’m using curl noise in a shader to make the particles move on the surface of the shape. However, curl noise makes it impossible to achieve zoom functionality within the shader by simply moving each particle away from the mouse cursor.

How can I achieve zoom functionality in this scenario?

Thank you for your help.

Have you tried moving the camera closer? You’ll need to make sure your calculations for the mouse cursor’s position work for any camera distance, but I don’t think there’s any reason to use a more complicated method.