Repository navigation
fix(fp): range traffic signals and signs by view distance - #128
Merged
Merged
Conversation
The traffic-light and stop/yield GLB instances spawn ~790 GeometryInstance3D children (signal heads, bodies) with no visibility range, so every junction in the day-10 city draws in street view regardless of distance. Range them at WS.VIS_PROP * vis_mult with self-fade, like the kit parts around them. Desktop census A/B (day-10 save, hero pose): FpMode in-range draws 955 -> 94, shadow casters 900 -> 39. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Automated reviewNo new findings on the 5 changed files (gdlint, complexity, TODO policy, dead code). Run |
KunalSiyag
added a commit
that referenced
this pull request
Oct 30, 2026
) Each shadow caster is a shadow-pass draw, and a signal lens or sign face casts nothing a walker reads. On the web tier (vis_mult < 1) _range_asset now strips cast_shadow from the GLB children and the kit parts (_mi) no longer cast; the kit range also scales by vis_mult there, closing the gap fix #128 left between _mi (absolute VIS_PROP) and _range_asset (scaled). Desktop and orbit are unchanged. Sites needed nothing: their small parts already ask for shadow=false and the static merge buckets the rest, so the caster set is identical across tiers (verified by probe). Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
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.
Why
The traffic-light and stop/yield GLB instances spawn ~790 GeometryInstance3D children (signal heads, bodies) with no visibility range, so on the day-10 census every junction in the city drew in street view regardless of distance: 790 of 2732 draws at the worst day-10 street crossing.
What
junctions.gd:_range_asset(inst)ranges every unranged GeometryInstance3D child of a junction asset atWS.VIS_PROP * vis_mult(self-fade, 0.5 margin), skipping pre-ranged nodes; applied to the traffic-light and stop/yield GLBs.vis_multfollows the quality preset.traffic_feature.gd: wiresjunctions.vis_multfrom the view.tools/tests/fp_junction_range_test.gd: 6/6.docs/api/scripts.fp.traffic.mdregenerated.Verified
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>