atrilumen Posted December 8, 2013 Share Posted December 8, 2013 I've noticed that things (textures (with alpha) created from canvases; bitmap texts) drawn with the webGL renderer have light colored outlines that are not present with the canvas renderer. Is there anything I can do to mitigate it? Also, there's a large disparity between the effective translucency of sprites drawn with the two renderers. For now I'm switching between two different alpha values depending on renderer type, but the screenshot below shows the difference without that workaround applied. (It's a relatively difficult workaround to apply; subject to lots of tweaking to get it close enough.) ...Sorry to pop in here for the first time just to whine. Greetings, everyone.GoodBoyDigital, PhotonStorm, and friends: respect. Quote Link to comment Share on other sites More sharing options...
rich Posted December 8, 2013 Share Posted December 8, 2013 Wow, I've never seen that before - how are you making the PNGs? I'll wager it's something to do with their encoding / bit-depth, or GPU possibly. Maybe upload a test for the rest of us to compare? Quote Link to comment Share on other sites More sharing options...
atrilumen Posted December 8, 2013 Author Share Posted December 8, 2013 The sprite textures are drawn with canvas and then loaded into textures. The bitmap font glyphs were generated by littera. I'm using a snapshot from the dev branch of pixi, and the latest chrome on a Macbook Pro 13" with Intel HD3000. That's the only way I've tried it so far (besides using the 1.3.0 release of pixi). I'll try to upload a test in a little while (it's hard to stay focused on the weekend)... Quote Link to comment Share on other sites More sharing options...
atrilumen Posted December 8, 2013 Author Share Posted December 8, 2013 Alright, here's a quick test: Canvas. WebGL. Quote Link to comment Share on other sites More sharing options...
atrilumen Posted December 9, 2013 Author Share Posted December 9, 2013 Here's how the webgl version looks in Firefox: The background only shows through the transparent sprite. And now this is resolved. Passing null as the color parameter to the Pixi.stage constructor did the trick. Now it looks correct in both renderers. Quote Link to comment Share on other sites More sharing options...
Akis Posted December 9, 2013 Share Posted December 9, 2013 Wow, nice trick. But still, by passing null to the stage, it will set black as the background color. What were you using before? white? Quote Link to comment Share on other sites More sharing options...
atrilumen Posted December 9, 2013 Author Share Posted December 9, 2013 @Aksis: Yes. The project I'm working on originally had a white background before I decided to use a transparent canvas over a background image. So I suppose this could still be an issue. I wonder why white causes those effects when black does not. (I'm passing black explicitly now, since you mentioned it). I guess I may have to dig into Pixi more than I planned. Quote Link to comment Share on other sites More sharing options...
xerver Posted December 9, 2013 Share Posted December 9, 2013 @Aksis: Yes. The project I'm working on originally had a white background before I decided to use a transparent canvas over a background image. So I suppose this could still be an issue. I wonder why white causes those effects when black does not. (I'm passing black explicitly now, since you mentioned it). I guess I may have to dig into Pixi more than I planned. Probably because your images are black, I suspect you would have black artifacts if you were using white images. Quote Link to comment Share on other sites More sharing options...
atrilumen Posted December 9, 2013 Author Share Posted December 9, 2013 Pull request 345 resolves both of these issues. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.