-
Notifications
You must be signed in to change notification settings - Fork 95
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
Geometry Rendering Distortion (Mac) #80
Comments
Can't reproduce on i686-linux with fov 110 at 1920x1080 fullscreen after a quick run to the spot with notarget on. Maybe something mac/driver specific. @ericwa might have an idea.. |
Screen.Recording.2023-09-27.at.4.59.46.PM.mp4Here's a video. More noticable the higher the FOV |
Does not happen on my Intel Mac. |
I can't repro this on Windows either; I don't have access to any M1 macs unfortunately. Here's a Blended over @timbergeron 's screenshot we can see it's just 1 triangle in the middle of a face that's missing: So, definitely not a vis culling related issue, since that would happen at a face granularity. I don't really have any ideas of how to fix this. OpenGL implementation bug? Edit: I'm assuming launching with |
Same issue with -noglsl |
If he is using our release builds, then yes (because while I can actually build arm versions I can't sign/notarize them.) |
I wonder if I'm getting the same with ezQuake on my MacBook. I'm using native arm builds though, so if so it's not arch-dependent. A Mac user reported this a while back, and it was pretty easy to reproduce on dm6 in ezQuake. What's similar in both the cases earlier in this thread, and in the ezQuake bug reports is that two vertices are behind the near plane. Can easily reproduce it in ezQuake at the same place in dm3 as above. But with a different set of vertices, but that might just be due to different iteration order. |
Same rendering issues with FTE on macOS arm64, Yet another piece of the puzzle is that it's not an issue on macOS arm64 when FTE runs as WASM/WebGL in the browser. https://hub.quakeworld.nu/games/?gameId=83873 ... but WebGL is OpenGL ES, so perhaps that's why it works there as it's different driver code and likely something Apple cares more about compared to desktop OpenGL... if it's driver related rather than engine related. |
This feels more and more like a driver bug every day? Closing.. Feel free to re-open if proven otherwise and have patch to fix it. |
@sezero Not sure it's a driver bug, but rather a quirk in an undefined corner,
http://web.archive.org/web/20150908203347/http://fly.srk.fer.hr/~unreal/theredbook/appendixg.html
If so, then perhaps it's not the only hardware this happens on. Talked to a guy yesterday with the same rendering bug in a standalone Metal application. He had a triangle affeced by this, where two vertices shared the same coordinates, both with a negative w component which at least matches the iPad bug mentioned in the first link above. And I suppose the MacBook GPU is an enlarged evolution of the iPad GPU. Haven't had time to dig out the data from any Quake engine yet, but it sounds likely to find such vertices there as well. |
@sezero The cause of this bug is that QuakeSpasm, FTE and ezQuake all produce degenerate triangles. As a quick experiment I added detection and pruning of such in ezQuake which avoids clipping of nearby non-degenerate triangles that are partially out of view. Guess it's a quirk of the hardware, but the solution is easy, just don't produce such triangles. Probably not the only hardware affected by weird side effects due to this. |
If you have a well-tested patch, please post it. |
Nopes, just a quick hack to verify the cause of the bug. I'll change the tesselation in ezQuake to not produce degenerates rather than producing them as filtering them out is a bit nasty. But now it's clear why it happens, so I suggest you reopen the issue. |
OK, re-opened. If someone has a patch for this, it would be welcomed. |
Here's the crude workaround experiment in ezQ from earlier today. It will introduce some blinking pixel unless gl_clear 1 as it's ~0 rather than 0 area. A solution is probably to identify collinear triangles and try to reshuffle the iteration order in hope of finding a non-collinear solution to the problem, and failing to do so, introducing a vertex in the middle of the polygon and tesselate with that as a start. In practice polygon vertex count seem to be fairly small, and the number of polygons causing collinear triangles from the natural iteration order all engines seem to use is relatively small in various maps I've tried, so probably not a huge penalty. |
applied this to qss(m) to test and it worked |
On Mac at FOVs > 100 get rendering artifacts exiting teleporter on e4m3 on MacBook Pro 14 M1 QuakeSpasm-0.96.0-osx-SDL2. See below.
The text was updated successfully, but these errors were encountered: