|
@@ -1,5 +1,5 @@
|
|
|
import { RenderTarget, Vector2, NodeMaterial, RendererUtils, QuadMesh, TempNode, NodeUpdateType } from 'three/webgpu';
|
|
import { RenderTarget, Vector2, NodeMaterial, RendererUtils, QuadMesh, TempNode, NodeUpdateType } from 'three/webgpu';
|
|
|
-import { nodeObject, Fn, float, uv, uniform, convertToTexture, vec2, vec4, passTexture, premultiplyAlpha, unpremultiplyAlpha } from 'three/tsl';
|
|
|
|
|
|
|
+import { Fn, float, uv, uniform, convertToTexture, vec2, vec4, passTexture, premultiplyAlpha, unpremultiplyAlpha } from 'three/tsl';
|
|
|
|
|
|
|
|
const _quadMesh = /*@__PURE__*/ new QuadMesh();
|
|
const _quadMesh = /*@__PURE__*/ new QuadMesh();
|
|
|
|
|
|
|
@@ -124,6 +124,15 @@ class GaussianBlurNode extends TempNode {
|
|
|
*/
|
|
*/
|
|
|
this.premultipliedAlpha = options.premultipliedAlpha || false;
|
|
this.premultipliedAlpha = options.premultipliedAlpha || false;
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * This flag can be used for type testing.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @type {boolean}
|
|
|
|
|
+ * @default true
|
|
|
|
|
+ * @readonly
|
|
|
|
|
+ */
|
|
|
|
|
+ this.isGaussianBlurNode = true;
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -358,7 +367,7 @@ export default GaussianBlurNode;
|
|
|
* @param {number} [options.resolutionScale=1] - The resolution of the effect. 0.5 means half the resolution of the texture node.
|
|
* @param {number} [options.resolutionScale=1] - The resolution of the effect. 0.5 means half the resolution of the texture node.
|
|
|
* @returns {GaussianBlurNode}
|
|
* @returns {GaussianBlurNode}
|
|
|
*/
|
|
*/
|
|
|
-export const gaussianBlur = ( node, directionNode, sigma, options = {} ) => nodeObject( new GaussianBlurNode( convertToTexture( node ), directionNode, sigma, options ) );
|
|
|
|
|
|
|
+export const gaussianBlur = ( node, directionNode, sigma, options = {} ) => new GaussianBlurNode( convertToTexture( node ), directionNode, sigma, options );
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* TSL function for creating a gaussian blur node for post processing with enabled premultiplied alpha.
|
|
* TSL function for creating a gaussian blur node for post processing with enabled premultiplied alpha.
|