
doesn’t exist parameters in the simple 3-pass splatting
algorithm that will solve one problem without intro-
ducing another.
3 ADAPTIVE POINT SPLATTING
The intuition behind APS is to perform the 3 EWA
passes multiple times increasing the variance of the
probability distributions each time. Pixels rendered in
one iteration will not be changed anymore in the next
iterations
2
. This scheme ensures that the color in pix-
els that have a high P(x) doesn’t get blended heavily
with its neighbor colors, so image sharpness is pre-
served. Future iterations only deal with pixels with
lower P(x), so the variance can be increased without
sacrificing image sharpness(Figure 5). This adaptive
variance scheme allows the projection to cover a big-
ger area. Also, depth discontinuities won’t be present
because the aggregated cutoff threshold is very low.
The halos around the surfaces due to the low
threshold are solved by first computing a mask in im-
age space of what pixel should be discarded regard-
less of probability. The mask makes sure that edges
are preserved, holes are filled, and outliers are filtered
out. Therefore, the actual point filtering never modi-
fies the real point cloud and is highly view-dependent.
This makes APS more robust to noise because it can
be hard and time consuming to determine an outlier
just from its neighbors in 3D. The APS algorithm can
be summarized as:
1. Compute the black and white mask M by render-
ing the points to a low resolution texture.
2. Repeat 3-5 times. For each succeeding iteration.
(a) Render the depth map for pixels where M is set.
(b) Accumulate the probability and colors where M
is set.
(c) For each pixel that passes the probability
threshold, normalize it and reset the corre-
sponding pixel in M so that it gets ignored in
succeeding iterations.
(d) Increase variance for each point’s distribution.
4 GPU IMPLEMENTATION
DETAILS
The APS algorithm itself is very easy to understand
in pseudocode, but the real challenge is to perform all
computation steps in the GPU as fast as possible. It is
2
Each iteration consists of the 3 EWA passes.
Figure 6: A mask is used to make sure points are filtered and
holes are filled. Note that the hole filling phase preserves the
outer edges.
very important to carefully manage the render targets
for each pass so that the CPU never stalls having to
wait for the GPU to finish rendering. Most graphics
drivers these days buffer the GPU commands so that
the GPU renders the scene while the CPU can per-
form other tasks like receive and decompress the data
from the net. Transferring a render target from video
to system memory is avoided at all costs. In order for
the final point cloud to be rendered along with other
background geometry, each point will have to have a
depth value. Because final points are determined by
the normalization phase, an image processing pass, it
means that their depths will have to be manually set
in the normalization pixel shader from a depth texture.
The normalization phase will write the final points di-
rectly to the real back buffer instead of using a dummy
render target that will later have to be rendered to the
back buffer. Figure 7 details the whole process and
necessary GPU states. One point worth noting is that
any number of iterations and mask computation steps
can be achieved with just 6 different render targets,
which makes APS memory friendly.
4.1 Computing the Mask
The masking effects in each iteration are implemented
through the hardware stencil buffer. In order to fill the
stencil buffer with the appropriate bits, a mask texture
has to be produced. First the point cloud is rendered
with traditional point rendering to a small render tar-
get
3
. Then the render target is used as a texture by
an erode shader that gets rid of outliers. This result
is then used by a holefill shader. For a pixel to be
set, the holefill shader makes sure there are sufficient
pixels on all four sides of the given pixel. Edges are
preserved and holes between the arms are correctly
ignored. Holefill is applied two to four times so that
large holes can be filled. All these passes are achieved
by double-buffering two textures: setting one as a ren-
3
Masks don’t need to have that much resolution, so we
can get away with small render targets for this phase. We
use 256x192 targets when the real back buffer dimensions
are 1024x768.
REAL-TIME ADAPTIVE POINT SPLATTING FOR NOISY POINT CLOUDS
231