Table of Contents

Enum BlendMode

Namespace
Sdl3Sharp.Video.Blending
Assembly
Sdl3Sharp.dll

Represents a blend mode used in drawing operations

public enum BlendMode : uint

Fields

Add = 2

Additive blending

dstRGB = (srcRGB * srcA) + dstRGB
dstA = dstA
AddPremultiplied = 32

Pre-multiplied additive blending

dstRGB = srcRGB + dstRGB
dstA = dstA
Blend = 1

Alpha blending

dstRGB = (srcRGB * srcA) + (dstRGB * (1 - srcA))
dstA = srcA + (dstA * (1 - srcA))
BlendPremultiplied = 16

Pre-multiplied alpha blending

dstRGBA = srcRGBA + (dstRGBA * (1 - srcA))
Invalid = 2147483647

A representative for an invalid BlendMode

Modulate = 4

Color modulate

dstRGB = srcRGB * dstRGB
dstA = dstA
Multiply = 8

Color multiply

dstRGB = (srcRGB * dstRGB) + (dstRGB * (1 - srcA))
dstA = dstA
None = 0

No blending

dstRGBA = srcRGBA

Remarks

The defined blend modes in the BlendMode enumeration are supported everywhere.

Additional custom blend modes can be obtained by using ComposeCustom(BlendFactor, BlendFactor, BlendOperation, BlendFactor, BlendFactor, BlendOperation). Notice that not all renderers support all custom blend modes.