LuminanceEffect Class
Namespace: Stride.Rendering.ImagesAssembly: Stride.Rendering.dll
Luminance effect.
public class LuminanceEffect : ImageEffect, IComponent, IReferencable, ICollectorHolder, IImageEffect, IGraphicsRenderer, IGraphicsRendererBase, IGraphicsRendererCore, IDisposable
| Name | Description | |
|---|---|---|
| Constructors | ||
| LuminanceEffect() | Initializes a new instance of the LuminanceEffect class. |
|
| Fields | ||
| LuminanceResult | ||
| Properties | ||
| AverageLuminance | Gets the average luminance calculated on the GPU. See remarks. |
|
| AverageLuminanceTexture | Gets the average luminance 1x1 texture available after drawing this effect. |
|
| 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. |
|
| EnableAverageLuminanceReadback | Gets or sets a value indicating whether to enable calculation of AverageLuminance (default is true). |
|
| EnableLocalLuminanceCalculation | Indicated if the local luminance should be rendered to the output texture. |
|
| LuminanceFormat | Luminance texture format. |
|
| LuminanceLogEffect | Luminance log effect. |
|
| UpscaleCount | Gets or sets the upscale count used to upscale the downscaled input local luminance texture. By default x16 of the input texture size. |
|
| Methods | ||
| DrawCore(RenderDrawContext) | ||
| InitializeCore() | ||
| Reset() | ||
Constructors
LuminanceEffect()
Initializes a new instance of the LuminanceEffect class.
public LuminanceEffect()
Fields
LuminanceResult
public static readonly ObjectParameterKey<LuminanceResult> LuminanceResult
Field Value
| Type | Description |
|---|---|
| ObjectParameterKey<LuminanceResult> |
Properties
AverageLuminance
Gets the average luminance calculated on the GPU. See remarks.
public float AverageLuminance { get; }
Property Value
| Type | Description |
|---|---|
| System.Single | 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
| Type | Description |
|---|---|
| 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
| Type | Description |
|---|---|
| System.Int32 | 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
| Type | Description |
|---|---|
| System.Boolean |
|
EnableLocalLuminanceCalculation
Indicated if the local luminance should be rendered to the output texture.
public bool EnableLocalLuminanceCalculation { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
LuminanceFormat
Luminance texture format.
public PixelFormat LuminanceFormat { get; set; }
Property Value
| Type | Description |
|---|---|
| PixelFormat |
LuminanceLogEffect
Luminance log effect.
public ImageEffectShader LuminanceLogEffect { get; set; }
Property Value
| Type | Description |
|---|---|
| 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
| Type | Description |
|---|---|
| System.Int32 | The upscale count. |
Methods
DrawCore(RenderDrawContext)
protected override void DrawCore(RenderDrawContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderDrawContext | context |
Overrides
InitializeCore()
protected override void InitializeCore()
Overrides
Reset()
public override void Reset()