Hello. Can anyone make a small modification of the Skybox shader for Unity 2018.1.9f2 for me? All that needs to be done is stretches skybox texture not over a sphere, but a hemisphere (while all the other features of shader will remain the same).
I’ve never written shaders before (and most likely never will to), but I think that this small change will not require much effort for someone who understands the issue.
What is it for ? The fact is that if Crunch compression is not enabled, Unity allocates space to the texture based on its size in pixels, and not on the content. So, 8K skybox texture weight will be permanent, even if the entire lower half of it is filled with solid black color. Applying Crunch compression to the greatly spoils it and is unacceptable. But in all skyboxes, only the upper part of the texture is “useful” - because the lower part is one solid color, which the player will never see (unless he falls under the map).
My idea is to crop the skybox texture to get an 8192x2048 texture (alf of the normal 8192×4096 texture for the sphere), which is then stretched onto a hemisphere in the same way as with a full-fledged skybox shader, and then cover the map with this hemisphere. As a result, instead of a 16MB skybox, we will get 8MB, but the user will not know anything, since the visible part of the skybox will not change, and he will never see the bottom.
In my case this is important because there are hundreds of skyboxes. And these are hundreds of “extra” lower parts of 8MB each. Literally half the weight of game is lower parts of skybox textures, which no one will ever see.
