Table of Contents

Class MaterialRenderFeature

Namespace
Stride.Rendering.Materials
Assembly
Stride.Rendering.dll

Handles material by permuting shaders and uploading material data.

public class MaterialRenderFeature : SubRenderFeature, IComponent, IReferencable, ICollectorHolder, IGraphicsRendererCore, IDisposable
Inheritance
MaterialRenderFeature
Implements
Inherited Members
Extension Methods

Methods

Draw(RenderDrawContext, RenderView, RenderViewStage, int, int)

Performs GPU updates and/or draw.

public override void Draw(RenderDrawContext context, RenderView renderView, RenderViewStage renderViewStage, int startIndex, int endIndex)

Parameters

context RenderDrawContext
renderView RenderView
renderViewStage RenderViewStage
startIndex int
endIndex int

InitializeCore()

Initializes this instance. Query for specific cbuffer (either new one, like PerMaterial, or parts of an existing one, like PerObject=>Skinning)

protected override void InitializeCore()

Prepare(RenderDrawContext)

Performs most of the work (computation and resource preparation). Later game simulation might be running during that step.

public override void Prepare(RenderDrawContext context)

Parameters

context RenderDrawContext

PrepareEffectPermutations(RenderDrawContext)

Perform effect permutations, before Prepare(RenderDrawContext).

public override void PrepareEffectPermutations(RenderDrawContext context)

Parameters

context RenderDrawContext

UpdateMaterial(RenderSystem, RenderDrawContext, MaterialInfoBase, int, RenderEffect, ParameterCollection)

public static bool UpdateMaterial(RenderSystem renderSystem, RenderDrawContext context, MaterialRenderFeature.MaterialInfoBase materialInfo, int materialSlotIndex, RenderEffect renderEffect, ParameterCollection materialParameters)

Parameters

renderSystem RenderSystem
context RenderDrawContext
materialInfo MaterialRenderFeature.MaterialInfoBase
materialSlotIndex int
renderEffect RenderEffect
materialParameters ParameterCollection

Returns

bool