Question : get position from ViewProjection matrix

is there any way to get the camera position and far clip value from ViewProjection matrix in the shader? the reason behind it is because i don’t want to pass in any extra value to the shader.

The View Matrix should be the same as “World” matrix for a render item, so you should be able to pull it out of there like you would a regular transform. I think :slight_smile:

I suppose If you do pass the camera position in the shader and translate it by the View matrix,
you will get (0,0,0).
I think the FarPlane will become 1 (or -1?) after projecting it with the Projection Matrix.