.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _class_FixedMaterial: FixedMaterial ============= **Inherits:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` **Category:** Core Brief Description ----------------- Simple Material with a fixed parameter set. Member Functions ---------------- +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_fixed_flag` **(** :ref:`int` flag **)** const | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_light_shader` **(** **)** const | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`get_parameter` **(** :ref:`int` param **)** const | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_point_size` **(** **)** const | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_texcoord_mode` **(** :ref:`int` param **)** const | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture` | :ref:`get_texture` **(** :ref:`int` param **)** const | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform` | :ref:`get_uv_transform` **(** **)** const | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_fixed_flag` **(** :ref:`int` flag, :ref:`bool` value **)** | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_light_shader` **(** :ref:`int` shader **)** | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_parameter` **(** :ref:`int` param, :ref:`Variant` value **)** | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_point_size` **(** :ref:`float` size **)** | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_texcoord_mode` **(** :ref:`int` param, :ref:`int` mode **)** | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_texture` **(** :ref:`int` param, :ref:`Texture` texture **)** | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_uv_transform` **(** :ref:`Transform` transform **)** | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ Numeric Constants ----------------- - **PARAM_DIFFUSE** = **0** --- Diffuse Lighting (light scattered from surface). - **PARAM_DETAIL** = **1** --- Detail Layer for diffuse lighting. - **PARAM_SPECULAR** = **2** --- Specular Lighting (light reflected from the surface). - **PARAM_EMISSION** = **3** --- Emission Lighting (light emitted from the surface). - **PARAM_SPECULAR_EXP** = **4** --- Specular Exponent (size of the specular dot). - **PARAM_GLOW** = **5** --- Glow (Visible emitted scattered light). - **PARAM_NORMAL** = **6** --- Normal Map (irregularity map). - **PARAM_SHADE_PARAM** = **7** - **PARAM_MAX** = **8** --- Maximum amount of parameters. - **TEXCOORD_UV** = **0** --- Read texture coordinates from the UV array. - **TEXCOORD_UV_TRANSFORM** = **1** --- Read texture coordinates from the UV array and transform them by uv_xform. - **TEXCOORD_UV2** = **2** --- Read texture coordinates from the UV2 array. - **TEXCOORD_SPHERE** = **3** - **FLAG_USE_ALPHA** = **0** - **FLAG_USE_COLOR_ARRAY** = **1** - **FLAG_USE_POINT_SIZE** = **2** - **FLAG_DISCARD_ALPHA** = **3** - **LIGHT_SHADER_LAMBERT** = **0** - **LIGHT_SHADER_WRAP** = **1** - **LIGHT_SHADER_VELVET** = **2** - **LIGHT_SHADER_TOON** = **3** Description ----------- FixedMaterial is a simple type of material :ref:`Resource`, which contains a fixed amount of parameters. It is the only type of material supported in fixed-pipeline devices and APIs. It is also an often a better alternative to :ref:`ShaderMaterial` for most simple use cases. Member Function Description --------------------------- .. _class_FixedMaterial_get_fixed_flag: - :ref:`bool` **get_fixed_flag** **(** :ref:`int` flag **)** const .. _class_FixedMaterial_get_light_shader: - :ref:`int` **get_light_shader** **(** **)** const .. _class_FixedMaterial_get_parameter: - void **get_parameter** **(** :ref:`int` param **)** const Return a parameter, parameters are defined in the PARAM\_\* enum. The type of each parameter may change, so it's best to check the enum. .. _class_FixedMaterial_get_point_size: - :ref:`float` **get_point_size** **(** **)** const .. _class_FixedMaterial_get_texcoord_mode: - :ref:`int` **get_texcoord_mode** **(** :ref:`int` param **)** const Return the texture coordinate mode. Each texture param (from the PARAM\_\* enum) has one. It defines how the textures are mapped to the object. .. _class_FixedMaterial_get_texture: - :ref:`Texture` **get_texture** **(** :ref:`int` param **)** const Return a texture. Textures change parameters per texel and are mapped to the model depending on the texcoord mode (see :ref:`set_texcoord_mode`). .. _class_FixedMaterial_get_uv_transform: - :ref:`Transform` **get_uv_transform** **(** **)** const Returns the special transform used to post-transform UV coordinates of the uv_xform texcoord mode: TEXCOORD_UV_TRANSFORM. .. _class_FixedMaterial_set_fixed_flag: - void **set_fixed_flag** **(** :ref:`int` flag, :ref:`bool` value **)** .. _class_FixedMaterial_set_light_shader: - void **set_light_shader** **(** :ref:`int` shader **)** .. _class_FixedMaterial_set_parameter: - void **set_parameter** **(** :ref:`int` param, :ref:`Variant` value **)** Set a parameter, parameters are defined in the PARAM\_\* enum. The type of each parameter may change, so it's best to check the enum. .. _class_FixedMaterial_set_point_size: - void **set_point_size** **(** :ref:`float` size **)** .. _class_FixedMaterial_set_texcoord_mode: - void **set_texcoord_mode** **(** :ref:`int` param, :ref:`int` mode **)** Set the texture coordinate mode. Each texture param (from the PARAM\_\* enum) has one. It defines how the textures are mapped to the object. .. _class_FixedMaterial_set_texture: - void **set_texture** **(** :ref:`int` param, :ref:`Texture` texture **)** Set a texture. Textures change parameters per texel and are mapped to the model depending on the texcoord mode (see :ref:`set_texcoord_mode`). .. _class_FixedMaterial_set_uv_transform: - void **set_uv_transform** **(** :ref:`Transform` transform **)** Sets a special transform used to post-transform UV coordinates of the uv_xform texcoord mode: TEXCOORD_UV_TRANSFORM.