GraphiteEditor / GraphiteEditor/Graphite

Support for SVG filter effects

未关闭
#4,308 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
Graphics
主要语言
Rust
星标
27.2k
派生
1.3k
平均合并
20 小时 5 分钟
30 天内合并 PR
57

描述

SVG has support for many filter effects (elements prefixed with `fe`). Documentation is available on [MDN list of SVG elements](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feDropShadow). A filter can be made by composing one or more of these filter effects. For example a glow could be made by combining the [`feMorphology`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feMorphology) to make the element thicker and then the [`feGaussianBlur`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feGaussianBlur) to blur the result. This can allow for powerful graphic effects whilst remaining a vector (useful for exporting and performance). Examples from the Inkscape filter gallery:

Inkscape filter gallery featuring a grid of different filter effects such as oil painting

Filters can also be composed by hand using a filter editor view:

a filter editor, featuring a list of filter effects and the details for a selected effect

This style of approach lends itself well the the existing graphite node graph.

Currently there is implemented a raster based blur and the ability to change the blend mode (this is implemented with the blend mode not a filter effect). However this significantly limits the possibilities compared to Inkscape.

The filter effect must also be implemented in the vello rendering pipeline, attempting to match the SVG rendering in a browser. For efficient SVG output, it should be possible to combine filter effects applied to an element into a single filter that can be reused. However this is not a particular priority given the rest of the SVG output is horrible.

贡献指南

这个仓库没有索引到贡献指南

调研方向

先研究现有的基于光栅的模糊和混合模式实现,然后追踪滤镜效果将如何通过 Graphite 节点图和 vello 渲染管线。使用链接的 MDN SVG 元素参考,将预期行为与浏览器的 SVG 渲染进行比较;完成的要求是实现组合的 SVG 滤镜效果、与 vello 输出匹配,并在可行时提供可复用的组合滤镜。

由索引模型根据 Issue 内容生成。

评估

技术栈
rust
领域
backend-api-design, computer-graphics
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
冷清
描述清晰度
需要澄清
新手友好度
28/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。