Skip to content

TSL: Align API of blur filters. #31557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 3, 2025
Merged

TSL: Align API of blur filters. #31557

merged 1 commit into from
Aug 3, 2025

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Aug 3, 2025

Related issue: #31556 (comment)

Description

Implements the feedback from #31556 (comment).

@Mugen87 Mugen87 added this to the r180 milestone Aug 3, 2025
@Mugen87 Mugen87 changed the title TSL: Align blur filters. TSL: Align API of blur filters. Aug 3, 2025
@Mugen87 Mugen87 merged commit 58b511e into mrdoob:dev Aug 3, 2025
8 checks passed
textureNode = convertToTexture( textureNode );
bluramount = nodeObject( bluramount );
const repeats = nodeObject( options.size ) || float( 45 );
const mask = options.mask || null;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently, mask also needs to be compatible with .sample() interface, I think we can use convertToTexture() too.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would also be interesting to deprecate premultipliedGaussianBlur() in favor of options to align API.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently, mask also needs to be compatible with .sample() interface, I think we can use convertToTexture() too.

Like so?

const mask = ( options.mask !== null ) ? convertToTexture( options.mask ) : null;

Copy link
Collaborator

@sunag sunag Aug 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yess! I started a PR right after commenting. #31559

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants