Remove fade-in on stream start

This commit is contained in:
Patrick Nicolas
2024-05-05 18:37:28 +02:00
parent 641e2cb182
commit 6b47a326a3
3 changed files with 1 additions and 16 deletions
-1
View File
@@ -721,7 +721,6 @@ void application::initialize()
// Optional extensions
std::vector<std::string> opt_extensions;
opt_extensions.push_back(XR_KHR_COMPOSITION_LAYER_COLOR_SCALE_BIAS_EXTENSION_NAME);
opt_extensions.push_back(XR_FB_DISPLAY_REFRESH_RATE_EXTENSION_NAME);
opt_extensions.push_back(XR_EXT_HAND_TRACKING_EXTENSION_NAME);
opt_extensions.push_back(XR_FB_PASSTHROUGH_EXTENSION_NAME);
+1 -13
View File
@@ -257,8 +257,7 @@ void scenes::stream::push_blit_handle(shard_accumulator * decoder, std::shared_p
}))
{
state_ = state::streaming;
first_frame_time = application::now();
spdlog::info("Stream scene ready at t={}", first_frame_time);
spdlog::info("Stream scene ready at t={}", application::now());
}
}
@@ -696,14 +695,6 @@ void scenes::stream::render(XrTime predicted_display_time, bool should_render)
};
}
float brightness = std::clamp<float>(dbrightness * (predicted_display_time - first_frame_time) / 1.e9, 0, 1);
XrCompositionLayerColorScaleBiasKHR color_scale_bias{
.type = XR_TYPE_COMPOSITION_LAYER_COLOR_SCALE_BIAS_KHR,
.colorScale = {brightness, brightness, brightness, 1},
.colorBias = {},
};
XrCompositionLayerProjection layer{
.type = XR_TYPE_COMPOSITION_LAYER_PROJECTION,
.layerFlags = 0,
@@ -712,9 +703,6 @@ void scenes::stream::render(XrTime predicted_display_time, bool should_render)
.views = layer_view.data(),
};
if (instance.has_extension(XR_KHR_COMPOSITION_LAYER_COLOR_SCALE_BIAS_EXTENSION_NAME))
layer.next = &color_scale_bias;
XrCompositionLayerQuad imgui_layer;
if (imgui_ctx)
{
-2
View File
@@ -104,8 +104,6 @@ private:
std::vector<std::tuple<device_id, XrAction, XrActionType>> input_actions;
state state_ = state::initializing;
XrTime first_frame_time{};
const float dbrightness = 2;
std::vector<xr::swapchain> swapchains;
xr::swapchain swapchain_imgui;