docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method refract

    refract(float2, float2, float)

    Returns the refraction vector given the incident vector i, the normal vector n and the refraction index.

    Declaration
    public static float2 refract(float2 i, float2 n, float indexOfRefraction)
    Parameters
    Type Name Description
    float2 i

    Incident vector.

    float2 n

    Normal vector.

    float indexOfRefraction

    Index of refraction.

    Returns
    Type Description
    float2

    Refraction vector.

    refract(float3, float3, float)

    Returns the refraction vector given the incident vector i, the normal vector n and the refraction index.

    Declaration
    public static float3 refract(float3 i, float3 n, float indexOfRefraction)
    Parameters
    Type Name Description
    float3 i

    Incident vector.

    float3 n

    Normal vector.

    float indexOfRefraction

    Index of refraction.

    Returns
    Type Description
    float3

    Refraction vector.

    refract(float4, float4, float)

    Returns the refraction vector given the incident vector i, the normal vector n and the refraction index.

    Declaration
    public static float4 refract(float4 i, float4 n, float indexOfRefraction)
    Parameters
    Type Name Description
    float4 i

    Incident vector.

    float4 n

    Normal vector.

    float indexOfRefraction

    Index of refraction.

    Returns
    Type Description
    float4

    Refraction vector.

    refract(double2, double2, double)

    Returns the refraction vector given the incident vector i, the normal vector n and the refraction index.

    Declaration
    public static double2 refract(double2 i, double2 n, double indexOfRefraction)
    Parameters
    Type Name Description
    double2 i

    Incident vector.

    double2 n

    Normal vector.

    double indexOfRefraction

    Index of refraction.

    Returns
    Type Description
    double2

    Refraction vector.

    refract(double3, double3, double)

    Returns the refraction vector given the incident vector i, the normal vector n and the refraction index.

    Declaration
    public static double3 refract(double3 i, double3 n, double indexOfRefraction)
    Parameters
    Type Name Description
    double3 i

    Incident vector.

    double3 n

    Normal vector.

    double indexOfRefraction

    Index of refraction.

    Returns
    Type Description
    double3

    Refraction vector.

    refract(double4, double4, double)

    Returns the refraction vector given the incident vector i, the normal vector n and the refraction index.

    Declaration
    public static double4 refract(double4 i, double4 n, double indexOfRefraction)
    Parameters
    Type Name Description
    double4 i

    Incident vector.

    double4 n

    Normal vector.

    double indexOfRefraction

    Index of refraction.

    Returns
    Type Description
    double4

    Refraction vector.

    In This Article
    Back to top
    Copyright © 2024 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)