How to get the viewport rectangle for a gameObject or mesh?!

hello community!

I was thinking about some possible collision detection methods(collision between a object and mouse Input) without a collider. I know how to do it with a collider attached but i wanted to try it w/o a collider! so what i planned was if it is possible to get the rectangle occupied by the game object on the viewport, I could easily detect it where the touch point is in tht rectangle or not. Anyone have any suggestions!!
Thank you.

PS: Dont post comments like “why cant you use collider”, I just want to try this out!

Once you render an object to your viewport, you do not have anymore the info of which pixel belonged to which object in the 3d scene afaik. (Although you could have it with deferred rendering)

That is why you use ray casting for picking usually. In order for the ray casting to be fast, it is cast againt some bounding geometry. That would be your collider in this case. You could do the computations against all the triangles of the mesh, but it has bad performance.