@babylonjs/viewer
Version:
The Babylon Viewer aims to simplify a specific but common Babylon.js use case: loading, viewing, and interacting with a 3D model.
3 lines (2 loc) • 2.02 kB
JavaScript
import{S as n}from"./index-BPURObVq.esm.min.js";import{c as e,a}from"./clipPlaneFragment-ELAd64Ls.esm.min.js";import{l as i}from"./logDepthDeclaration-Dfi1mLaK.esm.min.js";import{f as t,a as o}from"./fogFragment-BO2xqg06.esm.min.js";import{p as r}from"./packingFunctions-0n6YnGJP.esm.min.js";import{l as s}from"./logDepthFragment-D_zYvmxE.esm.min.js";const f="gaussianSplattingFragmentDeclaration",l="fn gaussianColor(inColor: vec4f,inPosition: vec2f)->vec4f\n{var A : f32=-dot(inPosition,inPosition);if (A>-4.0)\n{var B: f32=exp(A)*inColor.a;\n#include<logDepthFragment>\nvar color: vec3f=inColor.rgb;\n#ifdef FOG\n#include<fogFragment>\n#endif\nreturn vec4f(color,B);} else {return vec4f(0.0);}}\n";n.IncludesShadersStoreWGSL[f]||(n.IncludesShadersStoreWGSL[f]=l);const m={name:f,shader:l},c="gaussianSplattingPixelShader",g="#include<clipPlaneFragmentDeclaration>\n#include<logDepthDeclaration>\n#include<fogFragmentDeclaration>\n#ifdef GPUPICKER_PACK_DEPTH\n#include<packingFunctions>\n#endif\nvarying vColor: vec4f;varying vPosition: vec2f;\n#define CUSTOM_FRAGMENT_DEFINITIONS\n#include<gaussianSplattingFragmentDeclaration>\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#include<clipPlaneFragment>\nvar finalColor: vec4f=gaussianColor(input.vColor,input.vPosition);\n#define CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR\n#ifdef GPUPICKER_DEPTH\nfragmentOutputs.fragData0=finalColor;\n#ifdef GPUPICKER_PACK_DEPTH\nfragmentOutputs.fragData1=pack(fragmentInputs.position.z);\n#else\nfragmentOutputs.fragData1=vec4f(fragmentInputs.position.z,0.0,0.0,1.0);\n#endif\n#else\nfragmentOutputs.color=finalColor;\n#endif\n#define CUSTOM_FRAGMENT_MAIN_END\n}\n";n.ShadersStoreWGSL[c]||(n.ShadersStoreWGSL[c]=g);const u=[e,i,t,r,s,o,m,a];for(const e of u)n.IncludesShadersStoreWGSL[e.name]||(n.IncludesShadersStoreWGSL[e.name]=e.shader);const d={name:c,shader:g};export{d as gaussianSplattingPixelShaderWGSL};
//# sourceMappingURL=gaussianSplatting.fragment-BrWh8bZ9.esm.min.js.map