In 0.9.2 in-stencil cloud quads drawn over terrain quads rendered intuitively, as one would expect in a graphics program via layers. Occasionally clouds overlapped so the effect was more opaque (heavy clouds), which effect was exploited to simulate a storm cloud by intermittently drawing another quad over it consisting of the same cloud with a ray of lightning.

clouds.jpg (18.94 KiB) Viewed 251 times

In 11.2 the cloud renders totally different, some unknown blending changes its colors or the pixel colors under the transparent pixels. I’ve never used [read: understood] canvas, layer or blend commands in Löve though I’ve tried various of the latter with no success. I get either a white or magenta effect. How do I get the intuitive effect back in 11.2?

Hardly anything changed from 0.9.2 to 11.2: the code posted earlier was 11.2; 0.9.2 is below, and the only issue is how the cloud renders. The example just draws a city tile over the full tile set, plus a digit-image over it — there being no transparency in any of those, they render fine. The cloud though, is an opaque shape inside a transparent rectangle, and that is a tile drawn after love.graphics.setColor is given an alpha in its rgba table — no canvas function or blending command used (all other images are drawn in rgba: 1,1,1,1).

On the left is what 0.9.2 renders (as intended). What I get on 11.2 without any setBlendMode command are purple clouds. With love.graphics.setBlendMode(“add”, “alphamultiply”) — which at least doesn’t change the transparent areas of the cloud image below or in the tile drawn before it, I get the white clouds. It gets weirder at other blend settings.

comparo.jpg (10.24 KiB) Viewed 213 times

Oh, I just realized I’m still using the love.graphics.draw statement of 0.9.2 in 11.2, and something has probably changed there.

In the conversion from 0.9.2 to 11.2, the quick and dirty color redefinitions were just given a “/255” but somewhere along the line what should have been 255/255, 255/255, 255/255, 89/255 (1, 1, 1, 0.35) swallowed a ‘2’ in ‘g’ of ‘rgba (55/255), messing up the cloud tile.

The default love.graphics.setBlendMode(“alpha”, “alphamultiply”) works as expected, and in fact can be omitted for my purposes. Sayonara 0.9.2.