Rpcs3: Broken vertices in Dead Space 2 demo

Created on 22 Aug 2017  路  20Comments  路  Source: RPCS3/rpcs3

The demo for Dead Space 2 exhibits the following problem: 3D geometry as well as text is correctly rendered, but what basically are 2D billboards are broken. They are used for all floating UI elements in game and certain other effects as well as some splash screen elements.

grafik
grafik
grafik

What these elements all have in common is that they:

  • are drawn as quads with an index buffer
  • have a vertex buffer with a stride of 48
  • have a too small vertex buffer size of 48 if supposed to contain 4 vertices (size is larger for more vertices, but always too small - only 1/4th of required size)
  • have 6 interleaved "locations" for that buffer
  • have another location that seems to contain indices (0, 1, 2, 3 ...) which is also too small
  • some vertex positions are obviously correct because they are anchored at the correct place in the world

Dead Space 1 demo has basically the same issue but there the affected vertices are defined with a stride of 64. The stride is not the root cause but it seems to come as a side effect of the drawing mode the game uses for these elements.

This issue occurs with both Vulkan and OpenGL and regardless of SPU/PPU setting. I don't see any setting that has an effect on this actually.

Most helpful comment

This is very likely fixed here https://ci.appveyor.com/project/kd-11/rpcs3/build/0.0.3-919
I'd urge testing especially with silent hill 3 since it was used by the original author of that bit of code to determine ARL opcode behaviour. Let me know if anything breaks.

All 20 comments

dead space 1 have same think in HUD

Thank you @jjsat for researching the issue. I noticed one case where it appeared but I was unsure if it was a game bug or not. This at least confirms its the emulator thats at fault.

There are other games in which the uploaded vertex count does not correspond to the number of vertices to draw. One that seems similar is Metro Last Light (stride 96, also multiple locations).

Its expected for indexed draws that vertex count != draw count. Index buffer scanning is used to determine the minunum number of vertices referenced but admittedly that might be broken.

Yes, I didn't write this correctly. I specifically meant cases in which the number of uploaded vertices is not enough to draw the primitive like in Dead Space. The emulation code draws quads as triangles anyway, so the draw count is in that case different from the original.

I wonder, did it work correctly before the rewrite?

no, dead space 1 have same think, and rewrite no have affecter this, only affected speed ^^

I went back to commit 24002101448bc7eeff16d47806994ced775b268a before the vertex rewrite. Same behaviour as Zangetsu38 said.

Another game with this issue is Dantes Inferno. Unsurprising since it might use the same engine:
grafik

Thanks for reporting this issue wanted to report too, played Dante's Inferno to the third level where's these artifacts become very nasty which doesn't allow to play further

Looks like its caused by broken vertex attrib divisor implementation. A fix will be submitted soon.

Its a vp decompiler issue. ARL is broken.

This is very likely fixed here https://ci.appveyor.com/project/kd-11/rpcs3/build/0.0.3-919
I'd urge testing especially with silent hill 3 since it was used by the original author of that bit of code to determine ARL opcode behaviour. Let me know if anything breaks.

Very nice!

Dead Space 2 Demo and Dantes Inferno are fixed.

Silent Hill 3 looks the same as before (the lighting is somewhat broken):
grafik

Also fixes flickering in Rayman Legends:
Before:
grafik
After:
grafik

fixed also HUD in Dead space 1
image
image
image
image

kd-11, awesome fix, thanks

@kd-11
Before:
image

After:
image

Fixed broken characters
bez tytulu

Dead Space 2 [BLUS30624]
Before: (rpcs3-v0.0.3-2017-08-21-607e57ad)
rpcs3_dead_space_2_kd-11bf
After:
rpcs3_dead_space_2_kd-11af

@AniLeo This is fixed and can be closed. I think so at least.

Yeah, looks correct

Was this page helpful?
0 / 5 - 0 ratings