minerender 2.1.0-alpha.64 → 2.1.0-alpha.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -803,7 +803,7 @@ var init_Textures = __esm({
803
803
  });
804
804
 
805
805
  // src/Materials.ts
806
- import { Color, CustomBlending, DoubleSide, OneFactor, RepeatWrapping, FrontSide, MeshBasicMaterial, MeshStandardMaterial, ShaderChunk, ShaderMaterial, ZeroFactor } from "three";
806
+ import { Color, CustomBlending, DoubleSide, OneFactor, OneMinusSrcAlphaFactor, RepeatWrapping, FrontSide, MeshBasicMaterial, MeshStandardMaterial, ShaderChunk, ShaderMaterial } from "three";
807
807
  var _Materials, Materials;
808
808
  var init_Materials = __esm({
809
809
  "src/Materials.ts"() {
@@ -892,8 +892,15 @@ var init_Materials = __esm({
892
892
  material.blending = CustomBlending;
893
893
  material.blendSrc = OneFactor;
894
894
  material.blendDst = OneFactor;
895
- material.blendSrcAlpha = ZeroFactor;
896
- material.blendDstAlpha = OneFactor;
895
+ material.blendSrcAlpha = OneFactor;
896
+ material.blendDstAlpha = OneMinusSrcAlphaFactor;
897
+ material.onBeforeCompile = (shader) => {
898
+ shader.fragmentShader = shader.fragmentShader.replace(
899
+ "#include <dithering_fragment>",
900
+ "gl_FragColor.a = max(gl_FragColor.r, max(gl_FragColor.g, gl_FragColor.b));\n#include <dithering_fragment>"
901
+ );
902
+ };
903
+ material.customProgramCacheKey = () => "energy_swirl";
897
904
  material.color.set(8421504);
898
905
  break;
899
906
  case "water_mask":