mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
89 lines
4.1 KiB
ReStructuredText
89 lines
4.1 KiB
ReStructuredText
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
|
|
.. DO NOT EDIT THIS FILE, but the ShaderMaterial.xml source instead.
|
|
.. The source is found in doc/classes or modules/<name>/doc_classes.
|
|
|
|
.. _class_ShaderMaterial:
|
|
|
|
ShaderMaterial
|
|
==============
|
|
|
|
**Inherits:** :ref:`Material<class_Material>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
|
|
|
|
**Category:** Core
|
|
|
|
Brief Description
|
|
-----------------
|
|
|
|
A material that uses a custom :ref:`Shader<class_Shader>` program.
|
|
|
|
Properties
|
|
----------
|
|
|
|
+-----------------------------+-----------------------------------------------------+------+
|
|
| :ref:`Shader<class_Shader>` | :ref:`shader<class_ShaderMaterial_property_shader>` | null |
|
|
+-----------------------------+-----------------------------------------------------+------+
|
|
|
|
Methods
|
|
-------
|
|
|
|
+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Variant<class_Variant>` | :ref:`get_shader_param<class_ShaderMaterial_method_get_shader_param>` **(** :ref:`String<class_String>` param **)** const |
|
|
+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`property_can_revert<class_ShaderMaterial_method_property_can_revert>` **(** :ref:`String<class_String>` name **)** |
|
|
+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Variant<class_Variant>` | :ref:`property_get_revert<class_ShaderMaterial_method_property_get_revert>` **(** :ref:`String<class_String>` name **)** |
|
|
+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_shader_param<class_ShaderMaterial_method_set_shader_param>` **(** :ref:`String<class_String>` param, :ref:`Variant<class_Variant>` value **)** |
|
|
+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Description
|
|
-----------
|
|
|
|
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.
|
|
|
|
Tutorials
|
|
---------
|
|
|
|
- :doc:`../tutorials/shading/index`
|
|
|
|
Property Descriptions
|
|
---------------------
|
|
|
|
.. _class_ShaderMaterial_property_shader:
|
|
|
|
- :ref:`Shader<class_Shader>` **shader**
|
|
|
|
+-----------+-------------------+
|
|
| *Default* | null |
|
|
+-----------+-------------------+
|
|
| *Setter* | set_shader(value) |
|
|
+-----------+-------------------+
|
|
| *Getter* | get_shader() |
|
|
+-----------+-------------------+
|
|
|
|
The :ref:`Shader<class_Shader>` program used to render this material.
|
|
|
|
Method Descriptions
|
|
-------------------
|
|
|
|
.. _class_ShaderMaterial_method_get_shader_param:
|
|
|
|
- :ref:`Variant<class_Variant>` **get_shader_param** **(** :ref:`String<class_String>` param **)** const
|
|
|
|
Returns the current value set for this material of a uniform in the shader.
|
|
|
|
.. _class_ShaderMaterial_method_property_can_revert:
|
|
|
|
- :ref:`bool<class_bool>` **property_can_revert** **(** :ref:`String<class_String>` name **)**
|
|
|
|
.. _class_ShaderMaterial_method_property_get_revert:
|
|
|
|
- :ref:`Variant<class_Variant>` **property_get_revert** **(** :ref:`String<class_String>` name **)**
|
|
|
|
.. _class_ShaderMaterial_method_set_shader_param:
|
|
|
|
- void **set_shader_param** **(** :ref:`String<class_String>` param, :ref:`Variant<class_Variant>` value **)**
|
|
|
|
Changes the value set for this material of a uniform in the shader.
|
|
|