class_shadermaterial.rst 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. Member Functions
  13. ----------------
  14. +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`Variant<class_variant>` | :ref:`get_shader_param<class_ShaderMaterial_get_shader_param>` **(** :ref:`String<class_string>` param **)** const |
  16. +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | void | :ref:`set_shader_param<class_ShaderMaterial_set_shader_param>` **(** :ref:`String<class_string>` param, :ref:`Variant<class_variant>` value **)** |
  18. +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
  19. Member Variables
  20. ----------------
  21. .. _class_ShaderMaterial_shader:
  22. - :ref:`Shader<class_shader>` **shader** - The :ref:`Shader<class_shader>` program used to render this material.
  23. Description
  24. -----------
  25. 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.
  26. Member Function Description
  27. ---------------------------
  28. .. _class_ShaderMaterial_get_shader_param:
  29. - :ref:`Variant<class_variant>` **get_shader_param** **(** :ref:`String<class_string>` param **)** const
  30. Returns the current value set for this material of a uniform in the shader.
  31. .. _class_ShaderMaterial_set_shader_param:
  32. - void **set_shader_param** **(** :ref:`String<class_string>` param, :ref:`Variant<class_variant>` value **)**
  33. Changes the value set for this material of a uniform in the shader.