UNPKG

playcanvas

Version:

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

3 lines (2 loc) 1.44 kB
declare const _default: "\n\n// Shared splat identification (index, uv) and setSplat() helper\n#include \"gsplatSplatVS\"\n\n// stores the render order and corner for this vertex\nstruct SplatSource {\n uint order; // render order\n vec2 cornerUV; // corner coordinates for this vertex of the gaussian (-1, -1)..(1, 1)\n};\n\n// stores the camera and clip space position of the gaussian center\nstruct SplatCenter {\n vec3 view; // center in view space\n vec4 proj; // center in clip space\n mat4 modelView; // model-view matrix\n float projMat00; // element [0][0] of the projection matrix\n vec3 modelCenterOriginal; // original model center before modification\n vec3 modelCenterModified; // model center after modification\n #ifdef GSPLAT_FISHEYE\n float fisheyeSinTK; // sin(theta / k), shared with corner shader\n float fisheyeCosTK; // cos(theta / k), shared with corner shader\n float fisheyeRxy; // length(v.xy), shared with corner shader\n #endif\n};\n\n// stores the offset from center for the current gaussian\nstruct SplatCorner {\n vec3 offset; // corner offset (clip XY for 3DGS, model XYZ for 2DGS)\n vec2 uv; // corner uv\n #if GSPLAT_AA\n float aaFactor; // for scenes generated with antialiasing\n #endif\n\n vec2 v;\n float dlen;\n};\n\n"; export default _default;