Skip to content

Conversation

@FolloW12587
Copy link
Contributor

Hey!

I noticed an issue where the snow effect doesn’t work correctly on the secondary screen.

Issues

  • If the active window is on the left screen the right screen mirrors left one
  • If the active window is on the right screen - it doesn't work at all
image

Reason

The shader was working with each screen separately, and the coordinates of the snowflakes are local to each screen. Meanwhile, Uniforms.windowRect which is send in updateSnowflakes has global coordinates for all combined screens.

Solution

To fix this, I added a conversion of the window coordinates from global to local. So I've added the calculation of the global 'united' display and pass it to each screens' renderer with the origin of each screen, so it can calculate local coordinate of point in global coordinate system.

@BarredEwe
Copy link
Owner

BarredEwe commented Dec 12, 2025

Hi! I checked it, it works perfectly. Thanks for the fix.

#3

@BarredEwe BarredEwe merged commit 70087f5 into BarredEwe:main Dec 12, 2025
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.

2 participants