Skip to content

Fix vertical lines turning into wide bands when looking up/down - #162

Open
Toseflo wants to merge 1 commit into
EngineHub:masterfrom
Toseflo:fix/vertical-line-bands
Open

Toseflo wants to merge 1 commit into
EngineHub:masterfrom
Toseflo:fix/vertical-line-bands

Conversation

@Toseflo

@Toseflo Toseflo commented Nov 11, 2026

Copy link
Copy Markdown

The vanilla line shader multiplies each endpoint's screen-space offset by its own w. When one endpoint of a long segment is behind the camera, the offset flips sign in clip space and the clipped quad widens roughly by |w_behind| / w, turning tall vertical lines into wide bands.

Split line segments in BatchedRenderSink into pieces proportional to their camera distance (measured in pose space), so pieces crossing the camera plane stay outside the view frustum. Also cull vertical lines in Render3DGrid on the Y axis like X/Z.

Without the fix With the fix
Without fix With fix

The vanilla line shader multiplies each endpoint's screen-space offset by its own w. When one endpoint of a long segment is behind the camera, the offset flips sign in clip space and the clipped quad widens roughly by |w_behind| / w, turning tall vertical lines into wide bands.

Split line segments in BatchedRenderSink into pieces proportional to their camera distance (measured in pose space), so pieces crossing the camera plane stay outside the view frustum. Also cull vertical lines in Render3DGrid on the Y axis like X/Z.
@Toseflo

Toseflo commented Nov 11, 2026

Copy link
Copy Markdown
Author

The CI failure is a transient plugin resolution error (net.kyori.indra.licenser.spotless couldn't be fetched from the Gradle Plugin Portal), unrelated to this change. Could someone re-run the build?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant