Emulator Issues #4696
closedOGL: Metroid Prime thermal and X-ray visors don't work.
0%
Description
What steps will reproduce the problem?
- Set the video backend to OpenGL.
- Start Metroid Prime 1.
- Switch to the thermal or X-ray visors.
What is the expected output? What do you see instead?
Expected: The thermal visor should apply a purple-to-orange palette effect to the framebuffer. The X-ray visor should apply a blue-to-white palette effect to the framebuffer.
Observed: The world graphics either turn black or display a grayscale version of the world without any palette effect.
Dolphin version with the problem? Other Dolphin version without the
problem?
This has occurred ever since the texcache-rewrite merge in r7625. There's something wrong with the GLSL depalettizer. Previous versions performed depalettizing on the CPU. This problem occurs with any combination of EFB Copy settings.
32-bit or 64-bit and any other build parameters?
Happens in all 64-bit builds, 32-bit not tried.
OS version and versions of tools/libraries used?
OS: Windows 7 x64
Graphics: Radeon HD 5750, AMD Catalyst 11.6 drivers
Please provide any additional information below.
Both visor effects work by rendering the framebuffer to a texture in 8-bit grayscale, then interpreting the texture with a 256-color palette. This works fine in DX9 and DX11, but in OpenGL it seems to use the grayscale texture directly without applying the palette. Sometimes, the effect appears all black until I switch in and out of the visors a few times.
gDEBugger reveals that the depalettizer is generating a texture with the palette applied, but this colorized texture is somehow being discarded or mixed up with the original grayscale.
Other palette effects, including MP1's text and Twilight Princess's map, work fine.
Does this happen on other systems? Please comment.