diff options
| author | NiiRoZz <simonin.remi25@gmail.com> | 2026-11-22 21:12:17 +0100 |
|---|---|---|
| committer | NiiRoZz <simonin.remi25@gmail.com> | 2026-11-22 21:12:17 +0100 |
| commit | d9b34a1fe042e7efe86484bb29d7b572f10ca7d2 (patch) | |
| tree | b24a278295f7b0e80112fc1867e8e94337f8d955 /docs/shader_inputs.md | |
| parent | 217e2f46317ae41ca58b43adea5282ab446d2de4 (diff) | |
PROC-148: note that Transmittance addresses texel corners
@Silliana pointed it out on #3217; the program scales the integer texel
index by 1/256 and 1/64 with no half-texel offset.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs/shader_inputs.md')
| -rw-r--r-- | docs/shader_inputs.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/shader_inputs.md b/docs/shader_inputs.md index 17f715b38..b0f2c72b8 100644 --- a/docs/shader_inputs.md +++ b/docs/shader_inputs.md | |||
| @@ -171,6 +171,13 @@ transmittance table #1897 names, so it runs second and not side by side with `CS | |||
| 171 | (mip 0). Which texture is bound to which table comes from #1897, not from the program. If a sky pass runs before the | 171 | (mip 0). Which texture is bound to which table comes from #1897, not from the program. If a sky pass runs before the |
| 172 | tables are built, it reads whatever is in them, and the black or noisy sky looks like a translator bug. | 172 | tables are built, it reads whatever is in them, and the black or noisy sky looks like a translator bug. |
| 173 | 173 | ||
| 174 | ### Transmittance addresses texel corners | ||
| 175 | |||
| 176 | `CS_Transmittance` turns its integer texel index into table coordinates as x × 1/256 and y × 1/64, with no +0.5, | ||
| 177 | so each texel holds the value at its corner, not its centre (pointed out by @Silliana in | ||
| 178 | [#3217](https://github.com/ItsNotRexed/Leonida/pull/3217#issuecomment-7084678180)). A reference table built at texel | ||
| 179 | centres differs from it slightly, most visibly near the ground. That difference is expected and isn't a translator bug. | ||
| 180 | |||
| 174 | ### The dword at +0xD0: output format, not an enable | 181 | ### The dword at +0xD0: output format, not an enable |
| 175 | 182 | ||
| 176 | #1897 reports a SkyView dword that skips the stores when it is zero. In `CS_SkyView` and `CS_MultipleScattering` | 183 | #1897 reports a SkyView dword that skips the stores when it is zero. In `CS_SkyView` and `CS_MultipleScattering` |