MaterialRenderFeature Class
Namespace: Stride.Rendering.MaterialsAssembly: Stride.Rendering.dll
Handles material by permuting shaders and uploading material data.
public class MaterialRenderFeature : SubRenderFeature, IComponent, IReferencable, ICollectorHolder, IGraphicsRendererCore, IDisposable
Name | Description | |
---|---|---|
Methods | ||
Draw(RenderDrawContext, RenderView, RenderViewStage, Int32, Int32) | ||
InitializeCore() | Initializes this instance. Query for specific cbuffer (either new one, like PerMaterial, or parts of an existing one, like PerObject=>Skinning) |
|
Prepare(RenderDrawContext) | Performs most of the work (computation and resource preparation). Later game simulation might be running during that step. |
|
PrepareEffectPermutations(RenderDrawContext) | Perform effect permutations, before Prepare(RenderDrawContext). |
|
UpdateMaterial(RenderSystem, RenderDrawContext, MaterialRenderFeature.MaterialInfoBase, Int32, RenderEffect, ParameterCollection) |
Methods
Draw(RenderDrawContext, RenderView, RenderViewStage, Int32, Int32)
public override void Draw(RenderDrawContext context, RenderView renderView, RenderViewStage renderViewStage, int startIndex, int endIndex)
Parameters
Type | Name | Description |
---|---|---|
RenderDrawContext | context | |
RenderView | renderView | |
RenderViewStage | renderViewStage | |
System.Int32 | startIndex | |
System.Int32 | endIndex |
Overrides
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()
Overrides
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
Type | Name | Description |
---|---|---|
RenderDrawContext | context |
Overrides
PrepareEffectPermutations(RenderDrawContext)
Perform effect permutations, before Prepare(RenderDrawContext).
public override void PrepareEffectPermutations(RenderDrawContext context)
Parameters
Type | Name | Description |
---|---|---|
RenderDrawContext | context |
Overrides
UpdateMaterial(RenderSystem, RenderDrawContext, MaterialRenderFeature.MaterialInfoBase, Int32, RenderEffect, ParameterCollection)
public static bool UpdateMaterial(RenderSystem renderSystem, RenderDrawContext context, MaterialRenderFeature.MaterialInfoBase materialInfo, int materialSlotIndex, RenderEffect renderEffect, ParameterCollection materialParameters)
Parameters
Type | Name | Description |
---|---|---|
RenderSystem | renderSystem | |
RenderDrawContext | context | |
MaterialRenderFeature.MaterialInfoBase | materialInfo | |
System.Int32 | materialSlotIndex | |
RenderEffect | renderEffect | |
ParameterCollection | materialParameters |
Returns
Type | Description |
---|---|
System.Boolean |