Skip to content
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

[Bug] Gun crosshair works correctly only in native resolution #471

Closed
voradori opened this issue Dec 16, 2018 · 6 comments
Closed

[Bug] Gun crosshair works correctly only in native resolution #471

voradori opened this issue Dec 16, 2018 · 6 comments

Comments

@voradori
Copy link

voradori commented Dec 16, 2018

Description

Crosshair is behaving wrong on X-axis with internal resolution >1

Expected behavior

Crosshair correctly follows mouse cursor and real ingame aim mark on any GPU render scale

Actual behavior

a)
Crosshair's position on X axis is divided by N when using N image scaling.
E.g. when scale = 2, and mouse is in the center, crosshair is between cursor\mark and left screen edge

Y axis works as expected.
It's just crosshair X position draw bug - real aim mark is where it should be.

beetle psx

b)
There is also a very slight difference between crosshair and aim mark (and mouse cursor when windowed) even on native internal resolution - the closer crosshair to left\right edge is, the bigger is the difference. But it's very minor thing - the biggest difference is about 0.5 cm on a standard fullhd 24" screen

beetle psx 2
beetle psx 3

Steps to reproduce the bug

  1. Set input device 1 to Guncon
  2. Run Time Crisis to calibration screen
  3. Shoot at the aim to spawn red aim mark
    a) 4. Set internal gpu resolution to any value > 1
    b) 4. Let Internal gpu resolution at 1
  4. Move crosshair to Left and Right edges (try in both windowed and fullscreen)

Version/Commit

0.9.44.1 beeee12 SW\HW core
(There's no working crosshair and even shots under mouse cursor on HW core for gl\vulcan renderer, even in SW mode. DX renderers works with same problems as SW core)

Core options

Internal GPU Resolution = 2
Skip Bios = True
Widescreen hack = true

Environment information

  • OS: Win10 Pro x64 1809
  • Retroarch 1.7.5
@voradori voradori changed the title [Bug] Gun crosshair works correctly only in native resolution [Beetle PSX][Bug] Gun crosshair works correctly only in native resolution Dec 16, 2018
@Jj0YzL5nvJ
Copy link

Is the widescreen hack. That option only works correctly on some 3D games. The "aim" is a 2D element.

@voradori
Copy link
Author

voradori commented Dec 16, 2018

don't judge with no testing.
calibration screen is pure 2d.
and everything is the same for WS hack off

problem a
beetle psx a

problem b

beetle psx b1
beetle psx b2

as you can see, ws hack has no influence
that's same for both cores on any working renderer

@voradori voradori changed the title [Beetle PSX][Bug] Gun crosshair works correctly only in native resolution [Bug] Gun crosshair works correctly only in native resolution Dec 16, 2018
@Jj0YzL5nvJ
Copy link

Jj0YzL5nvJ commented Dec 17, 2018

This recall me a very old bug on Debian with the first generation of Intel HD Graphics...
What is your GPU and driver version?

@voradori
Copy link
Author

GTX 980, driver 416.94

@SirFritz
Copy link

I also have this issue, and on higher resolutions than 2x crosshair disappears completely. I have also experienced the slightly out of sync crosshair on the sides of the screen.

GTX970 417.71

@ggrtk
Copy link
Collaborator

ggrtk commented Nov 26, 2019

Issue has been diagnosed to screen space scaling in input_handle_lightgun() and input_handle_lightgun_touchscreen() in input.cpp. The scaling formula needs to be modified to account for the internal resolution scale, horizontal overscan cropping, and potentially the initial/last scanlines setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants