upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/shader_inputs.md
diff options
context:
space:
mode:
authorNiiRoZz <simonin.remi25@gmail.com>2026-11-22 21:12:17 +0100
committerNiiRoZz <simonin.remi25@gmail.com>2026-11-22 21:12:17 +0100
commitd9b34a1fe042e7efe86484bb29d7b572f10ca7d2 (patch)
treeb24a278295f7b0e80112fc1867e8e94337f8d955 /docs/shader_inputs.md
parent217e2f46317ae41ca58b43adea5282ab446d2de4 (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.md7
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
172tables are built, it reads whatever is in them, and the black or noisy sky looks like a translator bug. 172tables 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,
177so 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
179centres 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`