How to use zshader system.  (C) Richard Svensson

shader ini file layout.

	all shader ini files constist of at least two sections,
	one section is called [general] this is where all vertex shader
	configurations is done and other none texture settings.
	the other section is [pass-x], where x is the pass that section
	describes. a shader can have infinit numbers of passes, a pass 
	means that the geometry is rendered once.
	

settings in [general]

	copydata=true/false	[false]
	if this is enabled the shader will make a copy of all geometry data before
	any operations is applyed to the data, like vertex operations that changes
	the actual data. so that you dont screw up your original data buffers.
	this setting is prefered to be true if any software vertex shaders are used.

	randommovements=true/false	[false]
	a simple software vertex effect,simply moves each vertex whit a random distance
	in a random direction.
	
	waves=true/false	[false]
	a cool software vertex effect, that adds a sinus movement to all vertexs.
	this can be used to simulate water and alike.
	

settings in [pass-x]

	lighting=true/false	[false]
		will this modell be vertex lightned.
	
	cullface=true/false	[true]
		cull back faced polygons
	
	alphatest=true/false	[false]
		rastration vill be alpha tested, all pixels whit alpha below 0.5 vill not be
		rendered.
	
	tu0-3 = texturename   [""]
		what texture file will this texture unit use.
	
	tutexcords0-3 = int	[0,1,2,3]
		what texture cordinats will this texture unit use.
		possible options:
		0/TEX_ARAY_0 = use texture array 0
		1/TEX_ARAY_1 = use texture array 1
		2/TEX_ARAY_2 = use texture array 2
		3/TEX_ARAY_3 = use texture array 3
		4/AUTO_OBJLIN = use auto generated texture cordinats, object linear.
		5/AUTO_EYELIN = use auto generated texture cordinats, eye linear.
		6/AUTP_SPHERE = use auto generated texture cordinats, sphere maped
		
	polygonmdoefront = int	[1]
		set how to render front side of polygons in this pass.
		possible options:
		0/FILL = fill polygon
		1/LINE = line polygon
		2/POINT = point polygon
		
	polygonmodeback = int [1]
		see polygonmodefront.
		
	depthfunc = int [1]
		what depth test function to use.
		possible options:
		0 = NEVER_DEPTH
		1 = LESS_DEPTH
		2 = EQUAL_DEPTH
		3 = LEQUAL_DEPTH
		4 = GREATER_DEPTH
		5 = NOTEQUAL_DEPTH
		6 = GEQUAL_DEPTH
		7 = ALWAYS_DEPTH
		
	blend = true/false [false]	
		will this pass use any blending?
		
	blendsrc = int [1]
		what blend factors to use for the source.
		possible options:
		0 = ZERO_BLEND_SRC
		1 = ONE_BLEND_SRC
		2 = DST_COLOR_BLEND_SRC
		3 = ONE_MINUS_DST_COLOR_BLEND_SRC
		4 = SRC_ALPHA_BLEND_SRC
		5 = ONE_MINUS_SRC_ALPHA_BLEND_SRC
		6 = DST_ALPHA_BLEND_SRC
		7 = ONE_MINUS_DST_ALPHA_BLEND_SRC
		8 = SRC_ALPHA_SATURATE_BLEND_SRC
		
	blenddst = int [0]
		what blend factors to use for the destination.
		possible options:
			0 = ZERO_BLEND_DST
			1 = ONE_BLEND_DST
			2 = SRC_COLOR_BLEND_DST
			3 = ONE_MINUS_SRC_COLOR_BLEND_DST
			4 = SRC_ALPHA_BLEND_DST
			5 = ONE_MINUS_SRC_ALPHA_BLEND_DST
			6 = DST_ALPHA_BLEND_DST
			7 = ONE_MINUS_DST_ALPHA_BLEND_DST
	
	vertexcolor-r = float [1]
	vertexcolor-g = float [1]
	vertexcolor-b = float [1]
	vertexcolor-a = float [1]
		these are used to set vertexcolors
		
	colormaterial = true/false [false]
		enable diable colormaterial, used together whit vertexcolors.
		
	coloreffect = int [-1]
		enables a vertexcolor effect on the material
		possible options:
			-1/DISABLED = Disabled
			1/FLICKERING  = flickering
			2/PULSATING  = pulsating
						
	vertexprogram = string [none]
		set what hardware ARB vertex program to use,  (.zvp files)
		
	fragmentprogram = string [none]
		set what hardware ARB fragment program to use, (.zfp files)
		
		
		
EXAMPLES:

	//---- a simple one pass grass material
	[global]

	[pass-0]
	polygonmodefront=0
	tu0=data/textures/grass.tga

	//----	
	
	//---- a more advance material whit a motion texture blended whit a overlay texture whit to passes
	[global]
	copydata=true
	textureoffset_v=0.001

	[pass-0]
	polygonmodefront=0
	tu0=data/textures/dm/pillar_glow.tga

	[pass-1]
	polygonmodefront=0
	tu1=data/textures/dm/pillar.tga
	depthfunc=2
	blend=true
	blendsrc=4
	blenddst=5end=true
	blendsrc=4
	blenddst=5
	
	//----
	
	