Remove redundant data (#103)

RaySamples contained fields for bin_starts and bin_ends. These are also stored in the frustums. This PR removes them from the RaySamples.
This commit is contained in:
Matthew Tancik authored and GitHub committed 2022-07-07 18:07:34 -07:00
1 parent be45d5c9bb
commit 74280110ce
12 files changed
+145682 -145693

No files matched your search

+2 -2
View File
@@ -102,8 +102,8 @@ class NGPGraph(Graph):
field_outputs_pdf = self.field.forward(ray_samples_pdf)
# Hacky treatment of bins as points to allow us to merge uniform and pdf.
ts_uniform = (ray_samples_uniform.bin_starts + ray_samples_uniform.bin_ends) / 2.0
ts_pdf = (ray_samples_pdf.bin_starts + ray_samples_pdf.bin_ends) / 2.0
ts_uniform = (ray_samples_uniform.frustums.starts + ray_samples_uniform.frustums.ends) / 2.0
ts_pdf = (ray_samples_pdf.frustums.starts + ray_samples_pdf.frustums.ends) / 2.0
ts, indices = torch.sort(torch.cat([ts_uniform, ts_pdf], -2), -2)
bin_starts = ts
bin_ends = torch.cat([ts[..., 1:, :], ts[..., -1:, :]], dim=-2)