mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 12:46:12 +00:00
c/util: Add to_tangent for view state
This commit is contained in:
parent
0d0addca82
commit
669e37220c
|
@ -42,6 +42,9 @@ struct gfx_view_state
|
|||
// Is the alpha premultipled, false means unpremultiplied.
|
||||
bool premultiplied_alphas[RENDER_MAX_LAYERS];
|
||||
|
||||
// To go to this view's tangent lengths.
|
||||
struct xrt_normalized_rect to_tangent;
|
||||
|
||||
// Number of layers filed in.
|
||||
uint32_t layer_count;
|
||||
|
||||
|
@ -294,6 +297,9 @@ do_layers(struct render_gfx *rr,
|
|||
|
||||
for (uint32_t view = 0; view < ARRAY_SIZE(views); view++) {
|
||||
|
||||
// Used to go from UV to tangent space.
|
||||
render_calc_uv_to_tangent_lengths_rect(&new_fovs[view], &views[view].to_tangent);
|
||||
|
||||
// Projection
|
||||
struct xrt_matrix_4x4 p;
|
||||
math_matrix_4x4_projection_vulkan_infinite_reverse(&new_fovs[view], 0.1, &p);
|
||||
|
|
Loading…
Reference in a new issue