Line | |
---|
1 | struct VertexOut
|
---|
2 | {
|
---|
3 | float4 VertexPosition :POSITION;
|
---|
4 | float2 TexCoord :TEXCOORD;
|
---|
5 | };
|
---|
6 |
|
---|
7 |
|
---|
8 | /*
|
---|
9 | Vertex program for cloud rendering
|
---|
10 | */
|
---|
11 | VertexOut VertexProgram( float4 Position :POSITION,
|
---|
12 | float2 Texcoord: TEXCOORD
|
---|
13 | )
|
---|
14 | {
|
---|
15 | VertexOut Out;
|
---|
16 |
|
---|
17 | Out.VertexPosition=Position;
|
---|
18 | Out.TexCoord=Texcoord;
|
---|
19 |
|
---|
20 | return Out;
|
---|
21 | }
|
---|
22 |
|
---|
23 | /*
|
---|
24 | Fragment program for cloud rendering
|
---|
25 | */
|
---|
26 | float4 FragmentProgram( VertexOut In):COLOR
|
---|
27 | {
|
---|
28 | float4 Color;
|
---|
29 | float angle=In.TexCoord.y/length(In.TexCoord);
|
---|
30 | Color=float4(angle,1,1,1);
|
---|
31 |
|
---|
32 | return Color;
|
---|
33 | }
|
---|
34 |
|
---|
Note: See
TracBrowser
for help on using the repository browser.