LineParameters

Description

sealed class Tinman.Engine.Rendering.Effects.Shared.LineParameters

Shared render effect parameters for thick lines.

The following low-level render effect parameter slots are defined iff ILineFeatureLevels.FeatureLevel is LineFeatureLevel.DX10 or higher:

Public / Constants

Changed​Line​Thickness


public constant ChangedLineThickness → (1:int64)

Changed flag for LineThickness.

Public / Constructors

Line​Parameters


public constructor LineParameters → (1)

featureLevel in : LineFeatureLevel

The required feature level.

Creates a new instance of LineParameters.

Public / Methods

Compute​Line​Thickness


[Pure]
public static method ComputeLineThickness → (3)

thickness in : float32

The line thickness, in pixels.

width in : int32

The viewport width, in pixels.

height in : int32

The viewport height, in pixels.

returns → Vec3F

The line thickness coefficients.

Computes the line thickness coefficients.

Public / Attributes

Line​Thickness


public attribute LineThickness → (get,set)

value : Vec3F

The line thickness coefficients:
Vec3F.X: (thickness + 1) / width
Vec3F.Y: (thickness + 1) / height
Vec3F.Z: (thickness + 1) / (thickness - 1) - 1
where thickness is the line thickness in pixels, width is the viewport width in pixels and height is the viewport height in pixels. To obtain thickness from Vec3F.Z, use this formula: thickness = 2 / Z + 1.
Set to Vec3F.Zero when rendering of thick lines is disabled.

Coefficients for rendering thick lines.

Defaults to Vec3F.Zero.