Skip to content

Commit

Permalink
Implement camera, pathtracer settings and display channels
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamYuan committed Jan 30, 2019
1 parent bd829a8 commit dd81218
Show file tree
Hide file tree
Showing 20 changed files with 1,842 additions and 613 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ make
## Screenshots
![](https://raw.githubusercontent.com/AdamYuan/Adypt/master/screenshots/1.png)
![](https://raw.githubusercontent.com/AdamYuan/Adypt/master/screenshots/2.png)
![](https://raw.githubusercontent.com/AdamYuan/Adypt/master/screenshots/3.png)

1 change: 1 addition & 0 deletions configs/san.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pt.stackSize = 12
pt.RayTMin = 0.00004
pt.MaxBounce = 4
pt.MinGlossyExp = 0.0
Expand Down
1,143 changes: 1,040 additions & 103 deletions dep/imgui/imgui_draw.cpp

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion dep/imgui/imgui_widgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1905,7 +1905,19 @@ bool ImGui::DragScalar(const char* label, ImGuiDataType data_type, void* v, floa
if (start_text_input || (g.ActiveId == id && g.ScalarAsInputTextId == id))
{
FocusableItemUnregister(window);
return InputScalarAsWidgetReplacement(frame_bb, id, label, data_type, v, format);
const bool ret = InputScalarAsWidgetReplacement(frame_bb, id, label, data_type, v, format);
//MODIFIED, to clamp value from input box
switch (data_type)
{
case ImGuiDataType_S32: *(int*)v = ImClamp<int>(*(int*)v, *(int*)v_min, *(int*)v_max); break;
case ImGuiDataType_U32: *(unsigned*)v = ImClamp<unsigned>(*(unsigned*)v, *(unsigned*)v_min, *(unsigned*)v_max); break;
case ImGuiDataType_S64: *(long long*)v = ImClamp<long long>(*(long long*)v, *(long long*)v_min, *(long long*)v_max); break;
case ImGuiDataType_U64: *(unsigned long long*)v = ImClamp<unsigned long long>(*(unsigned long long*)v, *(unsigned long long*)v_min, *(unsigned long long*)v_max); break;
case ImGuiDataType_Float: *(float*)v = ImClamp<float>(*(float*)v, *(float*)v_min, *(float*)v_max); break;
case ImGuiDataType_Double: *(double*)v = ImClamp<double>(*(double*)v, *(double*)v_min, *(double*)v_max); break;
case ImGuiDataType_COUNT: break;
}
return ret;
}

// Actual drag behavior
Expand Down
1 change: 1 addition & 0 deletions dep/mygl3/utils/camera.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ namespace mygl3
x_offset *= sensitivity; y_offset *= sensitivity;
yaw_ -= x_offset; pitch_ -= y_offset;
pitch_ = glm::clamp(pitch_, -90.0f, 90.0f);
yaw_ = glm::mod(yaw_, 360.0f);
}
};
}
Expand Down
Binary file added results/salle_de_bain-105249spp.exr
Binary file not shown.
Binary file added results/sibenik-36522spp.exr
Binary file not shown.
Binary file modified screenshots/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit dd81218

Please sign in to comment.