fix glinting on windows and striping

This commit is contained in:
DramaticShape
2026-07-29 22:43:20 -04:00
parent 5ff56eab46
commit 6d27d91411
5 changed files with 68 additions and 28 deletions
+10 -2
View File
@@ -390,8 +390,16 @@ ShadowMap.SNUG = 0.9
-- terrain moved, so the acne margin the slack exists for is intact where
-- it matters. For sprite cards and other thin stand-ins only.
--
-- Valid between begin() and finish(), which is when `slack` matches the
-- frustum the map is being drawn with.
-- ONE OBLIGATION comes with it: the caster's LIT draw must hand this same
-- snugged transform to its shadow lookup (Voxel3D.draw's `sunModel`).
-- Stored and lookup then agree exactly, as they did before snugging, and
-- the compare keeps its full acne margin. A caster stored snugged but read
-- un-snugged is 0.9 of the margin short, and the loss shows up as diagonal
-- moire bands crawling across the card.
--
-- Valid between begin() and the next begin(): `slack` and the sun hold
-- still between redraws of the map, so a lit frame that reuses last
-- frame's map computes the same displacement it was stored with.
function ShadowMap.snug(model)
local f = sunDir()
local s = -ShadowMap.slack * ShadowMap.SNUG