Click or drag to resize
Ab4d.SharpEngine logo

VolumeMaterial Class

VolumeMaterial can be used to render 3D object from a set of 2D slices (slices are stored in a SlicesTexture3D 3D texture). The values are converted into colors using a TransferFunctionTexture texture.
Inheritance Hierarchy
SystemObject
  Ab4d.SharpEngine.CoreComponentBase
    Ab4d.SharpEngine.CoreInitializedSceneComponent
      Ab4d.SharpEngine.MaterialsMaterial
        Ab4d.SharpEngine.MaterialsVolumeMaterial

Namespace: Ab4d.SharpEngine.Materials
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.2.9386+3a404a3e1ebfa4efd231da7fe6f10dfb23b95dc4
Syntax
C#
public class VolumeMaterial : Material, 
	ITransparentMaterial

The VolumeMaterial type exposes the following members.

Constructors
 NameDescription
Public methodVolumeMaterial Constructor
Top
Properties
 NameDescription
Public propertyGradientFactor Gets or sets a float value that is passed to the fragment shader where it is multiplied by the calculated gradient value (it represents how much the value from the 3D texture changes between neighbor voxels). When set to 0, then the gradient value is not calculated. This slightly improves the performance because fewer values are read from the 3D texture. Default value is 1f.
Public propertyHasTransparency Gets a boolean that specifies if this material is semi-transparent and needs to be alpha blended with the scene.
Public propertySlicesTexture3D Gets or sets a GpuImage that represents a 3D texture (GpuImage's Depth is more than 1) with slice data values.
Public propertyTransferFunctionTexture Gets or sets a GpuImage that represents a texture that is used to convert the slice values from the SlicesTexture3D to color (Color4) values. This texture can be one-dimensional (horizontal) or two-dimensional texture. In both cases the x position (u) represents the slice value. When using two-dimensional texture the y position (v) represent the gradient value (when GradientFactor > 0) or slice index (when GradientFactor is 0).
Public propertyValueClipThreshold Pixels with the value from the 3D texture below this value will be clipped (not rendered and their depth will not be written to depth buffer). When set to 0, then clipping is disabled. Default value is 0.01f.
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
Remarks

[Missing <remarks> documentation for "T:Ab4d.SharpEngine.Materials.VolumeMaterial"]

See Also