Rewrite foveation to enforce pixel alignment

foveation now uses integer pixel ratios, and tries to follow the
previous tangent function.
This commit is contained in:
Patrick Nicolas
2025-06-06 20:04:40 +02:00
parent aef8efba8a
commit 64b446c0d8
24 changed files with 1291 additions and 700 deletions
+2 -3
View File
@@ -78,6 +78,7 @@ struct pseudo_swapchain
struct wivrn_comp_target : public comp_target
{
std::shared_ptr<wivrn_comp_target> self;
to_headset::video_stream_description desc{};
wivrn_pacer pacer;
@@ -98,7 +99,7 @@ struct wivrn_comp_target : public comp_target
std::vector<std::shared_ptr<video_encoder>> encoders;
wivrn::wivrn_session & cnx;
std::unique_ptr<wivrn_foveation_renderer> foveation_renderer = nullptr;
std::optional<wivrn_foveation> foveation;
std::atomic<float> requested_refresh_rate;
@@ -109,8 +110,6 @@ struct wivrn_comp_target : public comp_target
void reset_encoders();
void set_bitrate(int bitrate_bps);
void render_dynamic_foveation(std::array<to_headset::foveation_parameter, 2> foveation);
void set_refresh_rate(float);
};