[Closed] What is the pixel direction in a post process material?
In a post process material, what would be the simplest way to construct the ray cast from the camera position and hitting the near plane at the current pixel coordinates? (in view space or in world space)
If I am correct, creating it requires knowing the horizontal and vertical FoV as well as the horizontal and vertical center offsets (for stereo rendering; anything else I missed?). Those might be exposed already but I haven't found them, and I'd prefer to double check before implementing something that was already there.
The question has been closed Feb 24 '16 at 07:12 PM by AndrewHurley for the following reason:
The question is answered, right answer was accepted
I believe that Normalize(WorldPosition - CameraPositionWS) in the material should give you what you need.
If not, give me a shout and I will look more closely.
answered Feb 24 '16 at 07:12 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here