ashawkey / torch-ngp

A pytorch CUDA extension implementation of instant-ngp (sdf and nerf), with a GUI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible bug and difference between scale and resolution?

Guptajakala opened this issue · comments

commented

const float scale = exp2f(level * S) * H - 1.0f;

What's the difference between scale and resolution? Shouldn't they both refer to the number of voxels along one dimension?

And here you are trying to get the voxel center, why do you add 0.5 when align_corners is false?

pos[d] = inputs[d] * scale + (align_corners ? 0.0f : 0.5f);

commented

@Guptajakala Hi, scale is float and resolution is int, it follows the original implementation's notation.
For the second one, you may refer to this.