AssetTask does not load HDRCubeTextures and EquiRectangularCubeTextures


As I was about to implement an AssetTask for the EquiRectangularCubeTexture, I ran into a problem. Textures would only load for the TextureAssetTask and CubeTextureAssetTask, but not for HDRCubeTextureAssetTask (and EquiRectangularCubeTextureAssetTask, which is just a refactored version of the HDRCubeTextureAssetTask).

I set up a Playground that demonstrates this behaviour here. On line 400 I set up textureTask implementations for the different AssetTask types. The TextureAssetTask and the CubeTextureAssetTask work, the other two don’t.

The documentation for the HDRCubeTextureAssetTask in the Asset Manager states that it is to be used “Same as the CubeTextureAssetTask, but for HDR cube textures”. Since I did not find any other examples with the usage of the HDRCubeTextureAssetTask I opened this bug report.

Am I missing some mandatory information or is the HDRCubeTextureAssetTask not behaving as expected?

I’m happy for any pointers to a solution for this problem.

Thanks in advance


Hey and welcome!!

maybe it could be easier to do a PR so we can check the integration in the codebase directly?


Hi, I will do a PR later on for sure, but as of right now, I cannot even get an HDRCubeTextureAssetTask to provide a Texture on a sphere correctly, even without any codebase edits.

So either it really is a bug and we currently cannot load a HDRCubeTexture through its AssetTask or I am doing it wrong.

Current usage is something like this:
let textureTask = assetsManager.addHDRCubeTextureTask('HDRCubeTextureTask1', 'textures/environment.hdr', 512);


Can you repro in the playground? It is supposed to work we may need to fix a bug:)


Yeah, in the playground example I posted, you can change the Texture AssetTask type in line 400 and run the playground.
If you open the console you will see 3 logs if it works: task started, task removed from queue, and task finished. If you run the playground with the HDRCubetextureAssetTask or EquiRectangularCubeTextureAssetTask you will not only see, that the texture will not be applied on the sphere, but also, in the logs, that the task will start and finish only. It will not get removed from the queue. I would have to look into it a little deeper, but this is the current behavior I noticed.


Yeah understood but I meant a simpler pg without all the plumbing yo try to isolate the issue


Here I removed all the other stuff.


on it!!


And it was a bug :slight_smile:
Here is the commit:

Nightly in progress…should be good in 10minutes

1 Like

Hey @Deltakosh. Does this now work on 3.3.0 version also?


Nope. Only on 4.0