> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/godotengine/godot/llms.txt
> Use this file to discover all available pages before exploring further.

# Material

# 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

<ResponseField name="render_priority" type="int">
  Sets the render priority for objects in 3D scenes. Higher priority objects will be sorted in front.
</ResponseField>

<ResponseField name="next_pass" type="Material">
  Sets the Material to be used for the next pass.
</ResponseField>

## Methods

### inspect\_native\_shader\_code

```gdscript theme={null}
void inspect_native_shader_code()
```

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

### create\_placeholder

```gdscript theme={null}
Resource 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

<Tabs>
  <Tab title="GDScript">
    ```gdscript theme={null}
    var material = StandardMaterial3D.new()
    material.albedo_color = Color.RED
    material.render_priority = 1

    # Apply to a mesh
    var mesh_instance = MeshInstance3D.new()
    mesh_instance.material_override = material
    ```
  </Tab>

  <Tab title="C#">
    ```csharp theme={null}
    var material = new StandardMaterial3D();
    material.AlbedoColor = Colors.Red;
    material.RenderPriority = 1;
    ```
  </Tab>
</Tabs>
