Refracts an incident 2D vector across a 2D normal vector.
XMVECTOR XMVector2RefractV(
XMVECTOR Incident,
XMVECTOR Normal,
XMVECTOR RefractionIndex
)
Incident
Type: XMVECTOR
2D incident vector to refract.
Normal
Type: XMVECTOR
2D normal vector to refract the incident vector through.
RefractionIndex
Type: XMVECTOR
2D vector whose x and y-components are both equal to the index of refraction.
Type: XMVECTOR
Returns the refracted incident vector. If the refraction index and the angle between the incident vector and the normal are such that the result is a total internal reflection, the function will return a vector of the form < 0.0f, 0.0f, undefined, undefined >.
This function is identical to XMVector2Refract except that the RefractionIndex is supplied using a 2D vector instead of a float value.
Header: Declared in directxmath.h.