playcanvas
Version:
PlayCanvas WebGL game engine
3 lines (2 loc) • 723 B
TypeScript
declare const _default: "\n// Helper function to extract the RMS size from covariance\nfloat gsplatExtractSize(vec3 covA, vec3 covB) {\n float 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\nvoid gsplatApplyUniformScale(inout vec3 covA, inout vec3 covB, float scale) {\n float s2 = scale * scale;\n covA *= s2;\n covB *= s2;\n}\n\n// Helper function to make splat spherical/round with given size\n// Use size = 0.0 to hide the splat\nvoid gsplatMakeRound(inout vec3 covA, inout vec3 covB, float size) {\n float s2 = size * size;\n covA = vec3(s2, 0.0, 0.0);\n covB = vec3(s2, 0.0, s2);\n}\n";
export default _default;