Skip to content

CF_DrawBlend

Category: draw
GitHub: cute_draw.h


Per-drawable blend modes for the draw system.

Values

Enum Description
CF_DRAW_BLEND_NORMAL Premultiplied src-over (the default).
CF_DRAW_BLEND_ADD Additive: brightens what's beneath. Great for glows, fire, and particles.
CF_DRAW_BLEND_MULTIPLY Multiply: darkens what's beneath. Great for shadows and vignettes.
CF_DRAW_BLEND_SCREEN Screen: inverse multiply. Softer brightening than additive.

Remarks

Unlike cf_draw_push_render_state (whole-batch pipeline state), these are recorded per drawable and preserve paint order: additive particles can interleave with alpha sprites in a single stream of draw calls. All modes composite exactly against prior canvas content on every renderer path.

cf_draw_peek_blend
cf_draw_push_blend
cf_draw_pop_blend