66 float hmd_warp_param[4];
68 float lens_center[2][4];
69 float viewport_scale[2];
75 float coefficients[2][3][4];
77 float undistort_r2_cutoff[4];
88 size_t num_indices[2];
89 size_t offset_indices[2];
104 VkDescriptorSet descriptor_sets[2];
124 VkRenderPass render_pass,
125 VkPipelineCache pipeline_cache,
128 VkDescriptorPool descriptor_pool,
157 VkCommandBuffer command_buffer,
162 VkCommandBuffer command_buffer,
int viewport_id
Definition: comp_distortion.h:96
Helper struct that encapsulate a distortion rendering code.
Definition: comp_distortion.h:52
float aspect_x_over_y
Definition: comp_distortion.h:78
Main compositor written using Vulkan header.
VkPipelineLayout pipeline_layout
Definition: comp_distortion.h:100
size_t num_vertices
Definition: comp_distortion.h:87
bool flip_y
Definition: comp_distortion.h:97
VkPipeline pipeline
Definition: comp_distortion.h:101
xrt_distortion_model
Which distortion model does the device expose, used both as a bitfield and value. ...
Definition: xrt_defines.h:48
int * indices
Definition: comp_distortion.h:85
Settings struct for compositor header.
Main compositor struct tying everything in the compositor together.
Definition: comp_compositor.h:73
size_t total_num_indices
Definition: comp_distortion.h:90
void comp_distortion_init(struct comp_distortion *d, struct comp_compositor *c, VkRenderPass render_pass, VkPipelineCache pipeline_cache, enum xrt_distortion_model distortion_model, struct xrt_hmd_parts *parts, VkDescriptorPool descriptor_pool, bool flip_y)
Init a distortion, pass in the distortion so it can be embedded in a struct.
Definition: comp_distortion.c:176
VkDescriptorSetLayout descriptor_set_layout
Definition: comp_distortion.h:103
void comp_distortion_destroy(struct comp_distortion *d)
Free and destroy all fields, does not free the destortion itself.
Definition: comp_distortion.c:222
float * vertices
Definition: comp_distortion.h:84
float warp_scale
Definition: comp_distortion.h:70
struct vk_bundle * vk
Definition: comp_distortion.h:55
uint64_t VkDeviceMemory
Definition: xrt_compositor.h:453
All of the device components that deals with interfacing to a users head.
Definition: xrt_device.h:92
void comp_distortion_update_descriptor_set(struct comp_distortion *d, VkSampler sampler, VkImageView view, uint32_t eye)
Update the descriptor set to a new image.
Definition: comp_distortion.c:494
float grow_for_undistort
Definition: comp_distortion.h:79
void comp_distortion_draw_quad(struct comp_distortion *d, VkCommandBuffer command_buffer, int eye)
Submit draw commands to the given command_buffer.
Definition: comp_distortion.c:596
bool quirk_draw_lines
Definition: comp_distortion.h:106
size_t stride
Definition: comp_distortion.h:86
A tightly packed 2x2 matrix of floats.
Definition: xrt_defines.h:255
A bundle of Vulkan functions and objects, used by both Compositor and Compositor client code...
Definition: vk_helpers.h:34
void comp_distortion_draw_mesh(struct comp_distortion *d, VkCommandBuffer command_buffer, int eye)
Definition: comp_distortion.c:615