Alpha set to Zero in Effects cause render issues

Bugs will be moved here once resolved.

Post » Fri Sep 09, 2016 3:47 am

Problem Description
I have an effect that sets every pixel of an object to 0.0 so that it can be transparent.
However, if the pixel has rgb values other than 0.0, they will color objects behind them even though they are completely transparent.

Attach a Capx
https://1drv.ms/u/s!AhHSZHEulqh_gW9U2hgHsZL1XBNS

Description of Capx
sprite with the effect

Steps to Reproduce Bug
  • add the effect files to the effects folder
  • open the capx and view how it renders over objects behind it

Observed Result
The pixels are coloring objects behind it even though they are completely transparent.

Expected Result
For pixels not to color objects behind, even if their rgb values are set. Basically, the alpha in the effect should influence the results.

Affected Browsers
  • Chrome: (YES)
  • FireFox: (YES)
  • Internet Explorer: (YES)

Operating System and Service Pack
vista sp2

Construct 2 Version ID
r233
B
45
S
21
G
65
Posts: 1,118
Reputation: 38,227

Post » Fri Sep 09, 2016 4:05 am

also, obviously I don't intend to just make the objects transparent- I'll be adjusting various other stuff, but due to this issue it causes stuff to render incorrectly.
B
45
S
21
G
65
Posts: 1,118
Reputation: 38,227

Post » Wed Sep 14, 2016 1:33 pm

Closing as not a bug: your shader incorrectly handles premultiplied alpha - if you change the alpha to 0 you must also set the RGB channels to 0 as well.

Note we don't accept bugs in third-party code anyway.
Scirra Founder
B
398
S
236
G
88
Posts: 24,428
Reputation: 194,625


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 11 guests