Hi all, I'm trying to implement an effect in a shader at the moment. The basic premise of it is that a user will click on a point on a 3D mesh, then a texture distortion effect will spread out from that point. I've seen example code for other distortion effects such as ripples but I'm having difficulty with implementing something similar as they all seem to assume you know the texture coordinate center that the effect is originating from, however I only currently know the point in 3D space where it originates from and I'm not sure how to properly translate that into a usable 2D texture coordinate for the current fragment. Can anybody offer any help? :) Thanks.
PS. Sorry if I'm missing something completely obvious here. I'm still pretty new to graphics programming! :)