Skip to content

Commit ad338df

Browse files
authored
Merge pull request #720 from pmndrs/dev
Version 6.37.6
2 parents 6e76877 + 13d0b61 commit ad338df

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "postprocessing",
3-
"version": "6.37.5",
3+
"version": "6.37.6",
44
"description": "A post processing library for three.js.",
55
"homepage": "https://github.com/pmndrs/postprocessing",
66
"license": "Zlib",

src/effects/BloomEffect.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ export class BloomEffect extends Effect {
2323
*
2424
* @param {Object} [options] - The options.
2525
* @param {BlendFunction} [options.blendFunction=BlendFunction.SCREEN] - The blend function of this effect.
26-
* @param {Number} [options.luminanceThreshold=0.9] - The luminance threshold. Raise this value to mask out darker elements in the scene.
27-
* @param {Number} [options.luminanceSmoothing=0.025] - Controls the smoothness of the luminance threshold.
28-
* @param {Boolean} [options.mipmapBlur=false] - Enables or disables mipmap blur.
26+
* @param {Number} [options.luminanceThreshold=1.0] - The luminance threshold. Raise this value to mask out darker elements in the scene.
27+
* @param {Number} [options.luminanceSmoothing=0.03] - Controls the smoothness of the luminance threshold.
28+
* @param {Boolean} [options.mipmapBlur=true] - Enables or disables mipmap blur.
2929
* @param {Number} [options.intensity=1.0] - The bloom intensity.
3030
* @param {Number} [options.radius=0.85] - The blur radius. Only applies to mipmap blur.
3131
* @param {Number} [options.levels=8] - The amount of MIP levels. Only applies to mipmap blur.
@@ -39,9 +39,9 @@ export class BloomEffect extends Effect {
3939

4040
constructor({
4141
blendFunction = BlendFunction.SCREEN,
42-
luminanceThreshold = 0.9,
43-
luminanceSmoothing = 0.025,
44-
mipmapBlur = false,
42+
luminanceThreshold = 1.0,
43+
luminanceSmoothing = 0.03,
44+
mipmapBlur = true,
4545
intensity = 1.0,
4646
radius = 0.85,
4747
levels = 8,

src/effects/glsl/bloom.frag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ uniform float intensity;
1313
void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) {
1414

1515
vec4 texel = texture2D(map, uv);
16-
outputColor = vec4(texel.rgb * intensity, texel.a);
16+
outputColor = vec4(texel.rgb * intensity, max(inputColor.a, texel.a));
1717

1818
}

src/effects/glsl/texture.frag

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@ void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor)
2323
#endif
2424

2525
outputColor = TEXEL;
26+
outputColor.a = max(inputColor.a, outputColor.a);
2627

2728
}

types/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5270,9 +5270,9 @@ declare module "postprocessing" {
52705270
*
52715271
* @param {Object} [options] - The options.
52725272
* @param {BlendFunction} [options.blendFunction=BlendFunction.SCREEN] - The blend function of this effect.
5273-
* @param {Number} [options.luminanceThreshold=0.9] - The luminance threshold. Raise this value to mask out darker elements in the scene.
5274-
* @param {Number} [options.luminanceSmoothing=0.025] - Controls the smoothness of the luminance threshold.
5275-
* @param {Boolean} [options.mipmapBlur=false] - Enables or disables mipmap blur.
5273+
* @param {Number} [options.luminanceThreshold=1.0] - The luminance threshold. Raise this value to mask out darker elements in the scene.
5274+
* @param {Number} [options.luminanceSmoothing=0.03] - Controls the smoothness of the luminance threshold.
5275+
* @param {Boolean} [options.mipmapBlur=true] - Enables or disables mipmap blur.
52765276
* @param {Number} [options.intensity=1.0] - The bloom intensity.
52775277
* @param {Number} [options.radius=0.85] - The blur radius. Only applies to mipmap blur.
52785278
* @param {Number} [options.levels=8] - The amount of MIP levels. Only applies to mipmap blur.

0 commit comments

Comments
 (0)