File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 2895
2895
glass materials) can also vary with incident viewing direction (the direction of the incoming ray).
2896
2896
2897
2897
Lambertian (diffuse) reflectance can either always scatter and attenuate light according to its
2898
- reflectance $R$, or it can sometimes scatter (with probabilty $1-R$) with no attenuation (where a
2898
+ reflectance $R$, or it can sometimes scatter (with probability $1-R$) with no attenuation (where a
2899
2899
ray that isn't scattered is just absorbed into the material). It could also be a mixture of both
2900
2900
those strategies. We will choose to always scatter, so implementing Lambertian materials becomes a
2901
2901
simple task:
3000
3000
The reflected ray direction in red is just $\mathbf{v} + 2\mathbf{b}$. In our design, $\mathbf{n}$
3001
3001
is a unit vector (length one), but $\mathbf{v}$ may not be. To get the vector $\mathbf{b}$, we scale
3002
3002
the normal vector by the length of the projection of $\mathbf{v}$ onto $\mathbf{n}$, which is given
3003
- by the dot project $\mathbf{v} \cdot \mathbf{n}$. (If $\mathbf{n}$ were not a unit vector, we would
3004
- also need to divide this dot project by the length of $\mathbf{n}$.) Finally, because $\mathbf{v}$
3003
+ by the dot product $\mathbf{v} \cdot \mathbf{n}$. (If $\mathbf{n}$ were not a unit vector, we would
3004
+ also need to divide this dot product by the length of $\mathbf{n}$.) Finally, because $\mathbf{v}$
3005
3005
points _into_ the surface, and we want $\mathbf{b}$ to point _out_ of the surface, we need to negate
3006
3006
this projection length.
3007
3007
You can’t perform that action at this time.
0 commit comments