Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optics - Increase width of hidePeripheralVision slightly to prevent gaps #1568

Merged
merged 1 commit into from
Jun 24, 2023

Conversation

PabstMirror
Copy link
Contributor

ref acemod/ACE3#9141

I can reproduce at those exact resolution and scale/
20230214000042_1

mine has a gap on the left which is easy to see, but there also is a gap on the right at the edge of the image.

Checking the 3 ctrlPosition
Left: [-0.918847,-0.563663,0.0890598,2.12733]
Body: [-0.829787,-1.27305,2.65957,3.5461]
Right: [1.82979,-0.563663,0.0890598,2.12733]

Add up the widths and you get 2.83769 which is identical to the safezoneW
But I guess it's just a rounding error and the left ends a pixel short of where the body begins?
I think just adding half a pixel should be enough?

@PabstMirror PabstMirror added this to the 3.15.9 milestone Feb 14, 2023
@commy2
Copy link
Contributor

commy2 commented Feb 16, 2023

How would making it half a pixel wider result in the gap on the left be closed? Right sure, perhaps, if half pixels are even recognized, but left is controlled entirely by X value, which shouldn't change by changing W. Right?

@PabstMirror
Copy link
Contributor Author

Left: [-0.918847,-0.563663,0.0890598,2.12733]
Body: [-0.829787,-1.27305,2.65957,3.5461]
Right: [1.82979,-0.563663,0.0890598,2.12733]

Left X + Width:
-0.918847 + 0.0890598 = -0.829787
Which looks like the same as Body X:
-0.829787

But might not be because of floating point?
Or the engine rounds down on the number of actual pixels to render?

This PR does fix the issue and shouldn't effect people at other resolutions.

@commy2
Copy link
Contributor

commy2 commented Feb 17, 2023

It would make more sense to decrease left/top by 1 pixel and increase width/height by 2 if this is an issue.

@PabstMirror
Copy link
Contributor Author

I would prefer to change the value as little as possible; just enough to fix the issue

Copy link
Member

@veteran29 veteran29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would make more sense to decrease left/top by 1 pixel and increase width/height by 2 if this is an issue.

might be safer for all resolutions but if the current solution works too... LGTM

@jonpas jonpas merged commit 4809ef8 into master Jun 24, 2023
@jonpas jonpas deleted the opticsPixel branch June 24, 2023 11:50
@jonpas jonpas changed the title Optics - Increase width of hidePeripheralVision slightly to prevent gaps Optics - Increase width of hidePeripheralVision slightly to prevent gaps Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants