摘要 |
The method includes receiving a plurality of graphics primitives for rendering at a GPU of a computer system and rendering graphics primitives into pixel parameters of the pixels of a display, wherein the parameters include pixel depth values and pixel normal values. For each pixel of the display, an ambient occlusion process is performed. The algorithm takes as input a ND-buffer containing pixel depth values and pixel normals. Based on the pixel 3-D position and the pixel normal vector, horizon heights are computed by sampling the ND-buffer and an occlusion term is computed for each pixel based on the horizon heights. Based on the pixel 3-D position, the pixel normal vector, a normal occlusion term is computed by sampling the ND-buffer above the horizon in multiple directions. An ambient occlusion illumination value is computed by combining the horizon occlusion term and the normal occlusion term. |