opticalThickness
How much material the view passes through at this pixel: 0 at the edge, up to about 1.2 deep inside.
opticalThickness(field: SurfaceField, frame: SurfaceFrame): Expr
Import materials from shaders/std and use materials.opticalThickness.
Multiply by a density prop and feed beerLambert for glass, ice and water.
Parameters
| Name | Type | Notes |
|---|---|---|
field | SurfaceField | |
frame | SurfaceFrame |
Example
const thickness = mul(opticalThickness(field, frame), u.density)
See also
beerLambert— How much light survives a thickness of tinted material, per channel.