mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Merge pull request #99407 from devloglogan/rec-resolution
Allow using custom `Rect2i` for rendering with OpenXR
This commit is contained in:
commit
3014eec40d
25 changed files with 215 additions and 19 deletions
|
@ -1055,6 +1055,14 @@ Projection OpenXRInterface::get_projection_for_view(uint32_t p_view, double p_as
|
|||
return cm;
|
||||
}
|
||||
|
||||
Rect2i OpenXRInterface::get_render_region() {
|
||||
if (openxr_api) {
|
||||
return openxr_api->get_render_region();
|
||||
} else {
|
||||
return Rect2i();
|
||||
}
|
||||
}
|
||||
|
||||
RID OpenXRInterface::get_color_texture() {
|
||||
if (openxr_api) {
|
||||
return openxr_api->get_color_texture();
|
||||
|
@ -1528,6 +1536,8 @@ RID OpenXRInterface::get_vrs_texture() {
|
|||
eye_foci.push_back(openxr_api->get_eye_focus(v, aspect_ratio));
|
||||
}
|
||||
|
||||
xr_vrs.set_vrs_render_region(get_render_region());
|
||||
|
||||
return xr_vrs.make_vrs_texture(target_size, eye_foci);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue