Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.50] Tint Fill Not Working With Lights Pipeline #5452

Closed
kainage opened this issue Dec 18, 2020 · 1 comment
Closed

[3.50] Tint Fill Not Working With Lights Pipeline #5452

kainage opened this issue Dec 18, 2020 · 1 comment

Comments

@kainage
Copy link
Contributor

kainage commented Dec 18, 2020

Version

  • Phaser Version: 3.50

Description

When using the Light Pipeline (Light2D) tintFill appears to be doing the same thing as a regular tint call.

Example Test Code

Check out this labs example for the non-lights behavior: http://labs.phaser.io/view.html?src=src\display\tint\tint%20fill%20effect.js

Change it to something like this and the two will look the same

class Example extends Phaser.Scene
{
    constructor ()
    {
        super();
    }

    preload ()
    {
        this.load.image('mushroom', 'assets/particles/glass.png');
    }

    create ()
    {
        this.add.image(200, 300, 'mushroom').setPipeline("Light2D");
        this.add.image(400, 300, 'mushroom').setTint(0xff00ff).setPipeline("Light2D");
        this.add.image(600, 300, 'mushroom').setTintFill(0xff00ff).setPipeline("Light2D");

        this.lights.enable()
        this.lights.setAmbientColor("#0x999999")

        this.lights.addLight(200, 300, 1000, undefined, 2)
        this.lights.addLight(400, 300, 1000, undefined, 2)
        this.lights.addLight(600, 300, 1000, undefined, 2)
    }
}

const config = {
    type: Phaser.WEBGL,
    parent: 'phaser-example',
    width: 800,
    height: 600,
    backgroundColor: '#000000',
    scene: [ Example ]
};

const game = new Phaser.Game(config);
@photonstorm
Copy link
Collaborator

Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants