Vousk-prod. Posted December 9, 2014 Share Posted December 9, 2014 Hi everyone, I've just noticed something strange and a little annoying : When the canvas is resized (after window resizing, or in responsive webpage, also when changing orientation on smartphone or when the engine goes fullscreen), the engine is correctly resized and everything is ok. But when I put some antialisas filter on my cameracamera.attachPostProcess(new BABYLON.FxaaPostProcess("fxaa", 1.0, camera, BABYLON.Texture.TRILINEAR_SAMPLINGMODE, _ENGINE, true));on canvas resizing the whole scene is awfully stretched (it seems to keep the previous aspect ratio to recalculate the scene). Any idea why and how I can prevent that ? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 9, 2014 Share Posted December 9, 2014 Warning here: you should not use a reusable pp:new BABYLON.FxaaPostProcess("fxaa", 1.0, camera, BABYLON.Texture.TRILINEAR_SAMPLINGMODE, _ENGINE, false) Except that, this should work. If not could you try to repro it on the playground? Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted December 10, 2014 Share Posted December 10, 2014 I also have had weird re-size issues in the Voice-Sync Recorder I have been working on. Not an issue I am worried about since it is a developer tool, not an end customer game. Found I had to use tables-spans-(aligns & widths inside of td's) to group form controls with a canvas to get it to layout correctly on load, since div tags did not work at all. It is fixed by just reloading after resizing, but this is not feasible for all applications. Could be doing something wrong, but I have so many things that are a higher priority than this. Jeff Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted December 11, 2014 Author Share Posted December 11, 2014 In fact my code is not exactly the one I wrote here, I was using a reusable pp because I assign the new BABYLON.FxaaPostProcess to a aaf variable I attach to the camera in an other part of the code, and sometimes I detach the pp and reattach it later, so I thought I need to use a reusable pp, but maybe I misunderstood the "reusable" concept : is this for use on many different cameras, or for multi use on one same camera ? (btw, how did you format the piece of code you have posted to have it beautifully colored ? when I use the "code" tag it simply put it in a rectangle but not color syntaxing... ) Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted December 11, 2014 Author Share Posted December 11, 2014 And for the stretching problem, I've just double check and.... you're right, it works !! .... since babylon.2.0-alpha I didn't notice because for now I haven't updated my scenes to this new version (because compared to previous version it's 150Ko heavier, and I'm concerned with the loading speed and data amount people will have to download to their phones. BTW is their a plan to one day split the library in some parts so that if we don't use one aspect for a project we can load only relevant part ? for now it's not so required but when bjs will be 1Mo or more, for instance). Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 11, 2014 Share Posted December 11, 2014 the minified version is less than 600k and we use gzip on it to go down less than 100k Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted December 11, 2014 Author Share Posted December 11, 2014 Yes I know, I was asking that for the day when the (minified) lib will be more than 1Mo (not so soon ) How did you format your colorful code in the posts ? By hand or with a particular tag ? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 11, 2014 Share Posted December 11, 2014 You can find a code button in the post editor:) Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted December 11, 2014 Author Share Posted December 11, 2014 Erm, I'm already using this button, I certainly need to have some rest... I'm a little blind I think cause I never noticed that the text inside the "code rectangle area" is syntax-colored...What appears strange to my eyes is that you managed to put some colorfull code without this "code rectangle" around... that looked just too magical... GameMonetize 1 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.