Emulator Issues #13184
openSuper Mario Sunshine - Coconut drinks in Gelato Beach bar are invisible due to using nonexistent vertex color (conflicts with debug cubes fix)
0%
Description
Game Name?
Super Mario Sunshine
Game ID? (right click the game in the game list, Properties, Info tab)
GMSE01
MD5 Hash? (right click the game in the game list, Properties, Verify tab, Verify Integrity button)
0c6d2edae9fdf40dfc410ff1623e4119
What's the problem? Describe what went wrong.
In all episodes of Gelato Beach, the 4 coconut drinks at the bar where the Episode 8 shine is held are invisible. This is due to the material for those drinks specifying that its COLOR0 material source is vertex
, despite the geometry data for the drinks lacking vertex color data.
What steps will reproduce the problem?
Go to the bar at the opposite end of the level in any episode of Gelato Beach. Observe that there is nothing on the bartop.
Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.
Present in 5.0-18498
Is the issue present in the latest stable version?
Not present in 5.0
If the issue isn't present in the latest stable version, which is the first broken version? (You can find the first broken version by bisecting. Windows users can use the tool https://forums.dolphin-emu.org/Thread-green-notice-development-thread-unofficial-dolphin-bisection-tool-for-finding-broken-builds and anyone who is building Dolphin on their own can use git bisect.)
First broken version is unknown, but it is known that https://github.com/dolphin-emu/dolphin/commit/a51d01bb809bddaa2c221b0e9a6d0b935a285bce is the commit that broke it.
If your issue is a graphical issue, please attach screenshots and record a three frame fifolog of the issue if possible. Screenshots showing what it is supposed to look like from either console or older builds of Dolphin will help too. For more information on how to use the fifoplayer, please check here: https://wiki.dolphin-emu.org/index.php?title=FifoPlayer
FIFO log can be found at https://cdn.discordapp.com/attachments/783525184468156416/1079554884216557588/sms_tevcolorchannelbug_fifo.dff. Note however that the drink models DO show up correctly in it.
What are your PC specifications? (CPU, GPU, Operating System, more)
- CPU: AMD Ryzen 9 3900X 12-Core @ 3.8Mhz
- GPU: NVIDIA GeForce GTX 1070
- OS: Windows 10
Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)
See attachments.
Files
Updated by pokechu22 almost 2 years ago
- Related to Emulator Issues #12366: Super Monkey Ball Planar Reflection not working in Stage 103 (Beginner extra 3) added
Updated by pokechu22 almost 2 years ago
- Related to Emulator Issues #8059: Super Mario Sunshine - Special stage gray cubes added
Updated by pokechu22 almost 2 years ago
- Subject changed from Inaccuracy in Handling Invalid TEV Color Channel Setups to Super Mario Sunshine - Coconut drinks in Gelato Beach bar are invisible due to using nonexistent vertex color (conflicts with debug cubes fix)
- Regression changed from No to Yes
- Regression start set to 5.0-14402
As you probably know, there's another case in super mario shunshine that uses this behavior: the debug cubes in Bianco 6. The initial fix for that was 5.0-13081, but that ended up causing regressions in other games where similar configurations needed nothing to render; it was later changed to a game-specific hack where the color to use in this case can be specified on a per-game basis (and e.g. #12987 shows it's not always black or white). The fifo player uses its own value (as it doesn't know that it's playing back something from Super Mario Sunshine), and the global default is visible. Unfortunately, that hack can't be used to specify different behaviors in the same game, so there's no easy fix for this.
I've retitled the issue, as the TEV isn't at fault; it's perfectly valid for a TEV stage to use color channel 0 as its rasterized color (for BPMEM_TREF) when the vertex itself doesn't have a color component; it's only a problem if the material source for that channel is set to vertex color (in XFMEM_SETCHAN0_COLOR), and that's part of the transform unit. Annoyingly, when I attempted to test the correct behavior (see some of my messy notes) I found that it seemed to be based on the color used a few vertices ago, but that didn't give correct results for the debug cubes.
This works correctly on the switch port, interestingly: https://youtu.be/gVhgVb0fnL4?t=3444 (and this is not a version of that switch port where the debug cubes are visible: https://youtu.be/tPkLjNZTC5I?t=4502 - though I recall hearing that the debug cubes were hidden there with a texture hack and not by changing how they rendered the game.)
Via https://dolphin-emu.org/download/dev/a51d01bb809bddaa2c221b0e9a6d0b935a285bce/, the version that this regressed in is 5.0-14402. I haven't actually tested this myself, but it sounds correct.