WebGL 2D camera zoom to mouse point
问题 I'm currently building a 2D drawing app in WebGL. I want to implement zoom to point under mouse cursor similar to example in here. But I can't figure out how to apply the solution from that answer in my case. I have done basic zoom by scaling camera matrix. But it zooms to the top-left corner of the canvas, due to that being the origin (0,0) set by the projection (as far as I understand). Basic pan & zoom implemented: My draw function (including matrix computations) looks like this: var