Search Unity

Bug ReadPixels on Multi-Display setup (wrong output)

Discussion in 'General Graphics' started by Flavelius, Jan 25, 2021.

  1. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    945
    Hi,
    I have a dual display setup and when i do a ReadPixels() call i only always get the output of the second display, not the main one. It's used as color picker, so the mouse coordinates are fed as rect input (and the values are correct). But the returned color values clearly are not from below the mouse but from the same position on the other display.
    How can i make it work correctly (return the color from the actual input coordinates -> the first display)?
     
  2. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    945
    Btw, the same applies for ScreenCapture.CaptureScreenshot. It only captures one screen and it's the wrong one.