degenerate icon indicating copy to clipboard operation
degenerate copied to clipboard

Effects

Open casey opened this issue 3 years ago • 0 comments

I'm not sure what the best way to support full-screen postprocessing effects is. Some examples of such effects:

  • pixelation
  • chromatic abberation
  • glow
  • dither
  • different kinds of noise

In general, where possible, we should strive to find general ways to express these things. For example, pixelation might be expressed as some kind of function that's applied to where pixels are sampled. If the ability to set this function is general, then we might be able to support not just pixelation, but other effects, like scrambling, etc.

Others, however, seem less general. Like chromatic abberation. One option for abberation is just to allow alternative fragment shaders. We provide the default fragment.glsl, but also abberation.glsl, and users can switch fragment shaders and render in order to get a certain effect, and also provide their own as JS strings.

casey avatar Jul 10 '22 00:07 casey