View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0018023||Runner||HTML5||Public||2015-05-21 15:38||2018-10-26 11:35|
|Reporter||Ryan McKay||Assigned To||Mike Dailly|
|Priority||Low||Severity||C - General||Reproducibility||100%|
|Target Version||2.2.1||Fixed in Version||2.2.1|
|Summary||0018023: HTML5: Premultiplied alpha is not working|
|Description||I'm currently figuring out how to use an image with transparency as the alpha mask for another image that also has transparency.|
Specifically...an 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 Information||Original helpdesk ticket: http://help.yoyogames.com/tickets/85450|
|1.4 Found In||1.4.1567|
|2.x Runtime Found In|
|2.x Runtime Verified In||18.104.22.1688|
Masking_in_GMS.gmz (1,592,900 bytes)
||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|
|Circle bug fixed, but aside from that now seems to now be working.|