Rpcs3: GL/Vulkan: Naruto Shippuden: UNS Generations / RenderDoc

Created on 21 Sep 2016  路  47Comments  路  Source: RPCS3/rpcs3

OpenGL Vulkan

Most helpful comment

image

With the texture reconstruction and some minor tinkering:
Now, to make thes changes stick.

P.S: I've finally figured out why this is happening. Will need to rewrite parts of the glsl code generator. The method "return" as inserted in the middle of a shader does not mean exit and abandon all, we have discard for that. The main_end has to be invoked upon routine termination. I was right here: https://github.com/RPCS3/rpcs3/issues/2149#issuecomment-249364984

All 47 comments

I think this is related to https://github.com/RPCS3/rpcs3/issues/1949
I'll start working on this as it has been on the list of graphical issues for a while.

Please test https://ci.appveyor.com/project/kd-11/rpcs3/build/1.0.262/artifacts when its done building (opengl only)

If its still not working, get the title screen renderdoc trace with opengl and the build i've posted.

Oops. I messed up generating the reconstruction function; its missing a constructor declaration. This should have that specific issue fixed. Check if anything has changed.
https://ci.appveyor.com/project/kd-11/rpcs3/build/1.0.263/artifacts

https://ci.appveyor.com/project/kd-11/rpcs3/build/1.0.264/artifacts Should fix the black and white bug when using regular textures.

Uggh. I forgot something else. Will update with a better build. (Depth scale is logarithmic, not linear)

EDIT: I'm losing precision elsewhere during the reconstruction.

@kd-11
Pixels are rendered , in menu and at title screen
[ 9fce47fa ]
Fotoszok.pl
Title Screen.rdc
Menu.rdc

There's another problem with early exit in fragment shader: we should write depth before returning. I've started to understand the algorithm in place here.

image

https://ci.appveyor.com/project/kd-11/rpcs3/build/1.0.268/artifacts Manually re-uploads the texture data. I'll need it to compare my reconstruction with the proper upload.

@kd-11
[ 96d8fdd3 ]
Fotoszok.pl

Title Screen.rdc
Menu.rdc

Fixed re-upload of the texture. If this doesnt work, we probably have another error elsewhere. If it runs correctly (or somewhat correctly) using dx12, i'd like to take a look at the dx12 shaderlog.

https://ci.appveyor.com/project/kd-11/rpcs3/build/1.0.269/artifacts

The problem is elsewhere. There's another RTT being sampled even before we reach the code where depth reconstruction is done. As such, I think the reconstruction function works quite well.
The problem seems to be the fact that OGL and VK ignore render target swizzles, but DX12 has select cases enabled. Will have to implement some RTT channel remapping.

https://ci.appveyor.com/project/kd-11/rpcs3/build/1.0.270/artifacts
Remaps render targets as well. Might break some games (probable wierd blue-red swapping)

@kd-11 its not just "might" break some games, it does break some :P (project diva games)
http://i.imgur.com/tm3hXs3.png
http://i.imgur.com/l9HqzsW.png

I know it does; its hacky right now. I removed this from the vulkan renderer for this very reason, but if there are games that rely on the remap behaviour, I need to know.

@kd-11
No change

That means something else is broken. Its not the same issue as https://github.com/RPCS3/rpcs3/issues/1949 then. Something about the texture coordinates used is wierd.

image

With the texture reconstruction and some minor tinkering:
Now, to make thes changes stick.

P.S: I've finally figured out why this is happening. Will need to rewrite parts of the glsl code generator. The method "return" as inserted in the middle of a shader does not mean exit and abandon all, we have discard for that. The main_end has to be invoked upon routine termination. I was right here: https://github.com/RPCS3/rpcs3/issues/2149#issuecomment-249364984

https://ci.appveyor.com/project/kd-11/rpcs3/build/1.0.271/artifacts Should fix this on opengl. The depth reconstruction is still WIP so if you can get ingame, check for depth artifacts.

@kd-11
I get this error before the title screen

E {rsx::thread} RSX: Failed to compile vertex shader: 0(79) : error C1038: declaration of "dst_reg6" conflicts with previous declaration at 0(79)
0(221) : error C1038: declaration of "dst_reg6" conflicts with previous declaration at 0(211)

F {rsx::thread} class gl::glsl::link_exception thrown: linkage failed: 'Vertex info
-----------
0(79) : error C1038: declaration of "dst_reg6" conflicts with previous declaration at 0(79)
0(221) : error C1038: declaration of "dst_reg6" conflicts with previous declaration at 0(211)
(0) : error C2003: incompatible options for link
'

I'm guessing the shader contains a tc9 or clip plane input. Could you attach the shader. Just clear the shaderlog folder and attach the last vertex shader generated. It will have the largest number.

@kd-11
shaderlog

Fotoszok.pl

@kd-11
I can't run any mode, because a game stuck at black screen after choosing mode

@Nekotekina
Regression by #2043

Log
TTY

I'm creating a PR with the shader stuff without the depth reinterpret stuff as it seems kinda broken at the moment. Also, depth read sample binds a depth buffer as RGBA, but expects to read a normal depth value from it, not a reconstructed one. At least until we can go ingame, then we can proceed.

EDIT: Seems removing the depth reconstruction code causes the fence and structure behind naruto disappear.

EDIT2: I have a workaround for that as well.

https://github.com/RPCS3/rpcs3/pull/2155 should fix this issue without the wierd depth reconstruction glitches

[ add58c01 ]
OpenGL
Fotoszok.pl

Vulkan
Fotoszok.pl

[ add58c01 ]
@kd-11

Naruto Shippuden: UNS 3 ( In Game )
[OpenGL]

Fotoszok.pl

[Vulkan]
Fotoszok.pl

Shaderlog-GL
Shaderlog-Vulkan

Is the red color present in the title screen and menus as well? Also, a trace of opengl would help a lot.
EDIT: Just noticed that this is UNS3 is UNS generations okay?

Naruto Shippuden: UNS Generations ( Menu works well )

okay. then just attach the renderdoc trace for that red UNS3 scene. Does it show correctly using DX12?

@kd-11
[OpenGL-Trace]
red-scene

@kd-11
[ 9469c03a ]
Naruto Shippuden: UNS Generations
[OpenGL]
Fotoszok.pl
[Vulkan] Perfect render this scene
Fotoszok.pl


Naruto Shippuden: UNS 3
[OpenGL]
Fotoszok.pl

[Vulkan]
Fotoszok.pl

OpenGL-Trace

@kd-11
Naruto Shippuden: UNS 3 / still not fixed yet

Actually, the image has changed from the look of things. You can see the correct scene covered by the fullscreen effect. Only the post-process stuff needs some adjustment now. Attach a new opengl trace.

The scene is now correctly rendered but the post-process effects are upside-down. Can you retest with current master? Some fixes have been implemented opengl side. I'm not sure its anything that'll fix it, but just take a look.

The problem is that the game is using an input texture as the render target which is just crazy. Maybe I should force copying of surfaces in cases like these

@kd-11
Naruto Shippuden: UNS 3:

OpenGL-Trace
Moon
Village
VS Fox

GL and vulkan dont mirror wpos based on window origin!
Will submit a fix ASAP

This should have been fixed now. If its fixed, please close this ticket.

I'm getting this error in Naruto storm generations and can not go in the game, with WHAT this could be related?
capturar

Was this page helpful?
0 / 5 - 0 ratings