We are encountering a weird issue with Chrome when trying to use BABYLON.ScreenshotTools.CreateScreenshotUsingRenderTargetAsync.
PG Link: https://playground.babylonjs.com/#A2FPKU#3
This is what we found during testing:
Windows
- Chrome (No AA) - Blank screenshot with no rendered model, but has the correct clear color.
- Chrome (AA) - Blank screenshot with no rendered model and does not have the correct clear color.
- Firefox (No AA & AA) - Working as intended
- Edge behaves the same as Chrome (obviously)
Mac
- Chrome (No AA) - Blank screenshot with no rendered model, but has the correct clear color.
- Chrome (AA) - Blank screenshot with no rendered model and does not have the correct clear color.
- Firefox (No AA & AA) - Working as intended
- Safari (No AA & AA) - Working as intended (although only one screenshot will get downloaded at a time, so one of the calls needs to be commented out. I suspect it’s a browser limitation).
Chrome (No AA) can be fixed by introducing a small delay using setTimeout. We have not found anyway to fix Chrome (AA).