Estella
0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
BlendMode.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: Apache-2.0
2
// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
13
#pragma once
14
15
#include "
../../core/Types.hpp
"
16
17
namespace
esengine
{
18
22
enum class
BlendMode
:
u8
{
23
Normal
= 0,
// SrcAlpha, OneMinusSrcAlpha (default alpha blending)
24
Additive
= 1,
// SrcAlpha, One (glow, particles)
25
Multiply
= 2,
// DstColor, OneMinusSrcAlpha (shadows, multiply)
26
Screen
= 3,
// One, OneMinusSrcColor (lighten)
27
PremultipliedAlpha
= 4,
// One, OneMinusSrcAlpha (premultiplied alpha)
28
PmaAdditive
= 5,
// One, One (additive with premultiplied alpha source)
29
Lighten
= 6,
// GL_MAX blend equation (take brighter pixel)
30
Darken
= 7,
// GL_MIN blend equation (take darker pixel)
31
Overlay
= 8,
// Screen on light, Multiply on dark (requires shader)
32
// No blending: the source replaces the destination. Every other mode reads the
33
// destination for each fragment, which an opaque sprite pays for nothing, and
34
// — the reason this exists — an opaque draw is the only kind that may WRITE
35
// depth, since a blended one has to stay behind the painter's order. Last in
36
// the list rather than first because these values are serialized into material
37
// assets; Normal must stay 0.
38
None
= 9,
39
};
40
41
}
// namespace esengine
Types.hpp
Core type definitions and utilities for ESEngine.
esengine
Definition
EasingFunctions.hpp:10
esengine::BlendMode
BlendMode
Predefined blend modes for rendering.
Definition
BlendMode.hpp:22
esengine::BlendMode::Lighten
@ Lighten
Definition
BlendMode.hpp:29
esengine::BlendMode::Screen
@ Screen
Definition
BlendMode.hpp:26
esengine::BlendMode::Additive
@ Additive
Definition
BlendMode.hpp:24
esengine::BlendMode::None
@ None
Definition
BlendMode.hpp:38
esengine::BlendMode::Overlay
@ Overlay
Definition
BlendMode.hpp:31
esengine::BlendMode::Normal
@ Normal
Definition
BlendMode.hpp:23
esengine::BlendMode::PremultipliedAlpha
@ PremultipliedAlpha
Definition
BlendMode.hpp:27
esengine::BlendMode::PmaAdditive
@ PmaAdditive
Definition
BlendMode.hpp:28
esengine::BlendMode::Multiply
@ Multiply
Definition
BlendMode.hpp:25
esengine::BlendMode::Darken
@ Darken
Definition
BlendMode.hpp:30
esengine::u8
std::uint8_t u8
Unsigned 8-bit integer.
Definition
Types.hpp:41
src
esengine
renderer
draw
BlendMode.hpp
Generated by
1.15.0