C Specification
An acceleration structure SRT transform is defined by the structure:
// Provided by VK_NV_ray_tracing_motion_blur
typedef struct VkSRTDataNV {
    float    sx;
    float    a;
    float    b;
    float    pvx;
    float    sy;
    float    c;
    float    pvy;
    float    sz;
    float    pvz;
    float    qx;
    float    qy;
    float    qz;
    float    qw;
    float    tx;
    float    ty;
    float    tz;
} VkSRTDataNV;Members
- 
sxis the x component of the scale of the transform
- 
ais one component of the shear for the transform
- 
bis one component of the shear for the transform
- 
pvxis the x component of the pivot point of the transform
- 
syis the y component of the scale of the transform
- 
cis one component of the shear for the transform
- 
pvyis the y component of the pivot point of the transform
- 
szis the z component of the scale of the transform
- 
pvzis the z component of the pivot point of the transform
- 
qxis the x component of the rotation quaternion
- 
qyis the y component of the rotation quaternion
- 
qzis the z component of the rotation quaternion
- 
qwis the w component of the rotation quaternion
- 
txis the x component of the post-rotation translation
- 
tyis the y component of the post-rotation translation
- 
tzis the z component of the post-rotation translation
Description
This transform decomposition consists of three elements. The first is a matrix S, consisting of a scale, shear, and translation, usually used to define the pivot point of the following rotation. This matrix is constructed from the parameters above by:
The rotation quaternion is defined as:
- 
R= [qx,qy,qz,qw]
This is a rotation around a conceptual normalized axis [ ax, ay, az ]
of amount theta such that:
- 
[ qx,qy,qz] = sin(theta/2) × [ax,ay,az]
and
- 
qw= cos(theta/2)
Finally, the transform has a translation T constructed from the parameters above by:
The effective derived transform is then given by
- 
T×R×S
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.