playcanvas
Version:
Open-source WebGL/WebGPU 3D engine for the web
3 lines (2 loc) • 785 B
TypeScript
declare const _default: "\nvoid writeSplat(vec3 center, vec4 rotation, vec3 scale, vec4 color) {\n #ifdef GSPLAT_COLOR_UINT\n uint packed_rg = packHalf2x16(color.rg);\n uint packed_ba = packHalf2x16(color.ba);\n writeDataColor(uvec4(\n packed_rg & 0xFFFFu,\n packed_rg >> 16u,\n packed_ba & 0xFFFFu,\n packed_ba >> 16u\n ));\n #else\n writeDataColor(color);\n #endif\n #ifndef GSPLAT_COLOR_ONLY\n writeDataTransformA(uvec4(floatBitsToUint(center.x), floatBitsToUint(center.y), floatBitsToUint(center.z), packHalf2x16(rotation.xy)));\n writeDataTransformB(uvec4(packHalf2x16(vec2(rotation.z, scale.x)), packHalf2x16(scale.yz), 0u, 0u));\n #endif\n}\n";
export default _default;