Skip to content

effects/screentransform: Do proper cross-fading

At the moment, the effect that animates the screen works as follows:

  • render the screen before it's rotated in an offscreen texture
  • after screen rotated, paint the offscreen texture in the first half of the animation but not the screen contents after rotation and in the second half of the animation, paint the live screen contents

This works but it doesn't take into account things such as blur (I can see that the region around where the panel should be doesn't look as expected).

This change makes the screen transform effect do proper cross-fading, i.e. save the screen before it's rotated in an offscreen texture, render the current screen in an offscreen texture, and produce the final result by cross-fading between two offscreen textures in a shader.

Besides fixing the visuals of the effect, another motivation behind this change is to reduce the number of ScreenPaintData transforms, which can be very handy in simplifying item painting code.

Edited by Vlad Zahorodnii

Merge request reports