-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Avoid scaling 2d textures that could be used as “3d“ #3464
Conversation
Fixes the red screen in "Lost in Random", "Far: Changing Tides" and "A Hat in Time". |
Could it fix the similar issue occuring on AMD linux when playing SMO in handheld mode? |
No, I believe that issue is caused by out of bounds image access, which needs a feature to be available and enabled on vulkan, and I guess on opengl there is no workaround. EDIT: This extension does cover out of bounds texel fetch on opengl, might be worth looking into: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks. Nice to see this issue finally fixed.
Test the Build. I can confirm that the scaling problem red is now solved. All are perfect now |
This PR adds another “safe mode” toggle for scaling that disables it for 2d textures that might be used as 3D. These textures essentially have a line of “slices” stacked in the x direction, rather than using a real 3d texture, as it is easier to render into. Games that dynamically update a 3D look-up-table to do tone mapping might do this. If that texture were scaled, the slices would blend into each other, causing black to appear as red, and bright red to darken too.
Some notes about the rules:
Hopefully this should fix issue #3456 , but all those games are on different engines so it does need tested.