Tweak display of foveation config
This commit is contained in:
@@ -1146,10 +1146,19 @@ void scenes::stream::render(const XrFrameState & frame_state)
|
||||
|
||||
if (composition_layer_color_scale_bias_supported)
|
||||
{
|
||||
if (is_gui_interactable())
|
||||
dimming = dimming + frame_state.predictedDisplayPeriod / (1e9 * constants::stream::fade_duration);
|
||||
else
|
||||
dimming = dimming - frame_state.predictedDisplayPeriod / (1e9 * constants::stream::fade_duration);
|
||||
switch (gui_status)
|
||||
{
|
||||
case gui_status::hidden:
|
||||
case gui_status::foveation_settings:
|
||||
case gui_status::compact:
|
||||
case gui_status::overlay_only:
|
||||
dimming = dimming - frame_state.predictedDisplayPeriod / (1e9 * constants::stream::fade_duration);
|
||||
break;
|
||||
case gui_status::stats:
|
||||
case gui_status::settings:
|
||||
dimming = dimming + frame_state.predictedDisplayPeriod / (1e9 * constants::stream::fade_duration);
|
||||
break;
|
||||
}
|
||||
|
||||
dimming = std::clamp<float>(dimming, 0, 1);
|
||||
float x = dimming * dimming * (3 - 2 * dimming); // Easing function
|
||||
|
||||
@@ -615,10 +615,22 @@ static glm::vec4 compute_ray_limits(const XrPosef & pose, float margin = 0)
|
||||
|
||||
void scenes::stream::draw_gui(XrTime predicted_display_time, XrDuration predicted_display_period)
|
||||
{
|
||||
bool interactable = is_gui_interactable();
|
||||
bool interactable = true;
|
||||
XrSpace world_space = application::space(xr::spaces::world);
|
||||
auto views = session.locate_views(viewconfig, predicted_display_time, world_space).second;
|
||||
|
||||
switch (gui_status)
|
||||
{
|
||||
case gui_status::hidden:
|
||||
case gui_status::foveation_settings:
|
||||
case gui_status::overlay_only:
|
||||
case gui_status::compact:
|
||||
interactable = false;
|
||||
break;
|
||||
case gui_status::stats:
|
||||
case gui_status::settings:
|
||||
break;
|
||||
}
|
||||
imgui_ctx->set_controllers_enabled(interactable);
|
||||
|
||||
if (gui_status != last_gui_status)
|
||||
|
||||
Reference in New Issue
Block a user