Could anyone please help me in finding out how to get the "Window" Texture coordinates that is found in texture coordinate node in shader editor?

The window coordinate node in the shader outputs a gradient of 0-1 in X and Y in any screen.

But I only need that gradient in the camera screen only.

I just figured out that the Camera texture coordinates are different than the Window coordinates . As the camera texture coordinates doesn't take into account the X and Y rotations.


1 Answer 1


Camera coordinates are:

Position coordinate in camera space

This can be recreated in geometry nodes by using the inverse of the camera's transform. (You also have to invert the z channel of the result, I do not know why.)

Camera coordinates geometry nodes setup Camera coordinates geometry nodes result

Window coordinates are:

Location of shading point on the screen, ranging from 0.0 to 1.0 from the left to right side and bottom to top of the render.

This can be recreated in geometry nodes using the same as above, then scaling the coordinates by the width(for x) or height(for y) of the camera's viewing frustum at current z depth.

Window coordinates geometry nodes setup enter image description here


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .