playcanvas
Version:
PlayCanvas WebGL game engine
3 lines (2 loc) • 1.91 kB
TypeScript
declare const _default: "\n\n// stores the source UV and order of the splat\nstruct SplatSource {\n uint order; // render order\n uint id; // splat id\n ivec2 uv; // splat uv\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};\n\n// stores the offset from center for the current gaussian\nstruct SplatCorner {\n vec2 offset; // corner offset from center in clip space\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#include \"gsplatEvalSHVS\"\n#include \"gsplatQuatToMat3VS\"\n\n#if GSPLAT_COMPRESSED_DATA == true\n #include \"gsplatCompressedDataVS\"\n #if SH_COEFFS > 0\n #include \"gsplatCompressedSHVS\"\n #endif\n#elif GSPLAT_SOGS_DATA == true\n #include \"gsplatSogsDataVS\"\n #include \"gsplatSogsColorVS\"\n #if SH_COEFFS > 0\n #include \"gsplatSogsSHVS\"\n #endif\n#else\n #include \"gsplatDataVS\"\n #include \"gsplatColorVS\"\n #if SH_COEFFS > 0\n #include \"gsplatSHVS\"\n #endif\n#endif\n\n#include \"gsplatSourceVS\"\n#include \"gsplatCenterVS\"\n#include \"gsplatCornerVS\"\n#include \"gsplatOutputVS\"\n\n// modify the gaussian corner so it excludes gaussian regions with alpha less than 1/255\nvoid clipCorner(inout SplatCorner corner, float alpha) {\n float clip = min(1.0, sqrt(-log(1.0 / 255.0 / alpha)) / 2.0);\n corner.offset *= clip;\n corner.uv *= clip;\n}\n";
export default _default;