!!ARBfp1.0

# special shader used for generating mirror images with clipping, just does simple diffuse lighting + texmap
# no fog needed for that shader
#textures:
#texture[0], 2D		- (diffuse) color map, RGB

ATTRIB	texcoorddiff = fragment.texcoord[0];	# texcoords for map 1
ATTRIB	lightdiffusecol = fragment.color;

OUTPUT	outputcolor = result.color;			# fragment color output

TEMP	diffcol;

# 3. compute diffuse color
# 3.1. base brightness from L.N
TEX	diffcol, texcoorddiff, texture[0], 2D;
# do not set outputcolor.w, we have no alpha here...
# outputcolor.w is fetched from inputcolor.w, which is not used in the vertex program,
# and thus fetched from the C++ code, where glColor is set to 1,1,1,1. So w=1 here.
MUL	outputcolor.xyz, diffcol, lightdiffusecol;
# fixme: on a geforce6600 we need to set alpha to 1 here! check that glcolor fetched alpha=1
# before calling this...
MOV	outputcolor.w, 1;

END
