HDR Texture rotation with scene performance priority

Hey there!

I am trying to rotate my environment texture (based on Rotate Environment Texture) but I noticed that using scene performance priorities break the feature:

I did not find a flag that I could toggle to fix the issue, do you know if there is a way?

It seems that it’s not related to your texture rotation : Empty PG with perf priority
It appears that
scene.performancePriority = BABYLON.ScenePerformancePriority.Intermediate;
disables scene clear :thinking:

I am not sure why not clearing the scene would stop the texture from rotating though :thinking:

The performance priority disables a ton of stuff like isPickable for meshes so I expect there is a hidden flag for the cube texture that is not exposed.

Having a look at the doc, it’s in fact intended :

Intermediate mode

If you switch the performancePriority to BABYLON.ScenePerformancePriority.Intermediate, the scene will automatically:

  • Freeze materials when they are ready. If you need to change something on a material, you will have to call material.markDirty(true) after you did your changes
  • New meshes will have their alwaysSelectAsActiveMesh property set to true. The system will then skip frustrum clipping for the mesh and always set it to active (saving complex CPU operations). Keep in mind to turn it off if your scene is GPU bound
  • New meshes will have their isPickable property set to false. Picking and action managers will not work anymore. You can always turn that property back on if you need picking for a specific mesh
  • scene.skipPointerMovePicking will be turned on (meaning that there will be no OnPointerMove events)
  • scene.autoClear will be turned off

Did you try to put your hdr texture on a Skybox and rotate the Skybox instead ?

It was material.markDirty(true)! Thanks I should have read the doc more carefully ^^

Updated PG for reference: