1. rude
  2. love

Issues

Issue #443 resolved

Request for 'min' and 'max' blend modes via GL_EXT_blend_minmax

Anonymous created an issue

It would be useful for something I'm working on as there isn't any option for using the Z buffer for equivalent functionality.

Currently I'm having to do a lot of canvas swapping which isn't very fast.

Probably not a commonly used feature though.

Comments (4)

  1. Alex Szpakowski

    The min and max blend equations can be used to implement Photoshop's "lighten" and "darken" blend modes. However, I'm not quite sure what to do with the alpha channel, and min and max aren't available in OpenGL ES 2. :(

  2. Alex Szpakowski

    Added "lighten" and "darken" blend modes (resolves issue #443).

    They perform the equations res.rgba = max(dst.rgba, src.rgba) and res.rgba = min(dst.rgba, src.rgba) respectively.

    They only work when the "premultiplied" blend alpha mode is used, and an error occurs otherwise. They also aren't supported on some non-iOS OpenGL ES 2 systems. Check for support with love.graphics.getSupported().lighten.

    → <<cset b7d44f98e30b>>

  3. Log in to comment