Skip to content

Material

Eduard Gushchin edited this page Jul 1, 2026 · 5 revisions

Home | API by Category | Complete API Index | API Compatibility

Field Value
Full name Electron2D.Material
Namespace Electron2D
Kind class
Category Rendering

Overview

Provides the Electron2D base resource for visual materials.

Syntax

public abstract class Electron2D.Material : Electron2D.Resource

Godot 4.7 C# profile compatibility

Profile: Electron2D 0.1.0 2D
Status: Partial / Not verified
Out of profile: yes
Godot reference: Material

Base visual material resource with NextPass and RenderPriority storage for future renderer ordering.

Remarks

Material is the common base for resources that describe how geometry is colored or shaded. Electron2D 0.1.0 Preview uses it as the inheritance base for Electron2D.ShaderMaterial.

The current 2D renderer stores Electron2D.Material.NextPass and Electron2D.Material.RenderPriority for API parity, but the draw pipeline does not yet execute additional material passes.

Thread Safety

This type is not synchronized. Mutate material state on the main thread or from a single import/tooling worker.

Since

This type is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.ShaderMaterial

Members

Member Kind Summary
NextPass Property Gets or sets the material used for the next rendering pass.
RenderPriority Property Gets or sets the material render priority.
Electron2D.Material() Constructor Initializes a new instance of the Material type.

Member Details

NextPass

Kind: Property

public Electron2D.Material NextPass { get; set; }

Summary

Gets or sets the material used for the next rendering pass.

Remarks

Electron2D 0.1.0 Preview stores this value so resource data can round trip through tooling. Rendering extra passes is part of a later renderer task.

Value

The current next pass value.

Thread Safety

This property is not synchronized. Mutate it on the main thread or from a single import/tooling worker.

Since

This property is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Material

RenderPriority

Kind: Property

public System.Int32 RenderPriority { get; set; }

Summary

Gets or sets the material render priority.

Remarks

The valid range matches Electron2D's material priority range: -128 through 127. The value is stored for future renderer ordering; current 2D queue ordering is still driven by canvas item state.

Value

The current render priority value.

Exceptions

  • System.ArgumentOutOfRangeException: Thrown when the value is outside the supported range.

Thread Safety

This property is not synchronized. Mutate it on the main thread or from a single import/tooling worker.

Since

This property is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Material

Electron2D.Material()

Kind: Constructor

public Electron2D.Material()

Summary

Initializes a new instance of the Material type.

Remarks

The new instance follows the lifetime and validation rules of its declaring type.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Material

Clone this wiki locally