#!version 1.6.3
light
#!parameters:
float	intensity	=	1
color	lightcolor	=	1
point	from
point	to
float	coneangle
float	conedeltaangle
float	beamdistribution	=	2
#!variables:
uniform	vector	temporary_0
uniform	vector	axis
vector	temporary_1
vector	temporary_2
float	temporary_3
float	cosangle
float	atten
float	temporary_4
vector	temporary_5
float	temporary_6
uniform	float	temporary_7
float	temporary_8
uniform	float	temporary_9
vector	temporary_10
#!Init:
	vfromf            	temporary_0 0 0 0
	pfrom             	from "shader" temporary_0
	vfromf            	temporary_0 0 0 1
	pfrom             	to "shader" temporary_0
	radians	("f=f")  coneangle  30 
	radians	("f=f")  conedeltaangle  5 
	return            
#!Code:
	subvv             	temporary_0 to from
	normalize	("v=v")  axis  temporary_0 
	vuvector           temporary_1 from
	vuvector           temporary_2 axis
	vufloat            temporary_3 coneangle
	illuminate        	 temporary_1  temporary_2  temporary_3  #!Label2
	vuvector           temporary_5 axis
	dot               	temporary_4 L temporary_5
	length	("f=v")  temporary_6  L 
	divff             	cosangle temporary_4 temporary_6
	vufloat            temporary_6 beamdistribution
	pow	("f=ff")  temporary_4  cosangle  temporary_6 
	dot               	temporary_6 L L
	divff             	atten temporary_4 temporary_6
	cos	("f=f")  temporary_7  coneangle 
	vufloat            temporary_6 temporary_7
	subff             	temporary_9 coneangle conedeltaangle
	cos	("f=f")  temporary_7  temporary_9 
	vufloat            temporary_8 temporary_7
	smoothstep	("f=fff")  temporary_4  temporary_6  temporary_8  cosangle 
	mulff             	atten atten temporary_4
	vufloat            temporary_6 intensity
	mulff             	temporary_4 atten temporary_6
	vfromf            	temporary_5 temporary_4
	vuvector           temporary_10 lightcolor
	mulvv             	Cl temporary_5 temporary_10
#!Label2:
	endilluminate     
	return            

