!!ARBfp1.0
OPTION ARB_draw_buffers;
# cgc version 2.0.0012, build date Jan 30 2008
# command line args: -q -profile arbfp1 -entry fragment_main -DGLOWSRCMRT -po ATI_draw_buffers NumTemps=32 NumInstructionSlots=96 MaxLocalParams=512 NumTexInstructionSlots=32 NumMathInstructionSlots=64 MaxTexIndirections=4 MaxDrawBuffers=4
# source file: E:/projects/luxiniaprojects/tutorials/gpuprogs/simplelighting.cg
#vendor NVIDIA Corporation
#version 2.0.0.12
#profile arbfp1
#program fragment_main
#semantic fragment_main.lightambient
#semantic fragment_main.lightdiffuse
#semantic fragment_main.oLightpos
#semantic fragment_main.oCampos
#semantic fragment_main.specularctrl
#semantic fragment_main.diffusemap : TEXUNIT0
#semantic fragment_main.specmap : TEXUNIT1
#semantic fragment_main.illummap : TEXUNIT2
#var float2 IN.tex0 : $vin.TEXCOORD0 : TEX0 : 0 : 1
#var float3 IN.oNormal : $vin.TEXCOORD1 : TEX1 : 0 : 1
#var float4 IN.oPos : $vin.TEXCOORD2 : TEX2 : 0 : 1
#var float4 lightambient :  : c[0] : 1 : 1
#var float4 lightdiffuse :  : c[1] : 2 : 1
#var float4 oLightpos :  : c[2] : 3 : 1
#var float4 oCampos :  : c[3] : 4 : 1
#var float4 specularctrl :  : c[4] : 5 : 1
#var sampler2D diffusemap : TEXUNIT0 : texunit 0 : 6 : 1
#var sampler2D specmap : TEXUNIT1 : texunit 1 : 7 : 1
#var sampler2D illummap : TEXUNIT2 : texunit 2 : 8 : 1
#var float4 fragment_main.color0 : $vout.COLOR0 : COL : -1 : 1
#var float4 fragment_main.color1 : $vout.COLOR1 : COL1 : -1 : 1
#const c[5] = 0.5 1 0
PARAM c[6] = { program.local[0..4],
		{ 0.5, 1, 0 } };
TEMP R0;
TEMP R1;
TEMP R2;
TEMP R3;
TEMP R4;
TEMP R5;
TEX R0, fragment.texcoord[0], texture[0], 2D;
TEX R2.xyz, fragment.texcoord[0], texture[2], 2D;
TEX R1.xyz, fragment.texcoord[0], texture[1], 2D;
ADD R4.xyz, -fragment.texcoord[2], c[2];
DP3 R1.w, R4, R4;
RSQ R2.w, R1.w;
MUL R4.xyz, R2.w, R4;
ADD R3.xyz, -fragment.texcoord[2], c[3];
DP3 R1.w, R3, R3;
RSQ R1.w, R1.w;
MAD R3.xyz, R1.w, R3, R4;
MUL R5.xyz, R3, c[5].x;
DP3 R1.w, R5, R5;
RSQ R1.w, R1.w;
DP3 R2.w, fragment.texcoord[1], fragment.texcoord[1];
RSQ R2.w, R2.w;
MUL R3.xyz, R2.w, fragment.texcoord[1];
MUL R5.xyz, R1.w, R5;
DP3_SAT R1.w, R3, R4;
DP3_SAT R3.x, R3, R5;
SLT R2.w, c[5].z, R1;
POW R3.x, R3.x, c[4].w;
ABS R2.w, R2;
MUL R3.xyz, R3.x, c[4];
CMP R2.w, -R2, c[5].z, c[5].y;
CMP R3.xyz, -R2.w, c[5].z, R3;
MUL R1.xyz, R1, R3;
MUL R4.xyz, R1.w, c[1];
ADD R3.xyz, R4, c[0];
MAD R0.xyz, R0, R3, R1;
ADD result.color.xyz, R0, R2;
MOV result.color[1].w, R0;
MOV result.color.w, R0;
MOV result.color[1].xyz, c[5].y;
END
# 34 instructions, 6 R-regs
