UNPKG

gpu-curtains

Version:

gpu-curtains is a 3D WebGPU rendering engine. It can be used as a standalone 3D engine, but also includes extra classes focused on mapping 3d objects to DOM elements; It allows users to synchronize values such as position, sizing, or scale between them.

9 lines (8 loc) 321 B
//#region src/core/shaders/chunks/fragment/head/get-uv-cover-helper.ts /** Applies given texture matrix (`mat4x4f`) to given uv coordinates (`vec2f`). */ const getUVCover = ` fn getUVCover(uv: vec2f, textureMatrix: mat3x3f) -> vec2f { return (textureMatrix * vec3f(uv, 1.0)).xy; }`; //#endregion export { getUVCover };