How can I make post processing work on mobile devices?
Seems to work pretty well with desktop/PCs , but failing on Android and iOS devices
It should work there as well.
Can you provide a repro of the one not working ?
It might be the setup of the texture type or other kind of setup being unsupported on your particular devices ?
I am having problems with this, as well. On my Pixel7a / Chrome, as soon as i activate this (probably a bit extensive) postprocessing setup, the canvas just wents black. On a desktop browser it works.
`//SSAO Effekt
const ssao = new BABYLON.SSAORenderingPipeline(‘ssaopipeline’, scene, 4, [camera]);
ssao.radius = 0.00005;
ssao.bilateralSamples = 32;
ssao.bilateralSoften = 0.5;
ssao.bilateralTolerance = 1;
ssao.epsilon = 0.05;
ssao.samples = 32;
ssao.totalStrength = 1.3;
//Billo Bevel
const sscpb = new BABYLON.ScreenSpaceCurvaturePostProcess(‘sscpb’ ,scene,16 ,camera ,16 ,engine ,true ,0 ,false)
sscpb.ridge = 1.9;
sscpb.valley = 0.76;
sscpb.sample = 1;
// Default Rendering Pipeline
const pipeline = new BABYLON.DefaultRenderingPipeline(
“defaultPipeline”,
true,
scene,
scene.cameras
);
//Antialiasing
const fxaa = new BABYLON.FxaaPostProcess(
“fxaa”,
1.0,
camera
);
pipeline.chromaticAberrationEnabled = true;
pipeline.chromaticAberration.aberrationAmount = 33;
pipeline.chromaticAberration.radialIntensity = 3;
pipeline.chromaticAberration.samples = 3;
pipeline.sharpenEnabled = true;
pipeline.sharpen.edgeAmount = 0.15;
pipeline.bloomEnabled = true;
pipeline.bloomThreshold = 0.8;
pipeline.bloomWeight = 0.4;
pipeline.bloomKernel = 100;
pipeline.bloomScale = 0.5;
pipeline.grainEnabled = true;
pipeline.grain.intensity = 9;
pipeline.grain.animated = true;
pipeline.fxaaEnabled = true;
lensEffect = new BABYLON.LensRenderingPipeline(‘lens’, {
edge_blur: 0.69,
chromatic_aberration: 0.5,
distortion: 0.5,
grain_amount: 1.0
}, scene, 1.0, camera);`
Can you create the repro in the playground ?
My guess is that it is way too many post processes for a phone at a first glance.
here you can check it: Babylon.js Playground
I know that the SSAO is very performance hungry, still it is the one, that works on the mobile. the others make it go black. at least on my device.