autonomousvision / gaussian-opacity-fields

Gaussian Opacity Fields: Efficient and Compact Surface Reconstruction in Unbounded Scenes
https://niujinshuchong.github.io/gaussian-opacity-fields/
Other
559 stars 26 forks source link

Why pixf is added by 0.5 #48

Closed YanhaoZhang closed 3 weeks ago

YanhaoZhang commented 3 weeks ago

Thanks for releasing the code. I was wondering in renderCUDA, why 0.5 is added to pixf? Thank you.

float2 pixf = { (float)pix.x + 0.5f, (float)pix.y + 0.5f}; // TODO plus 0.5
niujinshuchong commented 3 weeks ago

Hi, +0.5 so that we are using the pixel center to create the ray otherwise it is the top-left corner of the pixel.

YanhaoZhang commented 3 weeks ago

Thanks a lot for your prompt reply. I know understand it.