Title

Screen space ambient occlusion, HTML5/WebGL, 2014.
Link: http://dsmu.me/sponza/sponza.html

Description

This demo supports Desktop Web browsers and Android Chrome. It is based on three.js framework. and the scene assets are downloaded from Crytek Sponza. In order to increase the loading time I suggest to use three.js's binary format that is converted from convert_obj_three tool. In my experience, it could save about 80% loading time, and the file size is just about a half size. In this SSAO demo, it uses two render targets and three passes:

  1. Depth pass: Storing the log depth and pack it into the RGBA render target texture.
  2. Diffuse pass: Storing diffuse value which has computed the lighting value into a RGB render target
  3. Post-Processing pass: Unpacking the log depth value from depth pass texture and linearize it, and then fetching the diffuse value from diffuse render target. Finally, computing the ssao using Spiral sampling approach and multiply with the diffuse value.

© Daosheng Mu 2024 All rights reserved · Back to top