JustMe Posted June 12, 2013 Share Posted June 12, 2013 Hello all... new to Pixi.js, love what I have seen sofar! Surprised at how easy it was to set pixi.js up the first thing I tested for myself was the scaling part...and... it scaled! \o/ unfortunately it blurred aswell! Could anyone tell me if you can adjust this manually like you could for canvas?ctx.imageSmoothingEnabled = false;ctx.webkitImageSmoothingEnabled = false;ctx.mozImageSmoothingEnabled = false; If pixi already provide this.. I was unable to locate the answer on the forums/docs. Please keep up the great work pixi! Thanks for reading. Quote Link to comment Share on other sites More sharing options...
xerver Posted June 12, 2013 Share Posted June 12, 2013 Unfortunately it does not provide unfiltered scaling yet Everything scales linearly by default (or bicubic for canvas), that there is no way to change it to nearest neighbor scaling built in. I have been hacking in a solution until an official one is released. Quote Link to comment Share on other sites More sharing options...
Mat Groves Posted June 12, 2013 Share Posted June 12, 2013 Ah yes! I was thinking I could have a renderer parameter? smooth true/false keep it nice and simple Quote Link to comment Share on other sites More sharing options...
xerver Posted June 12, 2013 Share Posted June 12, 2013 I'm working on a patch right now that I am about to submit, allowing you to set a filter parameter on a per-texture basis. Quote Link to comment Share on other sites More sharing options...
JustMe Posted June 12, 2013 Author Share Posted June 12, 2013 I'm working on a patch right now that I am about to submit, allowing you to set a filter parameter on a per-texture basis. Ah yes! I was thinking I could have a renderer parameter? smooth true/false keep it nice and simple Looking forward to this! Thanks for the response A small followup question; now I have no knowledge about anything related to the GPU... (or math for that matter ) is/can this scaling be done by the GPU or will this always be a CPU task? Thanks! Quote Link to comment Share on other sites More sharing options...
xerver Posted June 12, 2013 Share Posted June 12, 2013 When using WebGL, it will be a GPU task. When using Canvas it will be a CPU task (not 100% sure on that). *EDIT* Submitted: https://github.com/GoodBoyDigital/pixi.js/pull/167 Quote Link to comment Share on other sites More sharing options...
JustMe Posted June 12, 2013 Author Share Posted June 12, 2013 When using WebGL, it will be a GPU task. When using Canvas it will be a CPU task (not 100% sure on that). *EDIT* Submitted: https://github.com/GoodBoyDigital/pixi.js/pull/167 nice! is it you're not 100% about canvas because even though webGL is not supported for drawing it could still use the GPU for calculations?Also the link you added, is that a suggestion awaiting approval or an actual update? sorry for the newbee questions! Quote Link to comment Share on other sites More sharing options...
xerver Posted June 12, 2013 Share Posted June 12, 2013 I'm not 100% sure that all canvas calculations are done on the CPU, though I'm pretty sure most of them are. That link I added was a pull request, after review it will land in the dev branch and will be in the next release. Quote Link to comment Share on other sites More sharing options...
JustMe Posted June 13, 2013 Author Share Posted June 13, 2013 sweet thanks rolnaaba! 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.