最终效果
思路
改进之前的全景图,应用到天空球。
利用3d noise算法,生成噪声。
源代码
Shader "QQ/Sky/MultiSky"
{
Properties
{
_Color("Color",Color) = (1,1,1,1)
_Rotation("Rotation",Range(0,360)) = 360
[NoScaleOffset]_MainTex("Texture1", 2D) = "white" {}
[NoScaleOffset]_SecondTex("Texture2", 2D) = "white" {}
_BlendColor("blend Color",Color) = (1,1,1,0)
_Blend("blend",Range(0,1)) = 0.5
_Hill("hill",Range(0,1)) = 0.1
}
SubShader
{
Tags{
"Queue" = "Background"
"RenderType" = "Background"
"PreviewType" = "Skybox"
}
Zwrite Off
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cgi