In addition, the author uses a per pixel random plane to do a reflection on the sampling point around the shading point. But how does the random plane work? the sampling points are already random, is it really necessary to reflect them to be more random?

The original article containing the code can be found at
http://www.iquilezles.org/www/articles/ssao/ssao.htm
:sick::sick:

ZbuffeR

04-28-2012, 12:28 AM

I guess the 0.75 on x is to adapt a power of two texture to a 16/10 screen ratio. Mmh no scratch that, it would be 0.625 instead, so I have no clue.

The random plane is needed, as the sampling points are absolutely not random but aligned with the screen pixels.

Ludde

04-28-2012, 01:00 AM

I guess the 0.75 on x is to adapt a power of two texture to a 16/10 screen ratio..
But maybe a 4/3 ratio...