Class reference

CanvasItemMaterial

Inherits Material

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

int blend_mode = 0

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

int light_mode = 0

The manner in which material reacts to lighting.

bool particles_anim_loop

If true, the particles animation will loop. Note: This property is only used and visible in the editor if particles_animation is true.

Constants

BLEND_MODE_MIX = 0

Enum: BlendMode

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

BLEND_MODE_ADD = 1

Enum: BlendMode

Additive blending mode.

BLEND_MODE_SUB = 2

Enum: BlendMode

Subtractive blending mode.

BLEND_MODE_MUL = 3

Enum: BlendMode

Multiplicative blending mode.

BLEND_MODE_PREMULT_ALPHA = 4

Enum: BlendMode

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

LIGHT_MODE_NORMAL = 0

Enum: LightMode

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

LIGHT_MODE_UNSHADED = 1

Enum: LightMode

Render the material as if there were no light.

LIGHT_MODE_LIGHT_ONLY = 2

Enum: LightMode

Render the material as if there were only light.

Source revision 5592dc3a7a61
Connection interrupted. Reload×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.