Jump to content
  • Advertisement
Sign in to follow this  
Game_XinBing

My God, Inconceivable for construct pixel position?

This topic is 3003 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I can speak little english please don't mind...... I read expert MJP's article about reconstruct pixel position. http://mynameismjp.wordpress.com/2009/03/10/reconstructing-position-from-depth/ Suddenly, i perhaps understand. but i'm not sure. because it's Inconceivable. What's i understand is: We only render a two triangle(a quad, four vertex? or six vertex?) fill over the WIN32 window instead of rendering the whole scene primitives. The four vertex coordinates is equal to four corners of Far Plane of the View Frustum. The four vertex texture coordinates is only four corners UV of Linear Depth's Render Target Texture. Then We let the GPU auto interpolate those data(position and texture coordinate) and generate each pixel. Then for each pixel, The input position of Pixel Shader is the Ray pointing to that pixel(or pointing to that point in view space). The input Texture coordinate of Pixel Shader is also correctly address Liear Depth Render Target Texture. We don't render the whole scene geometry. But only render two trinagles. And we give all computing to GPU auto interpolating...... What I thought is right? It's Inconceivable! If It's wrong, please don't mind because i very stupid...

Share this post


Link to post
Share on other sites
Advertisement
Each of those rays has it's length determined by the value retrieved from the depth texture.

The ray and tex-coords are interpolated, then the interpolated-tex-coords are used to fetch a depth value, which is multiplied with the interpolated-ray.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!