2017-09-12 20:42:36 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-07-06 08:08:05 +00:00
<class name= "Material" inherits= "Resource" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2017-09-12 20:42:36 +00:00
<brief_description >
2023-06-24 11:19:58 +00:00
Abstract base class for applying visual properties to an object, such as color and roughness.
2017-09-12 20:42:36 +00:00
</brief_description>
<description >
2023-06-24 11:19:58 +00:00
[Material] is a base resource used for coloring and shading geometry. All materials inherit from it and almost all [VisualInstance3D] derived nodes carry a [Material]. A few flags and parameters are shared between all material types and are configured here.
2017-09-12 20:42:36 +00:00
</description>
<tutorials >
2020-10-01 08:34:47 +00:00
<link title= "3D Material Testers Demo" > https://godotengine.org/asset-library/asset/123</link>
<link title= "Third Person Shooter Demo" > https://godotengine.org/asset-library/asset/678</link>
2017-09-12 20:42:36 +00:00
</tutorials>
<methods >
2022-03-10 07:17:38 +00:00
<method name= "_can_do_next_pass" qualifiers= "virtual const" >
<return type= "bool" />
<description >
</description>
</method>
<method name= "_can_use_render_priority" qualifiers= "virtual const" >
<return type= "bool" />
<description >
</description>
</method>
<method name= "_get_shader_mode" qualifiers= "virtual const" >
<return type= "int" enum= "Shader.Mode" />
<description >
</description>
</method>
<method name= "_get_shader_rid" qualifiers= "virtual const" >
<return type= "RID" />
<description >
</description>
</method>
2022-12-20 21:49:11 +00:00
<method name= "create_placeholder" qualifiers= "const" >
<return type= "Resource" />
<description >
Creates a placeholder version of this resource ([PlaceholderMaterial]).
</description>
</method>
2021-01-28 10:26:37 +00:00
<method name= "inspect_native_shader_code" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2021-01-28 10:26:37 +00:00
<description >
</description>
</method>
2017-09-12 20:42:36 +00:00
</methods>
<members >
2019-07-15 18:42:47 +00:00
<member name= "next_pass" type= "Material" setter= "set_next_pass" getter= "get_next_pass" >
2020-01-21 00:28:03 +00:00
Sets the [Material] to be used for the next pass. This renders the object again using a different material.
2021-10-04 05:51:28 +00:00
[b]Note:[/b] This only applies to [StandardMaterial3D]s and [ShaderMaterial]s with type "Spatial".
2017-09-12 20:42:36 +00:00
</member>
2022-03-10 07:17:38 +00:00
<member name= "render_priority" type= "int" setter= "set_render_priority" getter= "get_render_priority" >
2020-01-21 00:28:03 +00:00
Sets the render priority for transparent objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects.
2021-10-04 05:51:28 +00:00
[b]Note:[/b] This only applies to [StandardMaterial3D]s and [ShaderMaterial]s with type "Spatial".
[b]Note:[/b] This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).
2017-09-12 20:42:36 +00:00
</member>
</members>
<constants >
2017-11-24 22:16:30 +00:00
<constant name= "RENDER_PRIORITY_MAX" value= "127" >
2019-06-27 09:10:53 +00:00
Maximum value for the [member render_priority] parameter.
2017-09-12 20:42:36 +00:00
</constant>
2017-11-24 22:16:30 +00:00
<constant name= "RENDER_PRIORITY_MIN" value= "-128" >
2019-06-27 09:10:53 +00:00
Minimum value for the [member render_priority] parameter.
2017-09-12 20:42:36 +00:00
</constant>
</constants>
</class>