摘要 |
Embodiments of the present invention disclose an image processing method and apparatus, and a computer device. The image processing method includes: receiving information sent by a central processing unit (CPU), about a scene within a preset range around a to-be-rendered target object; rendering the received scene to obtain scene depth parameters, where the scene is obtained through shooting by a camera located at a ray light source; rendering the to-be-rendered target object to obtain rendering depth parameters, where the to-be-rendered target object is obtained through shooting by a camera not located at a ray light source; calculating ambient occlusion (AO) maps of the to-be-rendered target object in directions of ray light sources according to the scene depth parameters and the rendering depth parameters; and overlaying the AO maps in the directions of the ray light sources, to obtain an output image. |
主权项 |
1. An image processing method, comprising:
receiving, by a graphic processing unit (GPU), information, which is sent by a central processing unit (CPU), about a scene within a preset range around a to-be-rendered target object; rendering, by the GPU, the scene to obtain scene depth parameters, wherein the scene is obtained through shooting by a camera located at a ray light source; rendering, by the GPU, the to-be-rendered target object to obtain rendering depth parameters, wherein the to-be-rendered target object is obtained through shooting by a camera not located at a ray light source; calculating, by the GPU, ambient occlusion (AO) maps of the to-be-rendered target object in directions of ray light sources according to the scene depth parameters and the rendering depth parameters; and overlaying, by the GPU, the AO maps in the directions of the ray light sources, to obtain an output image. |