好吧,我需要使用此skybox着色器,因为它可以实现所需的混合,问题是我还需要旋转它(动画旋转),如此处所述:https://answers.unity.com/questions/651780/rotate-skybox-constantly.html
着色器:
Shader "RenderFX/Skybox Blended" {
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) = ""
}
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
}
我对Skybox着色器非常陌生,并尝试集成它们的代码,但这只会引起错误。如何在此Skybox上设置旋转动画?
RenderSettings.skybox.SetFloat("_Rotation", Time.time*0.4f);
也不起作用。