Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

Material

Inherits: Resource < RefCounted < Object

Inherited By: BaseMaterial3D, CanvasItemMaterial, FogMaterial, PanoramaSkyMaterial, ParticleProcessMaterial, PhysicalSkyMaterial, PlaceholderMaterial, ProceduralSkyMaterial, ShaderMaterial

Virtual base class for applying visual properties to an object, such as color and roughness.

Description

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.

Importantly, you can inherit from Material to create your own custom material type in script or in GDExtension.

Tutorials

Properties

Material

next_pass

int

render_priority

Methods

bool

_can_do_next_pass ( ) virtual const

bool

_can_use_render_priority ( ) virtual const

Mode

_get_shader_mode ( ) virtual const

RID

_get_shader_rid ( ) virtual const

Resource

create_placeholder ( ) const

void