Interrupt / systemshock

Shockolate - A minimalist and cross platform System Shock source port.
GNU General Public License v3.0
806 stars 65 forks source link

[OpenGL] Weird star glitches at some places #137

Closed inguin closed 5 years ago

inguin commented 6 years ago

The OpenGL star rendering glitches in a few places. I can reliably reproduce it in a room a the beginning of level 2 (see this savegame):

  1. Open the door and walk slowly towards the window; the stars "zoom out" when crossing the doorstep.
  2. Walk closer to the window; at some point the stars disappear.
Interrupt commented 6 years ago

Oh weird, it looks like something is happening with one of the View matrices there.

inguin commented 6 years ago

All three coordinates of each star become very small at the point of the zoom, so there's probably a rounding issue somewhere. It works when using the screen coordinates of each point (sx/sy/0) instead of the 3D coordinates, but I'm not sure how g3_project_point() can do a better job than OpenGL.

The second issue is still a mystery.

Interrupt commented 6 years ago

Interesting find! For me the stars even disappear at some spots using the sx / sy coordinates. Switching back to the Software renderer in those spots shows the stars, so it's even stranger.

Interrupt commented 6 years ago

https://github.com/Interrupt/systemshock/pull/142 fixes some star rendering issues, but they still disappear sometimes.

donnierussellii commented 5 years ago

Disappearing stars fix in my PR #259