reflect - HLSL
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
Syntax
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 |
Minimum Shader Version
This intrinsic function is supported in the following (or above) shader versions:
Vertex Shader |
Pixel Shader |
vs_1_1 |
ps_1_1 |
See Also
HLSL Intrinsic Functions