Open
Description
Hi,
I'm reading the code for 2DGS projection, and am a bit confused about the motivation behind how the gaussian kernel is evaluated during rasterization. Specifically, in this piece of code:
// IMPORTANT: This is where the gaussian kernel is evaluated!!!!!
// point of interseciton in uv space
const S gauss_weight_3d = s.x * s.x + s.y * s.y;
// projected gaussian kernel
const vec2<S> d = {xy_opac.x - px, xy_opac.y - py};
// #define FILTER_INV_SQUARE 2.0f
const S gauss_weight_2d = FILTER_INV_SQUARE * (d.x * d.x + d.y * d.y);
// merge ray-intersection kernel and 2d gaussian kernel
const S gauss_weight = min(gauss_weight_3d, gauss_weight_2d);
const S sigma = 0.5f * gauss_weight;
// evaluation of the gaussian exponential term
S alpha = min(0.999f, opac * __expf(-sigma));
we evaluate the whitened deviation in two ways: once based on the true intersection point between the ray and the gaussian primitive, and once based on simply the distance between the pixel and the projected gaussian center. We pick between these based on which distance is smaller.
Can someone explain why this is done, and what is the motivation behind picking the smaller distance? Thanks!
Metadata
Metadata
Assignees
Labels
No labels