Skip to content

Commit 47d612d

Browse files
committed
Updates
1 parent b7d80d7 commit 47d612d

1 file changed

Lines changed: 16 additions & 10 deletions

File tree

  • extensions/2.0/Khronos/KHR_materials_scatter

extensions/2.0/Khronos/KHR_materials_scatter/README.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -174,16 +174,18 @@ However, the behaviour differs between the two modes:
174174
The single-scatter albedo $\rho_{ss}$ is derived from the multi-scatter albedo $\rho_{ms}$ and the anisotropy $g$ as:
175175

176176
$$
177-
s = 4.09712 + 4.20863\,\rho_{ms} - \sqrt{9.59217 + 41.6808\,\rho_{ms} + 17.7126\,\rho_{ms}^2}
178-
\\
179-
\rho_{ss} = \frac{1 - s^2}{\left(1.0 - g * s * s\right)}
177+
\begin{aligned}
178+
s &= 4.09712 + 4.20863\,\rho_{ms} - \sqrt{9.59217 + 41.6808\,\rho_{ms} + 17.7126\,\rho_{ms}^2}
179+
\\\\
180+
\rho_{ss} &= \frac{1 - s^2}{\left(1.0 - g * s * s\right)}
181+
\end{aligned}
180182
$$
181183

182184
The single-scatter albedo defines the fraction of the attenuation coefficient that goes to scattering versus absorption.
183185
Given the attenuation coefficient $\sigma_t = -\log(c)/d$ from `KHR_materials_volume`, the scattering and absorption coefficients are:
184186

185187
$$
186-
\sigma_s = \sigma_t\,\rho_{ss}, \qquad \sigma_a = \sigma_t\,(1 - \rho_{ss})
188+
\sigma_s = \sigma_t\,\rho_{ss}, \\\\ \qquad \sigma_a = \sigma_t\,(1 - \rho_{ss})
187189
$$
188190

189191
> [!NOTE]
@@ -282,24 +284,28 @@ In volumetric mode, `KHR_materials_scatter` does not modify the surface BSDF. Th
282284
With `KHR_materials_volume` alone:
283285

284286
$$
285-
\sigma_t = \sigma_a, \qquad \sigma_s = 0
287+
\begin{aligned}
288+
\sigma_t &= \sigma_a, \\\\ \qquad \sigma_s &= 0
289+
\end{aligned}
286290
$$
287291

288292
With `KHR_materials_scatter` added:
289293

290294
$$
291-
\sigma_t = \sigma_a + \sigma_s, \qquad \sigma_s = \sigma_t\,\rho_{ss}(\rho_{ms}^*)
295+
\begin{aligned}
296+
\sigma_t &= \sigma_a + \sigma_s, \\\\ \qquad \sigma_s &= \sigma_t\,\rho_{ss}(\rho_{ms}^*)
297+
\end{aligned}
292298
$$
293299

294300
where the effective multi-scatter albedo $\rho_{ms}^*$ is scaled by `scatterStrength`:
295301

296302
$$
297-
\rho_{ms}^* = \mathtt{scatterStrength} \times \rho_{ms}, \qquad
298-
\\
299-
\mathtt{scatterStrength} = \mathtt{scatterStrengthFactor} \times \mathtt{scatterStrengthTexture.a}
303+
\begin{aligned}
304+
\rho_{ms}^* &= \mathtt{scatterStrength} \times \rho_{ms}, \qquad \\\\ \mathtt{scatterStrength} &= \mathtt{scatterStrengthFactor} \times \mathtt{scatterStrengthTexture.a}
305+
\end{aligned}
300306
$$
301307

302-
$\rho_{\text{ms}}$ is derived from `multiscatterColorFactor` (and `multiscatterColorTexture`) as described in [Multi-Scatter Color](#multi-scatter-color) above, and $`\rho_{\text{ss}}`$ is derived from $\rho_{\text{ms}}^*$ via the Kulla-Conty mapping. At `scatter = 0`, $\rho_{\text{ms}}^* = 0$ and therefore $\rho_{\text{ss}} = 0$, giving a purely absorbing medium identical to `KHR_materials_volume` alone. $\sigma_{\text{t}}$ now accounts for both absorption and scattering, not absorption alone.
308+
$\rho_{\text{ms}}$ is derived from `multiscatterColorFactor` (and `multiscatterColorTexture`) as described in [Multi-Scatter Color](#multi-scatter-color) above, and $\rho_{\text{ss}}$ is derived from $\rho_{\text{ms}}^*$ via the Kulla-Conty mapping. At `scatterStrength = 0`, $\rho_{\text{ms}}^* = 0$ and therefore $\rho_{\text{ss}} = 0$, giving a purely absorbing medium identical to `KHR_materials_volume` alone. $\sigma_{\text{t}}$ now accounts for both absorption and scattering, not absorption alone.
303309

304310
## Interaction with Other Extensions
305311

0 commit comments

Comments
 (0)