ZeRo000s Posted May 23, 2020 Share Posted May 23, 2020 i'm trying to add lights to my game. was testing on pixiplayground here what i made so far :3https://www.pixiplayground.com/#/edit/~tlXTadqt1qCEvHf~cMQE i need to get coords normilized to (0,1) in full texture instead of only the part that is getting displayed ? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted May 23, 2020 Share Posted May 23, 2020 (edited) For fullscreen filters pixi uses same coords, so "cont.filterArea = app.screen" seems to solve the problem. Any other sizes, ( whatever container bounds are) temporary textures have pow2 sizes, different from what you pass in u_lightmap - you have to convert "input coords" to "pixel coords" and then to your u_lightmap coords, probably passing dimensions of the lightmap through uniforms. If you want more info on coords, you have to go through https://github.com/pixijs/pixi.js/wiki/v5-Creating-filters . Welcome to the forums! Edited May 23, 2020 by ivan.popelyshev ZeRo000s 1 Quote Link to comment Share on other sites More sharing options...
ZeRo000s Posted May 23, 2020 Author Share Posted May 23, 2020 Okay thank you, that's helpful Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.