I already add an env texture like this at the begining after I created the scene.
const envTexture = CubeTexture.CreateFromPrefilteredData('https://preview.smarteam3d.com/build/environment.dds', scene);
envTexture.name = "envTex";
envTexture.gammaSpace = false;
scene.environmentTexture = envTexture;
and put a return at the begining of function GetEnvironmentBRDFTexture. Aaaand all good
Because of this I asked if I still have to set environmentBRDFTexture too.
So shall I add it like this
scene.environmentBRDFTexture = CubeTexture.CreateFromPrefilteredData('https://preview.smarteam3d.com/build/environment.dds', scene);
?