docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Grain

    This class holds settings for the Grain effect.

    Inheritance
    object
    Object
    ScriptableObject
    PostProcessEffectSettings
    Grain
    Inherited Members
    PostProcessEffectSettings.active
    PostProcessEffectSettings.enabled
    PostProcessEffectSettings.SetAllOverridesTo(bool, bool)
    PostProcessEffectSettings.GetHash()
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.Rendering.PostProcessing
    Assembly: Unity.Postprocessing.Runtime.dll
    Syntax
    [Serializable]
    public sealed class Grain : PostProcessEffectSettings

    Fields

    colored

    Set to true to render colored grain, false for grayscale grain.

    Declaration
    [Tooltip("Enable the use of colored grain.")]
    public BoolParameter colored
    Field Value
    Type Description
    BoolParameter

    intensity

    The strength (or visibility) of the Grain effect on screen. Higher values mean more visible grain.

    Declaration
    [Range(0, 1)]
    [Tooltip("Grain strength. Higher values mean more visible grain.")]
    public FloatParameter intensity
    Field Value
    Type Description
    FloatParameter

    lumContrib

    Controls the noisiness response curve based on scene luminance. Lower values mean less noise in dark areas.

    Declaration
    [Range(0, 1)]
    [DisplayName("Luminance Contribution")]
    [Tooltip("Controls the noise response curve based on scene luminance. Lower values mean less noise in dark areas.")]
    public FloatParameter lumContrib
    Field Value
    Type Description
    FloatParameter

    size

    The size of grain particle on screen.

    Declaration
    [Range(0.3, 3)]
    [Tooltip("Grain particle size.")]
    public FloatParameter size
    Field Value
    Type Description
    FloatParameter

    Methods

    IsEnabledAndSupported(PostProcessRenderContext)

    Returns true if the effect is currently enabled and supported.

    Declaration
    public override bool IsEnabledAndSupported(PostProcessRenderContext context)
    Parameters
    Type Name Description
    PostProcessRenderContext context

    The current post-processing render context

    Returns
    Type Description
    bool

    true if the effect is currently enabled and supported

    Overrides
    PostProcessEffectSettings.IsEnabledAndSupported(PostProcessRenderContext)
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)