reckfellENGINE

Material

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

On this page
class MaterialReckfellSharpInherits Resource

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

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 ReckfellExtension.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

MaterialConstructor
# Material
C#
public Material();

Properties2

NextPassProperty
# NextPass
C#
public Material NextPass { get; set; }

Sets the Material to be used for the next pass. This renders the object again using a different material. Note: Material.NextPass materials are not necessarily drawn immediately after the source Material. Draw order is determined by material properties, Material.RenderPriority, and distance to camera. Note: This only applies to StandardMaterial3Ds and ShaderMaterials with type "Spatial".

RenderPriorityProperty
# RenderPriority
C#
public int RenderPriority { get; set; }

Material sorting priority within a pass that supports it. The example’s camera-attached quad uses 127 for late drawing of its screen/depth-reading material. Priority does not change the screen/depth capture stage, recapture it between every material or turn it into a final frame containing all UI.

Methods10

CreatePlaceholderResource
# CreatePlaceholder
C#
public Resource CreatePlaceholder();

Creates a placeholder version of this resource (PlaceholderMaterial).

Returns Resource
GetNextPassMaterial
# GetNextPass
C#
public Material GetNextPass();
Returns Material
GetRenderPriorityint
# GetRenderPriority
C#
public int GetRenderPriority();
Returns int
InspectNativeShaderCodevoid
# InspectNativeShaderCode
C#
public void InspectNativeShaderCode();

Only available when running in the editor. Opens a popup that visualizes the generated shader code, including all variants and internal shader code. See also Shader.InspectNativeShaderCode.

SetNextPassvoid
# SetNextPass
C#
public void SetNextPass(Material nextPass);
Parameters
NameTypeDefault
nextPassMaterial—
SetRenderPriorityvoid
# SetRenderPriority
C#
public void SetRenderPriority(int priority);
Parameters
NameTypeDefault
priorityint—
_CanDoNextPassbool
# _CanDoNextPass
C#
public virtual bool _CanDoNextPass();

Only exposed for the purpose of overriding. You cannot call this function directly. Used internally to determine if Material.NextPass should be shown in the editor or not.

Returns bool
_CanUseRenderPrioritybool
# _CanUseRenderPriority
C#
public virtual bool _CanUseRenderPriority();

Only exposed for the purpose of overriding. You cannot call this function directly. Used internally to determine if Material.RenderPriority should be shown in the editor or not.

Returns bool
_GetShaderModeShader.Mode
# _GetShaderMode
C#
public virtual Shader.Mode _GetShaderMode();

Only exposed for the purpose of overriding. You cannot call this function directly. Used internally by various editor tools.

Returns Shader.Mode
_GetShaderRidRid
# _GetShaderRid
C#
public virtual Rid _GetShaderRid();

Only exposed for the purpose of overriding. You cannot call this function directly. Used internally by various editor tools. Used to access the RID of the Material's Shader.

Returns Rid

Fields and constants2

RenderPriorityMaxField
# RenderPriorityMax
C#
public const long RenderPriorityMax = 127;

Maximum value for the Material.RenderPriority parameter.

RenderPriorityMinField
# RenderPriorityMin
C#
public const long RenderPriorityMin = -128;

Minimum value for the Material.RenderPriority parameter.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.