when i load the scene in environment texture 50 requests are triggered Parallel
const envTexture = CubeTexture.CreateFromPrefilteredData(“./assets/environment/environmentSpecular.env”, scene)
scene.environmentTexture = envTexture;
// scene.createDefaultSkybox(envTexture);
// scene.environmentIntensity = 0.2;
var blur = 0.8;
var myskybox = scene.createDefaultSkybox(envTexture, true, 10000, blur);
These are not true urls and they download nothing from a web site: they are blob urls that are created to generate the mipmaps of the cube texture.
The code is something like:
const bytes = imageData[i][face];
const blob = new Blob([bytes], { type: imageType });
const url = URL.createObjectURL(blob);
const image = new Image();
image.src = url;
// Enqueue promise to upload to the texture.
promise = new Promise<void>((resolve, reject) => {
image.onload = () => {
_OnImageReadyAsync(image, engine, expandTexture, rgbdPostProcess, url, face, i, generateNonLODTextures, lodTextures, cubeRtt, texture)
.then(() => resolve())
.catch((reason) => {
reject(reason);
});
};
image.onerror = (error) => {
reject(error);
};
});
It’s the image.src = url
that you see in the network pane.
2 Likes