View Issue Details

IDProjectCategoryView StatusLast Update
0018023RunnerHTML5Public2018-10-26 11:35
ReporterRyan McKayAssigned ToMike Dailly 
PriorityLowSeverityC - GeneralReproducibility100%
Status ClosedResolutionFixed 
PlatformHTML5OS OS Version
Product VersionPre-2.1.3 
Target Version2.2.1Fixed in Version2.2.1 
Summary0018023: HTML5: Premultiplied alpha is not working
DescriptionI'm currently figuring out how to use an image with transparency as the alpha mask for another image that also has transparency. animated alpha mask that I'm generating with code and a couple of images on a surface.
I realized that the premultiplied alpha mask method should do the trick, but I've ran into a bit of an issue that has led me to believe that using alpha masks and premultiplied alpha is currently broken in GameMaker Studio, when exporting to HTML5.
When I ran your masking examples under Windows 7, it works perfectly. The premultiplied alpha test looks like this:
However, when I run it in HTML5 it fails (using the latest stable version of both Chrome and GameMaker Studio).
When running it in HTML5 with WebGL disabled, the premultiplied alpha looks like this:
When running it in HTML5 with WebGL enabled, the entire tool just fails to run. The canvas shows up black, and the browser console starts spewing out error messages:
At this stage, I'm kinda lost. I've tried pretty much all of the alpha mask examples I could find on the forum (including examples for blend modes, surfaces, etc, some dating back to 2009).
Everything works brilliantly when I export to Windows, but when trying HTML5 on both Chrome and Firefox, with WebGL either enabled or disabled, the only luck I've had is with blend mode examples. Premultiplied alpha masks on surfaces aren't playing nice.
Additional InformationOriginal helpdesk ticket:
Tagshtml5, Runner
1.4 Found In1.4.1567
2.x Runtime Found In
2.x Runtime Verified In2.2.1.268


Peter Carr

2015-05-21 15:39


Masking_in_GMS.gmz (1,592,900 bytes)

Russell Kay

2016-09-14 14:29

Manager   ~0048555

Fixed a typo in WebGL_sprite_add_from_surface_RELEASE that means WebGL gets closer - NOTE: non-WebGL will not work as the blend modes are not supported

Mike Dailly

2018-08-01 11:43

Developer   ~0060993

Circle bug fixed, but aside from that now seems to now be working.