UNPKG

playcanvas

Version:

PlayCanvas WebGL game engine

3 lines (2 loc) 1.11 kB
declare const _default: "\nfn modifyCenter(center: ptr<function, vec3f>) {\n // Modify the splat center position\n // Example: (*center).y += 1.0; // offset all splats up by 1 unit\n}\n\nfn modifyCovariance(originalCenter: vec3f, modifiedCenter: vec3f, covA: ptr<function, vec3f>, covB: ptr<function, vec3f>) {\n // Modify the splat size/covariance\n // Example to scale all splats by 2x:\n // gsplatApplyUniformScale(covA, covB, 2.0);\n //\n // Example to clamp size to a range:\n // let size = gsplatExtractSize(*covA, *covB);\n // let newSize = clamp(size, 0.01, 0.5);\n // gsplatApplyUniformScale(covA, covB, newSize / size);\n //\n // Example to make splats round/spherical:\n // let size = gsplatExtractSize(*covA, *covB);\n // gsplatMakeRound(covA, covB, size * 0.5);\n //\n // To hide a splat:\n // gsplatMakeRound(covA, covB, 0.0);\n}\n\nfn modifyColor(center: vec3f, color: ptr<function, vec4f>) {\n // Modify the splat color\n // Example: (*color) = vec4f((*color).rgb * 0.5, (*color).a); // darken all splats\n}\n"; export default _default;