Click or drag to resize
AB4D logo

PlanarShadowRenderingProvider Properties

The PlanarShadowRenderingProvider type exposes the following members.

Properties
 NameDescription
Public propertyApplyShadowMatrix Gets or sets a Boolean that specifies if a shadow matrix is applied to the rendered 3D objects. By default this property is set to true, but when rendering custom shadow objects (defined in a custom RenderingQueue) that already have shadow matrix applied, then this property should be set to false.
Public propertyCustomShadowLight When CustomShadowLight is set, then it is used as a light that generates the shadow instead of a light from a 3D scene. This way it is possible to generate a shadow from a light that does not illuminate the scene. The only possible types of lights that can be assigned to this property are PointLight and DirectionalLight. It is also possible to use a custom light with overriding the CalculateShadowMatrix method.
Public propertyCutShadowToPlaneBounds Gets or sets a boolean that specifies if shadow is clipped to the shadow plane's bounds. When true then stencil buffer is used to render only the the part where the plane is rendered; when false the mesh need to be clipped on the CPU (for example with using PlanarShadowMeshCreator from Ab3d.PowerToys).
Public propertyDepthStencilFormat Gets or sets format of depth stencil buffer that is set by this PlanarShadowRenderingProvider. Possible values are D32_Float_S8X24_UInt (default) and D24_UNorm_S8_UInt. When changed the change need to be done before initializing the PlanarShadowRenderingProvider.
Public propertyFilterRenderingQueuesFunction Gets or sets a filter function that can be used to filter RenderingQueue that will be rendered (returning false for RenderingQueue that are not rendered). This property can be set to render only shadow objects that are defined in a custom RenderingQueue or to prevent rendering transparent objects.
Public propertyIsCheckingIsCastingShadow Gets or sets a Boolean that specifies if PlanarShadowRenderingProvider is checking if object has IsCastingShadow property set. That check can slightly decrease performance therefore the default value is false.
Public propertyShadowColor Gets or sets a color that is used to render shadow. Default value is Black. See also ShadowTransparency that defines the transparency of the shadow.
Public propertyShadowOffsetFromPlane Gets or sets a float number that specifies the distance of the shadow "objects" from the plane. This distance needs to be specified to prevent z-fighting artifacts that would occur is plane and shows objects are rendered to the same 3D positions. Default value is 0.01f.
Public propertyShadowPlaneBackMaterial Gets or sets a DirectX Material that is used to render the back (bottom) side of the shadow plane.
Public propertyShadowPlaneCenterPosition Gets or sets a Vector3 that specifies the center position of the shadow plane. Default value is (0, 0, 0).
Public propertyShadowPlaneHeightDirection Gets or sets a Vector3 that specifies the direction of the height (in the plane's size). Default value is (0, 0, -1).
Public propertyShadowPlaneMaterial Gets or sets a DirectX Material that is used to render the front (top) side of the shadow plane.
Public propertyShadowPlaneNormalVector Gets or sets a Vector3 that specifies the normal vector of the shadow plane. Default value is (0, 1, 0).
Public propertyShadowPlaneRenderingQueue Gets a RenderingQueue that is used to render shadow plane. If you are rendering your own shadow plane, then use this RenderingQueue.
Public propertyShadowPlaneSize Gets or sets a Vector2 that specifies the size of the shadow plane. When size is set to (0, 0), then the shadow plane is not rendered and also the shadow is not cut to shadow plane.
Public propertyShadowTransparency Gets or sets a float value that defines the transparency of the shadow (1 means no transparency; 0 means full transparency; default value is 0.65f).
Top
See Also