A method and an apparatus for
processing a 3D scene are presented. Techniques are disclosed for determining
light source locations, including tracking a current viewpoint of a camera capturing object(s) in a 3D scene and determining a reference viewpoint relative to the current viewpoint of the camera. According to aspects, a
light source location is determined by obtaining a registered map of real cast shadows of the object(s) from an input image captured by the camera, registered with respect to the reference viewpoint. Then, for candidates of light sources, obtaining respective maps of virtual shadows of the object(s) created with respect to the reference viewpoint, and determining the location of the
light source based on the candidates of light sources with respective maps of virtual shadows that match the registered map of real cast shadows.