mirror of
https://github.com/NoelFB/blah.git
synced 2024-11-29 17:08:56 +08:00
added NonPremultiplied BlendMode
This commit is contained in:
parent
410adbfe12
commit
d2703e5050
|
@ -113,8 +113,10 @@ namespace Blah
|
||||||
// BlendMode using for rendering
|
// BlendMode using for rendering
|
||||||
struct BlendMode
|
struct BlendMode
|
||||||
{
|
{
|
||||||
// Normal, pre-multiplied, Blend Mode
|
// Normal is Premultipled Alpha
|
||||||
|
// TODO: potentially rename normal to match that it is for Premultiplied Alpha?
|
||||||
static const BlendMode Normal;
|
static const BlendMode Normal;
|
||||||
|
static const BlendMode NonPremultiplied;
|
||||||
static const BlendMode Subtract;
|
static const BlendMode Subtract;
|
||||||
static const BlendMode Additive;
|
static const BlendMode Additive;
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,17 @@ const BlendMode BlendMode::Normal = BlendMode(
|
||||||
0xffffffff
|
0xffffffff
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const BlendMode BlendMode::NonPremultiplied = BlendMode(
|
||||||
|
BlendOp::Add,
|
||||||
|
BlendFactor::SrcAlpha,
|
||||||
|
BlendFactor::OneMinusSrcAlpha,
|
||||||
|
BlendOp::Add,
|
||||||
|
BlendFactor::SrcAlpha,
|
||||||
|
BlendFactor::OneMinusSrcAlpha,
|
||||||
|
BlendMask::RGBA,
|
||||||
|
0xffffffff
|
||||||
|
);
|
||||||
|
|
||||||
const BlendMode BlendMode::Subtract = BlendMode(
|
const BlendMode BlendMode::Subtract = BlendMode(
|
||||||
BlendOp::ReverseSubtract,
|
BlendOp::ReverseSubtract,
|
||||||
BlendFactor::One,
|
BlendFactor::One,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user