The paper presents a new data structure called a shadow pyramid for storing 3D objects to reduce the shadow-testing time during ray tracing. For each primitive object that first intersects a ray, a shadow pyramid is constructed in which all the candidate objects that possibly block the path from the relevant light source to any point on the primitive object are registered. Shadow testing of the intersection point, i.e. of whether the intersection point is shadowed or not, is then performed only against the objects registered in the shadow pyramid formed with the polygon in which the intersection point lies as the base. The registered objects are sorted in the order of so-called shadow form factors to reduce the number of ray-object intersections. The span coherency and the so-called D-list are used in the successive shadow testing of neighboring rays to further reduce the shadow-testing time. An efficient shadow-testing scheme called PYSHA is then proposed. PYSHA is a hybrid shadow-testing procedure in which the shadow testing on the surface of each primitive object (polygon and sphere) is determined between the conventional cell-traversal scheme and the proposed shadow-pyramid scheme for each light source according to a switching criterion. From the cost comparison of the two shadow schemes, two parameters N(sp)max, the maximum number of registered objects within a shadow pyramid, and A(s)min, the minimum screen-projected area of an object, are derived and used as switching criteria. Owing to the fast access to the candidate objects for intersection and the reduced number of intersection calculations, PYSHA is significantly faster than the conventional cell-traversal scheme or the shadow-pyramid scheme alone for the experimental scenes used in this work.