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

Rendering issue in Castlevania: Dawn of Sorrow #660

Open
windwakr opened this issue May 4, 2023 · 7 comments
Open

Rendering issue in Castlevania: Dawn of Sorrow #660

windwakr opened this issue May 4, 2023 · 7 comments

Comments

@windwakr
Copy link
Contributor

windwakr commented May 4, 2023

This boss in Catlevania Dawn of Sorrow(game code NTR-ACVE-USA) has an issue where the overlap of the arm segments near his elbow will flash black.
236331261-87d0df0e-3f58-4413-89c5-d1a4cad33250
Affects both the software renderer and OpenGL renderer. I've verified that it does not happen on real hardware.

Here is a save file right before him. He's to the left of the save room.
Castlevania.-.Dawn.of.Sorrow.zip

@zeromus
Copy link
Contributor

zeromus commented Sep 19, 2023

Can you find a capture from hardware of this game at this point? This seems like a strange thing for us to be getting wrong. It's a complex game. I'd say there's a chance it's bugged in the original game. Not a big chance, but.. a chance.

@windwakr
Copy link
Contributor Author

windwakr commented Sep 20, 2023

Here's a vid I took. Ignore the tiny blinking red spot near the center, it's a reflection from my phone.
vid.webm

I've also found that old versions of DeSmuME don't have this issue.

EDIT: Here's a direct capture video I found on YouTube:
https://youtu.be/qnVqKDXlZeI?si=yHjOEA4t0-ofyZkF&t=1029

@zeromus
Copy link
Contributor

zeromus commented Sep 21, 2023

ok, well done. thanks.

@rogerman
Copy link
Collaborator

@windwakr: Can you confirm which version of DeSmuME didn't have this issue? I tried all the way back to v0.9.8 and I still saw the graphical issue. Also, for the version that did work, were you running SoftRasterizer or OpenGL?

@windwakr
Copy link
Contributor Author

0.9.6 seems to be the most recent release that doesn't have the flickering. Renderer doesn't matter.

@zeromus
Copy link
Contributor

zeromus commented Sep 21, 2023

there is a pitch black piece intentionally placed behind the normal visible piece, in order to create the effect of a dark part of the body perpendicular to the screen. note the visible piece kind of "fades out" near its joint further up the arm, where it "blends" into the black piece.

I dont think it has to do with the sorting. It must be that the depth values are getting disordered. But you would expect that system to be really resilient in this game. If you look at it really closely it seems to glitch on certain Y-positions but I just wasn't able to get the sorting to affect it. Actually the game should be z-ordering everything properly.

One theory is that the designers goofed up and picked the same Z value for both those pieces (a flaw in their otherwise resilient system) and so it depends on very fine details of our geometry pipeline. I think my next step would be to print all Z values rendered and look for a tie.

I tried to get a renderdoc capture going but it was really hard. There's so many contexts in flight here (and I have to switch them all to core profile) that renderdoc has a hard time capturing it. I could see part of the level rendering sometimes, but it would stop like 4/5 through rendering the backdrop tiles and then go into another scene. I tried to enable single-threaded mode (otherwise, are we presenting the screen in another thread while rendering the opengl in yet another thread?) and ran into lots of agg crashes (bitrotted code in single thread mode) and after bashing through those, I got nonsense captures with lots of errors that looked like major opengl programming errors.

I really like debugging stuff with renderdoc nowadays.. I need to put some work into rehabilitating things here so that it works.

@rofl0r
Copy link
Collaborator

rofl0r commented Sep 22, 2023

in case the git history goes back to 0.9.6, git bisect is probably a good option to pinpoint the exact change breaking this.

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

No branches or pull requests

4 participants