4in1 blending skybox HELP!

I’m new to this stuff and I can’t get it to work so that the blend knob would change the skyboxes.
lets say that if bland knob is @
0.0-0.25 = sunrise
0.25-0.5 = day
0.5-0.75- = sunset
0.75- 1.0 = night
and then set the knob back to 0.0…
Here’s what i have so far…

Shader "RenderFX/Skybox Blended" {
Properties {
    _Tint ("Tint Color", Color) = (.5, .5, .5, .5)
    _Blend ("Blend", Range(0.0,1.0)) = 0.5
    _FrontSunriseTex ("Sunrise Front (+Z)", 2D) = "white" {}
    _BackSunriseTex ("Sunrise Back (-Z)", 2D) = "white" {}
    _LeftSunriseTex ("Sunrise Left (+X)", 2D) = "white" {}
    _RightSunriseTex ("Sunrise Right (-X)", 2D) = "white" {}
    _UpSunriseTex ("Sunrise Up (+Y)", 2D) = "white" {}
    _DownSunriseTex ("Sunrise Down (-Y)", 2D) = "white" {}
    _FrontDayTex("Day Front (+Z)", 2D) = "white" {}
    _BackDayTex("Day Back (-Z)", 2D) = "white" {}
    _LeftDayTex("Day Left (+X)", 2D) = "white" {}
    _RightDayTex("Day Right (-X)", 2D) = "white" {}
    _UpDayTex("Day Up (+Y)", 2D) = "white" {}
    _DownDayTex("Day Down (-Y)", 2D) = "white" {}
    _FrontSunsetTex("Sunset Front (+Z)", 2D) = "white" {}
    _BackSunsetTex("Sunset Back (-Z)", 2D) = "white" {}
    _LeftSunsetTex("Sunset Left (+X)", 2D) = "white" {}
    _RightSunsetTex("Sunset Right (-X)", 2D) = "white" {}
    _UpSunsetTex("Sunset Up (+Y)", 2D) = "white" {}
    _DownSunsetTex("Sunset Down (-Y)", 2D) = "white" {}
    _FrontNightTex("Night Front (+Z)", 2D) = "white" {}
    _BackNightTex("Night Back (-Z)", 2D) = "white" {}
    _LeftNightTex("Night Left (+X)", 2D) = "white" {}
    _RightNightTex("Night Right (-X)", 2D) = "white" {}
    _UpNightTex("Night Up (+Y)", 2D) = "white" {}
    _DownNightTex("Night Down (-Y)", 2D) = "white" {}
}

SubShader {
    Tags { "Queue" = "Background" }
    Cull Off
    Fog { Mode Off }
    Lighting Off        
    Color [_Tint]
    Pass {
        SetTexture [_FrontSunriseTex] { combine texture }
        SetTexture [_FrontDayTex] { constantColor (0,0,0,[_Blend]) combine texture lerp(constant) previous }
        SetTexture [_FrontDayTex] { combine previous +- primary, previous * primary }
        SetTexture [_FrontSunsetTex] { constantColor (0,0,0,[_Blend]) combine texture lerp(constant) previous }
        SetTexture [_FrontSunsetTex] { combine previous +- primary, previous * primary }  
        SetTexture [_FrontNightTex] { constantColor (0,0,0,[_Blend]) combine texture lerp(constant) previous }
        SetTexture [_FrontNightTex] { combine previous +- primary, previous * primary }
    }
    Pass {
        SetTexture [_BackSunriseTex] { combine texture }
        SetTexture [_BackDayTex] { constantColor (0,0,0,[_Blend]) combine texture lerp(constant) previous }
        SetTexture [_BackDayTex] { combine previous +- primary, previous * primary }     
        SetTexture [_BackSunsetTex] { constantColor (0,0,0,[_Blend]) combine texture lerp(constant) previous }
        SetTexture [_BackSunsetTex] { combine previous +- primary, previous * primary }
        SetTexture [_BackNightTex] { constantColor (0,0,0,[_Blend]) combine texture lerp(constant) previous }
        SetTexture [_BackNightTex] { combine previous +- primary, previous * primary }
    }
    Pass {
        SetTexture [_LeftSunriseTex] { combine texture }
        SetTexture [_LeftDayTex] { constantColor (0,0,0,[_Blend]) combine texture lerp(constant) previous }
        SetTexture [_LeftDayTex] { combine previous +- primary, previous * primary }
        SetTexture [_LeftSunsetTex] { constantColor (0,0,0,[_Blend]) combine texture lerp(constant) previous }
        SetTexture [_LeftSunsetTex] { combine previous +- primary, previous * primary }
        SetTexture [_LeftNightTex] { constantColor (0,0,0,[_Blend]) combine texture lerp(constant) previous }
        SetTexture [_LeftNightTex] { combine previous +- primary, previous * primary }
    }
    Pass {
        SetTexture [_RightSunriseTex] { combine texture }
        SetTexture [_RightDayTex] { constantColor (0,0,0,[_Blend]) combine texture lerp(constant) previous }
        SetTexture [_RightDayTex] { combine previous +- primary, previous * primary }        
        SetTexture [_RightSunsetTex] { constantColor (0,0,0,[_Blend]) combine texture lerp(constant) previous }
        SetTexture [_RightSunsetTex] { combine previous +- primary, previous * primary }
        SetTexture [_RightNightTex] { constantColor (0,0,0,[_Blend]) combine texture lerp(constant) previous }
        SetTexture [_RightNightTex] { combine previous +- primary, previous * primary }
    }
    Pass {
        SetTexture [_UpSunriseTex] { combine texture }
        SetTexture [_UpDayTex] { constantColor (0,0,0,[_Blend]) combine texture lerp(constant) previous }
        SetTexture [_UpDayTex] { combine previous +- primary, previous * primary }
        SetTexture [_UpSunsetTex] { constantColor (0,0,0,[_Blend]) combine texture lerp(constant) previous }
        SetTexture [_UpSunsetTex] { combine previous +- primary, previous * primary }
        SetTexture [_UpNightTex] { constantColor (0,0,0,[_Blend]) combine texture lerp(constant) previous }
        SetTexture [_UpNightTex] { combine previous +- primary, previous * primary }
    }
    Pass {
        SetTexture [_DownSunriseTex] { combine texture }
        SetTexture [_DownDayTex] { constantColor (0,0,0,[_Blend]) combine texture lerp(constant) previous }
        SetTexture [_DownDayTex] { combine previous +- primary, previous * primary }
        SetTexture [_DownSunsetTex] { constantColor (0,0,0,[_Blend]) combine texture lerp(constant) previous }
        SetTexture [_DownSunsetTex] { combine previous +- primary, previous * primary }
        SetTexture [_DownNightTex] { constantColor (0,0,0,[_Blend]) combine texture lerp(constant) previous }
        SetTexture [_DownNightTex] { combine previous +- primary, previous * primary }
    }
}

Fallback "RenderFX/Skybox", 1
}

