class_canvasitemmaterial.rst 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the CanvasItemMaterial.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_CanvasItemMaterial:
  5. CanvasItemMaterial
  6. ==================
  7. **Inherits:** :ref:`Material<class_material>` **<** :ref:`Resource<class_resource>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. A material for :ref:`CanvasItem<class_canvasitem>`\ s.
  12. Member Variables
  13. ----------------
  14. .. _class_CanvasItemMaterial_blend_mode:
  15. - :ref:`BlendMode<enum_canvasitemmaterial_blendmode>` **blend_mode** - The manner in which a material's rendering is applied to underlying textures.
  16. .. _class_CanvasItemMaterial_light_mode:
  17. - :ref:`LightMode<enum_canvasitemmaterial_lightmode>` **light_mode** - The manner in which material reacts to lighting.
  18. Enums
  19. -----
  20. .. _enum_CanvasItemMaterial_LightMode:
  21. enum **LightMode**
  22. - **LIGHT_MODE_NORMAL** = **0** --- Render the material using both light and non-light sensitive material properties.
  23. - **LIGHT_MODE_UNSHADED** = **1** --- Render the material as if there were no light.
  24. - **LIGHT_MODE_LIGHT_ONLY** = **2** --- Render the material as if there were only light.
  25. .. _enum_CanvasItemMaterial_BlendMode:
  26. enum **BlendMode**
  27. - **BLEND_MODE_MIX** = **0** --- Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value.
  28. - **BLEND_MODE_ADD** = **1** --- Additive blending mode.
  29. - **BLEND_MODE_SUB** = **2** --- Subtractive blending mode.
  30. - **BLEND_MODE_MUL** = **3** --- Multiplicative blending mode.
  31. - **BLEND_MODE_PREMULT_ALPHA** = **4** --- Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value.
  32. Description
  33. -----------
  34. ``CanvasItemMaterial``\ s provide a means of modifying the textures associated with a CanvasItem. They specialize in describing blend and lighting behaviors for textures. Use a :ref:`ShaderMaterial<class_shadermaterial>` to more fully customize a material's interactions with a :ref:`CanvasItem<class_canvasitem>`.