Line | |
---|
1 | #define D 128
|
---|
2 |
|
---|
3 | struct VertexOut
|
---|
4 | {
|
---|
5 | float4 VertexPosition :POSITION;
|
---|
6 | float2 TexCoord :TEXCOORD;
|
---|
7 | int ID :TEXCOORD1;
|
---|
8 | };
|
---|
9 |
|
---|
10 |
|
---|
11 | /*
|
---|
12 | Vertex program for cloud rendering
|
---|
13 | */
|
---|
14 | VertexOut VertexProgram( float4 Position :POSITION,
|
---|
15 | float2 Texcoord: TEXCOORD
|
---|
16 | )
|
---|
17 | {
|
---|
18 | VertexOut Out;
|
---|
19 |
|
---|
20 | Out.VertexPosition=Position;
|
---|
21 | Out.TexCoord=Texcoord;
|
---|
22 | Out.ID=Texcoord.x;
|
---|
23 |
|
---|
24 | return Out;
|
---|
25 | }
|
---|
26 |
|
---|
27 | /*
|
---|
28 | Fragment program for cloud rendering
|
---|
29 | */
|
---|
30 | float3 FragmentProgram( VertexOut In,
|
---|
31 | uniform samplerRECT LVisMap,
|
---|
32 | uniform samplerRECT Phase,
|
---|
33 | uniform float4 LightDirsWeights,
|
---|
34 | uniform float3 LightRad,
|
---|
35 | uniform float3 LightRad2,
|
---|
36 | uniform float2 Alb_Op):COLOR
|
---|
37 | {
|
---|
38 | float3 Color=float3(0,0,0);
|
---|
39 |
|
---|
40 | int direction=floor(In.TexCoord.y);
|
---|
41 | int negDir=D-1-direction;
|
---|
42 | int particle=In.ID;
|
---|
43 |
|
---|
44 |
|
---|
45 | if(floor(In.TexCoord.x)==500)
|
---|
46 | {
|
---|
47 | //Color=LightRad;
|
---|
48 | Color=float3(18,12,0);
|
---|
49 | }
|
---|
50 |
|
---|
51 | return Color;
|
---|
52 | }
|
---|
53 |
|
---|
54 |
|
---|
Note: See
TracBrowser
for help on using the repository browser.