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

MENU: Selecting antialiasing or anisotropy of 2x shows antialiasing or anisotropy of 4x after selection and vid_restart #136

Closed
kai-li-wop opened this issue Mar 15, 2022 · 3 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@kai-li-wop
Copy link
Member

kai-li-wop commented Mar 15, 2022

If antialiasing of 2x is selected in the menu in the graphics settings, after vid_restart the value 4x is shown as selected in the menu instead of 2x. However, the value of the variable r_ext_multisample is set to 2 as desired. The problem besides the incorrect display is also that the user can no longer set a value of 4 for r_ext_multisample via the menu afterwards, because selecting 4x again is not recognized as a change.

The absolute same issue applies to selecting Anisotropy of 2x!

Steps to reproduction:

  1. Go to the graphics options
  2. Set antialiasing/anisotropy to 2x
  3. Click Accept to restart
  4. Then go to the graphics options again
  5. Antialiasing/anisotropy is set to 4x instead of 2x

This is independent of the changes in 55cd12f (#135 )

Basically, the setting via the menu works flawlessly, because the following values are reached by selection:
Antialiasing Off --> r_ext_multisample 0
Antialiasing 2x --> r_ext_multisample 2
Antialiasing 4x --> r_ext_multisample 4
Antialiasing 8x --> r_ext_multisample 8

Same for anisotropy.

Further information:

The function ceil in combination with the function sqrt is used for both options and therein lies the problem. sqrt of 2 leads to a value of 1.41, which is rounded up to 2 with the function ceil, which leads to the wrong display of "4x". But here a value of 1 is needed, which would lead to the correct display of "2x". Another solution must be found here. For the other selection options of 4x and 8x the existing solution leads to a correct display.

  • ceil(sqrt(0) = 0 --> "Off"
  • ceil(sqrt(2) = 2 --> "4x" --> Issue: should be 1 ("2x")
  • ceil(sqrt(4) = 2 --> "4x"
  • ceil(sqrt(8) = 3 --> "8x"
  • ceil(sqrt(16) = 4 --> "16x"
@kai-li-wop kai-li-wop added the bug Something isn't working label Mar 15, 2022
@kai-li-wop kai-li-wop added this to the v1.7.0 milestone Mar 15, 2022
@kai-li-wop kai-li-wop moved this to Todo in WoP 1.7.x Mar 15, 2022
@kai-li-wop kai-li-wop changed the title MENU: Selecting antialiasing or anisotropy of 2x shows antialiasing or anisotropy of 4x after selection and vis_restart MENU: Selecting antialiasing or anisotropy of 2x shows antialiasing or anisotropy of 4x after selection and vid_restart Mar 15, 2022
@kai-li-wop kai-li-wop moved this from Todo to In Progress in WoP 1.7.x Mar 15, 2022
@kai-li-wop
Copy link
Member Author

Another problem I just found in this context is that a selected value for Anisotropy after a complete restart of WoP (not "vid_restart"!) causes the selected value in the graphics settings to always be reset to "Off". This problem can be traced back to the fact that "r_ext_anisotropy" instead of "r_ext_max_anisotropy" is tried to be read for the current state of the graphics option. "r_ext_anisotropy" does not exist.

@kai-li-wop kai-li-wop moved this from In Progress to Ready for Review in WoP 1.7.x Mar 15, 2022
@kai-li-wop
Copy link
Member Author

Both issues should be fixed with 0381b4f

@3aTmE
Copy link

3aTmE commented Mar 17, 2022

I could replicate the issues with version 1.6.2 with the steps given.
After building from source this issue does not appear any more! 👍
Seems to be fixed now!

Repository owner moved this from Ready for Review to Done in WoP 1.7.x Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants