Replace stream resolution with foveation
This commit is contained in:
@@ -671,13 +671,13 @@ void scenes::lobby::gui_settings()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stream resolution
|
// foveation
|
||||||
{
|
{
|
||||||
const int step = 10;
|
const int step = 10;
|
||||||
const auto current = config.get_stream_scale();
|
const auto current = config.get_stream_scale();
|
||||||
auto intval = int(current * 100 / step);
|
int intval = round((1 - current) * 100 / step);
|
||||||
const auto slider = ImGui::SliderInt(
|
const auto slider = ImGui::SliderInt(
|
||||||
_("Stream resolution").append("##stream_scale").c_str(),
|
_("Foveated encoding").append("##stream_scale").c_str(),
|
||||||
&intval,
|
&intval,
|
||||||
0,
|
0,
|
||||||
100 / step,
|
100 / step,
|
||||||
@@ -685,10 +685,19 @@ void scenes::lobby::gui_settings()
|
|||||||
if (slider)
|
if (slider)
|
||||||
{
|
{
|
||||||
// clamp out of the slider to have the 50% value centered
|
// clamp out of the slider to have the 50% value centered
|
||||||
intval = std::clamp(intval, 20 / step, 100 / step);
|
intval = std::clamp(intval, 0, 80 / step);
|
||||||
config.set_stream_scale(intval * step * 0.01);
|
config.set_stream_scale(1 - intval * step * 0.01);
|
||||||
config.save();
|
config.save();
|
||||||
}
|
}
|
||||||
|
if (ImGui::IsItemHovered())
|
||||||
|
{
|
||||||
|
if (config.check_feature(feature::eye_gaze))
|
||||||
|
imgui_ctx->tooltip(_("Higher values focus image quality where you look at,\n"
|
||||||
|
"improving latency, power efficiency and quality."));
|
||||||
|
else
|
||||||
|
imgui_ctx->tooltip(_("Higher values focus image quality at the center,\n"
|
||||||
|
"improving latency, power efficiency and quality."));
|
||||||
|
}
|
||||||
imgui_ctx->vibrate_on_hover();
|
imgui_ctx->vibrate_on_hover();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user