Claude/fog of war research sgxoa#1261
Merged
Merged
Conversation
Cleanup from previous commit - removed unused systems that were initialized but never actually integrated into the computation flow: Removed (dead code): - VisionOptimizer: Reference counting system that duplicated GPU efficiency - SDFVisionRenderer: Smooth edge system not connected to fog shader - VisionCompute LOS methods: GPU height-based LOS never wired into shader - Terrain getHeightMapData/Dimensions: Only needed for removed GPU LOS Kept and properly integrated: - LineOfSight: Now actually used in revealArea() for height-based blocking - Uses Terrain.getHeightAt() as height provider - Falls back to simple circular reveal when no height provider set - Implements industry-standard shadowcasting algorithm The GPU path still uses simple circular visibility (efficient for most cases). The CPU/main-thread path now properly uses LineOfSight when height data is available, enabling terrain-based vision blocking (high ground advantage). https://claude.ai/code/session_01XSmJ7hgNws3pkW6EHC2W4j
…ight" This reverts commit 2639d27.
Phase 1: VisionOptimizer now uses LineOfSight for terrain-aware visibility - Added setLineOfSight method to VisionOptimizer - getCellsInRange uses LOS when height provider is available - VisionSystem connects LineOfSight to VisionOptimizer automatically Phase 2: Fixed LineOfSight high ground advantage - Units on high ground can now see down without their own terrain blocking them - Added casterGroundHeight check in traceRay to skip terrain at/below caster level Phase 3: Fixed SDFVisionRenderer algorithm - SDF now correctly computes distance to boundary (not just visibility) - Boundary cells are properly identified (visible cells adjacent to fog) - Fixed edge factor calculation for cells far from any boundary - Updated test to check actual SDF behavior rather than Three.js internal state https://claude.ai/code/session_01XSmJ7hgNws3pkW6EHC2W4j
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.