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

rsx: Epic fixes #4312

Merged
merged 12 commits into from Mar 25, 2018
Merged

rsx: Epic fixes #4312

merged 12 commits into from Mar 25, 2018

Conversation

kd-11
Copy link
Contributor

@kd-11 kd-11 commented Mar 21, 2018

Partially fixes the common unreal engine 3 bugs #4025

  • Support for srgb (gamma corrected) texture data. Only DXT and ARGB8 are supported right now
  • Support for shadowmaps when used in wierd ways. Unreal reads all the components of a shadow comparison which is interesting
  • Crude support for arbitrary component shuffling on rendertarget resources. Very likely to be unused by any games and needs further polishing
  • A fix for AMD polaris and newer when using strict mode. Fixes exploding vertices

Extended commits

  • Reimplement TEX class of opcodes in FP
  • Implement SRGB framebuffer output
  • Reimplement framebuffer sampling and correctly implement color shuffling
  • Implement video-out calibration (ogl only)

The extended set fixes regressions introduced by the first set of patches

@kd-11
Copy link
Contributor Author

kd-11 commented Mar 21, 2018

There are some regressions here, due to incorrect colorspace detection for some games (skate3 for example). I'm working on that and will push a fix before merging this.

@Asinin3
Copy link
Contributor

Asinin3 commented Mar 21, 2018

Before/After Comparisons (Click to Expand)

Dollar Dash Trial

before
after

Supersonic Acrobatic Rocket-Powered Battle-Cars

before
after

CellFactor: Psychokinetic Wars

before
after

Shadows of the Damned

before
after

Life is Strange

before
after

Mass Effect

before
after

Mass Effect 3

before
after

Final Exam

before
after

Mirrors Edge

before
after

Need for Speed: Most Wanted

before
after

Drakengard 3

before
after

Infamous Festival of Blood

before
after

Tony Hawk's Pro Skater HD

before
after

Papo & Yo

before
after

Destroy All Humans

before
after

Journey

before
after

Anna

before
after

MLB 09 The Show

before
after

Midnight Club: LA

before
after

Project DIVA https://cdn.knightlab.com/libs/juxtapose/latest/embed/index.html?uid=96868b9a-2d37-11e8-b263-0edaf8f81e27

before
after

NIER

before
after

Asura's Wrath

before
after

Batman Arkham City

before
after

Ratchet & Clank

before
after

Ratchet & Clank 2

before
after

Ratchet & Clank 3

before
after

Army of Two

before
after

Army of Two 40th Day

before
after

Yakuza 3

before
after

Yakuza 4

before
after

Silent Hill: Downpour

before
after

Ride to Hell Retribution

before
after

New Comparisons with newer commit:
Uncharted

before
after

Gran Turismo HD Concept

before
after

@Xcedf
Copy link

Xcedf commented Mar 21, 2018

The most pleasant part Issue #3031 is affected
5 1
1

@Xcedf
Copy link

Xcedf commented Mar 21, 2018

@Asinin3 yeah, but i think it regressed by some other pr not this one, i remember someone wrote a few days ago that game became darker, and since i like this game i'm gonna investigate

@Xcedf
Copy link

Xcedf commented Mar 21, 2018

@Asinin3 will try to build combined version later

Assassin's Creed normal colors
3

Lolipop ChainSaw now with shadows
2

@jjsat
Copy link
Contributor

jjsat commented Mar 21, 2018

Dead Space Dismemberment Demo has a regression: it fails to compile a shader. Easy to reproduce because it happens right at startup.

