Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ambient Occlusion #10

Open
LukasKalbertodt opened this issue Feb 20, 2017 · 0 comments
Open

Ambient Occlusion #10

LukasKalbertodt opened this issue Feb 20, 2017 · 0 comments

Comments

@LukasKalbertodt
Copy link
Owner

A good way to improve visual quality it to use ambient occlusion. Currently, a fake AO is used: points closer to the center have a darker color which looks a bit like AO. But we should implement a better version of ambient occlusion!

Right now, I can think of two good possibilities:

SSAO (screen space ambient occlusion)

This is a technique used by many games: you only need a texture of depth values for each pixel on the screen (although having the SS normal makes certain things easier) and can do everything else in screen space by sampling random depth values in your neighborhood.

Precalculating ambient values based on the DE

We can also query the DE along the surface normal to evaluate the occlusion of a specific point. The occlusion information can be stored inside the vertex. More information here.

Reasons for SSAO

  • SSAO only requires one additional rendering pass on the GPU which can be pretty fast
  • There are many tutorials on how to implement this algorithm online
  • The precalculation method depends on several parameters that would need some fine tuning

Reasons for the precalculation-approach

  • The shape doesn't change, so there is no reason to calculate something every frame
  • SSAO can be tricky: occlusion can depend on camera angle (it shouldn't!) and the algorithm has several artifacts which can be avoided somehow... but then it get's even more tricky.
  • For SSAO we would need to change the rendering pipeline from our current forward renderer to a more elaborate kind of pipeline (to capture depth values in a texture)
  • The precalculation method seems to be more precise
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant