/Godot 3.1


Inherits: Material < Resource < Reference < Object

Category: Core

Brief Description

A material for CanvasItems.


BlendMode blend_mode
LightMode light_mode
int particles_anim_h_frames
bool particles_anim_loop
int particles_anim_v_frames
bool particles_animation


enum BlendMode:

  • BLEND_MODE_MIX = 0 — Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value.
  • BLEND_MODE_ADD = 1 — Additive blending mode.
  • BLEND_MODE_SUB = 2 — Subtractive blending mode.
  • BLEND_MODE_MUL = 3 — Multiplicative blending mode.
  • BLEND_MODE_PREMULT_ALPHA = 4 — Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value.

enum LightMode:

  • LIGHT_MODE_NORMAL = 0 — Render the material using both light and non-light sensitive material properties.
  • LIGHT_MODE_UNSHADED = 1 — Render the material as if there were no light.
  • LIGHT_MODE_LIGHT_ONLY = 2 — Render the material as if there were only light.


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.

Property Descriptions

BlendMode blend_mode

Setter set_blend_mode(value)
Getter get_blend_mode()

The manner in which a material’s rendering is applied to underlying textures.

LightMode light_mode

Setter set_light_mode(value)
Getter get_light_mode()

The manner in which material reacts to lighting.

int particles_anim_h_frames

Setter set_particles_anim_h_frames(value)
Getter get_particles_anim_h_frames()

bool particles_anim_loop

Setter set_particles_anim_loop(value)
Getter get_particles_anim_loop()

int particles_anim_v_frames

Setter set_particles_anim_v_frames(value)
Getter get_particles_anim_v_frames()

bool particles_animation

Setter set_particles_animation(value)
Getter get_particles_animation()

© 2014–2019 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.