UNPKG

@babylonjs/core

Version:

Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.

38 lines 1.74 kB
// Do not edit. import { ShaderStore } from "../Engines/shaderStore.js"; import { clipPlaneFragmentDeclaration } from "./ShadersInclude/clipPlaneFragmentDeclaration.js"; import { logDepthDeclaration } from "./ShadersInclude/logDepthDeclaration.js"; import { fogFragmentDeclaration } from "./ShadersInclude/fogFragmentDeclaration.js"; import { logDepthFragment } from "./ShadersInclude/logDepthFragment.js"; import { fogFragment } from "./ShadersInclude/fogFragment.js"; import { gaussianSplattingFragmentDeclaration } from "./ShadersInclude/gaussianSplattingFragmentDeclaration.js"; import { clipPlaneFragment } from "./ShadersInclude/clipPlaneFragment.js"; const name = "gaussianSplattingPixelShader"; const shader = `#include<clipPlaneFragmentDeclaration> #include<logDepthDeclaration> #include<fogFragmentDeclaration> varying vec4 vColor;varying vec2 vPosition; #define CUSTOM_FRAGMENT_DEFINITIONS #include<gaussianSplattingFragmentDeclaration> void main () { #define CUSTOM_FRAGMENT_MAIN_BEGIN #include<clipPlaneFragment> vec4 finalColor=gaussianColor(vColor); #define CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR gl_FragColor=finalColor; #define CUSTOM_FRAGMENT_MAIN_END } `; // Sideeffect if (!ShaderStore.ShadersStore[name]) { ShaderStore.ShadersStore[name] = shader; } const includes = [clipPlaneFragmentDeclaration, logDepthDeclaration, fogFragmentDeclaration, logDepthFragment, fogFragment, gaussianSplattingFragmentDeclaration, clipPlaneFragment]; for (const inc of includes) { if (!ShaderStore.IncludesShadersStore[inc.name]) { ShaderStore.IncludesShadersStore[inc.name] = inc.shader; } } /** @internal */ export const gaussianSplattingPixelShader = { name, shader }; //# sourceMappingURL=gaussianSplatting.fragment.js.map