Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I decided to reinvent SVG Filters because Safari won't let them be used with HTML canvas elements[1] ... well, at least that's the official reason.

Unofficially I just wanted a decent filter engine[2] that worked well with my canvas library, and there were things like SVG "filter chaining" which I really liked the idea of - but could they be done in a simpler way[3]? Also: proving to nobody that canvas filters can be done (fairly) efficiently without the need for WebGL shaders (because: why not?). And then I discovered I really like coding up filter functions and went a bit mad with them[4][5] and now the hole is so deep the only option left for me is to keep digging ...

[1] - Though I think that's changing this year? May already have changed - but I'm not gonna un-reinvent my filters even if the Safari folks have shipped the fix!

[2] - https://github.com/KaliedaRik/Scrawl-canvas/blob/v8/source/h...

[3] - Why do the SVG filter primitives need to be so complicated to work with?

[4] - https://scrawl-v8.rikweb.org.uk/demo/canvas-007.html

[5] - https://scrawl-v8.rikweb.org.uk/demo/filters-103.html



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: