11113
#1
How to generate Skybox in Engine instead of Editor?
this.app.assets.loadFromUrl("scenes/sunset_sky.dds", "texture", (error, asset:pc.Asset) => {
const texture = asset.resource as pc.Texture;
texture.magFilter=1;
texture.minFilter=5;
texture.anisotropy=1;
(<any>texture).rgbm=true;
this.app.setSkybox(asset);
return null;
});
I see the .dds file used. How do I generate the DDS file?
11113
#3
Oh, it needs editor. How does it need to be generated without an editor?
will
#4
I guess the Editor just calls pc.prefilterCubemap:
And then pc.Texture#getDds:
Neither function is in public API and so are subject to change in the future.