aseprite / aseprite

Animated sprite editor & pixel art tool (Windows, macOS, Linux)
https://www.aseprite.org
29.49k stars 6.19k forks source link

Add real time dithering for RGBA images #552

Open dacap opened 9 years ago

dacap commented 9 years ago

Basically we should be able to specify an option per sprite/layer to see RGB images rendered with a dithering technique in real-time.

dacap commented 9 years ago

I've already done some tests about this real-time dithering:

Anyway it's relatively easy to dither the final render result with the current code, but that is useless, we need to dither an intermediate phase/image in the render code. The steps are:

  1. Render the sprite in one image (image A)
  2. Dither image A 1 Render the transparent grid in other image B
  3. Composite the background + dithered image (A+B)
  4. Blit the result in the screen

For this we need to rewrite the whole rendering code. Also, with a new rendering code we could cache the rendered image A, and reuse it to improve the animation playback performance.