Skip to content

Commit 15270d8

Browse files
committed
Change default blend function
and enable premultiply
1 parent 672ee21 commit 15270d8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/effects/NoiseEffect.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Uniform } from "three";
2-
import { SoftLightBlendFunction } from "./blending/index.js";
2+
import { AddBlendFunction } from "./blending/blend-functions/AddBlendFunction.js";
33
import { Effect } from "./Effect.js";
44

55
import fragmentShader from "./shaders/noise.frag";
@@ -23,7 +23,7 @@ export interface NoiseEffectOptions {
2323
/**
2424
* Controls whether the noise should be multiplied with the input colors prior to blending.
2525
*
26-
* @defaultValue false
26+
* @defaultValue true
2727
*/
2828

2929
premultiply?: boolean;
@@ -73,14 +73,14 @@ export class NoiseEffect extends Effect implements NoiseEffectOptions {
7373

7474
constructor({
7575
rgb = true,
76-
premultiply = false,
76+
premultiply = true,
7777
fps = 24
7878
}: NoiseEffectOptions = {}) {
7979

8080
super("NoiseEffect");
8181

8282
this.fragmentShader = fragmentShader;
83-
this.blendMode.blendFunction = new SoftLightBlendFunction();
83+
this.blendMode.blendFunction = new AddBlendFunction();
8484

8585
this.input.uniforms.set("page", new Uniform(1.0));
8686
this.input.defines.set("SEED", Math.max(1, Math.round(Math.random() * 1000)).toFixed(1));

0 commit comments

Comments
 (0)