mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 06:11:29 +03:00
Added material_overlay property to MeshInstance
Applying overlay materials into multi-surface meshes currently requires adding a next pass material to all the surfaces, which might be cumbersome when the material is to be applied to a range of different geometries. This also makes it not trivial to use AnimationPlayer to control the material in case of visual effects. The material_override property is not an option as it works replacing the active material for the surfaces, not adding a new pass. This commit adds the material_overlay property to GeometryInstance (and therefore MeshInstance), having the same reach as material_override (that is, all surfaces) but adding a new material pass on top of the active materials, instead of replacing them. Implemented in rasterizer of both GLES2 and GLES3.
This commit is contained in:
@@ -1374,6 +1374,14 @@
|
||||
Sets the flag for a given [enum InstanceFlags]. See [enum InstanceFlags] for more details.
|
||||
</description>
|
||||
</method>
|
||||
<method name="instance_geometry_set_material_overlay">
|
||||
<return type="void" />
|
||||
<argument index="0" name="instance" type="RID" />
|
||||
<argument index="1" name="material" type="RID" />
|
||||
<description>
|
||||
Sets a material that will be rendered for all surfaces on top of active materials for the mesh associated with this instance. Equivalent to [member GeometryInstance.material_overlay].
|
||||
</description>
|
||||
</method>
|
||||
<method name="instance_geometry_set_material_override">
|
||||
<return type="void" />
|
||||
<argument index="0" name="instance" type="RID" />
|
||||
|
||||
Reference in New Issue
Block a user