#!version 1.3.15
surface
#!parameters:
float	Ka	=	1
float	Kd	=	0.5
float	Ks	=	0.5
float	roughness	=	0.1
color	specularcolor	=	1
#!variables:
vector	Nf
vector	temporary_0
vector	temporary_1
vector	temporary_2
vector	temporary_3
uniform	vector	temporary_4
vector	temporary_5
vector	temporary_6
uniform	vector	temporary_7
float	temporary_8
#!Init:
	return            
#!Code:
	normalize	("v=v")  temporary_0  N 
	faceforward	("v=vv")  Nf  temporary_0  I 
	vfromf            	temporary_4 Ka
	vuvector           temporary_3 temporary_4
	ambient	("c=")  temporary_5 
	mulvv             	temporary_2 temporary_3 temporary_5
	vfromf            	temporary_4 Kd
	vuvector           temporary_5 temporary_4
	diffuse	("c=n")  temporary_6  Nf 
	mulvv             	temporary_3 temporary_5 temporary_6
	addvv             	temporary_1 temporary_2 temporary_3
	mulvv             	temporary_0 Cs temporary_1
	vfromf            	temporary_7 Ks
	mulvv             	temporary_4 specularcolor temporary_7
	vuvector           temporary_2 temporary_4
	normalize	("v=v")  temporary_6  I 
	negv              	temporary_5 temporary_6
	vufloat            temporary_8 roughness
	specular	("c=nvf")  temporary_3  Nf  temporary_5  temporary_8 
	mulvv             	temporary_1 temporary_2 temporary_3
	addvv             	Ci temporary_0 temporary_1
	movevv            	Oi Os
	mulvv             	Ci Ci Oi
	return            

