@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.
72 lines (68 loc) • 2.76 kB
JavaScript
import { S as ShaderStore } from './index-MZPybX0H.esm.js';
import { c as clipPlaneFragmentDeclarationWGSL, a as clipPlaneFragmentWGSL } from './clipPlaneFragment-C6Z5D7El.esm.js';
import { l as logDepthDeclarationWGSL } from './logDepthDeclaration-BPJH8Xtb.esm.js';
import { f as fogFragmentDeclarationWGSL, a as fogFragmentWGSL } from './fogFragment-Lnu5KyrF.esm.js';
import { p as packingFunctionsWGSL } from './packingFunctions-CRspvE8r.esm.js';
import { l as logDepthFragmentWGSL } from './logDepthFragment-DD4DS4oL.esm.js';
// Do not edit.
const name$1 = "gaussianSplattingFragmentDeclaration";
const shader$1 = `fn gaussianColor(inColor: vec4f,inPosition: vec2f)->vec4f
{var A : f32=-dot(inPosition,inPosition);if (A>-4.0)
{var B: f32=exp(A)*inColor.a;
var color: vec3f=inColor.rgb;
return vec4f(color,B);} else {return vec4f(0.0);}}
`;
// Sideeffect
if (!ShaderStore.IncludesShadersStoreWGSL[name$1]) {
ShaderStore.IncludesShadersStoreWGSL[name$1] = shader$1;
}
/** @internal */
const gaussianSplattingFragmentDeclarationWGSL = { name: name$1, shader: shader$1 };
// Do not edit.
const name = "gaussianSplattingPixelShader";
const shader = `
varying vColor: vec4f;varying vPosition: vec2f;
@fragment
fn main(input: FragmentInputs)->FragmentOutputs {
var finalColor: vec4f=gaussianColor(input.vColor,input.vPosition);
fragmentOutputs.fragData0=finalColor;
fragmentOutputs.fragData1=pack(fragmentInputs.position.z);
fragmentOutputs.fragData1=vec4f(fragmentInputs.position.z,0.0,0.0,1.0);
fragmentOutputs.color=finalColor;
}
`;
// Sideeffect
if (!ShaderStore.ShadersStoreWGSL[name]) {
ShaderStore.ShadersStoreWGSL[name] = shader;
}
const includes = [clipPlaneFragmentDeclarationWGSL, logDepthDeclarationWGSL, fogFragmentDeclarationWGSL, packingFunctionsWGSL, logDepthFragmentWGSL, fogFragmentWGSL, gaussianSplattingFragmentDeclarationWGSL, clipPlaneFragmentWGSL];
for (const inc of includes) {
if (!ShaderStore.IncludesShadersStoreWGSL[inc.name]) {
ShaderStore.IncludesShadersStoreWGSL[inc.name] = inc.shader;
}
}
/** @internal */
const gaussianSplattingPixelShaderWGSL = { name, shader };
export { gaussianSplattingPixelShaderWGSL };
//# sourceMappingURL=gaussianSplatting.fragment-DYQeWUlb.esm.js.map