reconstruct position for local light (deffered)
Hi ,
I am using deffered shading and have problem with local lights. I thing problem is in reconstructing of position in PS. I'm using camPos+ cameraRay*depth. This works fine for fullscreen lights but in case of local lights (you render light geometry on screen) it simply doesn't work. Is there any fast way to reconstruct position also in this case ? Or i need to use "old" way ? (using inverse projMat). But i have only linear depth right now...
Please help me :)
Using inverse view projection matrix to reconstruct the position is the "default" way to do it as far as I know.
I'd recommend using mjp's method though if you're using linear depth since it's faster:
http://mynameismjp.wordpress.com/2009/03/10/reconstructing-position-from-depth/
I'd recommend using mjp's method though if you're using linear depth since it's faster:
http://mynameismjp.wordpress.com/2009/03/10/reconstructing-position-from-depth/
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement