Materials shown in the view: each object's metal and rough reach the shader (Solid and Rendered); a Material picker with sixteen to start from (gold, chrome, wood, ceramic...); o.material and fry.materials() in scripts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Nexoniarz 2026-10-20 17:14:55 +02:00
commit e93ae44684
9 changed files with 101 additions and 5 deletions

View file

@ -159,6 +159,10 @@ void main() {
n = normalize(tbn * vec3(xy, sqrt(max(1.0 - dot(xy, xy), 0.0))));
metal = m.z;
gloss = m.w;
} else if (DRAW.probe.w > 0.5) { // the model's own surface (Renderer::Surface)
uint s = uint(DRAW.probe.w - 0.5);
metal = float(s & 255u) / 255.0;
gloss = 1.0 - float((s >> 8) & 255u) / 255.0;
}
// Weather: how open to the sky this spot is (the lightmap's sky map; moving things: their
// sun visibility), then rain wetting it (darker, glossy) and snow lying on what faces up.