lights
lights copied to clipboard
Using for pixel art: low res lighting?
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:
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!
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.
Might be worth trying a mosaic filter at your desired big-pixel size perhaps?
@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.
@wayfu Ok thanks, I'll try this out soon.