refract
Returns the refraction vector given the incident vector i, the normal vector n and the refraction index.
Read time 2 minutesLast updated 6 days ago
Definition
- Type: Method
- Namespace: Unity.Mathematics
- Assembly: UnityEngine.MathematicsModule
refract(float2, float2, float)
Returns the refraction vector given the incident vector i, the normal vector n and the refraction index.
public static float2 refract(float2 i, float2 n, float indexOfRefraction)
Parameters
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.
public static float3 refract(float3 i, float3 n, float indexOfRefraction)
Parameters
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.
public static float4 refract(float4 i, float4 n, float indexOfRefraction)
Parameters
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.
public static double2 refract(double2 i, double2 n, double indexOfRefraction)
Parameters
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.
public static double3 refract(double3 i, double3 n, double indexOfRefraction)
Parameters
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.
public static double4 refract(double4 i, double4 n, double indexOfRefraction)
Parameters
Returns
Type | Description |
|---|---|
| double4 | Refraction vector. |