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

Rendering Bugs (when using -DUSE_I386_ASM=FALSE) #48

Open
DanielGibson opened this issue May 1, 2016 · 8 comments
Open

Rendering Bugs (when using -DUSE_I386_ASM=FALSE) #48

DanielGibson opened this issue May 1, 2016 · 8 comments

Comments

@DanielGibson
Copy link

DanielGibson commented May 1, 2016

Sometimes the viewport is screwed up, like the camera is rotated by 90°, but only for part of the screen. It usually goes back to normal soon, and screws up again later.
I don't really know how to reproduce it, in TSE it happens sometimes early in the first level (on the path between the pond and the first building), sometimes a bit later (shortly after receiving the flamethrower) - but more often than not I can play for a long time and it doesn't happen at all.
If it has happened once it tends to happen again and again.

So far I have observed this with both 32 and 64bit builds on both Linux and OSX, but only when using USE_PORTABLE_C instead of x86 ASM - however this may even be coincidence as I didn't test with ASM as much.

I have seen this bug since I started toying with the Serious Engine on Linux (i.e. before my 64bit fixes), but only now I've been able to create screenshots:

sesam-gfxbug1
sesam-gfxbug2

@yamgent
Copy link

yamgent commented May 1, 2016

Hmm, I have heard of this bug before, but I have never been able to reproduce this on my side.(I jinxed it, now I am getting this pretty frequently, and I don't know why.)

Someone reported the same thing for the vanilla source version on the forums (url), which indicates that the bug might be non-port related (it is hard to say though, since there's no reliable way of reproducing this).

@ptitSeb
Copy link

ptitSeb commented May 8, 2016

I have also this kind of things on the Pandora port. I have linked this behavor to slow frame rate, as it seems to happen (on the Pandora) only when framerate gets pretty low (sub 10fps).

@yamgent
Copy link

yamgent commented May 9, 2016

Interesting... does it happens every time the frame rate drops below 10fps? Does it recover when the frame rate return back to normal?

@DanielGibson
Copy link
Author

I think that it happened to me (on PC) without frame rate drops.

Also: Are you sure the frame rate drops and then the errors happen - or maybe the framerate drops because of the errors?

@ptitSeb
Copy link

ptitSeb commented May 9, 2016

It's not systematic, but happens mosty always around the same pot (like the one in the screenshot, which is the beggining of the game).
On the Pandora, once wrong, it doesn't recover.

@icculus
Copy link
Owner

icculus commented May 9, 2016

There was a similar bug in the Linux port before source release, where the framebuffer would invert, and it came down to an epsilon issue. Bug was also in the Windows version, but Visual C 6 just happened to generate slightly different code and avoid it...I guess that's why this other bug happens in the vanilla sources when built with a newer Visual Studio? I always assumed it was my bug.

That why there's the EPS() function in Engine/Math/Quaternion.h ... we might need that elsewhere, too?

The framebuffer flipping sideways like that definitely happened in the original Linux port of the The Second Encounter (and I don't think I ever saw it in The First Encounter, but I could be wrong), and I never figured out why.

@ptitSeb
Copy link

ptitSeb commented May 9, 2016

On the Pandora port, I have changed a bit the Eps() function to be even less sensitve:

#ifdef PLATFORM_PANDORA
    if ((orig <= 1e-4f) && (orig >= -1e-4f))
#else
      if ((orig <= 10e-6f) && (orig >= -10e-6f))
#endif

I don't have reproduce the issue since, but the performances had improve too, so it may just be luck.

@Manuel-K
Copy link

I've encountered the same bug several times in the room after you get the flamethrower with the 64 bits build.

(I don't know about the 32 bits one with asm, because that one segfaults on startup.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants