Hey guys,
Reasonably new to Babylon. I have this rather substantial web app and it runs great on all browser except chrome on mac.
It seems to only render one face of the skybox. Has anyone seen this before?
Thanks,
Hey guys,
Reasonably new to Babylon. I have this rather substantial web app and it runs great on all browser except chrome on mac.
It seems to only render one face of the skybox. Has anyone seen this before?
Thanks,
Hello and welcome!!
Do you have any message in the console?
Thank you, I’ve been copy/pasting all your snippets for the last couple months!
So I have no non-standard warnings in the console. Just the typical can’t resolve cannon (i don’t use it). And a bunch of react warnings about ‘i’, ‘e’ etc is already defined.
I did have a similar issue with chrome on Windows, where the corners of the sky box were blacked out, but as i moved the camera closer it would start to fill in (some sort of clipping based on the camera?). I scaled down the sky and it seemed to solve it (on windows).
Since the skybox is now touching the city limits, i cant scale it down anymore. I also dont think its the same problem, as when i move the camera into the black areas, they just stay black and don’t ‘fill in’.
Following up
So i went ‘outside’ the skybox. As far as i can tell all the white is clearcolor. and all the black is the sky box mesh. It seems like the cubemap isn’t mapped properly?
Edit:
So i’ve scaled the skybox mesh right down to about 100units. Its really visible now. Only one side of the cube is receiving textures, this is only happening in chrome on mac. Every other broswer (i’ve tried) works correctly on both windows and mac.
Relevant code:
var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene);
var skyMapCube = new BABYLON.CubeTexture(
"/engine/texture/TropicalSunnyDay/TropicalSunnyDay",
scene
);
skyboxMaterial.reflectionTexture = skyMapCube;
skyboxMaterial.fogEnabled = false;
skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
var skybox = BABYLON.Mesh.CreateBox("skyBox", 300.0, scene);
skybox.material = skyboxMaterial;
skybox.isPickable = false;
This really looks like a bug in chrome
you should open an issue here: https://bugs.chromium.org
Yeah i think so too. Oh well thanks for you time mate!
Edit:
.dds works with CubeTexture.CreateFromPrefilteredData()