outline.fragment.js 1004 B

123456789101112131415161718192021222324252627282930313233
  1. // Do not edit.
  2. import { ShaderStore } from "../Engines/shaderStore.js";
  3. import "./ShadersInclude/clipPlaneFragmentDeclaration.js";
  4. import "./ShadersInclude/logDepthDeclaration.js";
  5. import "./ShadersInclude/clipPlaneFragment.js";
  6. import "./ShadersInclude/logDepthFragment.js";
  7. const name = "outlinePixelShader";
  8. const shader = `#ifdef LOGARITHMICDEPTH
  9. #extension GL_EXT_frag_depth : enable
  10. #endif
  11. uniform vec4 color;
  12. #ifdef ALPHATEST
  13. varying vec2 vUV;uniform sampler2D diffuseSampler;
  14. #endif
  15. #include<clipPlaneFragmentDeclaration>
  16. #include<logDepthDeclaration>
  17. #define CUSTOM_FRAGMENT_DEFINITIONS
  18. void main(void) {
  19. #define CUSTOM_FRAGMENT_MAIN_BEGIN
  20. #include<clipPlaneFragment>
  21. #ifdef ALPHATEST
  22. if (texture2D(diffuseSampler,vUV).a<0.4)
  23. discard;
  24. #endif
  25. #include<logDepthFragment>
  26. gl_FragColor=color;
  27. #define CUSTOM_FRAGMENT_MAIN_END
  28. }`;
  29. // Sideeffect
  30. ShaderStore.ShadersStore[name] = shader;
  31. /** @internal */
  32. export const outlinePixelShader = { name, shader };
  33. //# sourceMappingURL=outline.fragment.js.map