123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- // 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
- ShaderStore.ShadersStore[name] = shader;
- /** @internal */
- export const gpuRenderParticlesPixelShader = { name, shader };
- //# sourceMappingURL=gpuRenderParticles.fragment.js.map
|