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.

47 lines 1.75 kB
// Do not edit. import { ShaderStore } from "../Engines/shaderStore.js"; import "./ShadersInclude/clipPlaneFragmentDeclaration2.js"; import "./ShadersInclude/imageProcessingDeclaration.js"; import "./ShadersInclude/logDepthDeclaration.js"; import "./ShadersInclude/helperFunctions.js"; import "./ShadersInclude/imageProcessingFunctions.js"; import "./ShadersInclude/fogFragmentDeclaration.js"; import "./ShadersInclude/clipPlaneFragment.js"; import "./ShadersInclude/logDepthFragment.js"; import "./ShadersInclude/fogFragment.js"; const name = "gpuRenderParticlesPixelShader"; const shader = `precision highp float; #ifdef LOGARITHMICDEPTH #extension GL_EXT_frag_depth : enable #endif uniform sampler2D diffuseSampler;varying vec2 vUV;varying vec4 vColor; #include<clipPlaneFragmentDeclaration2> #include<imageProcessingDeclaration> #include<logDepthDeclaration> #include<helperFunctions> #include<imageProcessingFunctions> #include<fogFragmentDeclaration> void main() { #include<clipPlaneFragment> vec4 textureColor=texture2D(diffuseSampler,vUV);gl_FragColor=textureColor*vColor; #ifdef BLENDMULTIPLYMODE float alpha=vColor.a*textureColor.a;gl_FragColor.rgb=gl_FragColor.rgb*alpha+vec3(1.0)*(1.0-alpha); #endif #include<logDepthFragment> #include<fogFragment>(color,gl_FragColor) #ifdef IMAGEPROCESSINGPOSTPROCESS gl_FragColor.rgb=toLinearSpace(gl_FragColor.rgb); #else #ifdef IMAGEPROCESSING gl_FragColor.rgb=toLinearSpace(gl_FragColor.rgb);gl_FragColor=applyImageProcessing(gl_FragColor); #endif #endif } `; // Sideeffect if (!ShaderStore.ShadersStore[name]) { ShaderStore.ShadersStore[name] = shader; } /** @internal */ export const gpuRenderParticlesPixelShader = { name, shader }; //# sourceMappingURL=gpuRenderParticles.fragment.js.map