diff --git a/src/strategy/dual_layer_reprojection.cpp b/src/strategy/dual_layer_reprojection.cpp index c47e99341e9bba3e0cff8b5940ac0ba932d62ebf..44a0da98bf50d7e657a2ec60cd49d52ea325bb42 100644 --- a/src/strategy/dual_layer_reprojection.cpp +++ b/src/strategy/dual_layer_reprojection.cpp @@ -7,7 +7,6 @@ namespace glsl using namespace glm; using uint = glm::uint32; #include "res/dpr/strategy/dual_layer_reprojection/dual_layer_reprojection_data.inc" -#include "res/dpr/strategy/dual_layer_reprojection/dual_layer_reprojection_defines.inc" } DualLayerReprojection::DualLayerReprojection() @@ -204,7 +203,10 @@ bool DualLayerReprojection::on_interface() ImGui::SliderFloat("Reproject Slope Threshold", &this->reproject_slope_threshold, 0.0f, 1.0f); ImGui::SliderFloat("Subdivision Threshold", &this->subdivision_threshold, 0.0, 1.0f); ImGui::SliderInt("Subdivide Cell Border", (int32_t*)&this->subdivide_cell_border, 0, 8); + ImGui::SliderInt("Subdivide Resolution", (int32_t*) &this->subdivision_resolution, 2, DUAL_LAYER_REPROJECTION_SUBDIVIDE_GROUP_SIZE); + ImGui::SliderFloat("Debug Value", &this->debug_value, 0.0, 1.0f); + ImGui::Checkbox("Wireframe", &this->wireframe); ImGui::Checkbox("Performance View", &this->performance_view); @@ -274,6 +276,7 @@ bool DualLayerReprojection::on_render(VkCommandBuffer command_buffer, lava::inde metadata.debug_value = this->debug_value; metadata.wireframe = this->wireframe; metadata.performance_view = this->performance_view; + metadata.subdivision_resolution = this->subdivision_resolution; this->get_headset()->submit_metadata(std::span<uint8_t>((uint8_t*)&metadata, sizeof(metadata))); diff --git a/src/strategy/dual_layer_reprojection.hpp b/src/strategy/dual_layer_reprojection.hpp index 9481679ccfdab10371be8438f57284d86b4adf1a..07c221e00431fae708a9e2d29976d8cb2287edb1 100644 --- a/src/strategy/dual_layer_reprojection.hpp +++ b/src/strategy/dual_layer_reprojection.hpp @@ -3,6 +3,11 @@ #include "stereo_strategy.hpp" +namespace glsl +{ +#include "res/dpr/strategy/dual_layer_reprojection/dual_layer_reprojection_defines.inc" +} + enum DualLayerReprojectionOverlay : uint32_t { DUAL_LAYER_REPROJECTION_OVERLAY_COLOR, @@ -39,6 +44,7 @@ struct DualLayerReprojectionMetadata float debug_value; bool wireframe; bool performance_view; + uint32_t subdivision_resolution; }; class DualLayerReprojection : public StereoStrategy @@ -91,6 +97,7 @@ private: float debug_value = 0.0f; bool wireframe = false; bool performance_view = false; + uint32_t subdivision_resolution = DUAL_LAYER_REPROJECTION_SUBDIVIDE_GROUP_SIZE; glm::uvec2 layer_resolution = glm::uvec2(0); glm::mat4 layer_projection_matrix = glm::mat4(1.0f);