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.
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);
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.