source: GTP/trunk/App/Demos/Illum/IBRBillboardCloudTrees/OGRE/IBRTreesOGRE/media/general/diffuseTextureScreenAligned_FP20.cg @ 1493

Revision 1493, 873 bytes checked in by igarcia, 18 years ago (diff)
Line 
1void main_fp(float2 texCoord: TEXCOORD0,
2             float2 subTexCoord: TEXCOORD1,
3             float4 position : WPOS,
4             float4 colour: COLOR0,
5             out float4 ocolor: COLOR,
6             uniform sampler2D texture)
7{
8        // Normalmap
9        //normal = normalize(normal);
10        // Convert from [-1,1] to [0,1]
11        //ocolor.r = (normal.r + 1.0) / 2.0;
12        //ocolor.g = (normal.g + 1.0) / 2.0;
13        //ocolor.b = (normal.b + 1.0) / 2.0;
14        //ocolor.a = tex2D(textura,texCoord).a;
15
16        // Depthmap
17        //ocolor.r = position.z;
18        //ocolor.g = position.z;
19        //ocolor.b = position.z;
20        //ocolor.a = 1.0;
21
22        // Texture
23        ocolor.r = tex2D(texture, texCoord).r;
24        ocolor.g = tex2D(texture, texCoord).g;
25        ocolor.b = tex2D(texture, texCoord).b;
26        ocolor.a = tex2D(texture, texCoord).a;
27
28        // Debug
29        //ocolor = ocolor + float4(colour.xyz,1.0);
30
31        // Colour
32        //ocolor = colour;
33
34}
Note: See TracBrowser for help on using the repository browser.