Inherits: Resource < Reference < Object

Inherited By: CanvasItemMaterial, ParticlesMaterial, ShaderMaterial, SpatialMaterial

Abstract base Resource for coloring and shading geometry.


Material is a base Resource used for coloring and shading geometry. All materials inherit from it and almost all VisualInstance derived nodes carry a Material. A few flags and parameters are shared between all material types and are configured here.


  • RENDER_PRIORITY_MAX = 127 — Maximum value for the render_priority parameter.
  • RENDER_PRIORITY_MIN = -128 — Minimum value for the render_priority parameter.

Property Descriptions


Sets the Material to be used for the next pass. This renders the object again using a different material.

Note: only applies to SpatialMaterials and ShaderMaterials with type “Spatial”.

  • int render_priority

Sets the render priority for transparent objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects.

Note: 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 sorted based on depth, while transparent objects are sorted from back to front (subject to priority).

doradoro's advice! Getters and Setters will be deprecated! Avoid their use!

Disclaimer: This page has been automaticaly and directly extracted from the official Godot Docs website, the 2020-03-07 at 01:34:32. It's the English Stable version because it's what most Godot users should use. The Copyright owners are Juan Linietsky, Ariel Manzur and the Godot community. CC-BY 3.0. Thanks for your patience and generosity.