Thorium-Sim / thorium-nova

Next-generation Spaceship Controls
https://thoriumsim.com
Apache License 2.0
345 stars 14 forks source link

Viewscreen problem #572

Closed GlynD02 closed 1 year ago

GlynD02 commented 1 year ago

Describe the bug

On the client that is displaying the viewscreen, the view breaks when rotating the ship

To Reproduce Steps to reproduce the behaviour:

  1. Click on Start Flight > Click Next
  2. Click Next on Ship screen
  3. Scroll down to Earth Sol mission > Select it > Click Start
  4. Choose Viewscreen on Windows client and Pilot in browser
  5. Rotate the ship with the Port/Starboard yaw
  6. Viewscreen glitches

Expected behaviour

Display the viewscreen correctly with no tearing or glitches

Screenshots

image

Additional context

Win 10, Nvidia 970 graphics card, Client and browser running on same PC

GlynD02 commented 1 year ago

Did a video as well...

https://user-images.githubusercontent.com/59927473/221271586-9ab17a67-2f53-4fdf-a989-7b9561aaa1ab.mp4

alexanderson1993 commented 1 year ago

The video is super helpful. It highlights a fun artifact of the way the view screen works. To transition the background image when you move between solar systems, there are two cubes, one slightly smaller than the other, that fade between each other.

The video shows z-buffer fighting between them - your GPU can't decide which one is in front of the other.

There are lots of ways to address this. Not sure which one would be best, and frankly this background has been really annoying to deal with anyway so maybe I'll find a different solution altogether.