class_shadermaterial.rst 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the ShaderMaterial.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_ShaderMaterial:
  5. ShaderMaterial
  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 that uses a custom :ref:`Shader<class_Shader>` program.
  12. Properties
  13. ----------
  14. +-----------------------------+-----------------------------------------------------+
  15. | :ref:`Shader<class_Shader>` | :ref:`shader<class_ShaderMaterial_property_shader>` |
  16. +-----------------------------+-----------------------------------------------------+
  17. Methods
  18. -------
  19. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  20. | :ref:`Variant<class_Variant>` | :ref:`get_shader_param<class_ShaderMaterial_method_get_shader_param>` **(** :ref:`String<class_String>` param **)** const |
  21. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | :ref:`bool<class_bool>` | :ref:`property_can_revert<class_ShaderMaterial_method_property_can_revert>` **(** :ref:`String<class_String>` name **)** |
  23. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`Variant<class_Variant>` | :ref:`property_get_revert<class_ShaderMaterial_method_property_get_revert>` **(** :ref:`String<class_String>` name **)** |
  25. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | void | :ref:`set_shader_param<class_ShaderMaterial_method_set_shader_param>` **(** :ref:`String<class_String>` param, :ref:`Variant<class_Variant>` value **)** |
  27. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. Description
  29. -----------
  30. A material that uses a custom :ref:`Shader<class_Shader>` program to render either items to screen or process particles. You can create multiple materials for the same shader but configure different values for the uniforms defined in the shader.
  31. Property Descriptions
  32. ---------------------
  33. .. _class_ShaderMaterial_property_shader:
  34. - :ref:`Shader<class_Shader>` **shader**
  35. +----------+-------------------+
  36. | *Setter* | set_shader(value) |
  37. +----------+-------------------+
  38. | *Getter* | get_shader() |
  39. +----------+-------------------+
  40. The :ref:`Shader<class_Shader>` program used to render this material.
  41. Method Descriptions
  42. -------------------
  43. .. _class_ShaderMaterial_method_get_shader_param:
  44. - :ref:`Variant<class_Variant>` **get_shader_param** **(** :ref:`String<class_String>` param **)** const
  45. Returns the current value set for this material of a uniform in the shader.
  46. .. _class_ShaderMaterial_method_property_can_revert:
  47. - :ref:`bool<class_bool>` **property_can_revert** **(** :ref:`String<class_String>` name **)**
  48. .. _class_ShaderMaterial_method_property_get_revert:
  49. - :ref:`Variant<class_Variant>` **property_get_revert** **(** :ref:`String<class_String>` name **)**
  50. .. _class_ShaderMaterial_method_set_shader_param:
  51. - void **set_shader_param** **(** :ref:`String<class_String>` param, :ref:`Variant<class_Variant>` value **)**
  52. Changes the value set for this material of a uniform in the shader.