Michael B Posted March 22, 2019 Share Posted March 22, 2019 I'm seeing some significant aliasing artifacts when a DropShadowFilter is applied to a sprite, unless cacheAsBitmap=true. Normally wouldn't be a problem as I'd just cache it as a bitmap, however I'm seeing some display bugs related to using it. 1) has cacheAsBitmap=false, no shadows 2) has cacheAsBitmap=true, drop shadow 3) has cacheAsBitmap=false, drop shadow Am I doing something wrong or do I need to do my own shadows? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 22, 2019 Share Posted March 22, 2019 antialiasing works only for main framebuffer. Any filter, renderTexture will ruin it and its webgl problem, not pixi. In WebGL2 its possible to use AA on created framebuffers but pixi-v5 doesnt support that yet. Well, if scale is near 1 you can try adding a transparent frame around the card for the texture. Another approach is to photoshop your shadows into PNG files and use extra sprites to show them, and its fastest approach. Quote Link to comment Share on other sites More sharing options...
Michael B Posted March 22, 2019 Author Share Posted March 22, 2019 yep I'm also using renderTexture to draw the card background here as the cards are transparent. I'll try creating a png just for the shadow itself and see how that goes, otherwise create new card assets with baked in shadows (less ideal, I'd have to have different sprite sets then). Quote Link to comment Share on other sites More sharing options...
Michael B Posted March 22, 2019 Author Share Posted March 22, 2019 as a side note, is it a known issue that when using cacheAsBitmap sprites could end up not rendered? I chased this for hours, sometimes my sprites are just invisible when it's enabled randomly (but frequent). I couldn't locate any specific bug of my own, and it doesn't happen at all when it's false. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 22, 2019 Share Posted March 22, 2019 Its difficult part of code ,it had many bugs and i think there are still many left. I recommend study how it works and use getBounds() renderTextures and other stuff like removing sprite from parent before caching to udnerstand why its difficult. I have custom caching for filters that takes care of very huge stages from big collection of SWF files and i still have bugs in it I will publish it in summer maybe. Welcome to hell. Quote Link to comment Share on other sites More sharing options...
Michael B Posted March 22, 2019 Author Share Posted March 22, 2019 yea I remember talking with you a bit about it before and sounded like a tough problem to solve. Maybe I'll find time to contribute, I haven't even looked at the v5 source yet as I'm still using v4. The prebaked shadows looked pretty good, so I can turn off bitmap caching and just go with that as a solution. Thanks! 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.