UNPKG

playcanvas

Version:

Open-source WebGL/WebGPU 3D engine for the web

3 lines (2 loc) 724 B
declare const _default: "\n\n// work values\nuint tAw;\nvec4 tBcached;\n\nvec4 unpackRotation(vec3 data) {\n return vec4(data.xyz, sqrt(max(0.0, 1.0 - dot(data, data))));\n}\n\n// read the model-space center of the gaussian\nvec3 getCenter() {\n // read transform data using generated load functions (use global splat.uv)\n uvec4 tA = loadTransformA();\n tAw = tA.w;\n tBcached = loadTransformB();\n return uintBitsToFloat(tA.xyz);\n}\n\nvec4 getColor() {\n return loadSplatColor();\n}\n\nvec4 getRotation() {\n return unpackRotation(vec3(unpackHalf2x16(tAw), tBcached.w)).wxyz;\n}\n\nvec3 getScale() {\n return tBcached.xyz;\n}\n\n#include \"gsplatUncompressedSHVS\"\n"; export default _default;