]> git.tdb.fi Git - libs/gl.git/commit
Take ambient occlusion samples only from the forward hemisphere
authorMikko Rasa <tdb@tdb.fi>
Sat, 8 May 2021 17:33:57 +0000 (20:33 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 9 May 2021 07:53:57 +0000 (10:53 +0300)
commit28965eccb61d06a497645e0770826de161b0e4cb
tree18f2bebfb46842b4c879b620ede6d4c4c86199dc
parent7f81f26889b84542b0b35685b0e80383256cdc47
Take ambient occlusion samples only from the forward hemisphere

This requires a few more samples from the depth buffer to determine the
normal, but that should not be an issue with today's GPUs.

Also generate the sample points for cosine-weighted importance sampling
to obtain physically correct occlusion values.
builtin_data/_ambientocclusion.glsl
builtin_data/_ambientocclusion_combine.glsl
builtin_data/_ambientocclusion_occlude.glsl
source/effects/ambientocclusion.cpp