SHARE
TWEET

Untitled

a guest Dec 18th, 2014 148 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // obtain position from texcoord and depth
  2. vec3 getpos (in vec3 p)
  3. {
  4.         vec4 pos = inverse (projmat) * vec4 (p * 2 - 1, 1);
  5.         pos /= pos.w;
  6.         pos = inverse (viewmat) * pos;
  7.         return pos.xyz / pos.w;
  8. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top