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

Shadow Tower Abyss - Flickering and dark picture #3281

Closed
Krusher97 opened this issue Mar 9, 2020 · 8 comments · Fixed by #10053
Closed

Shadow Tower Abyss - Flickering and dark picture #3281

Krusher97 opened this issue Mar 9, 2020 · 8 comments · Fixed by #10053

Comments

@Krusher97
Copy link

When Blending is enabled(set to anything above None) the game flickers constantly in the HW renderer.
Video HW: https://gfycat.com/dangerousbelatedfiddlercrab
Video SW: https://gfycat.com/welltodoinsistenthoopoe

There are also really extreme differences in lighting between the two
HW :
gsdx_20200309214813
SW :
gsdx_20200309214816

gsdump of screenshot :
gsdx_20200309220352.gs.zip

@lightningterror
Copy link
Contributor

Disabling Depth gets around the dark picture, shadows are still an issue on hw renderer tho.

@Mrlinkwii
Copy link
Contributor

still an issue as of 1.7.4854

image

@dante3732
Copy link

Yep, still not fixed.

@refractionpcsx2
Copy link
Member

Okay I did some investigation in to this and the problem is this.

The game sets the Z buffer value to a solid number/colour of 29696, in RGB this translates to 0, 116, 0. It does this with the Z set to C16S, but I think this should only affect the swizzle, not the value which should be written as-is (we need to hardware test this).
The problem then is the hardware renderer reads this from the depth to a render target (colour) and so it converts it from Z16 to C16, which truncates the colours, so this flat colour now becomes 0, 112, 0 (or 28672)

The target is then reused again as a depth texture to stencil out the shadows, and it tests drawing the black shadows to a completely white render target checking for when the the Z of the draw (which is all 29696) is higher than the current Z buffer (which is now max of 28672 because of the truncation), so every pixel passes, making the entire render target black.

After some messing this gets blended back in with the frame, making the entire screen a shadow instead of just the shaded bits.

@refractionpcsx2
Copy link
Member

So it turned out to be data loss during shader conversion.

if somebody gets a chance, if they could quickly test #10053 with the actual game (not the GS dump, I've done that, it's fine), that'd be awesome.

@refractionpcsx2
Copy link
Member

This has been tested, thanks.

@dante3732
Copy link

@Mrlinkwii
Copy link
Contributor

@dante3732 that looks like z-fighting in HW mode

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

Successfully merging a pull request may close this issue.

5 participants