jpd002 / Play-

Play! - PlayStation2 Emulator
http://purei.org
Other
2.18k stars 264 forks source link

Metal Gear Solid 2 is affected by its famous transparency issue #954

Open v-fox opened 4 years ago

v-fox commented 4 years ago

So, I've temporarily changed OpenAL output from JACK to PA (which runs as JACK shim) to avoid https://github.com/jpd002/Play-/issues/950 and tried out Metal Gear Solid 2. There were few issue right of the bat but the most prominent is probably https://github.com/PCSX2/pcsx2/issues/2514 which also notoriously affects original old PC port, among other things. There is a patch for SW renderer of PCSX2: https://github.com/PCSX2/pcsx2/pull/3444 Maybe the logic behind it can help to figure out right approach.

There are also more pressing issues:

For some reason I also can't correctly convert image dumps from the emulator with ImageMagic tools into png, they come out corrupted but jpg works fine (maybe IM bug and no one tests bmp). And there seem to be no options for some kind of logging. SLES_820 09;1_15-09-2020_11 34 05 106

jpd002 commented 4 years ago

Seems it's using the SCANMSK register to do its transparency effects? I'm going to try implementing it and share the results.

ilovelinux commented 4 years ago

Could you share the game's title ID? Would be great for compatibility tracker :slightly_smiling_face:

v-fox commented 4 years ago

Could you share the game's title ID? Would be great for compatibility tracker

SLUS_201.44 - for original "Song of Liberty", and SLES_820.09 - for "Substance" re-release.

jpd002 commented 3 years ago

I've made an implementation of the SCANMSK register in the Vulkan GS handler:

image image image

Results are a bit strange:

It's such a weird way to do transparency.

v-fox commented 3 years ago

In MGS3, there's no alternating pattern, dunno if it's supposed to do that or not.

I don't think that it is. Pretty sure it should be a normal window.

It's such a weird way to do transparency.

That's some early 200X trickery in action. Like how they did "reflections" by doubling geometry and illusion of 2D "light-shafts/specks" by creating geometric 3D "beams".

tadanokojin commented 3 years ago

IIRC second part of the trick is they used two displays. One will be offset by a pixel and blended with the other. Kind of an old fashion dither transparency.