source: GTP/trunk/App/Demos/Illum/Illumination Networks Demo [OpenGL]/src/SimplePrograms.cg @ 845

Revision 845, 704 bytes checked in by szirmay, 18 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,
29                                                uniform float invmaxvalue):COLOR
30{       
31        float4 TexCol=texRECT(Texture,In.TexCoord);     
32       
33        float4 Color=TexCol*invmaxvalue;
34        return Color;
35}
36
37
Note: See TracBrowser for help on using the repository browser.