source: GTP/branches/IllumWPdeliver2008dec/IlluminationWP/demos/Standalone/Hierarchical Systems Demo [OpenGL]/src/SimplePrograms.cg @ 3255

Revision 3255, 640 bytes checked in by szirmay, 15 years ago (diff)
Line 
1struct VertexOut
2{
3        float4 VertexPosition           :POSITION;
4        float2 TexCoord                         :TEXCOORD;
5};
6
7
8/*
9  Vertex program for cloud rendering
10*/
11VertexOut VertexProgram( float4 Position :POSITION,
12                                                float2 Texcoord: TEXCOORD,
13                                                uniform float4x4 ModelViewProj  :state.matrix.mvp
14                                                )                                                                       
15{
16        VertexOut Out; 
17       
18        Out.VertexPosition=mul(ModelViewProj, Position);
19        Out.TexCoord=Texcoord;
20       
21        return Out;     
22}
23
24/*
25  Fragment program for cloud rendering
26*/
27float4 FragmentProgram( VertexOut       In,
28                                                uniform samplerRECT Texture):COLOR
29{
30        float4 Color;
31        Color=texRECT(Texture,In.TexCoord);             
32        return Color;
33}
34
35
Note: See TracBrowser for help on using the repository browser.