Sandbox environment texture creation process

The env texture i set in my project does not look as good as the sandbox

    var reflectionTexture = new BABYLON.HDRCubeTexture("assets/HDRs/IWUCapture.hdr", this.scene, 128, false, true, false, true);
    this.scene.environmentTexture = reflectionTexture;

I also did an .env conversion but looks kinda the same.

This is my code

I saw in the sandbox inspector there was 2 environment texture .env files

If i delete one, the effect is lessened.

How are env textures loaded and set on the sandbox? can i see the code somewhere

You can have a look here: Using An HDR Environment For PBR | Babylon.js Documentation

Basically we are loading them this way: https://playground.babylonjs.com/#2FDQT5#1153

scene.environmentTexture = new BABYLON.CubeTexture("textures/environment.env", scene);

1 Like

Thanks for the response.

Can you please explain why in the sandbox the environment.env is created twice? How can i do the same? In my scene i only have one.

This is what i am trying to re-create

You should have it only once, it is just that in the sandbox we have a different one to map to skybox coordinates for the background. This wont impact how it looks.

Thanks for your help / patience

I see now