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 28952895glass materials) can also vary with incident viewing direction (the direction of the incoming ray).
28962896
28972897Lambertian (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
28992899ray that isn't scattered is just absorbed into the material). It could also be a mixture of both
29002900those strategies. We will choose to always scatter, so implementing Lambertian materials becomes a
29012901simple task:
30003000The reflected ray direction in red is just $\mathbf{v} + 2\mathbf{b}$. In our design, $\mathbf{n}$
30013001is a unit vector (length one), but $\mathbf{v}$ may not be. To get the vector $\mathbf{b}$, we scale
30023002the 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}$
30053005points _into_ the surface, and we want $\mathbf{b}$ to point _out_ of the surface, we need to negate
30063006this projection length.
30073007
You can’t perform that action at this time.
0 commit comments