Instanced |
The InstancedMeshNode type exposes the following members.
Name | Description | |
---|---|---|
DXMesh | Gets a MeshBase that is used to create this InstancedMeshNode. | |
InstancesCount | Gets or sets number of rendered instances. This value is automatically set from the SetInstanceData method to the length of the InstancesData array. But user can change the value to render just part of the instances. When the value is changed it is recommended to set the MeshIndexBufferDataChanged and BoundsChanged flags with calling NotifySceneNodeChange(SceneNodeSceneNodeDirtyFlags) method. | |
IsBackFaceMaterial | Gets or sets a Boolean that specifies if front faces (true) or back faces (false) are rendered. | |
IsCastingShadow | Gets or sets a Boolean that specifies if this SceneNode is casing shadow. This means that if IsCastingShadow is true, then 3D objects rendered with this SceneNode will create shadow; if false shadow will not be created. This works for VarianceShadowRenderingProvider and PlanarShadowRenderingProvider but not for ScreenSpaceAmbientOcclusionRenderingProvider. | |
IsPreMultipliedAlphaColor | When IsPreMultipliedAlphaColor is true (false by default) and Alpha is less then 1, then the instance colors components are already multiplied with alpha value to produce pre-multiplied colors. When false, then non-pre-multiplied color is converted in pre-multiplied color when this is required by the shader. | |
IsSolidColorMaterial | Gets or sets a Boolean that specifies if instanced objects are rendered with a solid color (without any shading based on lighting calculations). Default value is false. | |
IsUpdatingBounds | Gets or sets a Boolean that specifies if this SceneNode3D is automatically updating its Bounds value. Default value is true. | |
OverrideEffect | Gets or sets a DXEngine's Effect that is used to render this object. When OverrideEffect is null, the InstancedObjectsEffect is used. | |
StartInstanceIndex | StartInstanceIndex can be set to an index that will render only instances from the specified start index on. When the value is changed it is recommended to set the MeshIndexBufferDataChanged and BoundsChanged flags with calling NotifySceneNodeChange(SceneNodeSceneNodeDirtyFlags) method. | |
TextureAlphaClipThreshold | TextureAlphaClipThreshold can be set when TextureShaderResourceView is set. When its value is above 0 then pixels in texture with alpha color values below this value will be clipped (not rendered and their depth will not be written to depth buffer). Expected values are between 0 and 1. When 0 (by default) then alpha clipping is disabled - this means that also pixels with alpha value 0 are fully processed (they are not visible but its depth value is still written so objects that are rendered afterwards and are behind the pixel will not be visible). | |
TextureBlendState | Gets or sets a BlendState that is used to render the texture. If null then Opaque or PremultipliedAlphaBlend (for transparent materials) will be used. | |
TextureShaderResourceView | When TextureShaderResourceView is set to a ShaderResourceView, then this texture is used for all instances of the mesh. | |
UseAlphaBlend | Gets or sets a Boolean that specifies if alpha blending is used when rendering model instances. This can be used to render semi-transparent objects. Default value is false. This property is used only when instance color is used (not when UseSingleObjectColor(Color4) is called). | |
UseDynamicInstanceBuffer | Gets or sets a Boolean that specifies if dynamic instance buffer is created instead of immutable instance buffer. Dynamic instance buffer has better performance when instance data is changed often. On the other side the immutable buffer is better when the instance data is not changed or changed only a few times. Default value is false - use immutable buffer. | |
UseInstanceIdColor | When true (false by default) then the color of each instance is defined by the id (index) of each instance. | |
UseScreenSpaceScaling | When true (false by default) then each instance is scaled in the shader so that the value specified in matrix's M11 defines the size of the rendered object on screen (when the size of the mesh is 1). |