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

Using for pixel art: low res lighting? #35

Open
lukefisklennon opened this issue Nov 16, 2018 · 4 comments
Open

Using for pixel art: low res lighting? #35

lukefisklennon opened this issue Nov 16, 2018 · 4 comments

Comments

@lukefisklennon
Copy link

lukefisklennon commented Nov 16, 2018

Hi there!

I'm using pixi-lights for a retro game with pixel art. The original low res image is loaded with PIXI.SCALE_MODES.NEAREST and then scaled up. It looks pretty good. However, the lighting cast onto the sprite is soft and high res. I want to maintain that low res pixel art effect. For example:

image

That's 4 pixels from the original sprite, but scaled up (5x) and with the lighting effect, it's lost that low res effect to a degree. I'm not sure if I'm explaining this very well.

So how would I go about fixing this?

Thanks so much!

@ivanpopelyshev
Copy link
Contributor

ivanpopelyshev commented Nov 16, 2018

Lighting uses getRenderTexture() thingy from pixi-display plugin. You can introduce a lower resolution there, and make PR, I'll accept it.

Pretty much any change in lights leads to edits in internals of plugins because this thing is experimental.

@wayfu
Copy link

wayfu commented Nov 16, 2018

Might be worth trying a mosaic filter at your desired big-pixel size perhaps?

@lukefisklennon
Copy link
Author

@ivanpopelyshev Thanks for the quick reply and pointing me in the right direction. Because I'm new to Pixi, I currently don't really know how to add this feature, but if/when I ever do I'll send a PR right away.

@lukefisklennon
Copy link
Author

@wayfu Ok thanks, I'll try this out soon.

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

No branches or pull requests

3 participants