surface
AQSIS_V 1.6.0


segment Data

USES 395268

param uniform  float useNg
varying  normal Nt


segment Init
	pushif 0
	pop useNg


segment Code
	S_CLEAR
	pushif 0
	pushv useNg
	eqff
	S_GET
	RS_PUSH
	RS_GET
	RS_JZ 1
	pushv N
	normalize
	pop Nt
:1
	RS_INVERSE
	RS_JZ 0
	pushv Ng
	normalize
	pop Nt
:0
	RS_POP
	pushif 2
	setfc
	pushif 1
	setfc
	pushv Nt
	setnc
	addcc
	divcc
	pop Ci
	pushif 1
	setfc
	pop Oi
