Shader Reference

View Direction in Image Effect Shader

World space camera position: World space camera forward direction: Camera near clip plane: Camera projection matrix: World to camera space matrix:

so, the center of near clip plane in world space and clip space should be now, should be equal to (the symbol of z component is based on camera forward direction).

transform it into NDC by dividing its own w component. NDC should be a cubic space where x,y,z should all be in range from -1 to 1.

So, in NDC, the view direction should be , where is the normalized screen space position.

the view direction in post processing should be computed like this