scratchfoundation / scratch-flash

Open source version of the Scratch 2.0 project editor. This is the basis for the online and offline versions of Scratch found on the website.
https://scratch.mit.edu
GNU General Public License v2.0
1.33k stars 512 forks source link

Inconsistent graphic effect behaviour (probably) #1090

Closed alyssarosenzweig closed 5 years ago

alyssarosenzweig commented 8 years ago

See https://scratch.mit.edu/projects/106764731/, which relies on deterministic behavior of graphic effects (specifically, the whirl effect). The effect behaves identically between consecutive uses on the same machine, but across different environments can behave a few different ways.

(note: this is not my project).

TheLogFather commented 8 years ago

There are various ways that (certain) graphics effects will be inconsistent, even on the same machine under different settings (e.g. fullscreen, browser zoom level, etc.) As for different machines, a couple of major factors that I'd expect to cause significant differences would be retina-type displays (though I've not tested that) and whether or not they use Stage3D (which I have tested).

alyssarosenzweig commented 8 years ago

@TheLogFather Still -- that's a bug, not a feature!

TheLogFather commented 8 years ago

Oh, indeed, and I've already put in a PR to fix one of the big inconsistencies of Stage3D effects (the way brightness works: #972). Even then the behaviour is not identical to the non-Stage3D case, but it's way closer than it was.

I do wonder if it's actually not possible to have identical behaviour, in such fine detail, when something like retina is involved? I know that when I look at costumes after having applied an effect, they become 'blurred' at the edges on a retina screen, and have twice the pixel density, but only on my MacBook Pro with the retina screen.

The same is true for the project you reference above (the coloured pixels are clearly way finer, twice as dense in each direction, after whirl effect than before). Even without retina, I think you can get some idea of what I mean by trying it fullscreen.

An interesting example is this demo project: https://scratch.mit.edu/projects/89811075/

The behaviour is really odd, since it changes the look of the pen layer when there's a 'touching' test running within a loop (but the pen layer is fixed here, nothing gets redrawn). –But you'll only see the effect if you have a retina type display.