View Full Version : Viewport Space to Light Space
08-30-2005, 06:04 AM
I want to transform a point from Viewport Space to Light Space. What are the necessary transformations? I think that it's possible to merge all those transformations in one Matrix.
If you concatenate the transforms that take you from light space->eye space->clip space->viewport space, you'll have a 4x4 matrix. Simply invert that matrix to go from viewport space back into light space.
Note that this transform will take you from Real (x,y,z) viewport space into Homogeneous (x,y,z,w) light space. You'll need to divide by w to get to Real light space coordinates.
08-31-2005, 07:17 AM
Thanks a lot cass
I forget to divide by W. :p Now this works very well
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.