-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Description
Description
The current blur implementations of gaussian and box blur are inconsistent (API-wise) and could make with optimisations (separable implementation). I also think a Node<float> driven blur, like hashBlur does, would be very welcome (it surely is welcome in my use case).
Solution
As mentioned in Additional context, I'd be okay to implement those changes and utilities, but have design questions.
Alternatives
Each user would have to implement their own version of these utilities if they needed them, since they wouldn't be included in three/tsl.
Additional context
I'm working on a library, so far called three-tsl-lab, whichs goal is to facilitate the usage of three/tsl for graphic-design/2D purposes. I've already implemented a Typescript version of separable boxBlur and gaussianBlur and map-driven ("luma") box and gaussian blur as well. Porting it over wouldn't be hard, but the three/tsl codebase isn't designed the same way (see uniformBlur.ts and lumaBlur.ts). Feedback on how to approach this is welcome.
In which case, how do you recommend to structure the API? Each blur with a single export, with a boolean option to be separable? Or a separable blur and a one-pass blur as two different blur exports? Maybe even no difference between a map-driven blur and a uniform blur, where the map would be optional and if not provided, would default to uniform?