Skip to content

Fix double-scanning & pixel-doubling handling in openglnb output mode #3092

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

Merged
merged 1 commit into from
Nov 5, 2023

Conversation

johnnovak
Copy link
Member

@johnnovak johnnovak commented Nov 5, 2023

Description

The adaptive CRT shader always forced single-scanning in openglnb output modes which was wrong (e.g., 320x200 content always appeared single-scanned). This fix corrects that. See the updated comments block for the fixed double-scanning/pixel-doubling criteria.

The issue was reported by @SmilingSpectre and mmpp0 on the eXoDOS Discord.

Manual testing

  • Commented out the debug logging at the end of log_display_properties() in sdlmain.cpp to log the actual rendered dimensions as well.
  • Verified the correct double-scanning & pixel-doubling behaviour for opengl, openglnb, texture and texturenb for all VGA modes in Deluxe Paint II (both visually and by looking at the debug logs; 320x200 modes should result in 640x400 render dimensions for VGA).
  • Verified that the output = opengl + glshader = none special case results in doubling for VGA modes (i.e., 640x400 render dimensions for 320x200 modes).
  • Verified that the output = openglnb + glshader = none special case results in no doubling for VGA modes (i.e., 320x200 render dimensions for 320x200 modes).

Checklist

Please tick the items as you have addressed them. Don't remove items; leave the ones that are not applicable unchecked.

I have:

  • followed the project's contributing guidelines and code of conduct.
  • performed a self-review of my code.
  • commented on the particularly hard-to-understand areas of my code.
  • split my work into well-defined, bisectable commits, and I named my commits well.
  • applied the appropriate labels (bug, enhancement, refactoring, documentation, etc.)
  • checked that all my commits can be built.
  • confirmed that my code does not cause performance regressions (e.g., by running the Quake benchmark).
  • added unit tests where applicable to prove the correctness of my code and to avoid future regressions.
  • made corresponding changes to the documentation or the website according to the documentation guidelines.
  • locally verified my website or documentation changes.

@johnnovak johnnovak added video Graphics and video related issues shaders Issues related to shaders bug Something isn't working labels Nov 5, 2023
@johnnovak johnnovak marked this pull request as ready for review November 5, 2023 01:14
@johnnovak johnnovak self-assigned this Nov 5, 2023
Copy link
Member

@kcgen kcgen left a comment

Choose a reason for hiding this comment

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

Nice quick fix, @johnnovak !
Just a minor boolean vs. bitwise suggestion.

@weirddan455
Copy link
Collaborator

Haha great minds think alike @kcgen

@johnnovak johnnovak force-pushed the jn/auto-crt-openglnb-fix branch from 22bfb15 to 54eab84 Compare November 5, 2023 09:07
@johnnovak johnnovak merged commit 2568220 into main Nov 5, 2023
@kcgen kcgen deleted the jn/auto-crt-openglnb-fix branch November 7, 2023 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working shaders Issues related to shaders video Graphics and video related issues
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants