[Share] My extension of PIXI for Lighting.
See original GitHub issueMy extension is inspired by https://github.com/pixijs/pixi-lights. But it’s not simple port of old pixi-lights, it’s re-designed.
The differences :
- Better performance (just a bit little)
- A new renderer named
LightSpriteRenderer, don’t change WebGLRenderer & SpriteRenderer - Light is not the subclass of DisplayObject, it’s just a normal Class.
- attribute
lightson sprite, don’t need to add a light object to the stage/container. Now, you could set different lights on different sprites in the same stage. - AmbientLight is not necessary, you could use ambientColor and ambientLight on PointLight and DirectionalLight. But just use on the first light of
lightsplease. - support non-light-sprites in correct rendering order. (the old pixi-lights always render non-light sprite on the top).
- use pluginName for using LightSpriteRenderer ( see #3330 )
- add an important feature of pixi-gl-core ( see https://github.com/pixijs/pixi-gl-core/pull/18 )
- DO NOT support Container . Please use LightSpriteRenderer on standalone Sprite with normalTexture.
- … others…
My english is very poor , so , the example is better than my words : http://fattyboy.cn/pixi-lights-v4/
the key files of this feature in my fork version at : ~~https://github.com/finscn/pixi.js/tree/master/src/extension/light~~ [update: new url] : https://github.com/finscn/pixi.js/tree/master/src/extensions/renderers/light
Why don’t use Deferred Lightning ?
I found that Deferred Lightning in 2D game with WebGL won’t help for performance in most cases.
BTW, I’ve stopped to develop Light Filter. If want to implement it ,I have to create a new subclass of Sprite for render normalTexture. That’s so complex.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:7
- Comments:15 (6 by maintainers)
Top Results From Across the Web
[Share] My extension of PIXI for Lighting. · Issue #3360 - GitHub
A new renderer named LightSpriteRenderer , don't change WebGLRenderer & SpriteRenderer; Light is not the subclass of DisplayObject, it's just a ...
Read more >[Share] My extension of PIXI for Lighting. - Bountysource
My extension is inspired by https://github.com/pixijs/pixi-lights. But it's not simple port of old pixi-lights, it's re-designed.
Read more >Virtual Reality Kit W/ Pixi Evo And Aluminium Extension
Compact, light and always-ready kit for small 360° cameras · Mini tripod with two leg angles · Legs can be extended in five...
Read more >Pixi Lighting A19E-9WX 8.5-Watt LED Light Bulb, Warm Color
The Pixi A19E-9WX is a standard bulb replacement (40 Watt equivalent) with a warm color temperature. Pixi LED bulbs last years longer and...
Read more >Layered Lighting System Using Masks Issue - Pixi.js
I'm using pixi-layers & pixi v4. I have Sprites that use a texture (generally png) as a light. This gets added to the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

pixi-layers is an amazing feature , I couldn’t wait for it.
Hi guys , now support deferred-lighting .
When pixi supports
gl.bindAttribLocation, I will open a PR for this feature.@GoodBoyDigital , when will pixi support
gl.bindAttribLocation?P.S. : I’ve open a PR #3682 for
gl.bindAttribLocation. Review please, thank you.