Rev | Line | |
---|
[3255] | 1 | struct VertexOut
|
---|
| 2 | {
|
---|
| 3 | float4 VertexPosition :POSITION;
|
---|
| 4 | float2 TexCoord :TEXCOORD;
|
---|
| 5 | float4 Color :COLOR0;
|
---|
| 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 | float4 Color:COLOR0,
|
---|
| 15 | float3 BillboardSize: NORMAL,
|
---|
| 16 | uniform float4x4 ModelViewProj :state.matrix.mvp
|
---|
| 17 | )
|
---|
| 18 | {
|
---|
| 19 | VertexOut Out;
|
---|
| 20 |
|
---|
| 21 | Out.Color=Color;
|
---|
| 22 |
|
---|
| 23 | Out.VertexPosition=mul(ModelViewProj, Position);
|
---|
| 24 | Out.TexCoord=Texcoord.xy;
|
---|
| 25 |
|
---|
| 26 | return Out;
|
---|
| 27 | }
|
---|
| 28 |
|
---|
| 29 | /*
|
---|
| 30 | Fragment program for displaying particle system with rectangle rendertexture
|
---|
| 31 | */
|
---|
| 32 | void FragmentProgram( VertexOut In,
|
---|
| 33 | uniform sampler2D Texture
|
---|
| 34 | ,out float4 Color:COLOR
|
---|
| 35 | )
|
---|
| 36 | {
|
---|
| 37 |
|
---|
| 38 | Color=float4(0,0,0,tex2D(Texture,In.TexCoord).r*0.17*In.Color.a);
|
---|
| 39 |
|
---|
| 40 | }
|
---|
| 41 |
|
---|
Note: See
TracBrowser
for help on using the repository browser.