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

Revision 845, 688 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                                                )                                                                       
14{
15        VertexOut Out; 
16       
17        Out.VertexPosition=Position;
18        Out.TexCoord=Texcoord;
19       
20        return Out;     
21}
22
23/*
24  Fragment program for cloud rendering
25*/
26float4 FragmentProgram( VertexOut       In,
27                                                uniform samplerRECT DirectIllumTexture,
28                                                uniform samplerRECT IllumTexture,
29                                                uniform float invmaxvalue):COLOR
30{       
31        float4 Color=texRECT(DirectIllumTexture,In.TexCoord)+texRECT(IllumTexture,In.TexCoord);
32       
33        return Color;
34}
35
36
Note: See TracBrowser for help on using the repository browser.