pixijs / lights

Adds dynamic lighting via deferred shading to PixiJS
https://pixijs.io/lights/docs/index.html
MIT License
198 stars 29 forks source link

Ambient light seems to come from the bottom right? #34

Open jazzyjeff5 opened 5 years ago

jazzyjeff5 commented 5 years ago

It seems that when I use a bright ambient light, the light is actually coming from the bottom right of the screen. I'm doing some funny translation of the stage to make (0,0) the bottom left, perhaps this is why?

How do I change the position of the ambient light? I've looked at the indices and vertices arrays but I don't see how what's in them relates to on screen co-ordinates.

Maybe I'm misunderstanding ambient light? All I'm looking for is a way to lighten the whole scene evenly so it's not totally black without any other lights.

Thanks for all the help and for the engine!

jonlepage commented 5 years ago

you need a DirectionalLight to your stage. https://github.com/djmisterjon/PIXI.ProStageEditor/blob/d9e05aa1a1a7b943a2d1b4562fc062bbc8be079d/js/plugins/core_ContainerData.js#L374

Dai696 commented 5 years ago

I think a new PR was made that fixed this

U don't need directional light tho