ref_iface_IVDXAContext_SetTextureMatrix - shekh/VirtualDub2 GitHub Wiki
VirtualDub Plugin SDK 1.2
IVDXAContext interface
Sets a 4x3 matrix to use for generating texture sampling coordinates.
void SetTextureMatrix(uint32 coordIndex, uint32 textureHandle, float xoffset, float yoffset, const float uvMatrix[12]);
coordIndex | Texture coordinate set to apply a matrix to (0-7). |
textureHandle | Optional handle to texture to use as a basis for computing texture coordinates. |
xoffset | Horizontal texel position of top-left coordinate of texture rectangle to sample. |
yoffset | Vertical texel position of top-left coordinate of texture rectangle to sample. |
uvMatrix | Optional affine UV matrix to use (12 elements). |
This method is not thread-safe.
If a texture is supplied, the entire source texture is mapped to the entire render target with the supplied offsets. This automatically applies any necessary scaling factors and also allows for easy offsetting for filter kernels.
If a matrix is supplied instead, an arbitrary affine transformation may be used to generate texture coordinates; this must be adjusted to accommodate the UV scaling factors if the generated coordinates are actually used for sampling. The format of the matrix is row-major, such that elements 8-11 of the matrix are the constant offset (w row).
If neither a texture nor a matrix are supplied, the identity matrix is applied.
Copyright (C) 2007-2012 Avery Lee.