For my Game Architecture final project (@RPI), I worked on a glossy screen space reflection (SSR) tech demo. Implementation details...
Video (best in 720P)
[media]
[/media]
Very interesting. I couldn't see the timmings on the video but isn't this a performance killer? From what I understand, for each pixel you're casting a good deal of rays and ray casting them in screen space will require lots of sampling from the G-Buffer.
You should also use a more interesting test scene, with more complexity and lighting, to show the eye candy.
Anyway, great work! I'm curious to know more so don't hesitate to write a more detailed article on your blog about your implementation.
Indeed this looks very interesting, but I'd also be interested in some performance specs
I've been looking into SSR for use in a game I'm working on, but the I always considered the performance hit too great to actually apply it
Would be nice to see how your technique performs
Perhaps dynamically creating a quad-tree over the depth buffer could speed up the whole process.
I only trace one ray per pixel. The intermediate result is extremely noisy, but you gotta live with that. The bilateral-ish blur pass smooths everything out.
I used this simple scene as SSR is quite... bad for anything complex. In the Crysis SSR videos I've seen, the reflection only contained cylindrical cans/bottles/tubes. I imagine if you're using glossy SSR in a real game, it would have to have to be for relatively rough surfaces where reflections fade out quickly with respect to reflection distance. This let's us constrain the SSR rendering to areas where we're likely to have information.
Only one sample? Impressive. I still think you could improve the blur to mask out the noise even further. Forget the poisson disc blur, not only it gives you a noisy result but the somewhat random texture sampling must be harming your performance. You should instead try applying a gaussian blur or even two passes of gaussian blur .
I have to disagree with you on that, SSR will shine on more detailed scenes because all the visual complexity will help hiding the fact that only the visible portions of the scene get reflected. The fresnel term will also help with this by forcing the reflection to show only at grazing angles. You should really try it out with a better scene.
Full gaussian blurs are very expensive in this case, as the blur is bilateral-ish and not separable (maybe you can still do it in a separable fashion... but I don't know how that would look).When doing SS shadow/occlusion rays, I have used a separated horizontal/vertical bilateral-ish Gaussian blur (even though it's actually not a separable filter!).
Full gaussian blurs are very expensive in this case, as the blur is bilateral-ish and not separable (maybe you can still do it in a separable fashion... but I don't know how that would look).
I have to disagree with you on that, SSR will shine on more detailed scenes because all the visual complexity will help hiding the fact that only the visible portions of the scene get reflected. The fresnel term will also help with this by forcing the reflection to show only at grazing angles. You should really try it out with a better scene.