Docs: reduce over-documentation across gameplay scripts

Trim restated narration, dead commented-out code, and oversized class
headers; keep all why-comments (authority, timing, edge cases), tooltips,
and serialization caveats.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Fable 5 committed 2026-07-02 10:08:28 +02:00
1 parent 882d30797e
commit 066e308cde
21 files changed
+478 -902

No files matched your search

+11 -17
View File
@@ -82,13 +82,11 @@ public partial class MeshPainter
}
/// <summary>
/// Rasterizes the mesh UV islands into a per-texel coverage marker (true = the texel lies
/// inside a UV triangle). This is the dilation SOURCE / overwrite guard: island texels are
/// real content the edge-padding pass must never overwrite, while the gutter (false) stays
/// paddable. Deriving the marker from the STATIC UV layout - instead of from transient
/// per-stroke coverage - makes every seed (fresh start, loaded maps, backend switch) mark
/// the same real content as painted, so the first stroke after a load/switch no longer
/// bleeds over the existing paint. Built once and cached (UV layout + textureSize are fixed).
/// Rasterizes the mesh UV islands into a per-texel coverage marker - the dilation SOURCE / overwrite
/// guard (island texels are real content edge padding must never overwrite; the gutter stays
/// paddable). Derived from the STATIC UV layout instead of transient per-stroke coverage, so every
/// seed (fresh start, load, backend switch) marks the same content and the first stroke after a
/// load/switch no longer bleeds over existing paint. Built once and cached.
/// </summary>
private bool[] GetIslandMask()
{
@@ -235,16 +233,12 @@ public partial class MeshPainter
if (_materialInstance.HasProperty(OcclusionStrengthId)) _materialInstance.SetFloat(OcclusionStrengthId, 1f);
}
// Height: the same mask map is also bound to _ParallaxMap (see MapProps), so the painted
// occlusion value (G) doubles as a 0.5-centred height. _PARALLAXMAP turns on URP's single-
// step parallax (ApplyPerPixelDisplacement) AND our relief-normal/AO remap in PlayerCamoLit.
// Lift _Parallax off its floor so the displacement is actually visible (the relief normal is
// the dominant cue; this just adds subtle motion parallax). Live-tunable on the instance.
// _NORMALMAP is REQUIRED for the relief normal to show: URP's InitializeInputData only
// transforms surfaceData.normalTS into world space when _NORMALMAP (or _DETAIL) is set -
// otherwise it discards normalTS and uses the geometric normal, so the relief is invisible.
// _BumpMap stays unbound (= flat default normal), so it only enables the tangent->world path
// and our relief blends on top of a flat base.
// Height: the same mask map is also bound to _ParallaxMap, so the painted occlusion (G) doubles
// as a 0.5-centred height. _PARALLAXMAP enables URP's parallax AND our relief-normal/AO remap in
// PlayerCamoLit; _Parallax is lifted off its floor so the displacement is visible. _NORMALMAP is
// REQUIRED for the relief normal to show - URP only transforms normalTS into world space when it
// (or _DETAIL) is set, otherwise the relief is invisible. _BumpMap stays unbound (flat default
// normal), so the keyword only enables the tangent->world path.
if (_materialInstance.HasProperty(ParallaxMapId))
{
_materialInstance.EnableKeyword("_PARALLAXMAP");