Rev | Line | |
---|
[852] | 1 | struct VertexOut
|
---|
| 2 | {
|
---|
| 3 | float4 VertexPosition :POSITION;
|
---|
| 4 | float2 TexCoord :TEXCOORD;
|
---|
| 5 | float4 Position :TEXCOORD2;
|
---|
| 6 | };
|
---|
| 7 |
|
---|
| 8 |
|
---|
| 9 | /*
|
---|
| 10 | Vertex program for displaying particle system with rectangle rendertexture
|
---|
| 11 | */
|
---|
| 12 | VertexOut VertexProgram( float4 Position :POSITION,
|
---|
| 13 | float4 Texcoord: TEXCOORD,
|
---|
| 14 | uniform float4x4 ModelViewProj :state.matrix.mvp
|
---|
| 15 | )
|
---|
| 16 | {
|
---|
| 17 | VertexOut Out;
|
---|
| 18 |
|
---|
| 19 | Out.VertexPosition=mul(ModelViewProj, Position);
|
---|
| 20 | Out.TexCoord=Texcoord.xy;
|
---|
| 21 |
|
---|
| 22 | return Out;
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | /*
|
---|
| 26 | Fragment program for displaying particle system with rectangle rendertexture
|
---|
| 27 | */
|
---|
| 28 | void FragmentProgram( VertexOut In,
|
---|
| 29 | uniform sampler2D Texture
|
---|
| 30 | ,out float4 Color:COLOR
|
---|
| 31 | )
|
---|
| 32 | {
|
---|
| 33 | Color=float4(0,tex2D(Texture,In.TexCoord).r*0.2,0,0);
|
---|
| 34 | }
|
---|
| 35 |
|
---|
Note: See
TracBrowser
for help on using the repository browser.