{"action":"created","issue":{"url":"https://api.github.com/repos/highfidelity/hifi/issues/14128","repository_url":"https://api.github.com/repos/highfidelity/hifi","labels_url":"https://api.github.com/repos/highfidelity/hifi/issues/14128/labels{/name}","comments_url":"https://api.github.com/repos/highfidelity/hifi/issues/14128/comments","events_url":"https://api.github.com/repos/highfidelity/hifi/issues/14128/events","html_url":"https://github.com/highfidelity/hifi/pull/14128","id":365973564,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5NzYyNTU4","number":14128,"title":"Improved Ambient Occlusion","user":{"login":"Zvork","id":14199381,"node_id":"MDQ6VXNlcjE0MTk5Mzgx","avatar_url":"https://avatars3.githubusercontent.com/u/14199381?v=4","gravatar_id":"","url":"https://api.github.com/users/Zvork","html_url":"https://github.com/Zvork","followers_url":"https://api.github.com/users/Zvork/followers","following_url":"https://api.github.com/users/Zvork/following{/other_user}","gists_url":"https://api.github.com/users/Zvork/gists{/gist_id}","starred_url":"https://api.github.com/users/Zvork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zvork/subscriptions","organizations_url":"https://api.github.com/users/Zvork/orgs","repos_url":"https://api.github.com/users/Zvork/repos","events_url":"https://api.github.com/users/Zvork/events{/privacy}","received_events_url":"https://api.github.com/users/Zvork/received_events","type":"User","site_admin":false},"labels":[{"id":675876856,"node_id":"MDU6TGFiZWw2NzU4NzY4NTY=","url":"https://api.github.com/repos/highfidelity/hifi/labels/Engine","name":"Engine","color":"A2277C","default":false},{"id":733764234,"node_id":"MDU6TGFiZWw3MzM3NjQyMzQ=","url":"https://api.github.com/repos/highfidelity/hifi/labels/Project%20Approved","name":"Project Approved","color":"009800","default":false},{"id":315234367,"node_id":"MDU6TGFiZWwzMTUyMzQzNjc=","url":"https://api.github.com/repos/highfidelity/hifi/labels/QA%20Rejected%20:sob:","name":"QA Rejected :sob:","color":"e11d21","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/highfidelity/hifi/milestones/36","html_url":"https://github.com/highfidelity/hifi/milestone/36","labels_url":"https://api.github.com/repos/highfidelity/hifi/milestones/36/labels","id":3290835,"node_id":"MDk6TWlsZXN0b25lMzI5MDgzNQ==","number":36,"title":"v0.76.0","description":"","creator":{"login":"conklin94122","id":12115653,"node_id":"MDQ6VXNlcjEyMTE1NjUz","avatar_url":"https://avatars2.githubusercontent.com/u/12115653?v=4","gravatar_id":"","url":"https://api.github.com/users/conklin94122","html_url":"https://github.com/conklin94122","followers_url":"https://api.github.com/users/conklin94122/followers","following_url":"https://api.github.com/users/conklin94122/following{/other_user}","gists_url":"https://api.github.com/users/conklin94122/gists{/gist_id}","starred_url":"https://api.github.com/users/conklin94122/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/conklin94122/subscriptions","organizations_url":"https://api.github.com/users/conklin94122/orgs","repos_url":"https://api.github.com/users/conklin94122/repos","events_url":"https://api.github.com/users/conklin94122/events{/privacy}","received_events_url":"https://api.github.com/users/conklin94122/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":91,"state":"open","created_at":"2018-04-23T19:27:21Z","updated_at":"2018-11-14T02:28:31Z","due_on":null,"closed_at":null},"comments":89,"created_at":"2018-10-02T16:13:12Z","updated_at":"2018-11-14T12:29:34Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/highfidelity/hifi/pulls/14128","html_url":"https://github.com/highfidelity/hifi/pull/14128","diff_url":"https://github.com/highfidelity/hifi/pull/14128.diff","patch_url":"https://github.com/highfidelity/hifi/pull/14128.patch"},"body":"This PR improves the ambient occlusion effect by fixing the existing SSAO technique and adding a new and higher quality HBAO technique. Both techniques can be chosen dynamically and each have a variety of settings to balance between speed and quality. Overall, HBAO is of higher quality but SSAO is faster.\r\n\r\n# Description\r\n## SSAO\r\nThis is the previously existing technique, fixed by improving the bilateral upsampling pass.\r\n![ssao](https://user-images.githubusercontent.com/14199381/46361754-b464b080-c66e-11e8-8018-bc09448af4ca.jpg)\r\n(screenshot done with resolutionLevel = 1)\r\n## HBAO\r\nThis is the technique described by [Louis Bavoil from NVidia](https://www.nvidia.com/object/siggraph-2008-HBAO.html). It gives a higher fidelity result but is heavier on the GPU.\r\n![hbao](https://user-images.githubusercontent.com/14199381/46361699-94cd8800-c66e-11e8-978a-9560c7e860b7.jpg)\r\n(screenshot done with resolutionLevel = 1)\r\n\r\nThe current version uses dithering with 4x4 sub renderings of the AO, with the same sampling direction for each sub rendering. A more simple version (but potentially less efficient with big radii) can be used by setting the _SSAO_USE_QUAD_SPLIT_ macro in _ssao_shared.h_ to 0 and recompiling. This renders the AO in one go using a pseudo noise jittering of the samples (the same noise as the one used in SSAO).\r\n\r\nThere is also a option available with the _HBAO_USE_COS_ANGLE_ macro set to 0 to measure the occlusion angle through the sine and not the cosine (using the tangent to the surface and not the normal). Again this needs a recompilation. It gives a better visual result especially for extremely concave places but there is some occlusion acnee that I am unable to get rid off at this time. So this is still experimental.\r\n\r\n# Settings\r\nTo edit the ambient occlusion settings, run the _scripts/developer/utilities/render/debugAmbientOcclusionPass.js_ script and click on the \"AO\" button in the task bar. Switching to HBAO is done by enabling the \"Horizon Based\" checkbox. You can view the ambient occlusion pass by opening the Luci editor (run the scripts/developer/utilities/render/luci.js script and click on the Luci button) and choosing the _Ambient Occlusion_ entry in the _Debug Framebuffer_ combo box.\r\n\r\n## Common\r\n### Post blur and resolution\r\n- Blur Edge Sharpness : this controls the edge preserving aspect of the upsampling bilateral filter. Low values give a very smooth results along depth discontinuities while high values preserve silhouettes.\r\n- Blur Radius : the amount of upsampling blur. Setting to 0 disables the blur\r\n- Resolution Downscale : the amount of downscaling applied to the AO effect. High values give better performance but with less precise visuals.\r\n### Switches\r\n- HorizonBased : switch between HBAO (checked) and SSAO (unchecked)\r\n- JitterEnabled : add a time varying jitter (experimental as there is no temporal filtering)\r\n- DitheringEnabled : add dithering to the AO sampling (for debugging purposes)\r\n- FetchMipsEnabled : optimize AO by fetching depth in higher level mips when possible. Unchecking this gives a better visual result at the cost of a massive GPU performance hit.\r\n- BorderingEnabled : disable border clamping when computing AO (for debugging purposes)\r\n\r\n## SSAO\r\n- Radius : control the maximum distance of the occlusion effect\r\n- Level : control the depth of the occlusion effect.\r\n- Num Taps : the number of samples used. High values give cleaner results but is heavier on the GPU\r\n- Taps Spiral : controls the sampling distribution (for debugging purposes)\r\n- Falloff Angle : a threshold value to remove any unwanted AO acnee. Increase if acnee is visible.\r\n\r\n## HBAO\r\n- Radius : control the maximum distance of the occlusion effect\r\n- Level : control the depth of the occlusion effect.\r\n- Num Taps : the number of samples used. High values give cleaner results but is heavier on the GPU\r\n- Falloff Angle : a threshold value to remove any unwanted AO acnee. Increase if acnee is visible.\r\n\r\n# TEST PLAN\r\nUse the updated tests\\engine\\render\\effect\\ambientocclusion tests proposed in [hifi_test PR #276](https://github.com/highfidelity/hifi_tests/pull/276)."},"comment":{"url":"https://api.github.com/repos/highfidelity/hifi/issues/comments/438645648","html_url":"https://github.com/highfidelity/hifi/pull/14128#issuecomment-438645648","issue_url":"https://api.github.com/repos/highfidelity/hifi/issues/14128","id":438645648,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODY0NTY0OA==","user":{"login":"hifi-gustavo","id":4554450,"node_id":"MDQ6VXNlcjQ1NTQ0NTA=","avatar_url":"https://avatars0.githubusercontent.com/u/4554450?v=4","gravatar_id":"","url":"https://api.github.com/users/hifi-gustavo","html_url":"https://github.com/hifi-gustavo","followers_url":"https://api.github.com/users/hifi-gustavo/followers","following_url":"https://api.github.com/users/hifi-gustavo/following{/other_user}","gists_url":"https://api.github.com/users/hifi-gustavo/gists{/gist_id}","starred_url":"https://api.github.com/users/hifi-gustavo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hifi-gustavo/subscriptions","organizations_url":"https://api.github.com/users/hifi-gustavo/orgs","repos_url":"https://api.github.com/users/hifi-gustavo/repos","events_url":"https://api.github.com/users/hifi-gustavo/events{/privacy}","received_events_url":"https://api.github.com/users/hifi-gustavo/received_events","type":"User","site_admin":false},"created_at":"2018-11-14T12:29:34Z","updated_at":"2018-11-14T12:29:34Z","author_association":"NONE","body":"Windows client-only build is available at: https://deployment.highfidelity.com/jobs/pr-build/label%3Dwindows/15143/HighFidelity-Beta-Interface-PR14128-85a3938.exe"}}
{"actor":{"display_login":"hifi-gustavo"}}