Skip to content

Commit c7bc46b

Browse files
committed
TSL: Use convertToTexture() in boxBlur().
1 parent 62a0912 commit c7bc46b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/jsm/tsl/display/boxBlur.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Fn, vec2, uv, Loop, vec4, premultiplyAlpha, unpremultiplyAlpha, max, int, textureSize, nodeObject } from 'three/tsl';
1+
import { Fn, vec2, uv, Loop, vec4, premultiplyAlpha, unpremultiplyAlpha, max, int, textureSize, nodeObject, convertToTexture } from 'three/tsl';
22

33
/**
44
* Applies a box blur effect to the given texture node.
@@ -24,6 +24,7 @@ import { Fn, vec2, uv, Loop, vec4, premultiplyAlpha, unpremultiplyAlpha, max, in
2424
*/
2525
export const boxBlur = /*#__PURE__*/ Fn( ( [ textureNode, options = {} ] ) => {
2626

27+
textureNode = convertToTexture( textureNode );
2728
const size = nodeObject( options.size ) || int( 1 );
2829
const separation = nodeObject( options.separation ) || int( 1 );
2930
const premultipliedAlpha = options.premultipliedAlpha || false;

0 commit comments

Comments
 (0)