# Shader that matches filter(DILATE)?

**URL:** <https://discourse.processing.org/t/shader-that-matches-filter-dilate/24257>\
**Category:** p5.js\
**Created:** [September 30, 2020, 11:36pm UTC](https://discourse.processing.org/t/shader-that-matches-filter-dilate/24257 "2020-09-30T23:36:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanielH](https://avatars.discourse-cdn.com/v4/letter/d/c5a1d2/32.png) [@DanielH](https://discourse.processing.org/u/DanielH)\
**Post date:** [September 30, 2020, 11:36pm UTC](https://discourse.processing.org/t/shader-that-matches-filter-dilate/24257/1 "2020-09-30T23:36:35Z")

</div>

Anyone know if such a thing exists? Would be nice to provide shader equivalents for the basic filters included in p5js so that users can easily switch between 2D/filters and WEBGL

---

<div class="post-metadata">

**Author:** ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Post date:** [October 1, 2020, 3:56am UTC](https://discourse.processing.org/t/shader-that-matches-filter-dilate/24257/2 "2020-10-01T03:56:19Z")

</div>

have you tried the shader examples in processing. You can then look at the shader using the show sketch folder command.

---

<div class="post-metadata">

**Author:** ![DanielH](https://avatars.discourse-cdn.com/v4/letter/d/c5a1d2/32.png) [@DanielH](https://discourse.processing.org/u/DanielH)\
**Post date:** [October 1, 2020, 7:21am UTC](https://discourse.processing.org/t/shader-that-matches-filter-dilate/24257/3 "2020-10-01T07:21:43Z")

</div>

1. I am asking specifically whether anyone has implemented the DILATE filter in p5js as a shader for use with the WEBGL renderer ?

2. I am suggesting that we make make (publicly) available the set 8 filters in p5js (THRESHOLD, GRAY, OPAQUE, INVERT, POSTERIZE, BLUR, ERODE, DILATE and BLUR.) as shaders (with the same names) so that people can more easily port sketches between the default renderer and WEBGL.
