playcanvas
Version:
PlayCanvas WebGL game engine
3 lines (2 loc) • 783 B
TypeScript
declare const _default: "\n// Helper function to extract the RMS size from covariance\nfn gsplatExtractSize(covA: vec3f, covB: vec3f) -> f32 {\n let tr = covA.x + covB.x + covB.z;\n return sqrt(max(tr, 0.0) / 3.0);\n}\n\n// Helper function to apply uniform scale to covariance\nfn gsplatApplyUniformScale(covA: ptr<function, vec3f>, covB: ptr<function, vec3f>, scale: f32) {\n let s2 = scale * scale;\n *covA = *covA * s2;\n *covB = *covB * s2;\n}\n\n// Helper function to make splat spherical/round with given size\n// Use size = 0.0 to hide the splat\nfn gsplatMakeRound(covA: ptr<function, vec3f>, covB: ptr<function, vec3f>, size: f32) {\n let s2 = size * size;\n *covA = vec3f(s2, 0.0, 0.0);\n *covB = vec3f(s2, 0.0, s2);\n}\n";
export default _default;