Custom Vector To Screenspace UV coordinate?

I know that the Texture Coordinate node outputs screen-space uv coordinets for every shaded point via Window output, however is the same possible for a custom vector? Let’s say I have a Combine XYZ node that represents some arbitrary vector value, and that value is covered by our viewport’s viewing frustrum, how would I be able to convert it to screenspace uv coordinates? This is necessary for multiple sampling purposes from a provided texture. Vector transform does not seem to offer anything like that, only To Camera space option which isn’t helpful.

I would even appreciate a confirmination that this is not possible, because it seems like this is the case.

The spaces conversion are just a multiplication of the stored object/world/view matrices (and their inverses)…

What does that “custom vector” actually represent?
Or better… what kind of sampling do you want to perform?

I’m aware of how space conversion in shader programming goes, the issue isn’t how complex or trivial they are mathematically in this case, it’s the lack of values and information exposed to us that’s the crux of the problem.

Vector values From camera’s space would require projection matrix which is a conglomerate of near, far, aspect ratio, and field of view values etc. and I don’t see any of that in the shader nodes. I suspect that’s cause shader nodes’ primary function is to provide surface shading capabilities and not screen space effects and alike.

I’m trying to recreate SSAO with fine tune capabilities per object as an aproximation for baking preview, I already wrote a script for depth map inclusion in the shader. I just need a way to sample from it given arbitrary points distributed in a hemisphere.

EDIT:
GPU modules come with a huge bottleneck where batches of already existing high poly objects have to be evaluated and created for shaders. And given that I’ll control sample radius and count per object that will be changed freuqently by the user that would require that those batches get destroyed and recreated non-stop for updating purposes.

Shader Nodes do offer Ambient Occlusion with fine tune control but that’s only for Cycles and not Eevee and is also incredibly slow for even medium-tier PCs.

I don’t think that’s possible in a shader, and probably a bit difficult to do it in the compositor.

In Cycles, you could trace a ray from a certain screen direction into the scene (thought you’d only get geometry attributes, but no shading attributes).

In Eevee, that’s not possible. At least not without tampering with the source code, but for that, then is better to include/modify the SSAO in the source.

Pretty much as I speculated, thank you for your contribution and closure to the subject.

Ambient Occlusion node works great in Eevee?

You’re right, it actually does, all I had to do is just enable Ambient Occlusion in the Rendering Tab. Thank you.