View Full Version : Coded infinite shadows, now gluPickMatrix doesnt work!
03-05-2003, 09:55 AM
The significant change that I see here is that I am now using an infinite projection matrix. I am wondering, how do I go about fixing this? Im thinking mebbe I should use a standard matrix just for picking. Is there a more valid way around this problem?
03-05-2003, 12:41 PM
Unless you are trying to pick the shadow volumes themselves, maybe you should just omit the volumes from the picking pass.
03-05-2003, 01:02 PM
That's not the problem, what the problem is is the perspective matrix. I have set up the picking matrix and non-infinite projection matrix. It doesn't match what's visible perfectly, but it does select the appropriate mesh usually. There's a decent amount of inaccuracy the further you get from the center of the view. I can clean up the error by moving the far plane further out, but I don't know how far I want to go.
03-05-2003, 01:29 PM
Sorry, I don't understand what you're saying then.
03-05-2003, 01:32 PM
Well, I guess I can survive with the picker in its current state. Maybe I can squeeze some more accuracy out of it.
It turns out when the projection matrix is loaded with an infinite matrix, whenever I tried to pick out something which has been clicked on, it only selects what's in the upper right hand corner of the view.
03-05-2003, 01:53 PM
A spatial disparity that increases towards the edge strongly suggests a simple frustum miscalculation. You might want to try drawing with the same matrix you pick with and compare the view with the correctly rendered scene.
[This message has been edited by dorbie (edited 03-05-2003).]
03-05-2003, 03:08 PM
The disparity at this point is slight enough for me to not worry about it.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.