Pros: Quite fast with soft edge (non-realistic) shadows
Cons: Edge bleeding
Should do Poisson filtering with depth difference when blurring, to avoid it !
The main idea is really simple:
1.We render depth buffer since we need it for SSAO.
2.We render a shadow calculation pass. to get shadow contributions to the scene. Shadow map resolutions can be low, standard problems with insufficient sampling will occur anyhow. Try something like PSM or similar.
3. So now you have black and white image with shadows only (notice poor resolution of shadow maps on the far wall): 4. A SSAO full resolution pass
Modulate SSAO and full screen shadow map pass , downsample 4x, blur horizontally and verticaly two times and upsample back to screen resolution .
Final result: lightning with modulated shadowing from 2 spot lights and combined SSAO pass. Notice smooth shadows of the far wall.
Edge detect using shadow contribution pass and SSAO post process, could be used to do different blurs depending on depth change.
Cheers,
Tex
Ni komentarjev:
Objavite komentar