Table of Contents

Class LightSpot

Namespace
Stride.Rendering.Lights
Assembly
Stride.Rendering.dll

A spot light.

[DataContract("LightSpot")]
[Display("Spot", null)]
public class LightSpot : DirectLightBase, IDirectLight, IColorLight, ILight
Inheritance
LightSpot
Implements
Inherited Members

Constructors

LightSpot()

Initializes a new instance of the LightSpot class.

public LightSpot()

Properties

AngleInner

Gets or sets the spot angle in degrees.

[DataMember(20)]
[DataMemberRange(0.01, 90, 1, 10, 1)]
public float AngleInner { get; set; }

Property Value

float

The spot angle in degrees.

AngleOuter

Gets or sets the spot angle in degrees.

[DataMember(30)]
[DataMemberRange(0.01, 90, 1, 10, 1)]
public float AngleOuter { get; set; }

Property Value

float

The spot angle in degrees.

AspectRatio

[DataMember(60)]
public float AspectRatio { get; set; }

Property Value

float

FlipMode

[DataMember(80)]
public LightSpot.FlipModeEnum FlipMode { get; set; }

Property Value

LightSpot.FlipModeEnum

HasBoundingBox

Gets a value indicating whether this instance has a bounding box.

public override bool HasBoundingBox { get; }

Property Value

bool

true if this instance has a bounding box; otherwise, false.

MipMapScale

Scales the mip map level in the shader. 0 = biggest mip map, 1 = smallest mip map.

[DataMember(50)]
[DataMemberRange(0, 1, 0.01, 0.1, 3)]
public float MipMapScale { get; set; }

Property Value

float

ProjectionPlaneDistance

[DataMember(75)]
public float ProjectionPlaneDistance { get; set; }

Property Value

float

ProjectiveTexture

The texture that is multiplied on top of the lighting result like a mask. Can be used like a cinema projector.

[DataMember(40)]
public Texture ProjectiveTexture { get; set; }

Property Value

Texture

Range

Gets or sets the range distance the light is affecting.

[DataMember(10)]
public float Range { get; set; }

Property Value

float

The range.

TransitionArea

[DataMember(70)]
[DataMemberRange(0, 1, 0.01, 0.1, 3)]
public float TransitionArea { get; set; }

Property Value

float

UVOffset

The offset in the texture coordinates.

[DataMember(45)]
[Display("UV offset", null)]
public Vector2 UVOffset { get; set; }

Property Value

Vector2

UVScale

The scale of the texture coordinates.

[DataMember(43)]
[Display("UV scale", null)]
public Vector2 UVScale { get; set; }

Property Value

Vector2

Methods

ComputeBounds(Vector3, Vector3)

Computes the bounds of this light..

public override BoundingBox ComputeBounds(Vector3 position, Vector3 direction)

Parameters

position Vector3

The position.

direction Vector3

The direction.

Returns

BoundingBox

BoundingBox.

ComputeScreenCoverage(RenderView, Vector3, Vector3)

Computes the screen coverage of this light in pixel.

public override float ComputeScreenCoverage(RenderView renderView, Vector3 position, Vector3 direction)

Parameters

renderView RenderView

The render view.

position Vector3

The position of the light in world space.

direction Vector3

The direction of the light in world space.

Returns

float

The largest screen coverage width or height size in pixels of this light.

Update(RenderLight)

public override bool Update(RenderLight light)

Parameters

light RenderLight

Returns

bool