Click or drag to resize
AB4D logo

StandardEffect Class

StandardEffect is an effect that can render the mesh geometry with the standard material. Standard material can define diffuse color and diffuse texture, specular color and power and emissive color.
Inheritance Hierarchy
SystemObject
  Ab3d.DirectXDXResourceBase
    Ab3d.DirectXSharedDXResource
      Ab3d.DirectXSharedDXDeviceResource
        Ab3d.DirectXEffect
          Ab3d.DirectX.EffectsStandardEffect

Namespace: Ab3d.DirectX.Effects
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.0.8865.1045
Syntax
C#
public class StandardEffect : Effect, 
	IMultiPassEffect

The StandardEffect type exposes the following members.

Constructors
 NameDescription
Public methodStandardEffect Constructor
Public methodStandardEffect(String) Constructor
Top
Properties
 NameDescription
Public propertyRequiredInputLayoutType Gets the input layout that is required to render this effect.
(Overrides EffectRequiredInputLayoutType)
Top
Methods
 NameDescription
Public methodApplyMaterial Applies the material and object's world matrix to this effect.
(Overrides EffectApplyMaterial(Material, RenderablePrimitiveBase))
Public methodApplyRenderingPass Sets the constant buffers and prepares all the shader states for rendering the specfied rendering pass. Before this method is called the OnApplyPerFrameSettings method must be called to set other frame settings.
Public methodGetDirectionalLightShader Returns and instance of DirectionalLightShader that is used by this StandardEffect. The method increases reference count on DirectionalLightShader. This means that the returned instance must be disposed when it is not used any more.
Public methodGetRequiredRenderingPassesCount Gets number of passes required to render this effect.
Public methodGetSuperShader Returns and instance of SuperShader that is used by this StandardEffect. The method increases reference count on SuperShader. This means that the returned instance must be disposed when it is not used any more.
Public methodStatic memberIsUsingPerPixelShader Returns true when per pixel shader should be used for specified shader quality.
Public methodIsUsingSuperShader(IListILight)Obsolete.
IsUsingSuperShader method return true if SuperShader is needed to render the specified lights. When false is returned than DirectionalLightShader can render the scene. This method also creates the needed shader (SuperShader or DirectionalLightShader) if is was not yet created.
Public methodIsUsingSuperShader(IListILight, DXScene) IsUsingSuperShader method return true if SuperShader is needed to render the specified lights. When false is returned than DirectionalLightShader can render the scene. This method also creates the needed shader (SuperShader or DirectionalLightShader) if is was not yet created.
Public methodPreloadShaders PreloadShaders can be called to load the shaders in advance before they are used. Calling this method increases the startup time, but when the 3D object needs to be shown, it is shown faster because all the shaders have already been created.
(Overrides EffectPreloadShaders)
Public methodResetRenderableGeometryMaterialFlagsValue When RenderableGeometry objects are rendered in the same order in each frame, the RenderableGeometry.MaterialFlags value specifies how similar the material is to the previous object (for example if diffuse part is the same, then many color checks can be skipped). But when the order of rendering is changed or if we start rendering from the middle of the RenderingQueue, then we need to reset the cached value for the first rendered RenderableGeometry so that all the checks are done again. This method does that.
Public methodSetCustomPerFrameConstantBuffers SetCustomPerFrameConstantBuffers sets custom perFrameCameraConstantsBuffer and perFrameLightsConstantBuffer. Note that the constant buffers need to be exactly the same as the DirectionalLightShader or SuperShader expects.
Top
Fields
 NameDescription
Public fieldStatic memberEffectName EffectName
Top
See Also