Skip to content
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

blur2 with stride #254

Closed
wants to merge 1 commit into from
Closed

blur2 with stride #254

wants to merge 1 commit into from

Conversation

Fil
Copy link
Member

@Fil Fil commented Jul 1, 2022

demo https://observablehq.com/@d3/blur-stride-dev

The API will have to change: having the stride at the end after the optional ry is not the best solution.

There is no need to change blur1 to accept a stride parameter, since it is the same as using blur2 with width=stride, rx=0, ry=r. We can intercept this in the API if we want, for consistency.

@Fil Fil requested a review from mbostock July 1, 2022 09:49
@Fil Fil mentioned this pull request Jul 1, 2022
@mbostock
Copy link
Member

mbostock commented Jul 1, 2022

I took the liberty of rebasing it with the latest commit 65942a9. Strangely the Laplacian example is faster but the simpler blur is slower, so I wonder if further optimization is possible or if the circular buffer strategy is not a good idea? I wonder if you would be willing to implement a benchmark that runs in Node. That would help compare the possible approaches (even though Node/V8 is only one engine to consider).

Copy link
Member

@mbostock mbostock left a comment

Choose a reason for hiding this comment

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

This doesn’t feel right to me. It lets you blur RGBA, yes, but you can’t e.g. just blur the R channel, and now blurh and asymmetric with blurv. We need to think through the interface here some more.

@mbostock
Copy link
Member

mbostock commented Jul 2, 2022

Closing in favor of c889f65 in #252. Thanks for the help!

@mbostock mbostock closed this Jul 2, 2022
@Fil Fil deleted the fil/blur-stride branch July 7, 2022 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants