Accessing View Projection Matrix from material

Hello,

I need to access view projection matrix in my material, is it possible in any way?

Thanks in advance.

Thanks for the answer, I’ll look into it, I need it for projected grid shader I think I can actually achieve it with Transform nodes you provided, thanks a lot again. :wink:

I love you :slight_smile:

It’s an old post but, I leave a comment because I think There are still many people that search for this these days.


You can get view projection matrix using custom node and ResolvedView.ViewToClip fuction.
Return value is a matrix so, you should acces rows or elements with a array access expression. e.g. ResolvedView.ViewToClip[0][0]

I think there are more matrix like that in engine code so, If I need I should search through engine code.

2 Likes

Great help! :slightly_smiling_face: