mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
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.
This commit is contained in:
@@ -84,6 +84,8 @@ public:
|
||||
BLEND_ADD,
|
||||
BLEND_SUBTRACT,
|
||||
BLEND_MULTIPLY,
|
||||
BLEND_LIGHTEN,
|
||||
BLEND_DARKEN,
|
||||
BLEND_SCREEN,
|
||||
BLEND_REPLACE,
|
||||
BLEND_MAX_ENUM
|
||||
@@ -138,6 +140,7 @@ public:
|
||||
{
|
||||
SUPPORT_MULTI_CANVAS_FORMATS,
|
||||
SUPPORT_CLAMP_ZERO,
|
||||
SUPPORT_LIGHTEN,
|
||||
SUPPORT_MAX_ENUM
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user