GraphiteEditor / GraphiteEditor/Graphite

Support for SVG filter effects

Abierto
#4,308 0 comentarios 1 reacción 0 asignados Ver en GitHub
Graphics
Lenguaje dominante
Rust
Estrellas
27.2k
Forks
1.3k
Merge medio
20 h 5 min
PR fusionados (30 d)
57

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Start by studying the existing raster-based blur and blend-mode implementation, then trace how filter effects would pass through the Graphite node graph and the vello rendering pipeline. Use the linked MDN SVG element references to compare expected behavior with browser SVG rendering; done requires composed SVG filter effects, matching vello output, and reusable combined filters where practical.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
rust
Área
backend-api-design, computer-graphics
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Tranquilo
Claridad
Necesita aclaración
Aptitud para principiantes
28/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.