E {rsx::thread} RSX: Failed to compile shader: Fragment shader failed to compile with the following errors:
ERROR: 0:56: error(#202) No matching overloaded function found: textureProj
ERROR: 0:56: error(#216) Vector field selection out of range "xyz"
ERROR: error(#273) 2 compilation errors.  No code generated


F {rsx::thread} class gl::glsl::link_exception thrown: linkage failed: 'Fragment shader(s) were not successfully compiled before glLinkProgram() was called.  Link failed. 

The shader: FragmentProgram80.zip

Edit: Scrap that. I was on your rsx_volatile branch, not on master. Sorry.

@MarioSonic2987
Copy link
Contributor

MarioSonic2987 commented Mar 21, 2018

GTA V is improved (Trevor's outfit is no longer red in this camera position) and regressed at the same time (water can is brown and lighting is dark).

Before:
image

After:
image

Edit: Returns to the same situation as in before screenshot.

@Xcedf
Copy link

Xcedf commented Mar 21, 2018

Yakuza 3 now with shadows
1

@AniLeo AniLeo added the RSX label Mar 21, 2018
@Psycho-A
Copy link

Psycho-A commented Mar 21, 2018

This fixed Silent Hill: Downpour, but bump-maps on characters and some itmes seems still to be rendered weird way, and dynamic shadows are glitchy if any resolution scaling different from 720p is chosen.

@Dreadmoth
Copy link

Red Dead Redemption regression
Master:
PR:

Guess this is due to the known incorrect colorspace detection issue? Occurs with Strict Rendering Mode enabled too.

@Zangetsu38
Copy link
Contributor

Zangetsu38 commented Mar 21, 2018

also problem on Format, on VK and OGL, regression it is broken again on X16 and 2 other
DX12
VK
OGL

@Xcedf
Copy link

Xcedf commented Mar 22, 2018

Dante's Inferno regressed with very first commit c33f095
removing lines from VKTextureCache.h fixes this for me

if (colorspace != rsx::texture_colorspace::rgb_linear)
	vk_format = get_compatible_srgb_format(vk_format);

same for OGL, but of course it breaks the main gamma fix
As for RDR it regressed from a420e2e

@kd-11 kd-11 changed the title rsx: Minor fixes [WIP] rsx: Minor fixes Mar 22, 2018
@kd-11
Copy link
Contributor Author

kd-11 commented Mar 22, 2018

The scope of this has grown significantly following further investigation. Relegated to WIP status until the supporting patches are ready.

@Asinin3 Asinin3 mentioned this pull request Mar 22, 2018
@Psycho-A
Copy link

What about this issue - #3656
Is this a typical Unreal 3 games bug too?

@Anty0
Copy link

Anty0 commented Mar 23, 2018

You've got typo in includes. In commit "video out: Set up video configuration options in fxm".
It isn't "Emu/idManager.h" but Emu/IdManager.h". (I vs i)

Can't build on Linux without this fix, as Linux is case sensitive...

@kd-11 kd-11 changed the title [WIP] rsx: Minor fixes [WIP] rsx: Epic fixes Mar 23, 2018
@Psycho-A
Copy link

Psycho-A commented Mar 24, 2018

After Extended commits, some interface elements of SH: Downpour got abnormally dark.

Before:
bandicam 2018-03-24 03-52-38-976
After:
bandicam 2018-03-24 03-54-57-394
Before:
bandicam 2018-03-24 03-53-07-775
After:
bandicam 2018-03-24 03-55-32-923

@ActualMandM
Copy link

Supersonic Acrobatic Battle-Cars' lighting has become more accurate with the latest changes.
2018-03-23_22-35-37

@guofuchou
Copy link

how to download it

- Implement SRGB (gamma corrected) textures (DXT1, DXT3, DXT5, RGBA8 only)
- Fix channel map decode for XY data texture formats
- Fix remap layout for X16 textures (verified with Mass Effect 3)
- Export some debug information in the free texture register space components zw
  Very useful when analysing renderdoc captures
- Enable shadow comparison on depth as long as compare function is active and texture is uploaded for depth read
  Some engines (UE3) read all the components in the shader and use mul/mad with the result
    The restart emulation is there to keep the proprietary drivers from randomly crashing when using primitive restart
- TODO: Actually do something with the values
- Separate TXB from TXL: They are completely different!
- Properly perform TMU emulation in the fragment shader. Implemens SRGB conversion and alphakill at the moment
- Properly perform ROP emulation in the fragment shader. Implements FRAMEBUFFER_SRGB. While support on the chip looks to be incomplete (and wierd), it does work
- Document some more bits in SHADER_CONTROL register
- Seems to be of limited use but if it is determined to be useful, a vulkan implementation can be done
- Reimplements render target views used for sampling
- Optimizes access using an encoded control token
- Adds proper encoding for 24-bit textures (DRGB8 -> ORGB/OBGR)
- Adds proper encoding for ABGR textures (ABGR8 -> ARGB8)
- Silence some compiler warnings as well
- TODO: Real texture views for OGL current method is a hack
…che.

- glEnable/glDisable should not be used with GL_BLEND as the main renderer uses the indexed variant
- GL queries share the target binding (not asynchronous!)
- Discard active queries by closing them, leave closed queries alone (nothing to be done for discard op)
- gl/vk: Properly handle remapping temporary resources
@woj1993
Copy link

woj1993 commented Mar 24, 2018

@guofuchou Go to Commits. Click on tick on the last one. Chose Appveyor details, artifact and chose file.

@Psycho-A
Copy link

gl: Implement video-out calibration for gamma and dynamic range

Where can I find it? It's an user-defined feature, or just something internal?

@kd-11 kd-11 changed the title [WIP] rsx: Epic fixes rsx: Epic fixes Mar 25, 2018
@whjhs1010203
Copy link

@Psycho-A
From System.h see that.
It's default I guess, so do NOT something.

@kd-11
Copy link
Contributor Author

kd-11 commented Mar 25, 2018

Its enabled for gamma correction, but that doesnt seem to have much effect. Limited RGB does have a big effect but it simulates the washed out visuals you get on standard TV display and isnt visually pleasing imo It does add some implicit brightness to the games though - can be edited in config.yml
As for downpour getting darker menus, that will have to be investigated separately as the detection code was scrapped and now the game's texture settings are just blindly implemented in the fragment shaders with no special code or hacks. Probably caused by one setting implicitly overriding another.

@Yuuyatails
Copy link

Yuuyatails commented Mar 25, 2018

This pull request has caused a potentially game-breaking graphical regression on Kamen Rider: Battride War Genesis, as after the game publishers logo screens and the loading screen, all the game shows most of the time were black screens with music running.

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

Successfully merging this pull request may close these issues.

None yet