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