class_canvasitemmaterial.rst 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. Properties
  13. ----------
  14. +-----------------------------------------------------+--------------------------------------------------------+
  15. | :ref:`BlendMode<enum_CanvasItemMaterial_BlendMode>` | :ref:`blend_mode<class_CanvasItemMaterial_blend_mode>` |
  16. +-----------------------------------------------------+--------------------------------------------------------+
  17. | :ref:`LightMode<enum_CanvasItemMaterial_LightMode>` | :ref:`light_mode<class_CanvasItemMaterial_light_mode>` |
  18. +-----------------------------------------------------+--------------------------------------------------------+
  19. Enumerations
  20. ------------
  21. .. _enum_CanvasItemMaterial_LightMode:
  22. enum **LightMode**:
  23. - **LIGHT_MODE_NORMAL** = **0** --- Render the material using both light and non-light sensitive material properties.
  24. - **LIGHT_MODE_UNSHADED** = **1** --- Render the material as if there were no light.
  25. - **LIGHT_MODE_LIGHT_ONLY** = **2** --- Render the material as if there were only light.
  26. .. _enum_CanvasItemMaterial_BlendMode:
  27. enum **BlendMode**:
  28. - **BLEND_MODE_MIX** = **0** --- Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value.
  29. - **BLEND_MODE_ADD** = **1** --- Additive blending mode.
  30. - **BLEND_MODE_SUB** = **2** --- Subtractive blending mode.
  31. - **BLEND_MODE_MUL** = **3** --- Multiplicative blending mode.
  32. - **BLEND_MODE_PREMULT_ALPHA** = **4** --- Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value.
  33. Description
  34. -----------
  35. ``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>`.
  36. Property Descriptions
  37. ---------------------
  38. .. _class_CanvasItemMaterial_blend_mode:
  39. - :ref:`BlendMode<enum_CanvasItemMaterial_BlendMode>` **blend_mode**
  40. +----------+-----------------------+
  41. | *Setter* | set_blend_mode(value) |
  42. +----------+-----------------------+
  43. | *Getter* | get_blend_mode() |
  44. +----------+-----------------------+
  45. The manner in which a material's rendering is applied to underlying textures.
  46. .. _class_CanvasItemMaterial_light_mode:
  47. - :ref:`LightMode<enum_CanvasItemMaterial_LightMode>` **light_mode**
  48. +----------+-----------------------+
  49. | *Setter* | set_light_mode(value) |
  50. +----------+-----------------------+
  51. | *Getter* | get_light_mode() |
  52. +----------+-----------------------+
  53. The manner in which material reacts to lighting.