HUD is unreadable in rift mode due to scaling/aliasing.

Create issue
Issue #35 new
Alistair Buxton created an issue

It looks like the whole game is being rendered as if the display were 1920x1200. As a result, on the 1280x800 Rift display, the single pixel font becomes invisible in places due to aliasing.

Comments (12)

  1. Riot

    This is an issue with the user-end rift display setup; we currently full-screen on a dedicated display if we detect one as the rift (matching the rift's native resolution) - otherwise we fall back to full-screening on the primary monitor. If your primary display isn't at 1280x800 (or whatever the resolution will be of future versions), you'll get aliasing. The solution is to run the rift in second display mode under windows.

    We could work around this by permitting the user to change full-screen resolution, which we need to do anyway, which is why i'm not marking this as "wontfix" but it's really an issue with the fact the rift allows you to send it 1920x1080 input and will alias it down silently.

  2. Alistair Buxton reporter

    I normally have my monitors arranged like this. When they are like this, the game opens a 1920x1200 fullscreen window on big monitor, and then actually renders only in the bottom left corner in a 1280x800 area. This could be mitigated by allowing windowed and/or borderless window "fake fullscreen" modes.

  3. Alistair Buxton reporter

    If I arrange the monitors like this then everything appears to work correctly. The fullscreen window opens on the right monitor and the font is correct. However this layout breaks other rift games/applications.

  4. Riot

    Wow ok, having seen "scaling.png", i'm quite surprised. The rift does scale down from 1920 but as you say that's clearly happening before it hits the rift... and we don't have any mechanism in software to (intentionally) scale the display, so what's happening is that one of the viewport values is probably taken from the rift, while the font size is set by the window size... and the viewport it renders in is then not the same size as the window. That's an odd scenario. Can you paste me the beginning of the debug log, no more than the first 100 lines at most? Thanks!

  5. Alistair Buxton reporter
    SoundStorm: PortAudio V19-devel (built Mar 17 2014 22:03:03) build 1899
      0 HDA ATI SB: VT1708S Analog (hw:0,0) Ch 2in 8out 44100Hz
      1 HDA ATI SB: VT1708S Digital (hw:0,3) Ch 0in 2out 44100Hz [out only] [fd]
      2 HDA NVidia: HDMI 0 (hw:1,3) Ch 0in 8out 44100Hz [out only] [fd]
      3 HDA NVidia: HDMI 1 (hw:1,7) Ch 0in 8out 44100Hz [out only] [fd]
      4 HDA NVidia: HDMI 2 (hw:1,8) Ch 0in 8out 44100Hz [out only] [fd]
      5 HDA NVidia: HDMI 3 (hw:1,9) Ch 0in 8out 44100Hz [out only] [fd]
      6 USB Device 0x46d:0x821: Audio (hw:2,0) Ch 2in 0out 32000Hz [in only]
      7 sysdefault Ch 128in 128out 48000Hz
      8 front Ch 0in 8out 44100Hz [out only] [fd]
      9 surround40 Ch 0in 8out 44100Hz [out only] [fd]
      10 surround41 Ch 0in 128out 44100Hz [out only] [fd]
      11 surround50 Ch 0in 128out 44100Hz [out only] [fd]
      12 surround51 Ch 0in 8out 44100Hz [out only] [fd]
      13 surround71 Ch 0in 8out 44100Hz [out only] [fd]
      14 hdmi Ch 0in 2out 44100Hz [out only] [fd]
      15 pulse Ch 32in 32out 44100Hz
      16 dmix Ch 0in 2out 48000Hz [out only] [fd]
     *17 default Ch 32in 32out 44100Hz [sysdef in] [sysdef out] [apidef in] [apidef out]
    Initialising player...
    Initialising universe...
    Starting AdvertCity version Alpha 3.5.2709.14783
    Initialising graphics...
    Oculus: Initialising Oculus Rift...
    DeviceManager - HMD Found OVR0001 - 2
    Oculus: Device found
    DeviceManager - HMD Found OVR0001 - 2
    Oculus: Sensor found
      DisplayDeviceName: OVR0001
      ProductName: Oculus Rift DK1
      Manufacturer: Oculus VR
      Version: 0
      HResolution: 1280
      VResolution: 800
      HScreenSize: 0.14976
      VScreenSize: 0.0936
      VScreenCenter: 0.0468
      EyeToScreenDistance: 0.041
      LensSeparationDistance: 0.0635
      InterpupillaryDistance: 0.064
      DistortionK[0]: 1
      DistortionK[1]: 0.22
      DistortionK[2]: 0.24
      aspect ratio  = 0.8
      field of view = 1.70272
      interlens distance (ratio)  = 0.424012
    Monitors: 3
    Monitor 0 (primary)
      Name: DVI-D-0
      Physical size: 518 324
      Position: 0 0
      Mode: 1920 1200 59
    Monitor 1
      Name: DVI-I-0
      Physical size: 338 270
      Position: 1920 176
      Mode: 1280 1024 60
    Monitor 2
      Name: HDMI-0
      Physical size: 150 94
      Position: 320 200
      Mode: 1280 800 60
      (Oculus Rift candidate)
    Oculus Rift mode enabled.
    GL_VERSION:  4.4.0 NVIDIA 331.38
    GL_VENDOR:   NVIDIA Corporation
    GL_RENDERER: GeForce GTX 780/PCIe/SSE2
    GL version major 4 minor 4 revision 0 API 196609 profile  0
    GL antialiasing mode: 8 buffers: 1, samples: 8
    Graphics initialised.
    New window size [1280,800] aspect ratio 1.6
    Looking for input devices...
      0: gnome15-digital-joystick
      1: gnome15-joystick
    Selected input device 0: gnome15-digital-joystick
      2 axes, 6 buttons
    DEBUG: mouse locked in mouselook
    Level unchanged, old 0 new 0
    New window size [1920,1200] aspect ratio 1.6
    ERROR: player corp is nullptr when drawing HUD data
    Initialisation complete.
    DEBUG: mouse is free
    Have a nice day!
    
  6. Riot

    That all looks fine - it appears to correctly identify monitor 2 as the rift candidate in this situation. The key lines are:

    Oculus: Sensor found
      ProductName: Oculus Rift DK1
      HResolution: 1280
      VResolution: 800
    Monitor 2
      Mode: 1280 800 60
      (Oculus Rift candidate)
    Oculus Rift mode enabled.
    

    That should full-screen the game on monitor 2, running at native 1280x800 resolution... does it not do that?

  7. Alistair Buxton reporter

    No. It opens a window which covers all of monitor 0, and then renders into a 1280x800 viewport in the bottom left of the window. The monitor layout is as in layout.png and the result is scaling.png.

  8. Riot

    Hmm, this sounds like a glfw3 bug in that case, in opening the window itself. I'm abroad at the moment but when i'm back i'll put together a minimal test program to try opening a full-screen context on a monitor other than 0. I have linux test machines but no multimonitor capable ones so can't reproduce the issue here.

  9. Log in to comment