forked from 1b-agent/opencadstudio-upstream
The batched hatch pass evaluates its fill procedurally per fragment — a point-in-polygon test over the whole boundary plus the pattern test, with a `discard` that disables early-Z. When the view sits inside a hatch its quad covers the screen, so panning / zooming re-runs that full-screen shader every frame (~40 ms/frame on a hatch-heavy plan) even though the rest of the scene is cheap — the wire pass and CPU prepare are negligible by comparison. Suppress the hatch pass while the view is actively panning / zooming / orbiting, detected from `camera_generation` plus a short settle timer (`Scene::navigating_lod`), and fold that state into the render signature so the moment the view settles it renders hatches once and the scene-render cache holds that full-quality frame. A brief `is_settling` subscription keeps requesting frames just past the settle point so the hatched frame renders even when no input event would otherwise fire. Mirrors AutoCAD's adaptive degradation. The paper sheet keeps its fills.