I finally had some time to continue with this shader Now I've implemented what I think is a cross bilateral upsampling filter that prevents bluring over large differences in depth but doesnt care about normals for now. I first blur in X and then in Y. I render the SSAO to 512 and upsample it to 1024.
The drawbacks in the current implementation:
- Horrible performance (25 fps at 1024)
- Ugly artifacts from the cross filter (probably because i only run it once in each direction)
- Some edges are not blured at all (I've read somewhere that you need to blur them separately)
- Something seems to be wrong with the SSAO shader or the normals of the model (the very black parts…)
I’m not sure if it’s worth it to use a bilateral filter. Maybe it’s better to render to full resolution and do a normal blur filter.
Some images: