displacement
AQSIS_V 1.6.0


segment Data

USES 51456

param uniform  string dmap
param uniform  float Km
varying  point PP
varying  float disp


segment Init
	pushis ""
	pop dmap
	pushif 1
	pop Km


segment Code
	pushif 1
	pop disp
	S_CLEAR
	pushis ""
	pushv dmap
	ness
	S_GET
	RS_PUSH
	RS_GET
	RS_JZ 0
	pushif 0.5
	pushv t
	pushv s
	pushif 0
	pushv dmap
	pushif 0
	ftexture2
	subff
	pushv disp
	subff
	pop disp
:0
	RS_POP
	pushv P
	pushis "shader"
	transform
	pop PP
	pushv N
	normalize
	pushv disp
	pushv Km
	mulff
	mulfp
	pushv P
	subpp
	pop P
	pushv P
	calculatenormal
	pop N
