Skip to content

Zoom in further for a stronger parallax - #28

Merged
CPritch merged 1 commit into
mainfrom
feat/margin-follows-intensity
Oct 10, 2026
Merged

CPritch merged 1 commit into
mainfrom
feat/margin-follows-intensity

Conversation

@CPritch

@CPritch CPritch commented Oct 10, 2026

Copy link
Copy Markdown
Owner

The shader zooms in 2.5% on each side, so shifted pixels come from beyond the screen instead of the stretched edge. That's enough for a parallax_intensity up to 0.05. Past that, the biggest shifts reached the edge.

  • The margin is now 2.5% or half the intensity, whichever is more, so the default and anything up to 0.05 look the same as before
  • The shader works it out from the intensity it already gets. On the Rust side, start_transition zooms the scale it hands the portal and dissolve by the same margin, from the intensity step_and_write last drew with
  • The config docs no longer say the edges show past 0.05

Nearfar wants a stronger parallax on phones (0.08), which is what this is for. Format, clippy and tests pass locally, with a new test that the margin covers the biggest shift, and the render crate still checks for Android. Not yet run on the desktop.

The margin the shader zooms in by was fixed at 2.5% each side, enough for
an intensity of 0.05. It now grows to half the intensity when that's
more, so stronger settings no longer pull in the stretched edge.
@CPritch
CPritch merged commit 2025fb6 into main Oct 10, 2026
1 check passed
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