In computer graphics, ray tracing is a technique used to project three dimensional space onto a two dimensional plane as seen from an eye point. The basic ray tracing algorithm is to fire a ray from the eye point through every pixel in the display. If the ray intersects something in the scene, keep the closest intersection point and calculate the intensity at that point. The following novel algorithm which we designed, the Stochastic Gain Control operator, was inspired by distributed ray tracing. 1One problem though is that, since each pixel really represents a fixed area of the scene instead of a fixed point, one sample for the whole pixel may not capture all of the information in that area. This leads to jagged edges often called aliasing. 2Therefore, anti-aliasing techniques are used to soften the edges in a ray tracer.
One such technique is called supersampling. By firing multiple, evenly spaced rays over the pixel area, the intensities calculated for each ray are averaged to find the overall intensity in the pixel. 3This is similar to the Pattanaik-Yee Adaptive Gain Control operator. Unfortunately, by uniformly sampling each pixel, the image may appear blurry in some parts or have rigid variations in other parts. This can be solved by using distributed ray tracing.
In distributed ray tracing, rays are randomly fired over a finite pixel area and then averaged together. Surface lighting is usually defined as multiple integrals, so using a Monte Carlo method to sample the integrand at randomly chosen points results in a better approximation. While the aliasing is removed, it will lead to a small amount of noise in the picture, but overall the picture quality will be improved. 4
Using this idea, modifications can be made to the averaging local operator. As the window sweeps across the image, randomly selected pixels are averaged together. Since the pixels are randomly selected, the same pixel may be selected more than once. Thus, some pixels are weighted more than others. This acts as a weighted pixel mask or pseudo Gaussian filter.
![]() |
If only one pixel is randomly selected inside the window, the resulting image will be very blurry. This makes sense because while sliding the window the same pixel may have sampled repeatedly and at the same time failed to sample others. As the number of pixels selected increases, the image becomes sharper and sharper compared to the image produced by the Pattanaik-Yee Adaptive Gain Control operator. However, if more than 125% of the pixels in the window are selected, there will be no noticeable change.