Skip to content

Commit

Permalink
Clarify and simplify formula for attenuation.
Browse files Browse the repository at this point in the history
  • Loading branch information
emackey committed Jun 17, 2024
1 parent 20ed9f6 commit 12ca861
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions extensions/2.0/Khronos/KHR_materials_volume/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,15 @@ T(*x*) = e<sup>-σ<sub>t</sub>*x*</sup>

where T is commonly referred to as *transmittance*.

Substituting σ<sub>t</sub> in the previous equation by its definition via *attenuation color* and *attenuation distance*, as defined above, and setting *x* = *d* we get
Substituting σ<sub>t</sub> in the previous equation by its definition via *attenuation color* and *attenuation distance*, as defined above, we get

T(d<sub>a</sub>) = e<sup>(log(*c*) / *d*) * *d*</sup> = *c*
T(x) = e<sup>(log(*c*) / *d*) * *x*</sup>

So, after traveling distance *d* through the medium we get attenuation color *c*.
The above formula can be simplified as:

T(x) = *c*<sup> *x* / *d*</sup>

So, after traveling distance *x* through a medium with attenuation color *c* and attenuation distance *d*, we get we get transmittance T(x).

## Base Color and Absorption

Expand Down

0 comments on commit 12ca861

Please sign in to comment.