Why are the procedural skyboxes so unreliable?


Sometimes they work sometimes they dont, sometimes they are working one minute and not working the next.
When they are not working it just reverts to the static skybox image, sometimes. (if there is no image set then it might revert to start or it might revert to just a black sky)

There doesnt seem to be any reason or rhyme for this, I cant reproduce anything except that it simply doesnt work sometimes (more than half the time). And this is across 4 different experiments, I am sure others are seeing this too?

The shaders I am using are proven to work,
The hosting I am using is proven to work,
No errors show in the log.


I changed the skybox shader yesterday to my webspace instead of hifi one. it worked.
Just did visit Franny. now im back on my domain i still see thick clouds skybox . Looks i have more skyboxes in my entities list that where not there yesterday.

Delete, Delete, Relog. Now i see mine back.
Going to franny and come back, and the thick clouds are back again. after a relog i see the correct shader.

@adrian, it looks for me after teleport the shader not get always correct loaded for me. or there are mnaby shaders with the same name and cache is screwing things.

… renaming my shader…, clearing cache. Relog. Ok.
Going to franny again. back. and i see the wrong shader again. i use btw existing skybox where i changed the shader url.

This is annoying. where are the thick clouds coming from ?
Did some more testing, it’s weird. make sure the shader is loaded before teleporting back.

Franny -> simsquare = wrong shader.
Playa -> simsquare = is ok
Earth -> simsquyare = earth domain Not loading / not connected… wrong shader !
Judas nice town -> simsquare = wrong shader

After judas place -> simsquare i jumped back to playa then back to simsquare and the shader is fine. I only needed to move my camera to make it load.

This bad, and cannot explain it.


I’ve identified one of the issues with procedural skyboxes. Specifically, if you leave a skybox and then re-enter, the zone will display the backing skybox texture rather than the procedural content. I have a PR here to fix it.


You are a champion, more power to you.
Thanks, looking forward to the merge.


Yes, I have seen this too, though for me what usually happens is that the backing texture appears for a minute then the procedural shader kicks in. Less often the procedural shader never runs.


So, when you load a texture, it gets cached in the GPU, even after its no longer in active use. But shaders aren’t cached the same way (I believe). When a shader is unloaded it’s simply discarded and when you re-enter a zone the shader has to be fetched again, but the texture is most likely still in GPU memory so it gets used as a placeholder until the shader is done loading. At some point we should do caching of the shader as well, but in the meantime I recommend that if you have a procedural shader, you set the skybox URL to a small black texture like this one. You’ll still see the star background wink-out briefly until the procedural shader kicks in, but at least it won’t be as jarring as the cloudy sky skybox that seems to be the default for a lot of these procedural items.