docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class LensDistortion

    This class holds settings for the Lens Distortion effect.

    Inheritance
    object
    Object
    ScriptableObject
    PostProcessEffectSettings
    LensDistortion
    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 LensDistortion : PostProcessEffectSettings

    Fields

    centerX

    The center point for the distortion (x-axis).

    Declaration
    [Space]
    [Range(-1, 1)]
    [Tooltip("Distortion center point (x-axis).")]
    public FloatParameter centerX
    Field Value
    Type Description
    FloatParameter

    centerY

    The center point for the distortion (y-axis).

    Declaration
    [Range(-1, 1)]
    [Tooltip("Distortion center point (y-axis).")]
    public FloatParameter centerY
    Field Value
    Type Description
    FloatParameter

    intensity

    The total amount of distortion to apply.

    Declaration
    [Range(-100, 100)]
    [Tooltip("Total distortion amount.")]
    public FloatParameter intensity
    Field Value
    Type Description
    FloatParameter

    intensityX

    Multiplies the intensity value on the x-axis. Setting this value to 0 will disable distortion on this axis.

    Declaration
    [Range(0, 1)]
    [DisplayName("X Multiplier")]
    [Tooltip("Intensity multiplier on the x-axis. Set it to 0 to disable distortion on this axis.")]
    public FloatParameter intensityX
    Field Value
    Type Description
    FloatParameter

    intensityY

    Multiplies the intensity value on the y-axis. Setting this value to 0 will disable distortion on this axis.

    Declaration
    [Range(0, 1)]
    [DisplayName("Y Multiplier")]
    [Tooltip("Intensity multiplier on the y-axis. Set it to 0 to disable distortion on this axis.")]
    public FloatParameter intensityY
    Field Value
    Type Description
    FloatParameter

    scale

    A global screen scaling factor.

    Declaration
    [Space]
    [Range(0.01, 5)]
    [Tooltip("Global screen scaling.")]
    public FloatParameter scale
    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)