The invention specifically relates to an ambient light shielding method, mainly solves the problems that an existing SSAO method is insufficient in sense of depth at corners and wrinkles and not obvious in contrast ratio, and meanwhile applicable to complex and completely dynamic scenes, for achieving stabilization and greatly improving rendering performance. The method comprises the steps of firstly subsequent calculated amounts via downsampling; then introducing a discrete horizontal structure, and computing an outline level and an outline value through sampling depth textures; then reducingthe distance between a current texture pixel and a sub-pixel through using linear or Gaussian attenuation according to the distance, and at last reducing noise influence via smooth filtering. The method is applicable to the fields of video games, animation production and live-action simulation, can relatively realistically simulate a rendering effect of overall illumination under the condition ofreal-time running, and improves aiming at the defects in three aspects: sampling point selection, texture sampling and smooth filtering, and thus via improving the performance and the rendering effect, the method is more applicable to rendering the real-time game scene in the three-dimensional game.