Click or drag to resize
AB4D logo

SuperShadowShaderEffectApplyMaterial Method

Applies the material and object's world matrix to this effect.

Namespace: Ab3d.DirectX
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.0.8865.1045
Syntax
C#
public override void ApplyMaterial(
	Material material,
	RenderablePrimitiveBase renderableGeometry
)

Parameters

material  Material
Material
renderableGeometry  RenderablePrimitiveBase
object that the material is applied for (usually RenderablePrimitive).
Remarks

ApplyMaterial applies the material and object's world matrix to this effect.

Usually effects define two constant buffers:
- one that is can be changed only once per frame and contains data about lights,
- one that is different for each material and object.

The first constant buffer is set by calling ApplyPerFrameSettings(ICamera, IListILight, RenderingContext) method.

The second constant buffer can be set by calling ApplyMaterial(Material, RenderablePrimitiveBase) method. This sets properties defined in Material. It also sets projection matrices like world_view_projection and others. The device states (blend state, rasterizer state, etc.) are also set there.

See Also