Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

CanvasItemMaterial

Inherits: Material < Resource < RefCounted < Object

A material for CanvasItems.

Description

CanvasItemMaterials provide a means of modifying the textures associated with a CanvasItem. They specialize in describing blend and lighting behaviors for textures. Use a ShaderMaterial to more fully customize a material's interactions with a CanvasItem.

Properties

BlendMode

blend_mode

0

LightMode

light_mode

0

int

particles_anim_h_frames

bool

particles_anim_loop

int

particles_anim_v_frames

bool

particles_animation

false


Enumerations

enum BlendMode:

BlendMode BLEND_MODE_MIX = 0

Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value.

BlendMode BLEND_MODE_ADD = 1

Additive blending mode.

BlendMode BLEND_MODE_SUB = 2

Subtractive blending mode.

BlendMode BLEND_MODE_MUL = 3

Multiplicative blending mode.

BlendMode BLEND_MODE_PREMULT_ALPHA = 4

Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value.


enum LightMode:

LightMode LIGHT_MODE_NORMAL = 0

Render the material using both light and non-light sensitive material properties.