<p>Usual reprojection finds UV of current visible point into previous frame. For diffuse and rough objects it simply adds motion vector: <code>vec2 UV_reprojected = UV + motion;</code></p>
<p>But for mirror-like surfaces it doesn't work, because we see not object (mirror) itself but what reflects in mirror (virtual object). The general idea to reproject reflected point is:</p>
<ol>
<li>Find world space position for reflected point visible in reflector (Here we need to know reflected path length).</li>
<li>Substract world space delta between frames, so we found previous world position.</li>
<li>Project this point into reflector using previous camera position.</li>
<li>Project world space reflector point back to the screen.</li>
</ol>
<p>The most hardest part is p.3, and is not easy analytically find this point, because reflector can change normal. Some interesting links about this topic:</p>
<ul>
<li><a href="http://bitsquid.blogspot.com/2017/06/reprojecting-reflections_22.html" rel="nofollow noreferrer">Reflection reprojection in Uncharted</a>. Here we assume that reflector is plane that changes transform, both camera and receiver are also dynamic.</li>
<li><a href="https://link.springer.com/content/pdf/10.1007%2F978-1-4842-4427-2_32.pdf" rel="nofollow noreferrer">Ray Tracing Gems chapter 32</a>. (32.4.3) Theoretical approach that finds reflector position in terms of least squares. And interesting geometrical optic approach (here we assume that reflector point is locally sphere-like).</li>
</ul>

CC BY-SA 4.0
2020-11-18T12:42:51.337Z
2020-11-19T14:08:21.353Z
2020-11-19T14:08:21.353Z
push рор
<p>I am in the middle of implementing stochastic screen space reflection based on frostbite presentation <a href="http://www.cse.chalmers.se/edu/course/TDA361/Advanced%20Computer%20Graphics/Screen-space%20reflections.pdf" rel="nofollow noreferrer">here</a>. On page number 39, it is stated that we need to reproject the ray intersection location instead of the reflected surface location. I don't really get what's the difference between the two. Isn't ray intersection location the same as the reflected surface location. Can someone explain this?</p>

<p>And then in another <a href="https://www.ea.com/frostbite/news/stochastic-screen-space-reflections" rel="nofollow noreferrer">ppt</a>, they mention that</p>

<blockquote>
  <p>I mentioned temporal reprojection, so let’s have a quick look at it
  now. The idea is simple: given a pixel’s 3D coordinate, check where it
  was in the previous frame, project it, and we have the texcoord to
  sample.</p>
  
  <p>… except when we move the viewport, reflections exhibit parallax. That
  is, the reflected objects move according to their depth, not the depth
  of the surface which reflects them. Attempting to reproject
  reflections using the closer depth results in smearing. So we
  calculate the average depth of the reflected objects, and reproject
  using that. This results in much reduced smearing.</p>
</blockquote>

<p>Again I don't understand this at all.</p>

CC BY-SA 4.0
2020-11-18T23:33:34.023Z
See also [Reprojecting Reflections](http://bitsquid.blogspot.com/2017/06/reprojecting-reflections_22.html) on the bitsquid blog.
Nathan Reed
<projections><reflection>
What to reproject when doing temporal filtering in stochastic screen space reflection?
kevinyu
# What to reproject when doing temporal filtering in stochastic screen space reflection?

(Asked by: username_0 on 2019-01-08)

I am in the middle of implementing stochastic screen space reflection based on frostbite presentation [here](http://www.cse.chalmers.se/edu/course/TDA361/Advanced%20Computer%20Graphics/Screen-space%20reflections.pdf). On page number 39, it is stated that we need to reproject the ray intersection location instead of the reflected surface location. I don't really get what's the difference between the two. Isn't ray intersection location the same as the reflected surface location. Can someone explain this?

And then in another [ppt](https://www.ea.com/frostbite/news/stochastic-screen-space-reflections), they mention that

> I mentioned temporal reprojection, so let’s have a quick look at it
> now. The idea is simple: given a pixel’s 3D coordinate, check where it
> was in the previous frame, project it, and we have the texcoord to
> sample.
>
> … except when we move the viewport, reflections exhibit parallax. That
> is, the reflected objects move according to their depth, not the depth
> of the surface which reflects them. Attempting to reproject
> reflections using the closer depth results in smearing. So we
> calculate the average depth of the reflected objects, and reproject
> using that. This results in much reduced smearing.

Again I don't understand this at all.

**Tags:** projections, reflection

> **Comments:**
> **username_1**: See also [Reprojecting Reflections](http://bitsquid.blogspot.com/2017/06/reprojecting-reflections_22.html) on the bitsquid blog.  

---

## 1 answers

### Answer by username_2 on 2020-11-18. Score: 2

Usual reprojection finds UV of current visible point into previous frame. For diffuse and rough objects it simply adds motion vector: `vec2 UV_reprojected = UV + motion;`

But for mirror-like surfaces it doesn't work, because we see not object (mirror) itself but what reflects in mirror (virtual object). The general idea to reproject reflected point is:

1. Find world space position for reflected point visible in reflector (Here we need to know reflected path length).
2. Substract world space delta between frames, so we found previous world position.
3. Project this point into reflector using previous camera position.
4. Project world space reflector point back to the screen.

The most hardest part is p.3, and is not easy analytically find this point, because reflector can change normal. Some interesting links about this topic:

* [Reflection reprojection in Uncharted](http://bitsquid.blogspot.com/2017/06/reprojecting-reflections_22.html). Here we assume that reflector is plane that changes transform, both camera and receiver are also dynamic.
* [Ray Tracing Gems chapter 32](https://link.springer.com/content/pdf/10.1007%2F978-1-4842-4427-2_32.pdf). (32.4.3) Theoretical approach that finds reflector position in terms of least squares. And interesting geometrical optic approach (here we assume that reflector point is locally sphere-like).


---

