Skip to content

Fix fallback shader scaling for adaptive CRT shaders#2840

Merged
johnnovak merged 1 commit intomainfrom
jn/adaptive-shader-fix
Sep 7, 2023
Merged

Fix fallback shader scaling for adaptive CRT shaders#2840
johnnovak merged 1 commit intomainfrom
jn/adaptive-shader-fix

Conversation

@johnnovak
Copy link
Copy Markdown
Member

@johnnovak johnnovak commented Sep 6, 2023

Always disable integer scaling in integer_scaling = auto mode for adaptive CRT shaders when the fallback sharp shader is active.

This fixes a rather obscure bug that manifests when:

  • An adaptive CRT shader is selected (glshader = crt-auto-*)
  • The default integer_scaling = auto mode is selected
  • The fallback sharp shader is active because the minimum vertical scaling ratio requirement hasn't been met
  • When the fallback shader activation is triggered first by a screen mode change or a window resize event, the integer scaling is turned off — this is correct
  • But if you then press the "Reload Shader" shortcut, or enter/exit fullscreen, the vertical integer scaling will be activated again — this is a bug 🛑

Always disable integer scaling in 'integer_scaling = auto' mode for
adaptive CRT shaders when the fallback 'sharp' shader is active.
@johnnovak johnnovak added bug Something isn't working shaders Issues related to shaders video Graphics and video related issues labels Sep 6, 2023
@johnnovak johnnovak self-assigned this Sep 6, 2023
@johnnovak johnnovak marked this pull request as ready for review September 6, 2023 12:07
Comment thread src/gui/shader_manager.cpp
Copy link
Copy Markdown
Collaborator

@weirddan455 weirddan455 left a comment

Choose a reason for hiding this comment

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

Seems like a pretty straight forward and small bug fix. Nice job.

@johnnovak
Copy link
Copy Markdown
Member Author

Seems like a pretty straight forward and small bug fix. Nice job.

Thanks for the review @weirddan455 👍🏻

@johnnovak johnnovak merged commit 732f518 into main Sep 7, 2023
@kcgen kcgen deleted the jn/adaptive-shader-fix branch October 17, 2023 19:24
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.

2 participants