hunts Posted February 26, 2017 Share Posted February 26, 2017 Hello , pls I need help on how to use this optimising code from BJS doc..something like a playground. Thanks var result = new BABYLON.SceneOptimizerOptions(60, 2000); var priority = 0; result.optimizations.push(new BABYLON.ShadowsOptimization(priority)); result.optimizations.push(new BABYLON.LensFlaresOptimization(priority)); // Next priority priority++; result.optimizations.push(new BABYLON.PostProcessesOptimization(priority)); result.optimizations.push(new BABYLON.ParticlesOptimization(priority)); // Next priority priority++; result.optimizations.push(new BABYLON.TextureOptimization(priority, 256)); // Next priority priority++; result.optimizations.push(new BABYLON.RenderTargetsOptimization(priority)); // Next priority priority++; result.optimizations.push(new BABYLON.HardwareScalingOptimization(priority, 4)); return result; Quote Link to comment Share on other sites More sharing options...
Dad72 Posted February 26, 2017 Share Posted February 26, 2017 This : var EngineOptimizer = function() { var result = new BABYLON.SceneOptimizerOptions(60, 2000); var priority = 0; result.optimizations.push(new BABYLON.ShadowsOptimization(priority)); result.optimizations.push(new BABYLON.LensFlaresOptimization(priority)); // Next priority priority++; result.optimizations.push(new BABYLON.PostProcessesOptimization(priority)); result.optimizations.push(new BABYLON.ParticlesOptimization(priority)); // Next priority priority++; result.optimizations.push(new BABYLON.TextureOptimization(priority, 256));// Next priority priority++; result.optimizations.push(new BABYLON.RenderTargetsOptimization(priority)); // Next priority priority++; result.optimizations.push(new BABYLON.HardwareScalingOptimization(priority, 4)); return result; }; BABYLON.SceneOptimizer.OptimizeAsync(scene, EngineOptimizer()); hunts and dbawel 2 Quote Link to comment Share on other sites More sharing options...
hunts Posted February 26, 2017 Author Share Posted February 26, 2017 @Dad72 thanks 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.