desmume icon indicating copy to clipboard operation
desmume copied to clipboard

The Dark Spire (U) - Map and Wireframe rendering issues

Open MuscleSpark opened this issue 7 years ago • 4 comments

Map does not render when pressing Y, although it does render when going to the main menu and selecting the Map option. 3652 - dark spire the us xenophobia __25484 Switching rendering modes while in Y Map screen makes it appear, albeit with some differences between OpenGL and SoftRasterizer mode. It seems that the wireframe dungeon is being rendered undernearth/behind the Map, which is slightly transparent in the SoftRasterizer mode, it's a little hard to see but it's there. 3652 - dark spire the us xenophobia __28165 3652 - dark spire the us xenophobia __28195 This is further supported by the fact that switching the rendering modes back and forth quickly results in this: 3652 - dark spire the us xenophobia __28352 ...or sometimes this??? (the right half of the screen seems to be rendered on the left and vice-versa) 3652 - dark spire the us xenophobia __28254 In Modern mode it's just a black screen: 3652 - dark spire the us xenophobia __28580

Wireframe rendering in OpenGL: around a corner (wall in front and right of it are missing) 3652 - dark spire the us xenophobia __25674 looking at a corner wall (wall in front and right are missing) 3652 - dark spire the us xenophobia __25684 looking at a wall (all walls missing) 3652 - dark spire the us xenophobia __25720 Turning results in a series of random individual pixels being rendered each frame: 3652 - dark spire the us xenophobia __25958

Wireframe rendering in SoftRasterizer (note how lines aren't in the correct position): 3652 - dark spire the us xenophobia __26758 3652 - dark spire the us xenophobia __26768 3652 - dark spire the us xenophobia __26840 Without line hack: 3652 - dark spire the us xenophobia __29850 Y Map workaround doesn't work 3652 - dark spire the us xenophobia __30001

Let me know if any further info is needed.

Edit: Additionally, someone spotted that setting 3D renderer to None makes the Y Map work.

MuscleSpark avatar May 14 '18 03:05 MuscleSpark

Just dropping by to say, it's for real.

zeromus avatar May 24 '18 01:05 zeromus

the problem is the game stops rendering 3d, then changes the clear color (to transparent) i need to investigate whether changes to the clear color can take effect even if the scene isn't redrawn (and changes to other things, too)

reminder: it is sensible in principle to send the flush command, and then change the clear color--but only if it's immediately after. if the final command executes (upon vsync) and THEN you change the clear color, it'd be too late for the new color to ever get latched. i did see that happening in desmume, but it's possible we have a timing bug causing the vsync and clear color change to get wrongly ordered. I suspect it's that the clear color can be changed any time, though.

zeromus avatar May 25 '18 15:05 zeromus

The rendering engine draws every frame even if no flush commands are sent. So changing the clear color in that case should still take effect.

Arisotura avatar Jun 14 '18 19:06 Arisotura

Some things get latched on swapbuffers, some things don't. The question is, which things do? It's seemingly random which is which. Just because it keeps rendering doesn't mean it uses the current clear color register configuration, it could be using the previously latched one (and there's some other problem causing the timing of the swapbuffers and register setting to get wrongly ordered)

zeromus avatar Jun 14 '18 20:06 zeromus