playcanvas
Version:
PlayCanvas WebGL game engine
4 lines (2 loc) • 650 B
JavaScript
var gsplatDataVS = "\nuniform highp usampler2D transformA;\nuniform highp sampler2D transformB;\n\n// work values\nuint tAw;\n\n// read the model-space center of the gaussian\nvec3 readCenter(SplatSource source) {\n // read transform data\n uvec4 tA = texelFetch(transformA, source.uv, 0);\n tAw = tA.w;\n return uintBitsToFloat(tA.xyz);\n}\n\n// sample covariance vectors\nvoid readCovariance(in SplatSource source, out vec3 covA, out vec3 covB) {\n vec4 tB = texelFetch(transformB, source.uv, 0);\n vec2 tC = unpackHalf2x16(tAw);\n covA = tB.xyz;\n covB = vec3(tC.x, tC.y, tB.w);\n}\n";
export { gsplatDataVS as default };