0001: // ----------------------------------------------------------------------------
0002: // Input datas from vertex shader
0003: // ----------------------------------------------------------------------------
0004: struct myVertexOut  {
0005:     float4 lightVec : COLOR0;
0006:     float4 texCoord0 : TEXCOORD0;
0007:     float4 texCoord1 : TEXCOORD1;
0008: };
0009: 
0010: // ----------------------------------------------------------------------------
0011: // Output data
0012: // ----------------------------------------------------------------------------
0013: struct myFragment {
0014:   float4 col : COLOR;
0015: };
0016: 
0017: // ----------------------------------------------------------------------------
0018: // Pixel shader program
0019: // ----------------------------------------------------------------------------
0020: myFragment main(myVertexOut I
0021:                 , uniform sampler2D tex0
0022:                 , uniform sampler2D tex1
0023: ) {
0024:     myFragment O;   
0025: 
0026:     // the color is read the texture color
0027:     O.col = tex2D(tex0)-0.3f*tex2D(tex1);
0028: 
0029:     return O;
0030: } 
0031: