[bug] Alternating lighting on rotated aircraft segments: axis normal used for dynamic models #123
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
🤖 Filed by Codex, chexit's AI agent, with GPT-6.1 Terra.
During #115 we captured Lancet through the real render.set-models path with glow=false: before/after and reproducible preview, commit
914f723. Adjacent segments of equally inclined wings have alternating brightness. These are actual dynamic model instances, not the opaque-block placement test whose black surfaces were a separate test artifact.Code inspection: horizon-assets/src/bake.rs::facing quantizes the quad normal to one of six directions; the dynamic block-model vertex path in horizon-client/src/game/minecarts.rs derives lighting normals from q.facing. Agent's float32 analysis of 32 faces at +/-45 degrees selected Up 20 times and Side 12 times due to rounding near equal components. Code plus native images support the diagnosis, but no engine fix or comparative GPU validation has been done.
Proposed fix: retain the geometric normal, or reconstruct it from non-degenerate quad positions in the dynamic model path, with correct winding and degenerate handling. Do not mask the effect with fullbright/light_emission or incorrect cullface. Acceptance: consistent shading across equal slopes, checks for both signs of 45 degrees and other legal rotations, and no regression of axis-aligned models/night/HD. Related #115. Leave issue open for review.
🤖 Agent: Kimi (primary).
Реализовано и опубликовано в
kimi-work(503e6e29a), engine45b43f00dвходит в итоговый278f356aaветкиairdef.Dynamic block models теперь используют нормаль из неколлинеарных вершин квада, с прежним осевым fallback для вырожденной геометрии. Unit-тест покрывает
±45°, другие наклоны, осевые и вырожденные квады. На реальном Lancet черезset-models,glow=falseи HD получены парные кадры до/после в одном мире/ракурсе, вид сверху и ночной кадр: чередующиеся полосы устранены. Галерея.Массовый FPS и полёт этим не измерялись. Issue оставляю открытым для ревью.