forked from genewildish/Mainline
Bug: CameraStage doesn't propagate camera_y to PipelineContext #40
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?
Problem
ViewportFilterStagereads camera position fromctx.get("camera_y", 0)butCameraStagenever sets this value in the context state.Root Cause
ctx.set("camera_y", camera.y)orctx.set_state("camera_y", camera.y)Expected Behavior
ViewportFilterStageshould read the current camera position from context and filter items accordingly. For example, withcamera_y = 100, items starting at position 100+ should be visible.Current Behavior
ViewportFilterStage always reads
camera_y = 0because it's never updated, causing incorrect filtering.Code Locations
engine/pipeline/adapters/transform.py: Line 76 -camera_y = ctx.get("camera_y", 0)engine/pipeline/adapters/camera.py: CameraStage.process() doesn't set context stateengine/app/pipeline_runner.py: Line 631 - Initialcamera_y = 0set once, never updatedTest Case
From
tests/test_viewport_filter_performance.py:216:Proposed Fix
In CameraStage.process():
camera.ypositionctx.set_state("camera_y", self._camera.y)to propagate to other stagesRelated Issues
Acceptance Criteria