Skip to content

Commit 8625c25

Browse files
committed
Un-break position and activation visualization
1 parent 26b0620 commit 8625c25

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/testbed_nerf.cu

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ __global__ void composite_kernel_nerf(
799799
// The normal is then in the opposite direction of the density gradient (i.e. the direction of decreasing density)
800800
Vector3f normal = -network_to_density_derivative(float(local_network_output[3]), density_activation) * warped_pos;
801801
rgb = normal.normalized().array();
802-
} else if (render_mode == ERenderMode::Positions || render_mode == ERenderMode::EncodingVis) {
802+
} else if (render_mode == ERenderMode::Positions) {
803803
if (show_accel>=0) {
804804
uint32_t mip = max(show_accel, mip_from_pos(pos));
805805
uint32_t res = NERF_GRIDSIZE() >> mip;
@@ -811,11 +811,13 @@ __global__ void composite_kernel_nerf(
811811
rgb.y() = rng.next_float();
812812
rgb.z() = rng.next_float();
813813
} else {
814-
rgb = pos.array() * 16.f;
814+
rgb = pos.array();
815815
rgb.x() -= floorf(rgb.x());
816816
rgb.y() -= floorf(rgb.y());
817817
rgb.z() -= floorf(rgb.z());
818818
}
819+
} else if (render_mode == ERenderMode::EncodingVis) {
820+
rgb = warped_pos.array();
819821
} else if (render_mode == ERenderMode::Depth) {
820822
float z=cam_fwd.dot(pos-origin) * depth_scale;
821823
rgb = {z,z,z};

0 commit comments

Comments
 (0)