Skip to main content

Material

Inherits: Resource < RefCounted < Object

Description

Virtual base class for applying visual properties to an object, such as color and roughness. All materials inherit from it.

Properties

int
Sets the render priority for objects in 3D scenes. Higher priority objects will be sorted in front.
Material
Sets the Material to be used for the next pass.

Methods

inspect_native_shader_code

Opens a popup that visualizes the generated shader code. Only available in editor.

create_placeholder

Creates a placeholder version of this resource.

Constants

  • RENDER_PRIORITY_MAX = 127 - Maximum value for render_priority
  • RENDER_PRIORITY_MIN = -128 - Minimum value for render_priority

Example Usage