Skip to content

Commit 6e76877

Browse files
authored
Merge pull request #718 from pmndrs/dev
Version 6.37.5
2 parents 665d425 + 01913c4 commit 6e76877

33 files changed

+745
-726
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "postprocessing",
3-
"version": "6.37.4",
3+
"version": "6.37.5",
44
"description": "A post processing library for three.js.",
55
"homepage": "https://github.com/pmndrs/postprocessing",
66
"license": "Zlib",
@@ -90,11 +90,11 @@
9090
"watch:js": "node esbuild -w"
9191
},
9292
"peerDependencies": {
93-
"three": ">= 0.157.0 < 0.178.0"
93+
"three": ">= 0.157.0 < 0.179.0"
9494
},
9595
"devDependencies": {
9696
"@tweakpane/core": "2.x.x",
97-
"@types/node": "22.x.x",
97+
"@types/node": "24.x.x",
9898
"@types/three": "0.x.x",
9999
"@typescript-eslint/eslint-plugin": "8.x.x",
100100
"@typescript-eslint/parser": "8.x.x",

pnpm-lock.yaml

Lines changed: 677 additions & 664 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/effects/blending/glsl/add.frag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) {
22

3-
return mix(x, x + y, opacity);
3+
return mix(x, vec4(x.rgb + y.rgb, y.a), opacity);
44

55
}

src/effects/blending/glsl/alpha.frag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) {
22

3-
return mix(x, y, min(y.a, opacity));
3+
return mix(x, y, y.a * opacity);
44

55
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) {
22

3-
return mix(x, (x + y) * 0.5, opacity);
3+
return mix(x, vec4((x.rgb + y.rgb) * 0.5, y.a), opacity);
44

55
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) {
22

3-
vec4 z = mix(step(0.0, y) * (1.0 - min(vec4(1.0), (1.0 - x) / y)), vec4(1.0), step(1.0, x));
4-
return mix(x, z, opacity);
3+
vec3 a = x.rgb, b = y.rgb;
4+
vec3 z = mix(step(0.0, b) * (1.0 - min(vec3(1.0), (1.0 - a) / b)), vec3(1.0), step(1.0, a));
5+
return mix(x, vec4(z, y.a), opacity);
56

67
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) {
22

3-
vec4 z = step(0.0, x) * mix(min(vec4(1.0), x / max(1.0 - y, 1e-9)), vec4(1.0), step(1.0, y));
4-
return mix(x, z, opacity);
3+
vec3 a = x.rgb, b = y.rgb;
4+
vec3 z = step(0.0, a) * mix(min(vec3(1.0), a / max(1.0 - b, 1e-9)), vec3(1.0), step(1.0, b));
5+
return mix(x, vec4(z, y.a), opacity);
56

67
}

src/effects/blending/glsl/color.frag

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) {
22

33
vec3 xHSL = RGBToHSL(x.rgb);
44
vec3 yHSL = RGBToHSL(y.rgb);
5-
vec3 z = HSLToRGB(vec3(yHSL.rg, xHSL.b));
6-
return vec4(mix(x.rgb, z, opacity), y.a);
5+
vec3 z = HSLToRGB(vec3(yHSL.xy, xHSL.z));
6+
return mix(x, vec4(z, y.a), opacity);
77

88
}

src/effects/blending/glsl/darken.frag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) {
22

3-
return mix(x, min(x, y), opacity);
3+
return mix(x, vec4(min(x.rgb, y.rgb), y.a), opacity);
44

55
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) {
22

3-
return mix(x, abs(x - y), opacity);
3+
return mix(x, vec4(abs(x.rgb - y.rgb), y.a), opacity);
44

55
}

0 commit comments

Comments
 (0)