Remove Snapdragon Game Super Resolution
This commit is contained in:
@@ -181,9 +181,6 @@ configuration::configuration(xr::system & system)
|
||||
if (auto val = root["enable_stream_gui"]; val.is_bool())
|
||||
enable_stream_gui = val.get_bool();
|
||||
|
||||
if (auto val = root["sgsr"]; val.is_object())
|
||||
parse_sgsr_options(val.get_object());
|
||||
|
||||
if (auto val = root["openxr_post_processing"]; val.is_object())
|
||||
parse_openxr_post_processing_options(val.get_object());
|
||||
|
||||
@@ -231,31 +228,11 @@ configuration::configuration(xr::system & system)
|
||||
preferred_refresh_rate.reset();
|
||||
minimum_refresh_rate.reset();
|
||||
resolution_scale = 1.4;
|
||||
sgsr = {};
|
||||
openxr_post_processing = {};
|
||||
passthrough_enabled = system.passthrough_supported() == xr::passthrough_type::color;
|
||||
}
|
||||
}
|
||||
|
||||
void configuration::parse_sgsr_options(simdjson::simdjson_result<simdjson::dom::object> sgsr_root)
|
||||
{
|
||||
sgsr = {};
|
||||
if (auto val = sgsr_root["enabled"]; val.is_bool())
|
||||
sgsr.enabled = val.get_bool();
|
||||
|
||||
if (auto val = sgsr_root["upscaling_factor"]; val.is_double())
|
||||
sgsr.upscaling_factor = val.get_double();
|
||||
|
||||
if (auto val = sgsr_root["use_edge_direction"]; val.is_bool())
|
||||
sgsr.use_edge_direction = val.get_bool();
|
||||
|
||||
if (auto val = sgsr_root["edge_threshold"]; val.is_double())
|
||||
sgsr.edge_threshold = val.get_double();
|
||||
|
||||
if (auto val = sgsr_root["edge_sharpness"]; val.is_double())
|
||||
sgsr.edge_sharpness = val.get_double();
|
||||
}
|
||||
|
||||
void configuration::parse_openxr_post_processing_options(simdjson::simdjson_result<simdjson::dom::object> openxr_post_processing_root)
|
||||
{
|
||||
openxr_post_processing = {};
|
||||
@@ -271,17 +248,6 @@ static std::ostream & operator<<(std::ostream & stream, feature f)
|
||||
return stream << "\"" << magic_enum::enum_name(f) << "\"";
|
||||
}
|
||||
|
||||
static std::ostream & write_sgsr(std::ofstream & stream, const configuration::sgsr_settings & sgsr)
|
||||
{
|
||||
stream << "{\"enabled\":" << std::boolalpha << sgsr.enabled;
|
||||
stream << ",\"upscaling_factor\":" << sgsr.upscaling_factor;
|
||||
stream << ",\"use_edge_direction\":" << std::boolalpha << sgsr.use_edge_direction;
|
||||
stream << ",\"edge_threshold\":" << sgsr.edge_threshold;
|
||||
stream << ",\"edge_sharpness\":" << sgsr.edge_sharpness;
|
||||
stream << "}";
|
||||
return stream;
|
||||
}
|
||||
|
||||
static std::ostream & write_openxr_post_processing(std::ofstream & stream, const configuration::openxr_post_processing_settings & openxr_post_processing)
|
||||
{
|
||||
stream << "{\"super_sampling\":" << openxr_post_processing.super_sampling;
|
||||
@@ -324,8 +290,6 @@ void configuration::save()
|
||||
if (minimum_refresh_rate)
|
||||
json << ",\"minimum_refresh_rate\":" << *minimum_refresh_rate;
|
||||
json << ",\"resolution_scale\":" << resolution_scale;
|
||||
json << ",\"sgsr\":";
|
||||
write_sgsr(json, sgsr);
|
||||
json << ",\"openxr_post_processing\":";
|
||||
write_openxr_post_processing(json, openxr_post_processing);
|
||||
json << ",\"passthrough_enabled\":" << std::boolalpha << passthrough_enabled;
|
||||
|
||||
Reference in New Issue
Block a user