Problem with Raycaster

Hi everybody. I’m having trouble using Raycaster with shader-level scaling. I scale my 3D model in the shader as follows :

gl_Position = projectionMatrix * modelViewMatrix * scaleFactor;

And when I clicked, Raycaster stopped noticing the object, although I even recalculate the bounding Box and bounding Sphere to it. The updateMatrixWorld(true) and updateMatrix methods didn’t help either. How to solve this problem? I don’t need the scale method. I need to scale models specifically on shaders.

Raycasting happens on the CPU side.
One option you have is to not displace in the shader, but in the JavaScript side geometry.

This is one way to solve the problem.

In Cesium, the guys work at the shader level, and at the same time, when clicking on an object anywhere, they understand what kind of object is in the path of the ray… I need it on shaders…

Yeah, i’m not using cesium. But the Cesium source code is on github.
If you can figure it out, it would be good to know how.
Just keep searching though, the problem has been discussed many times with various other approaches offered that differ from mine.