Returns the reflection vector v, given the entering ray direction i, and the surface normal n, as in:
v = i - 2 * dot(i, n) * n
ret reflect(i, n) |
---|
Where:
Name | In/Out | Template Type | Component Type | Size |
---|---|---|---|---|
i | in | vector | float | any |
n | in | vector | float | same dimension(s) as input i |
ret | out | vector | float | same dimension(s) as input i |
This intrinsic function is supported in the following (or above) shader versions:
Vertex Shader | Pixel Shader |
---|---|
vs_1_1 | ps_1_1 |