Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

math.refract

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static float2 refract(float2 i, float2 n, float indexOfRefraction);

Parameters

Parameter Description
i Incident vector.
n Normal vector.
indexOfRefraction Index of refraction.

Returns

float2 Refraction vector.

Description

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

Parameter Description
i Incident vector.
n Normal vector.
indexOfRefraction Index of refraction.

Returns

float3 Refraction vector.

Description

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

Parameter Description
i Incident vector.
n Normal vector.
indexOfRefraction Index of refraction.

Returns

float4 Refraction vector.

Description

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

Parameter Description
i Incident vector.
n Normal vector.
indexOfRefraction Index of refraction.

Returns

double2 Refraction vector.

Description

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

Parameter Description
i Incident vector.
n Normal vector.
indexOfRefraction Index of refraction.

Returns

double3 Refraction vector.

Description

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

Parameter Description
i Incident vector.
n Normal vector.
indexOfRefraction Index of refraction.

Returns

double4 Refraction vector.

Description

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