Show / Hide Table of Contents

    Interface ISaturationEffectComponent

    Allows adjusting the saturation of an entity/screen. If added as a component to an entity, the saturation property will control the entity's saturation. If created separately (and initialized with a null entity), this can be use to control the saturation of the entire screen.

    //to adjust saturation for an object:
    myObj.AddComponent<ISaturationEffectComponent>().Saturation = 0.5f;
    
    //to adjust saturation for the screen:
    var effect = new SaturationEffect(game.Factory.Shaders, game.Events);
    effect.Init(null);
    effect.Saturation = 0.5f;

    Inherited Members
    IComponent.Name
    IComponent.Entity
    IComponent.RegistrationType
    IComponent.Init(IEntity, Type)
    IComponent.AfterInit()
    System.IDisposable.Dispose()
    System.ComponentModel.INotifyPropertyChanged.PropertyChanged
    Namespace: AGS.API
    Assembly: AGS.API.dll
    Syntax
    public interface ISaturationEffectComponent : IComponent, IDisposable, INotifyPropertyChanged

    Properties

    | Improve this Doc View Source

    Saturation

    Gets or sets the saturation for the entity/screen. The default is 1, which is the same color as the original image. A lower value than 1 will reduce saturation (0 being completely gray) and a greater value than 1 will increase saturation.

    Declaration
    float Saturation { get; set; }
    Property Value
    Type Description
    System.Single

    The saturation.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX