class PoseBufferLatchingShader
Defined at line 21 of file ../../src/ui/lib/escher/hmd/pose_buffer_latching_shader.h
Uses a simple compute shader to latch a pose out of the pose buffer.
public/fidl/fuchsia.ui.gfx/commands.fidl for details on pose buffer.
Public Members
static const uint32_t kLeftVpMatrixOffset
static const uint32_t kRightVpMatrixOffset
Public Methods
void PoseBufferLatchingShader (EscherWeakPtr escher)
Defined at line 32 of file ../../src/ui/lib/escher/hmd/pose_buffer_latching_shader.cc
BufferPtr LatchPose (const FramePtr & frame, const Camera & camera, PoseBuffer pose_buffer, int64_t latch_time, bool host_accessible_output)
Latches a pose from the pose buffer for |latch_time|.
The returned buffer will contain the raw latched pose as well as a
ViewProjection matrix computed from |pose_buffer| and |camera| as
camera->transform() * mat4(latched_pose) * camera->projection().
These output values will be layed out in the output buffer as follows:
struct OutputBuffer {
struct Pose latched_pose;
mat4 vp_matrix;
}
Note that this is a convenience entry point which simply calls through
to LatchStereoPose.
For details on pose buffers and the layout of the Pose struct see
//sdk/fidl/fuchsia.ui.gfx/commands.fidl
Defined at line 35 of file ../../src/ui/lib/escher/hmd/pose_buffer_latching_shader.cc
BufferPtr LatchStereoPose (const FramePtr & frame, const Camera & left_camera, const Camera & right_camera, PoseBuffer pose_buffer, int64_t latch_time, bool host_accessible_output)
The same as LatchPose but takes two cameras and computes a ViewProjection
matrix for each.
These output values will be layed out in the output buffer as follows:
struct OutputBuffer {
struct Pose latched_pose;
mat4 left_vp_matrix;
mat4 right_vp_matrix;
}
Defined at line 41 of file ../../src/ui/lib/escher/hmd/pose_buffer_latching_shader.cc