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

Ford Racing 2 (PAL), Incorrect shadow drawing, (only hardware mode) #1982

Open
MarcoEstevez opened this issue Jun 25, 2017 · 19 comments
Open

Comments

@MarcoEstevez
Copy link
Contributor

MarcoEstevez commented Jun 25, 2017

PCSX2 version:
PCSX2 1.5.0-20170513103906 - compiled on May 13 2017

PCSX2 options:
OpenGL Hardware, No hacks

Plugins used:
Bound GS: GSdx32-AVX2.dll [GSdx 20170513103906 (MSVC 19.00 AVX2/AVX2) 1.1.0]
Bound PAD: LilyPad.dll [LilyPad (20170513103906) 0.12.1]
Bound SPU2: Spu2-X.dll [SPU2-X 20170513103906 2.0.0]
Bound CDVD: cdvdGigaherz.dll [cdvdGigaherz 20170513103906 0.11.0]
Bound USB: USBnull.dll [USBnull Driver 20170513103906 0.7.0]
Bound FW: FWnull.dll [FWnull Driver 20170513103906 0.7.0]
Bound DEV9: DEV9null.dll [DEV9null Driver 20170513103906 0.5.0]

Description of the issue:
This game suffers on hardware mode 2 issues
1 - Shadow under cars has flat white color, isntead of a normal gray-black color saw on Software mode
2 - Brake red lighs glow effects on the cards has squared artifacts

How to reproduce the issue:
Any race using back camera and using OpenGL hardware mode, I have tested on all backends and bahaves similarly on all of them.

PC specifications:
Operating System = Microsoft Windows 10 Home (build 15063), 64-bit
Physical RAM = 7986 MB
CPU name = Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz

x86 Features Detected:
SSE2.. SSE3.. SSSE3.. SSE4.1.. SSE4.2.. AVX.. AVX2.. FMA

OpenGL information. GPU: GeForce GT 755M/PCIe/SSE2. Vendor: NVIDIA Corporation. Driver: NVIDIA 382.53

Image showing the graphical artifact:
image

correct effect on OpenGL software:
image

GS Dump
https://drive.google.com/file/d/0ByJrCj2X0ZpATTV4V3d0OUhPZDA/view?usp=sharing

@MrCK1
Copy link
Member

MrCK1 commented Jun 25, 2017

Did you try adjusting blening accuracy? Some games need Full to render effects properly.

@MarcoEstevez
Copy link
Contributor Author

Yes I did, I tried "Ultra" and had no effect at all.

@MrCK1
Copy link
Member

MrCK1 commented Jun 25, 2017

Try some of the other hacks - auto flush could prove useful here. Otherwise, you should try to track down whether or not this is a regression.

@MarcoEstevez
Copy link
Contributor Author

I did try all of them, no luck, I haven't tested all versions, but I'm quite sure this has been always wrong, in fact was even worst on previous versions.

Personally I'm quite fine playing it on Software mode since I got a pretty decent CPU, but my GPU sucks, so, I just wanted to report this in case could point out some deffects on the great OpenGL implementation, and hopefully help on some others cases.

@MrCK1
Copy link
Member

MrCK1 commented Apr 6, 2018

@MarcoEstevez Can you retest on latest git?

@MarcoEstevez
Copy link
Contributor Author

Sure, it doesn't seem to have improved

image

image

@MrCK1
Copy link
Member

MrCK1 commented Apr 6, 2018

Did the ground (not the shadow itself) always look like that before, or is that new?

Also, DX11 should be retested - although I'm not expecting anything here to change.

@MarcoEstevez
Copy link
Contributor Author

its new, before was only car shadows, but it's something intermittent though

image

@lightningterror
Copy link
Contributor

Can you upload a gs dump again ? I prefer the same or similar taken like on the picture above,
also can you try out
https://buildbot.orphis.net/pcsx2/index.php?m=dl&rev=v1.5.0-dev-2291-gc1fd01545&platform=windows-x86
And see if there's any difference ?

@MarcoEstevez
Copy link
Contributor Author

here you have:

gsdx_20180406220049.gs.zip

@MarcoEstevez
Copy link
Contributor Author

Same situation with your build

@lightningterror
Copy link
Contributor

Can you upload a multiframe gsdump ? I'm not able to see anything on the dump on the hw render right now.

@MarcoEstevez
Copy link
Contributor Author

Of course, let me know if this is enough, the size grows so quick

https://drive.google.com/file/d/16WzQJJEHKF6gseo7F4K323J3JBCfCL5z/view?usp=sharing

@lightningterror
Copy link
Contributor

Thanks, I reproduced the issue even on 1.4 when the resolution is upscaled, so the ground issue is related to upscaling it seems.

@MarcoEstevez
Copy link
Contributor Author

Just wanted to update the issue

I tested on Vulkan now and suffers same issue, another thing I noticed hardware does not render the "sun light on the sky" effect

Software
image

Hardware
image

@coornio
Copy link
Contributor

coornio commented Mar 6, 2022

Here's a couple dumps for this too.

This one's software (for comparison)
gs_20220306135222.gs.zip

This is hardware (both the shadow and sun are broken)
gs_20220306135229.gs.zip

@prafullpcsx2
Copy link
Contributor

Enabling Auto flush + Preload frame data fixes the Sun. Shadow problem still exists.

@Mrlinkwii
Copy link
Contributor

still broken as of v1.7.5079 ,

Ford Racing 2_SLES-51705_20231002144720

heres an updated gs dump
ford racing 2 issues.zip

@refractionpcsx2
Copy link
Member

refractionpcsx2 commented Jan 26, 2024

Just so I don't forget, the problem here is it uses a texture at 0x3c00, 0x3d00, 0x3e00 and 0x3f00 for various things and later it uses 0x3f00 for the shadow, which is basically supposed to be a black texture with an alpha channel for the shadow position, the problem is earlier on it gets used as a cloud texture, then the game does a clear of just the colour which goes from 0x3C00 through to 0x4000. Right now we don't update targets in between, only mark the rgb/alpha as invalid, so you get either:

  1. a "cloud" shadow
  2. nothing at all (because the RGB gets marked as invalid so it goes to memory, where the alpha is wrong)

I have been trying to work on some local code to update the contained target but it's been kind of a can of worms, partially because of other broken behaviour which somehow worked.

So here's a picture to show it is working.
image

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

No branches or pull requests

8 participants
@MarcoEstevez @refractionpcsx2 @coornio @prafullpcsx2 @MrCK1 @Mrlinkwii @lightningterror and others