Drive parallax height and relief from the painted occlusion channel
Reuse the existing occlusion paint channel (no new map, MAP_COUNT stays 3): 0.5 is neutral, above 0.5 raises a hill, below 0.5 sinks a hole and also fades ambient occlusion (saturate(2*occ)). Bind the MSO map to _ParallaxMap, enable _PARALLAXMAP, derive a relief normal from the height gradient, and reseed unpainted occlusion to 0.5 so untouched surfaces stay visually neutral. Pin the _PARALLAXMAP runtime variant in the build keep-alive material. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
e349446fb7
commit
fdcb4f8d8a
6 files changed
+78
-13
No files matched your search
@@ -69,8 +69,9 @@ public partial class MeshPainter
|
||||
switch (mi)
|
||||
{
|
||||
case MAP_ALBEDO: return new[] { "_BaseMap", "_MainTex" };
|
||||
// One mask map drives both URP slots: _MetallicGlossMap (R/A) + _OcclusionMap (G).
|
||||
case MAP_MSO: return new[] { "_MetallicGlossMap", "_OcclusionMap" };
|
||||
// One mask map drives three URP slots: _MetallicGlossMap (R/A) + _OcclusionMap (G) +
|
||||
// _ParallaxMap (G = occlusion reused as a 0.5-centred height for parallax/relief).
|
||||
case MAP_MSO: return new[] { "_MetallicGlossMap", "_OcclusionMap", "_ParallaxMap" };
|
||||
default: return new[] { "_EmissionMap" };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user