gsdx: support RGB5A1 <=> depth conversion in texture cache #806

Closed
wants to merge 1 commit into
from

Projects

None yet

6 participants

@gregory38
Contributor

Fix bad depth effect in Silent Hill 4

@gregory38 gregory38 self-assigned this Sep 8, 2015
@karasuhebi
Contributor

Do you want testing to be done on other games to see if there's any regressions? Or just on Silent Hill 4?

@gregory38
Contributor

Currently it breaks silent hill 4 shadows :(

So no need to test others games.

@karasuhebi
Contributor

Okay. :-\

@gregory38 gregory38 added the Postponed label Sep 11, 2015
@gregory38 gregory38 gsdx: support RGB5A1 <=> depth conversion in texture cache
Fix bad depth effect in Silent Hill 4
8b24054
@gregory38
Contributor

I rebased the code on latest master. And maybe it will work better due to the exp typo fixed in one shader. Need to test silent hill 4.

@AmbientMalice
Contributor

@gregory38 I have Silent Hill 4. Would you post a built to test?

@gregory38
Contributor

Try to follow the appveyor link. (Otherwise I wil post the link when I come back from vacation)

@bositman
Member

Shadows in SH4 are fine now :) Here is the build: http://bositman.pcsx2.net/dumps/GSdx32-silent%20hill-4.rar
What was the initial issue this fixed?

@gregory38
Contributor

By now you mean broken on master and fixed in this branch? Or fixed by this branch?
I don't remember the initial issue. I think it was some extra strange color rendering (like a white sprite in some part of the screen). A depth effect was badly emulated due to the format (game read the depth as 16 bit color whereas other game read the depth as 32 bit color)

@gregory38
Contributor

Edit: I mean alredy fixed in master

@bositman
Member

I mean the shadows are ok using this PR. I'll look into the old GSdx thread in case someone had reported the initial issue there

@FlatOutPS2
Member
FlatOutPS2 commented Apr 17, 2016 edited

This is the related GSdx thread post: http://forums.pcsx2.net/Thread-GSdx-1-0?pid=476003&highlight=silent+hill+4#pid476003

The top right quarted of the screen flashes transparently in the dump, but I didn't see it ingame.

Edit: Though the shadow on the ground is fixed by this update, it does seem to create a shadow-like halo around the character that isn't supposed to be there.

@bositman
Member

It should go away if you set TC X and Y offsets to 500, or use native

@FlatOutPS2
Member
FlatOutPS2 commented Apr 18, 2016 edited

It should go away if you set TC X and Y offsets to 500, or use native

Yeah, the offset removed the halo.

I've tried the commit with some other games and it creates a regression. In games where Hardware Depth renderers a depth effect, but with a small bug remaining, a line running along the ground and walls at the edge of the effect, the effect now creates all kinds of edges and lines.
Crash Twinsanity:
Before:
gsdx_20160417153825
After:
gsdx_20160417153809

WRC II (blurred shots, but it clearly shows the regression):
Before:
gsdx_20160417154120
After:
gsdx_20160417154231

@gregory38
Contributor

Hum, code is still buggy as hell...
Could you post me a gs dump of Crash Twinsanity. Thanks you.

@FlatOutPS2
Member
@gregory38
Contributor

Did you enable VU cycle stealing when you generate the dump ?

@gregory38
Contributor

Ok. I got it. There is half-screen bug. And the regression is due to a wrong detection of a 16 bits format. Due to the texture shuffling effect, I must keep the depth to 32 bits... It is very annoying.

@gregory38
Contributor

In short, I need to reimplement completely depth management.

@gregory38
Contributor

See #1306

@gregory38 gregory38 closed this Apr 24, 2016
@gregory38 gregory38 deleted the gsdx-RGB5A1-depth-conversion branch Apr 28, 2016
@jonaand
jonaand commented May 9, 2016

there is not fix for silent hill origins shadow HW yeat?

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