docs.unity.cn
    Show / Hide Table of Contents

    Class Grain

    This class holds settings for the Grain effect.

    Inheritance
    Object
    PostProcessEffectSettings
    Grain
    Inherited Members
    PostProcessEffectSettings.active
    PostProcessEffectSettings.enabled
    PostProcessEffectSettings.SetAllOverridesTo(Boolean, Boolean)
    PostProcessEffectSettings.GetHash()
    Namespace: UnityEngine.Rendering.PostProcessing
    Syntax
    public sealed class Grain : PostProcessEffectSettings

    Fields

    colored

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

    Declaration
    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
    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
    public FloatParameter lumContrib
    Field Value
    Type Description
    FloatParameter

    size

    The size of grain particle on screen.

    Declaration
    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
    Boolean

    true if the effect is currently enabled and supported

    Overrides
    PostProcessEffectSettings.IsEnabledAndSupported(PostProcessRenderContext)
    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Thursday, April 14, 2022
    Terms of use