I created a perspective projection pretty exactly according to Computer Graphics: Principles and Practice in C (2nd Edition) [Hardcover] James D. Foley (Author), Andries van Dam (Author), Steven K. Feiner (Author), John F. Hughes (Author) Chapter 6.
Nper = M * Sper * SHpar * T(-prp) * R * T(-vrp).
I used extents umax = 5, umin = -5; vmax = 5; vmin = -5.
As I understand it, this should project onto a plane of -1,-1 to 1,1. However, my projection has varying extents depending on where I set prp. I can get near to the expected if I set the prp to [0 0 1] but the eyepoint for my system is determined by a frustum that I've already created. I'm just trying to use this projection to detect obscured objects. I'd appreciate any help. If needed, I guess I can post the Matlab code.
Nper = M * Sper * SHpar * T(-prp) * R * T(-vrp).
I used extents umax = 5, umin = -5; vmax = 5; vmin = -5.
As I understand it, this should project onto a plane of -1,-1 to 1,1. However, my projection has varying extents depending on where I set prp. I can get near to the expected if I set the prp to [0 0 1] but the eyepoint for my system is determined by a frustum that I've already created. I'm just trying to use this projection to detect obscured objects. I'd appreciate any help. If needed, I guess I can post the Matlab code.