mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
Fix CW→CCW winding bug on polygon/mesh faces (types 1,3) that caused backface culling to discard half the geometry. Decompose the monolithic bsp.load step (1028 lines) into atomic workflow steps chainable via JSON connections — each step only runs when connected: - bsp.load: open pk3, read + validate BSP, store raw data in context - bsp.lightmap_atlas: build lightmap atlas, upload to GPU - bsp.parse_spawn: parse entity lump for spawn point - bsp.build_geometry: build face geometry with CW→CCW winding fix - bsp.extract_textures: load textures from pk3 with mipmaps - bsp.upload_geometry: upload merged VB/IB to GPU - bsp.build_collision: create Bullet physics convex hull collision Shared BSP structs extracted to bsp_types.hpp. Workflow JSON updated to chain: load → lightmap → geometry → textures → upload → collision → spawn. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>