struct VertexOut { float4 VertexPosition :POSITION; float2 TexCoord :TEXCOORD; }; /* Vertex program for cloud rendering */ VertexOut VertexProgram( float4 Position :POSITION, float2 Texcoord: TEXCOORD ) { VertexOut Out; Out.VertexPosition=Position; Out.TexCoord=Texcoord*2.0-1.0; return Out; } /* Fragment program for cloud rendering */ float4 FragmentProgram( VertexOut In):COLOR { float4 Color; float2 UV=In.TexCoord; float g2=UV.x*UV.x; float phase=3*(1-g2)*(1+UV.y*UV.y)/2/(2+g2)/pow((1+g2-2*(UV.y)*(UV.x)),1.5); Color=float4(phase,1,1,1); return Color; }