Skip to content

Commit

Permalink
🎨 add camera mode in the gui
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasParistech committed Jul 6, 2022
1 parent ada6058 commit 1bddda3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/neural-graphics-primitives/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ enum class ECameraMode : int {
Environment
};

static constexpr const char* CameraModeStr = "Perspective\0Orthographic\0Environment\0\0";

enum class ERandomMode : int {
Random,
Halton,
Expand Down
1 change: 1 addition & 0 deletions src/testbed.cu
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,7 @@ void Testbed::imgui() {
ImGui::Checkbox("Autofocus", &m_autofocus);

if (ImGui::TreeNode("Advanced camera settings")) {
accum_reset |= ImGui::Combo("Camera mode", (int*)&m_camera_mode, CameraModeStr);
accum_reset |= ImGui::SliderFloat2("Screen center", &m_screen_center.x(), 0.f, 1.f);
accum_reset |= ImGui::SliderFloat2("Parallax shift", &m_parallax_shift.x(), -1.f, 1.f);
accum_reset |= ImGui::SliderFloat("Slice / focus depth", &m_slice_plane_z, -m_bounding_radius, m_bounding_radius);
Expand Down

0 comments on commit 1bddda3

Please sign in to comment.