reflect
The direction i bounced off a surface with unit normal n.
reflect(i: Val, n: Val): Expr
Import math from shaders/std and use math.reflect.
Parameters
| Name | Type | Notes |
|---|---|---|
i | Val | |
n | Val |
Example
const bounce = reflect(viewDir, normal)
The direction i bounced off a surface with unit normal n.
reflect(i: Val, n: Val): Expr
Import math from shaders/std and use math.reflect.
| Name | Type | Notes |
|---|---|---|
i | Val | |
n | Val |
const bounce = reflect(viewDir, normal)