SHARE
TWEET
Untitled
a guest
Dec 18th, 2014
148
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- // obtain position from texcoord and depth
- vec3 getpos (in vec3 p)
- {
- vec4 pos = inverse (projmat) * vec4 (p * 2 - 1, 1);
- pos /= pos.w;
- pos = inverse (viewmat) * pos;
- return pos.xyz / pos.w;
- }
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.

