Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualHodgman

Posted 29 January 2013 - 03:44 AM

oh that looks amazing...

Inigo Quilez is an amazing graphics tinkerer, he built that landscape in a weekend, and that water in an hour... That's an order of magnitude more productive than most of us could hope to be at these tasks wink.png

I can't seem to find any documentation on how screen space reflection is even done. Are there any tutorials anywhere?

I'm not aware of any tutorials, but the principle is the same as parallax mapping techniques (parallax occlusion mapping, quadtree displacement mapping, etc), except that --
* with parallax mapping, you start with a ray that is outside of the "volume". Assuming your texture repeats, the ray will eventually intersect with the volume somewhere.
* with screen-space reflections, your starting ray is already inside the "volume", maybe heading in or maybe heading out. You need to deal with the cases where the ray leaves the volume.
-- in either case, you step along that ray through the volume until you find a collision.

The naive implementation is just to truncate the ray to two dimensions and step one pixel at a time. To speed this up, you can approximate by stepping 'n' pixels at a time.
Fancier parallax techniques (POM, QDM, etc) are basically ways to implement this basic idea more efficiently/accurately.

#1Hodgman

Posted 29 January 2013 - 03:38 AM

oh that looks amazing...

Inigo Quilez is an amazing graphics tinkerer, he built that landscape in a weekend, and that water in an hour... That's an order of magnitude more productive than most of us could hope to be at these tasks wink.png

I can't seem to find any documentation on how screen space reflection is even done. Are there any tutorials anywhere?

I'm not aware of any tutorials, but the principle is the same as parallax mapping techniques (parallax occlusion mapping, quadtree displacement mapping, etc), except that --

* with parallax mapping, you start with a ray that is outside of the "volume"

* with screen-space reflections, your starting ray is already inside the "volume"

-- in either case, you step along that ray through the volume until you find a collision.


PARTNERS