Error setting Sphere map in material with PREFILTERED Cubemap

Hello, I’ve encountered an error in the following situation:

  • When using PREFILTERED Cubemap
  • Setting the Sphere Map texture in the ENVIRONMENT material The error seems to occur when only these conditions are met.

Here is the project:

Here are the material settings:

Error occurs when using PREFILTERED Cubemap and setting Sphere Map in ENVIRONMENT

No error case

Do not set Cubemap

Do not set Prefiltered Cubemap

Other findings (the error disappears when displaying another material)

One thing I found is that when displaying one other material, the error disappeared.

When displaying two other materials, the error completely disappeared.

I thought that this issue might occur when using PREFILTERED Cubemap and Sphere Map.


I’m not entirely certain, but I wanted to share some information I found while investigating this issue. It seems that there may be an error occurring when texture_envAtlas is missing in this section of the code: engine/standard-material.js at afd26b0f6398fecff7bc72b70ddc774114f83bcc · playcanvas/engine · GitHub.