Inverse projection: question about w coordinate
Posted
by
fayeWilly
on Game Development
See other posts from Game Development
or by fayeWilly
Published on 2014-08-23T11:55:36Z
Indexed on
2014/08/23
16:34 UTC
Read the original article
Hit count: 299
I have to perform in shader an inverse projection from a u/v of a render target.
What I do is:
Get NDC as
2*(u,v,depth) - 1
Then world space as
tmp = (P*V)^-1 * (NDC,1.0);
world space = tmp/tmp.w;
This apparently works, but I am confused about the w division there. Why this work? Shouldn't be a multiplication by a w somewhere (as in the "forward" pipeline there is the perpsective division?)
Thank you,
Faye
© Game Development or respective owner