Opened 3 years ago

Last modified 2 years ago

#13169 new defect

Myst III Exile: missing scene transition effect on PowerPC (big-endian) machines on all OSes — at Version 7

Reported by: kas1e Owned by:
Priority: normal Component: Engine: Myst3
Version: Keywords: big endian, BE, Myst3, AmigaOS
Cc: kas1e Game: Myst 3: Exile

Description (last modified by kas1e)

While testing AmigaOS4 builds of ScummVM (v2.5.0 and daily build from 25.12.2021) find out a rendering issue.

The issue is that switch between scenes in Myst3 does not have that nice cross-fade effect when one image is fade out and another one fade it, making one image replace another with tasty cross-fade effect. Instead, we have or just a white screen for a time while the cross-fade effect should happen or a bit of visual trash (depends on the drivers we use).

If we use an older version of our drivers called MiniGL we have such a visuall mess:

https://youtu.be/ndhmxNXlLH4?t=78

If watch carefully between switching of scenes then instead of effect we have some purple vertical lines all over the screen for a time of effect. Mean that no-cross-fade happens, but nothing instead and unitialized stuff have place.

And that if I use another more modern OpenGL driver called GL4ES:

https://youtu.be/KiDJ3ox51lU?t=37

There all visibly better. Just instead of a color mess, we have a white screen for the time while the effect should happen and when a new scene happens.

When I test the same version of the game but on win32/x64 then all fine means it's probably a Big-Endian issue.

If needs any more details or tests just ask :)

Thanks!

Change History (7)

comment:1 by BeWorld2018, 3 years ago

I can confirm here, i have same with transition effect
I test with OpenGL/OpenGL but with Software mode, it's ok.

Platform : MorphOS

comment:2 by kas1e, 3 years ago

Yes, can confirm that on AmigaOS4 effect also works in software mode.

That probably mean that OpenGL-based code in Myst3 needs to be byte-swapped when handling of this effect happens ? (software renderer seems to be Endian aware and that is why it works imho?)

Last edited 3 years ago by kas1e (previous) (diff)

comment:3 by kas1e, 3 years ago

Summary: Myst III Exile: missing scene transition effect on PowerPC (big-endian) machines under AmigaOS4Myst III Exile: missing scene transition effect on PowerPC (big-endian) machines on all OSes

comment:4 by kas1e, 3 years ago

At the moment we only reach to the point that seems that it can be be a bug in glCopyTexImage2D() in all 3 realisation of GL drivers : MiniGL, OGLES2 and MorphOS GL.

To be 100% sure i will try to build ScummVM for LinuxPPC under MESA to see how it will reacts there. If bug still will be there, then it probabaly something about Endianes, if bug will be not there, then it will mean indeed bug in all the amigaos4 and morphos driver realisations.

comment:5 by lephilousophe, 3 years ago

I managed to reproduce the white screen bug using GL4ES and Mesa on Linux.

It's due to the fact that GL4ES doesn't mark its texture object as valid when using glCopyTexImage2D.
A call to glTexImage2D before corrects the problem although it shouldn't be needed.

What happens if you use the following patch?
Here, with GL4ES it works.

  • engines/myst3/gfx_opengl_texture.cpp

    a b void OpenGLTexture::copyFromFramebuffer(const Common::Rect &screen) {  
    135135               internalHeight = upperPowerOfTwo(height);
    136136               internalWidth = upperPowerOfTwo(width);
    137137       }
    138138
    139139       glBindTexture(GL_TEXTURE_2D, id);
     140       glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, internalWidth, internalHeight, 0, internalFormat, GL_UNSIGNED_BYTE, nullptr);
    140141       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
    141142       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
    142143
    143144       glCopyTexImage2D(GL_TEXTURE_2D, 0, internalFormat, screen.left, screen.top, internalWidth, internalHeight, 0);
    144145}

in reply to:  5 comment:6 by kas1e, 3 years ago

@lephilousophe

What happens if you use the following patch?
Here, with GL4ES it works.

Thanks for taking more attention on it ! Much apprecated :) But we do test yesterday with you the same path and ut wasn't working :) But i tried just in case another time, exactly what you quote there : nope, no cross-fade effect visibly.

Maybe you reproduce different "white" bug ? My one as shown on video is more like missng cross-fade effect and instead one image just overwrte another one, but in the time where we should have cross-fade we have nothng (or mess/white/etc depends on the driver)

comment:7 by kas1e, 3 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.