Skip to content
Snippets Groups Projects
Commit e2378322 authored by Jens Koenen's avatar Jens Koenen
Browse files

Dynamic cell subdivision resolution implemented

parent 9252b4f1
Branches feature/dual-layer-reprojection
No related tags found
No related merge requests found
......@@ -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)));
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment