Click or drag to resize
Ab4d.SharpEngine logo

DepthOnlyMaterial Class

DepthOnlyMaterial can be used to render only depth values into the depth buffers (used for depth pre-pass) and does not execute any fragment shader. It is using DepthOnlyEffect. The material can be used on scene nodes that are derived from ModelNode and are using StandardMesh (or TriangleMesh<PositionNormalTextureVertex>) or optimized TriangleMesh<Vector3> mesh.
Inheritance Hierarchy

Namespace: Ab4d.SharpEngine.Materials
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntax
C#
public class DepthOnlyMaterial : Material, 
	ITwoSidedMaterial

The DepthOnlyMaterial type exposes the following members.

Constructors
 NameDescription
Public methodDepthOnlyMaterialInitializes a new instance of the DepthOnlyMaterial class
Top
Properties
 NameDescription
Public propertyIsTwoSided Gets or sets a Boolean that specifies if the material should be rendered on both front and back side. Note that when rendering semi-transparent objects and when alpha clipping is not used, it is better to set BackMaterial to the same material as Material instead of setting IsTwoSided to true because this correctly rendered the back side before the front side.
Top
Methods
 NameDescription
Protected methodOnInitializeSceneResources Initializes resources with the specified Scene and GpuDevice. This method can be overriden and is called from InitializeSceneResources(Scene) method.
(Overrides MaterialOnInitializeSceneResources(Scene, VulkanDevice))
Top
See Also