
instances( 15 )

regc( 1, "FOG_PARAMS" )
regc( 2, "TEXTURE0_XFORM" )
regcn( 6, "CONST_PALETTE", 90 )

regi(0, "float4", "SS_POSITION")
regi(1, "float2", "SS_TEXCOORD0")

vshader("

	vs.1.1

	def	c0, 1, 0, 0, 0.5

	mov	a0.x, v0.w
	mad	r0, v0, c0.xxxy, c0.yyyx

	dp4	oPos.x, r0, c[6 + a0.x]
	dp4	oPos.y, r0, c[7 + a0.x]
	dp4	oPos.z, r0, c[8 + a0.x]
	dp4	oPos.w, r0, c[9 + a0.x]

	dp4	r1.x, r0, c[8 + a0.x]
	mad	oFog.x, r1.x, c1.x, c1.y

	mov 	oD0, c[10 + a0.x]

	dp4	oT0.x, v1, c[2]
	dp4	oT0.y, v1, c[3]
")
