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.
@@ -851,7 +851,7 @@ var init_Textures = __esm({
851
851
  });
852
852
 
853
853
  // src/Materials.ts
854
- import { Color, CustomBlending, DoubleSide, OneFactor, RepeatWrapping, FrontSide, MeshBasicMaterial, MeshStandardMaterial, ShaderChunk, ShaderMaterial, ZeroFactor } from "three";
854
+ import { Color, CustomBlending, DoubleSide, OneFactor, OneMinusSrcAlphaFactor, RepeatWrapping, FrontSide, MeshBasicMaterial, MeshStandardMaterial, ShaderChunk, ShaderMaterial } from "three";
855
855
  var Materials;
856
856
  var init_Materials = __esm({
857
857
  "src/Materials.ts"() {
@@ -943,8 +943,15 @@ var init_Materials = __esm({
943
943
  material.blending = CustomBlending;
944
944
  material.blendSrc = OneFactor;
945
945
  material.blendDst = OneFactor;
946
- material.blendSrcAlpha = ZeroFactor;
947
- material.blendDstAlpha = OneFactor;
946
+ material.blendSrcAlpha = OneFactor;
947
+ material.blendDstAlpha = OneMinusSrcAlphaFactor;
948
+ material.onBeforeCompile = (shader) => {
949
+ shader.fragmentShader = shader.fragmentShader.replace(
950
+ "#include <dithering_fragment>",
951
+ "gl_FragColor.a = max(gl_FragColor.r, max(gl_FragColor.g, gl_FragColor.b));\n#include <dithering_fragment>"
952
+ );
953
+ };
954
+ material.customProgramCacheKey = () => "energy_swirl";
948
955
  material.color.set(8421504);
949
956
  break;
950
957
  case "water_mask":