You don’t need 5 textures for this. You need only 2 texture, 1 float and control script. Calculate time, and then set textures from script with “Material.SetTexture”, and mix amount with “Material.SetFloat”. I think more nice way is use cubemaps, in that case you can draw all you need in one pass.

I switched it over to cubemaps, but the cubemap texture is looking low-detailed(stretched or something) in-game and you can see the box in the sky :S

Shader "RenderFX/Skybox Blended" {
Properties {
    _Tint ("Tint Color", Color) = (.5, .5, .5, .5)
    _Blend ("Blend", Range(0.0,1.0)) = 0.5
    _Skybox1 ("Skybox one", Cube) = ""
    _Skybox2 ("Skybox two", Cube) = ""
}

SubShader {
    Tags { "Queue" = "Background" }
    Cull Off
    Fog { Mode Off }
    Lighting Off        
    Color [_Tint]
    Pass {
        SetTexture [_Skybox1] { combine texture }
        SetTexture [_Skybox2] { constantColor (0,0,0,[_Blend]) combine texture lerp(constant) previous }
        SetTexture [_Skybox2] { combine previous +- primary, previous * primary }
    }
}

Fallback "RenderFX/Skybox", 1
}

anyone?

Ah, it’s because of the low resolution of the cubemap and thats why i can see like the corners and sides of a cube :stuck_out_tongue: