Hi Guys,
I have googled a shader, which works perfectly for blending two skyboxes:
Shader "RenderFX/SkyboxBlend" {
Properties{
_Tint("Tint Color", Color) = (.5, .5, .5, .5)
_Tint1("Tint Color one", Color) = (.5, .5, .5, .5)
_Tint2("Tint Color two", Color) = (.5, .5, .5, .5)
_Blend("Blend", Range(0.0,1.0)) = 0.5
_Skybox1("Skybox one", Cube) = ""
_Skybox2("Skybox two", Cube) = ""
//_Skybox3("Skybox three", Cube) = "" << Would like
//_Skybox4("Skybox four", Cube) = "" << Would like
}
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
}
I’d like to learn how to add more skyboxes into this shader, so it may blend between them. This is my first time re-writing a custom shader. I know the basics of scripting shaders, but I’m pretty green here. Could someone please help me?
Thanks!