Monado OpenXR Runtime
|
Distortion shader code. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "main/comp_settings.h"
#include "main/comp_compositor.h"
#include "comp_distortion.h"
#include "shaders/distortion.vert.h"
#include "shaders/mesh.frag.h"
#include "shaders/mesh.vert.h"
#include "shaders/none.frag.h"
#include "shaders/panotools.frag.h"
#include "shaders/vive.frag.h"
Functions | |
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. More... | |
void | comp_distortion_destroy (struct comp_distortion *d) |
Free and destroy all fields, does not free the destortion itself. More... | |
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. More... | |
void | comp_distortion_draw_quad (struct comp_distortion *d, VkCommandBuffer command_buffer, int eye) |
Submit draw commands to the given command_buffer. More... | |
void | comp_distortion_draw_mesh (struct comp_distortion *d, VkCommandBuffer command_buffer, int eye) |
Distortion shader code.
void comp_distortion_draw_mesh | ( | struct comp_distortion * | d, |
VkCommandBuffer | command_buffer, | ||
int | eye | ||
) |
References comp_uniform_buffer::buffer, comp_distortion::descriptor_sets, comp_distortion::index_handle, comp_distortion::mesh, comp_distortion::num_indices, comp_distortion::num_vertices, comp_distortion::offset_indices, comp_distortion::pipeline, comp_distortion::pipeline_layout, comp_distortion::total_num_indices, comp_distortion::vbo_handle, comp_distortion::vk, vk_bundle::vkCmdBindDescriptorSets, vk_bundle::vkCmdBindIndexBuffer, vk_bundle::vkCmdBindPipeline, vk_bundle::vkCmdBindVertexBuffers, vk_bundle::vkCmdDraw, and vk_bundle::vkCmdDrawIndexed.