Rev | Line | |
---|
[852] | 1 | struct VertexOut
|
---|
| 2 | {
|
---|
| 3 | float4 VertexPosition :POSITION;
|
---|
| 4 | float Z :TEXCOORD;
|
---|
| 5 |
|
---|
| 6 | };
|
---|
| 7 |
|
---|
| 8 |
|
---|
| 9 | /*
|
---|
| 10 | Vertex program for cloud rendering
|
---|
| 11 | */
|
---|
| 12 | VertexOut VertexProgram( float4 Position :POSITION,
|
---|
| 13 | uniform float4x4 ModelViewProj :state.matrix.mvp,
|
---|
| 14 | uniform float4x4 ModelViewMatrix:state.matrix.modelview
|
---|
| 15 | )
|
---|
| 16 | {
|
---|
| 17 | VertexOut Out;
|
---|
| 18 |
|
---|
| 19 | float4 p=mul(ModelViewProj,Position);
|
---|
| 20 | Out.VertexPosition=p;
|
---|
| 21 | float4 CamPos=mul(ModelViewMatrix,Position);
|
---|
| 22 | Out.Z=CamPos.z;
|
---|
| 23 |
|
---|
| 24 | return Out;
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | /*
|
---|
| 28 | Fragment program for cloud rendering
|
---|
| 29 | */
|
---|
| 30 | float4 FragmentProgram( VertexOut In,
|
---|
| 31 | uniform samplerRECT Texture
|
---|
| 32 | ):COLOR
|
---|
| 33 | {
|
---|
| 34 | //float4 Color=float4(1,0,0,1);
|
---|
| 35 | float4 Color=float4(0,0,0,1);
|
---|
| 36 | Color=float4(In.Z,In.Z,In.Z,1);
|
---|
| 37 | return Color;
|
---|
| 38 | }
|
---|
| 39 |
|
---|
| 40 |
|
---|
Note: See
TracBrowser
for help on using the repository browser.