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>
- postfx.taa: temporal anti-aliasing with Halton jitter, neighborhood clamping,
Karis tonemap for stable history, configurable blend_factor from JSON
- Texture loader: auto-generate full mipmap chain via SDL_GenerateMipmapsForGPUTexture
- 16x anisotropic filtering on all textures
- LOD bias 0.5 to reduce moire patterns on high-frequency textures at distance
- TAA shader: 3x3 neighborhood clamp with expanded bbox to reduce flicker
- Ping-pong history buffers for temporal accumulation
- Sub-pixel jitter via Halton(2,3) sequence, 16-frame cycle
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- map.load: Assimp-based glTF/GLB scene loader with auto physics generation
- draw.map: renders all map meshes with JSON-driven texture-to-mesh mapping
- export_room_gltf.py: exports seed workflow physics bodies to GLB
- Seed demo room exported as map.glb (14 static meshes)
- Texture mapping configurable per mesh name pattern in workflow JSON
- Maps can be edited in Blender and re-exported
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Extract spotlight logic from render.prepare into dedicated spotlight.update step
- render.prepare now only handles camera, shadow, and lighting uniforms
- spotlight.update runs per-frame after render.prepare, reads spotlight.state from context
- Aim distance configurable via JSON (aim_distance parameter)
- Camera-local offset for spotlight origin (matches viewmodel position)
- Direction computed from torch position toward camera aim point (natural beam alignment)
- Add distance fog to whole room (exponential, dark blue-grey)
- Volumetric beam: 48 steps, UE4 interleaved gradient noise, cubic cone falloff
- Fog density increased for visible beam effect
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Build system:
- Fix generate_cmake.py backslash paths and UTF-8 encoding for Windows
- Auto C++20 in conan deps, auto-detect VS install location
- dev_commands.py: add generate, all --run commands, platform-aware bootstrap
- Add assimp to cmake_config.json link libraries
- Fix CMakeUserPresets.json duplicate preset issue
Cross-platform C++:
- UUID generation: Windows rpc.h/UuidCreate with #ifdef _WIN32
- HOME env var fallback to USERPROFILE on Windows
- Shader format detection for D3D12/DXIL Vulkan driver
Shader pipeline (12 new SPIRV shaders):
- Port all Metal shaders to Vulkan GLSL (PBR, shadows, post-FX, compute)
- SDL3 GPU descriptor set convention (set 0-3)
- Combined image samplers for Vulkan compatibility
- Bootstrap-driven shader path rewriting (msl↔spirv automatic per platform)
Rendering features:
- spotlight.setup: generic atomic workflow step, attach to camera or static
- PBR spotlight with cone attenuation, distance falloff, wrap lighting
- Volumetric light beam (16-step ray march through dust/fog in spotlight cone)
- geometry.create_flashlight: procedural flashlight mesh (cylinder + head + lens)
- draw.viewmodel: FPS weapon-style rendering locked to camera view
- model.load: Assimp-based 3D model loader (OBJ/GLB/FBX/BLEND)
- Indoor ambient lighting fix, SSAO bypass for Vulkan clip-space
Performance:
- Frame loop logging suppressed via _in_frame_loop context flag
Assets:
- Real PBR textures from ambientCG (CC0): wood floor, concrete ceiling
- Seed demo: dark room + flashlight beam + Quake-style viewmodel
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Import SDL3CPlusPlus C++ game engine with:
- SDL3 + bgfx rendering backend
- Vulkan/Metal/DirectX shader support
- MaterialX material system
- Scene framework with ECS architecture
- Comprehensive test suite (TDD approach)
- Conan package management
- CMake build system
This provides the native C++ foundation for the Universal Platform's
Game and 3D capability modules.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>