PCSX2 / pcsx2

PCSX2 - The Playstation 2 Emulator
https://pcsx2.net
GNU General Public License v3.0
11.52k stars 1.6k forks source link

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

Open MarcoEstevez opened 7 years ago

MarcoEstevez commented 7 years ago

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 commented 7 years ago

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

MarcoEstevez commented 7 years ago

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

MrCK1 commented 7 years ago

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 commented 7 years ago

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 commented 6 years ago

@MarcoEstevez Can you retest on latest git?

MarcoEstevez commented 6 years ago

Sure, it doesn't seem to have improved

image

image

MrCK1 commented 6 years ago

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 commented 6 years ago

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

image

lightningterror commented 6 years ago

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 commented 6 years ago

here you have:

gsdx_20180406220049.gs.zip

MarcoEstevez commented 6 years ago

Same situation with your build

lightningterror commented 6 years ago

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

MarcoEstevez commented 6 years ago

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 commented 6 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 1 year ago

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

Mrlinkwii commented 11 months ago

still broken as of v1.7.5079 ,

Ford Racing 2_SLES-51705_20231002144720

heres an updated gs dump ford racing 2 issues.zip

refractionpcsx2 commented 8 months ago

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