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

Frameskipping cause glitches with shader that have requires60fps #12325

Closed
iota97 opened this issue Sep 14, 2019 · 14 comments
Closed

Frameskipping cause glitches with shader that have requires60fps #12325

iota97 opened this issue Sep 14, 2019 · 14 comments

Comments

@iota97
Copy link
Contributor

iota97 commented Sep 14, 2019

What happens?

If have shader have 60FPS enabled when one unthrottle the game speed the game show old frame, stop completely on one or loop over some.
It's graphic only, the game keep running normally and one unthrottle is stopped the graphic get back to normal as well.

Sometimes the shader get totally stuck and display nothing (0 fps, all black), when this happen stop unthrottle doesn't fix it and the shader must be turned off to let the game render again.

Only shader that have this is "CTR scanline" (note that "Scanline (CTR)" require no 60fps and work fine).

What should happen?

Either should be fixed, ignore the 60 fps requirement and let the shader bug its timing (better that the totally corrupted graphic), or just disable the shader during unthrottle.

What hardware, operating system, and PPSSPP version? On desktop, GPU matters for graphical issues.

Vulkan and OpenGL are affected on both Android and desktop linux. I only had MHFU to test that have a max framerate of 30, might be related.

@LunaMoo
Copy link
Collaborator

LunaMoo commented Sep 14, 2019

Just to note can't reproduce this on windows, even with frameskip unthrottle in neither backend.

@iota97
Copy link
Contributor Author

iota97 commented Nov 3, 2019

Made some quick test on 1.9.4 with 30 vs 60 fps game:

In both 30 and 60 FPS game the graphic glitches badly showing old frame mixed with new one, getting stuck on one and so on.

Game keep running in background just fine (speed in not unthrottled, but just normal game speed)

The only difference is if stopping the unthrottling fix the rendering: in 30 fps happen 50% of the time, in 60 fps game never. Opening game setting (just the pause menu is fine) fix it in both cases.

@hrydgard
Copy link
Owner

Note to self: This can easily be reproduced on Windows by setting FrameskipUnthrottle = True.

@LunaMoo
Copy link
Collaborator

LunaMoo commented Jan 29, 2020

Weird, I couldn't reproduce on win 10 when testing this back when I commented, maybe it has to do something with vsync or something else I keep disabled.

Edit:
Oh yeah I can see it now, maybe the game I tested this on was not obvious(or ran soo fast I couldn't see anything since with frameskip unthrottle it's kind of common case>.>), I still can't reproduce rendering stopping completely nor any obvious glitches at least in MH3rd, but I can see it as displaying older frames in-between newer ones with frameskip unthrottle, so it's kind of jumpy.

@iota97
Copy link
Contributor Author

iota97 commented Jan 29, 2020

I couldn't test if the PR fix it, but starting MHFU on android (Redmi 4X) with CTR shader (force 60 fps one) cause it to get stuck at start all the time (the FPS counter say 0/30) even if no unthrolle is used. Pausing and going back to game make it start again as always.

@hrydgard
Copy link
Owner

Huh, that's pretty interesting...

@LunaMoo
Copy link
Collaborator

LunaMoo commented Jan 29, 2020

@iota97, since it's android, do you use frameskip or auto frameskip there? Maybe it just skipped frames at boot.

Edit: Yeah I could reproduce it with just frameskipping, so renamed the issue.

@LunaMoo LunaMoo changed the title Unthrottle cause glitches with shader that have requires60fps Frameskipping cause glitches with shader that have requires60fps Jan 29, 2020
@LunaMoo
Copy link
Collaborator

LunaMoo commented Jan 29, 2020

Interesting note, the flag itself doesn't cause this problem. Post process shader(even empty one) with a flag does.

@hrydgard
Copy link
Owner

Wait, so just regular frameskipping without unthrottling is problematic too, with a postprocessing effect with the flag enabled?

@iota97
Copy link
Contributor Author

iota97 commented Jan 29, 2020

Good point, disabling autoframe skip fix it on my end as well.

Edit -- on MHFU (30 fps game)
No frame skip / 1 frame: fine
2 - 5 frame: flicker previous frame
Auto: stuck with 0 fps

@hrydgard
Copy link
Owner

hrydgard commented Jan 29, 2020

At least my PR won't make things worse but indeed the issue seems to go deeper.

hrydgard added a commit that referenced this issue Feb 29, 2020
@hrydgard
Copy link
Owner

hrydgard commented Mar 1, 2020

This might have been improved by #12665.

hrydgard added a commit that referenced this issue Mar 1, 2020
@iota97
Copy link
Contributor Author

iota97 commented Mar 4, 2020

I can't reproduce the flicker anymore so i guess that is fixed.

Auto frameskip + 60fps shader still cause MHFU to render a black screen on startup (pause and unpause will make it render fine again, and game is still running fine under the black screen). I can reproduce only on my phone (Redmi 4X) and not on my PC.

@unknownbrackets
Copy link
Collaborator

Well, frameskip will still potentially decide to skip the real frames and only process the fake frames.

-[Unknown]

hrydgard added a commit that referenced this issue Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants