My God, Inconceivable for construct pixel position?

Started by
0 comments, last by Hodgman 13 years, 12 months ago
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...
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.

This topic is closed to new replies.

Advertisement