-
-
Notifications
You must be signed in to change notification settings - Fork 911
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
Screen Tearing In Window Mode #2216
Comments
Oh, its it the bad jitter in the FPS tempalte? whenever you move around and look at something it looks like bad FPS? |
So I'm new to stride so I haven't use any other template, but yes - especially when you strafe right or left and move your mouse to keep looking at an object - you get horrible screen tearing. In fullscreen mode, you don't get it at all. EDIT: Just pulled up the third person template - also get the screen tearing. Although, its less noticeable because of how the camera moves. |
Thank you for all of this, looks like you accidently copied and paste twice here, mind if you correct it? I got the rest of the changes in.
to
|
Ah yep, fixed! Also worth mentioning that my best speed for for the follow script is 25, seems to be the smoothest without falling behind. |
Whoa. Well, I think I definitely screwed it up somewhere because I'm getting wild behavior. I'm going to come back tonight and just rewrite the camera and movement system, while taking in your smooth lerping technique into account. For me, I think the player control and camera should all be in one script. Thanks a ton for the help! If you have a sample project with these changes let me know as well. Sounds like this is probably not a v-sync issue. |
Here is the project with the fixes included: https://github.com/Doprez/smooth-fps-template/tree/main It also had a change with some light shafts that cause an initial lag on loading the game but it should clear up after 2-3 seconds. |
@Doprez You are a saint! That fixed it. It was a bit laggy at first, but then when I also set the Its full steam ahead for my wpf/avalonia overlay. I think I definitely will open source it. The other wpf/avalonia solutions involve the attempt of rendering the UI framework in Stride, mine just uses win32 apis to get it to work. EDIT: The only thing not working in this code is that gun shots do not hit when you are moving the character, I'm sure i can figure out a fix to that though. |
@Doprez, do we need to document this? |
Probably wouldnt hurt, I know this isnt the first time I have seen someone with this issue and even when I first started this drove me nuts because I didnt know why lol. |
Let's do it. Do we have a relevant section in the manual? Should it go to UI section? Wouldn't you mind creating a PR, maybe just simply summarising the subject? |
Yep, I can take some time later to do this. I am not sure where would be the right spot though.. maybe Physics? |
Thank you. Let's put it under Physics. I will assist with the rest, I can check with others if it is the right location. Also, you can just dump content to the new docs page, and I can align and format further, just to save your time :) |
Release Type: Official Release
Version: 4.2.0.2122
Platform(s): Windows 11
Describe the bug
When running the fps template in window mode, screen tearing occurs (tested on a 100hz monitor, and 60hz monitor)
Per @Doprez, I tried the following code:
I've also tried changing PresenterInterval options. Having two selected still creates screen tearing, but its more, how do I say... steppy.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No screen tearing occurs, like when in exclusive full screen.
Additional context
I've also tried setting 0 for throttle limits on window update rate. I've also tried
WindowMinimumUpdateRate.SetToPreciseAuto()
, no dice.The text was updated successfully, but these errors were encountered: