[SOLVED] Trouble with external image colors

I am looking for a method to (quite quickly) fix a problem with the colors of 6 externally loaded cubemap images.

As seen here (local load to the left, and external load to the right), the colors seem to be parsed as ‘8 bit’ (or they are subject to a similar effect … have no clue):

I have a clue that the solution is oriented towards getting/setting the correct texture-format (all the R8_G8_B8 etc-stuff). I could start out trying that, but I have no idea how to manage; all the 6 images are first of all exactly the same (local vs external) and secondly -> there should not be anything suggesting that bit-depth should lower in such cases (at least not locally. https://playcanvas.com/editor/scene/385269)

I am currently setting all the 6 images:

    asset1 = self.app.assets.find("Gulc.jpg");asset2 = self.app.assets.find("Lila.jpg");asset3 = self.app.assets.find("Oran.jpg");
              asset6 = self.app.assets.find("Sort.jpg");asset5 = self.app.assets.find("Sand.jpg");asset4 = self.app.assets.find("Turk.jpg");
              //console.log(asset1);   
                  
            // Get the list of texture assets
            var assets = [
                asset1,
                asset2,
                asset3,
                asset4,
                asset5,
                asset6];
    
            // Load all the assets
        var texture = new pc.Texture(this.app.graphicsDevice, {
    width: 512,
    height: 512,
    format: pc.PIXELFORMAT_R8_G8_B8
});
            self._loadAssets(assets, function (textures) {
                // set the textures sources into the cubemap
                cubemap.setSource(textures.map(function (texture) {
                    return texture.resource.getSource();
                }));
  • the issue also resides within my greater knowledge of .texture. If only it had an autocompletion that is much simpler than the quite-off rendertarget-approach.
    Like … .texture.pixelFormat_R8_G8_B8();

Christ … looks like .jpg vs .png-support within interpreting the bit-depth :-/
(uploading a test now)

ok, for those interested:

  cubemap: true,
                **//rgbm: true, // we're using HDR textures**
            });
2 Likes