Gamua / Starling-Framework

The Cross Platform Game Engine
http://www.starling-framework.org
Other
2.82k stars 821 forks source link

Glow Filter: Color issue #1074

Closed Adolio closed 4 years ago

Adolio commented 4 years ago

Hi Daniel,

I just discovered an issue with the new GlowFilter version from Starling version 2.6. Apparently the new implementation doesn't support white color anymore (and maybe other colors).

In 2.5.1: Screen Shot 04-10-20 at 12 06 AM

In 2.6: Screen Shot 04-10-20 at 12 08 AM

Code to reproduce:

package
{
    import starling.display.Quad;
    import starling.display.Sprite;
    import starling.filters.GlowFilter;
    import starling.core.Starling;

    public class GlowTest extends Sprite
    {
        public function GlowTest()
        {
            Starling.current.stage.color = 0x555555;

            var q:Quad = new Quad(100, 100, 0x0);
            q.filter = new GlowFilter(0xffffff);
            q.x = (Starling.current.stage.stageWidth - q.width) * 0.5;
            q.y = (Starling.current.stage.stageHeight - q.height) * 0.5;
            addChild(q);
        }
    }
}

Best, Aurélien

PrimaryFeather commented 4 years ago

Hey Aurélien! Hm, that's strange. In the Starling Demo scene where I'm showing filters, it works fine. However, when I run your demo, I can reproduce the error.

I'll look into it – thanks a lot for the heads-up!

PrimaryFeather commented 4 years ago

I've got it! The problem was that I didn't always assign the replaceColor setting of the filter effect. The same happened on the DropShadowFilter.

It's now fixed. Thanks again for making me aware of this, Aurélien!

Adolio commented 4 years ago

Excellent! Thanks again Daniel for you fast reaction! 😀

I'm taking the opportunity to ask you if there is any easy way to get access to the swc library of the current master? Thanks in advance for your help.

PrimaryFeather commented 4 years ago

You're welcome, Aurélien!

Hm, unfortunately there isn't any pre-compiled SWC for non-released versions. You have to build it yourself, or reference Starling's source code / project directly (that's what I always do).

Adolio commented 4 years ago

Alright, I will try build it myself or I might fallback to a classpath addition until 2.6.1 get released (if that's your plans).

See you :) !

PrimaryFeather commented 4 years ago

Ah, you know what? I just made a quick (but untested!) build for you: https://web.tresorit.com/l#o_NimMyruWmJuCtWLtj-lA

I hope that helps! 😄 Cheers!

Adolio commented 4 years ago

Thanks a lot 😊