Skybox blending

Hello !
I am trying to use this shader to have a transition between 2 skyboxes:

However, I must admit I am quite a rookie with Unity and shaders. I don’t really understand how to use it.

I created the shader in my Project, copied what was written but…

  • What should I modify in the shader code ? _FrontTex (“Front (+Z)”, 2D) = “white” {} : should I replace white or Front (+Z) with my material name ?
  • Should I now apply the shader on some material ? How ?
  • How can I move the “blend” and how can I do this from a script ? skyboxmaterial.SetFloat(“_Blend”, yourBlend) <= Skybox.material exists, but I don’t think this is what is required, considering the SetFloat.

Well, if one could give me an example of how I can use this, he would be most welcome :slight_smile:

Are you trying to modify the shader or use it as-is?

I have not tried it in 3.4, but in theory, you put it on a material, it should let you drop 12 textures on it in the Inspector (6 for one box, 6 for the other), and have a slider that lets you set the blend amount.

You can refer to: Unity3D - Skybox Shader Blend - YouTube for the skybox set up.

The scripting for the blending part is:

  1. Create an empty game object.
  2. Reset its position (0,0,0) [optional]
  3. Drag your Skybox material from the folder where your shader, textures and skybox material is and into the empty material section in the empty game object’s inspector.
  4. You are good to go!

Can we try setting up three skyboxes using this method? If so what changes will i need to make to the code?