Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    LuminanceEffect Class

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

    Luminance effect.

    System.Object → DisposeBase → ComponentBase → RendererCoreBase → RendererBase → DrawEffect → ImageEffect → LuminanceEffect
    Derived from LuminanceEffect:

    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()
    | Improve this Doc View Source

    Constructors


    LuminanceEffect()

    Initializes a new instance of the LuminanceEffect class.

    public LuminanceEffect()
    | Improve this Doc View Source

    Fields


    LuminanceResult

    public static readonly ObjectParameterKey<LuminanceResult> LuminanceResult
    Field Value
    Type Description
    ObjectParameterKey<LuminanceResult>
    | Improve this Doc View Source

    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

    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
    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.

    | Improve this Doc View Source

    Methods


    DrawCore(RenderDrawContext)

    protected override void DrawCore(RenderDrawContext context)
    Parameters
    Type Name Description
    RenderDrawContext context
    Overrides
    RendererBase.DrawCore(RenderDrawContext)

    InitializeCore()

    protected override void InitializeCore()
    Overrides
    RendererCoreBase.InitializeCore()

    Reset()

    public override void Reset()
    Overrides
    ImageEffect.Reset()

    Inherited Members

    ImageEffect.EnableSetRenderTargets
    ImageEffect.SetInput(Int32, Texture)
    ImageEffect.SetOutput(Texture)
    ImageEffect.SetOutput(Texture[])
    ImageEffect.SetDepthOutput(Texture, Texture)
    ImageEffect.SetDepthOutput(Texture, Texture[])
    ImageEffect.SetViewport(Nullable<Viewport>)
    ImageEffect.PreDrawCore(RenderDrawContext)
    ImageEffect.SetRenderTargets(RenderDrawContext)
    ImageEffect.PostDrawCore(RenderDrawContext)
    ImageEffect.DisposeCreatedRenderTargetViews(RenderDrawContext)
    ImageEffect.InputCount
    ImageEffect.GetInput(Int32)
    ImageEffect.GetSafeInput(Int32)
    ImageEffect.DepthStencil
    ImageEffect.HasDepthStencilOutput
    ImageEffect.OutputCount
    ImageEffect.GetOutput(Int32)
    ImageEffect.GetSafeOutput(Int32)
    ImageEffect.NewScopedRenderTarget2D(TextureDescription)
    ImageEffect.NewScopedRenderTarget2D(Int32, Int32, PixelFormat, TextureFlags, Int32)
    ImageEffect.NewScopedRenderTarget2D(Int32, Int32, PixelFormat, MipMapCount, TextureFlags, Int32)
    DrawEffect.SamplingPattern
    DrawEffect.Parameters
    DrawEffect.Scaler
    DrawEffect.SetDefaultParameters()
    DrawEffect.Draw(RenderDrawContext, String)
    DrawEffect.Draw(RenderDrawContext, String, Object[])
    DrawEffect.ToString()
    RendererBase.Draw(RenderDrawContext)
    RendererCoreBase.Enabled
    RendererCoreBase.Profiling
    RendererCoreBase.ProfilingKey
    RendererCoreBase.Context
    RendererCoreBase.Services
    RendererCoreBase.Content
    RendererCoreBase.GraphicsDevice
    RendererCoreBase.EffectSystem
    RendererCoreBase.Initialized
    RendererCoreBase.Initialize(RenderContext)
    RendererCoreBase.Unload()
    RendererCoreBase.NewScopedBuffer(BufferDescription, PixelFormat)
    RendererCoreBase.NewScopedTypedBuffer(Int32, PixelFormat, Boolean, GraphicsResourceUsage)
    RendererCoreBase.PushScopedResource<T>(T)
    RendererCoreBase.CheckIsInDrawCore()
    RendererCoreBase.Destroy()
    RendererCoreBase.ToLoadAndUnload<T>(T)
    RendererCoreBase.PreDrawCoreInternal(RenderDrawContext)
    RendererCoreBase.EnsureContext(RenderContext)
    RendererCoreBase.PostDrawCoreInternal(RenderDrawContext)
    ComponentBase.Tags
    ComponentBase.Name
    ComponentBase.ICollectorHolder.Collector
    ComponentBase.OnNameChanged()
    DisposeBase.Dispose()
    DisposeBase.IsDisposed
    DisposeBase.IReferencable.ReferenceCount
    DisposeBase.IReferencable.AddReference()
    DisposeBase.IReferencable.Release()
    DisposeBase.OnAddReference()
    DisposeBase.OnReleaseReference()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    ImageEffectExtensions.SetInput(IImageEffect, Texture)
    ImageEffectExtensions.SetInput(IImageEffect, Texture, Texture)
    ImageEffectExtensions.SetInput(IImageEffect, Texture, Texture, Texture)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation