Review point: with no worker thread the fallback built a whole in-memory zip per
entry; it now writes each entry straight into the file like the serial writer,
and the test covers that path.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The secondary-ray maps now start from 64 rays reaching a tenth of the
bounding-box diagonal (was 32 rays and a quarter), the defaults common to
mesh-map bakers. Occlusion falls off linearly with the hit distance instead
of with its square, on the CPU and in the GPU shader, so a hit halfway to the
max distance counts half. Thickness keeps its 0.1 reach and also gets 64 rays;
bent normals still share the occlusion rays.
Tests: a floor under a ceiling at half the max distance bakes 0.5 occlusion
(0.25 with the squared falloff), and the default ray settings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Saving compressed every zip entry one after the other with deflate level 6 on a
single thread; the baked maps were about three quarters of the time. The entries
are independent, so native builds now compress them on up to 8 worker threads
(one core is left to the UI) and copy the finished entries into the file in the
original order with raw_copy_file. Entry names, order, methods, CRCs and sizes
are unchanged, the format is unchanged, older versions open the files.
Memory stays bounded: a worker only starts an entry while the estimated size of
the entries started and not yet written is under 3 GiB, and baked maps and pixel
tiles stream into the compressor instead of building a raw copy first. wasm and
single-core machines keep the serial writer. The atomic tmp + fsync + rename
path is unchanged.
Refs #200, fixes#214
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Replace the per-vertex mesh curvature with short ray rings around each
texel, so triangle size no longer decides the result: walls beside the
point (concave), hard edges (convex), the spread of the smooth normals and
true curvature where shading and faces agree. A high poly uses a small
true-curvature radius, and with match by mesh name a part only reads
itself. Rays go through RayScene::closest in bounded chunks, so they run
on the GPU tracer when there is one. Ray is laid out as the shader reads
it and uploads without a copy. Output stays 0..1 with 0.5 flat;
curvatureStrength and curvature_from_normal keep their meaning.
Clean-room implementation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
63 -> 72 materials. Cobblestone uses rounded cells with sunken joints, gravel
fine Voronoi stones, plaster a soft troweled tooth; linen a coarse weave, wool
and moss a soft sheen.