-
-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question for the occupancy grid code of Raymatching.cu #140
Comments
I suspect that the reason is because the authors defined the density_bitfield using uint8, but since the values within density_bitfield only need to represent 0 or 1, a single element can represent the values for 8 positions. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am a little confused about the implementation of occ, why we need to /8 when define the grid?
self.register_buffer('density_bitfield', torch.zeros(self.cascades*self.grid_size**3//8, dtype=torch.uint8))
And when we query the occ, also /8 and & (1 << (idx % 8)), Why?
const bool occ = density_bitfield[idx / 8] & (1 << (idx % 8));
The text was updated successfully, but these errors were encountered: