Table of Contents

Class LuminanceEffect

Namespace
Stride.Rendering.Images
Assembly
Stride.Rendering.dll

Luminance effect.

public class LuminanceEffect : ImageEffect, IComponent, IReferencable, ICollectorHolder, IImageEffect, IGraphicsRenderer, IGraphicsRendererBase, IGraphicsRendererCore, IDisposable
Inheritance
LuminanceEffect
Implements
Inherited Members
Extension Methods

Constructors

LuminanceEffect()

Initializes a new instance of the LuminanceEffect class.

public LuminanceEffect()

Fields

LuminanceResult

public static readonly ObjectParameterKey<LuminanceResult> LuminanceResult

Field Value

ObjectParameterKey<LuminanceResult>

Properties

AverageLuminance

Gets the average luminance calculated on the GPU. See remarks.

public float AverageLuminance { get; }

Property Value

float

The average luminance.

Remarks

The average luminance is calculated on the GPU and readback with a few frames of delay, depending on the number of frames in advance between command scheduling and actual execution on GPU.

AverageLuminanceTexture

Gets the average luminance 1x1 texture available after drawing this effect.

public Texture AverageLuminanceTexture { get; }

Property Value

Texture

The average luminance texture.

DownscaleCount

Gets or sets down scale count used to downscale the input intermediate texture used for local luminance (if no output is given). By default 1/64 of the input texture size.

public int DownscaleCount { get; set; }

Property Value

int

Down scale count.

EnableAverageLuminanceReadback

Gets or sets a value indicating whether to enable calculation of AverageLuminance (default is true).

public bool EnableAverageLuminanceReadback { get; set; }

Property Value

bool

true if to enable calculation of AverageLuminance; otherwise, false.

EnableLocalLuminanceCalculation

Indicated if the local luminance should be rendered to the output texture.

public bool EnableLocalLuminanceCalculation { get; set; }

Property Value

bool

LuminanceFormat

Luminance texture format.

public PixelFormat LuminanceFormat { get; set; }

Property Value

PixelFormat

LuminanceLogEffect

Luminance log effect.

public ImageEffectShader LuminanceLogEffect { get; set; }

Property Value

ImageEffectShader

UpscaleCount

Gets or sets the upscale count used to upscale the downscaled input local luminance texture. By default x16 of the input texture size.

public int UpscaleCount { get; set; }

Property Value

int

The upscale count.

Methods

DrawCore(RenderDrawContext)

Main drawing method for this renderer that must be implemented.

protected override void DrawCore(RenderDrawContext context)

Parameters

context RenderDrawContext

The context.

InitializeCore()

protected override void InitializeCore()

Reset()

Resets the state of this effect.

public override void Reset()