See, I don't want to argue with you clown I just wanted to know for sure if there is such a thing which we could incoorporate. We're planning a great Online Multiplayer Game (MMORPG: Massive Multiplayer Online Role Playing Game for those of you which don't know). We also need a great Modeler and a Storyboard Writer (SW) for our budget. I'm fundraising ATM but this is not for this thread.

Php Code:
// input from application
	struct a2v {
	half4 position		: POSITION;
	half2 texCoord		: TEXCOORD0;
	half3 tangent		: TANGENT;
	half3 binormal		: BINORMAL;
	half3 normal		: NORMAL;
};

// output to fragment program
struct v2f {
		half4 position		: POSITION;
		half2 texCoord		: TEXCOORD0;
		float3 eyeVec		 : TEXCOORD1;
		half3 lightVec	   : TEXCOORD2;
};

// blinn lighting with lit function
half4 blinn2(half3 N,
		half3 L,
		half3 V,
		uniform half4 diffuseColor,
		uniform half4 specularColor,
		uniform half shininess
		)
	{
	half3 H = normalize(V+L);
	half4 lighting = lit(dot(L,N), dot(H,N), shininess);
	return diffuseColor*lighting.y + specularColor*lighting.z;
	}

/**************************************/
/***** VERTEX SHADER ******************/
/**************************************/

v2f v(a2v In,
		uniform half4x4 worldViewProj, // object to clip space
		uniform half4x4 WorldIMatrix,  //world to object space
		uniform half4 lightPosition,
		uniform half4x4 ViewInvTrans,
		uniform half4x4 world		// object to world space
		)
{
	v2f Out;

  // transform vertex position to homogeneous clip space
	Out.position = mul(In.position, worldViewProj);
  
  //pass texture coordinates
	Out.texCoord = In.texCoord;

  // compute the 3x3 tranform from tangent space to object space
	half3x3 objTangentXf;

	objTangentXf[0] = In.binormal.xyz;
	objTangentXf[1] = -In.tangent.xyz;
	objTangentXf[2] = In.normal.xyz;

   //put the world space light position in object space
	   half4 objSpaceLightPos = mul(lightPosition, WorldIMatrix);
	   half3 objLightVec = objSpaceLightPos.xyz - In.position.xyz;
   // xform light vector from obj space to tangent space
	   Out.lightVec = mul(objTangentXf, objLightVec );
	
  //compute the eye vector in world space and put it in object space
	  half4 objSpaceEyePos = mul(ViewInvTrans[3], WorldIMatrix);
  // xform eye vector from obj space to tangent space
	  half3 objEyeVec = objSpaceEyePos.xyz - In.position.xyz;
	  Out.eyeVec = mul(objTangentXf, objEyeVec);

	return Out;
}

/**************************************/
/***** FRAGMENT PROGRAM ***************/
/**************************************/

float4 f(v2f In,
			uniform sampler2D colorTex,
			uniform sampler2D bumpTex,
			uniform half4 ambient,
			uniform half4 diffuseColor,
			uniform half4 specularColor,
			uniform half shininess,
			uniform half4 light1Color,
			uniform float offsetBias
			) : COLOR
{  
  // calculate lighting vectors
  half3 V = normalize(In.eyeVec);
  half3 L = normalize(In.lightVec);

  //I have to do this take make it look right - don't know why
  half2 newV = V.xy;
  newV.y = -newV.y;
  
  //offset the texture coords based on the view vector
  half height = tex2D(bumpTex, In.texCoord.xy).a;
  half2 offset = newV * (height * 2.0 - 1.0) * offsetBias;
  half2 newTexCoord = In.texCoord.xy + offset;

  //fetch the diffuse map
  half4 colorMap = tex2D(colorTex, newTexCoord);

  
  // fetch the bump normal from the normal map
  half3 normal = tex2D(bumpTex, newTexCoord).xyz * 2.0 - 1.0;

  half3 N = normal;
  
  //lighting
  
  //ambient light
  half4 C = ambient*colorMap;
  
  //diffuse light
  C += light1Color * blinn2(N, L, V, colorMap*diffuseColor, specularColor*colorMap.a, shininess);

  return C;
}

float4 f2(v2f In,
			uniform sampler2D colorTex,
			uniform sampler2D bumpTex,
			uniform half4 ambient,
			uniform half4 diffuseColor,
			uniform half4 specularColor,
			uniform half shininess,
			uniform half4 light1Color,
			uniform float offsetBias
			) : COLOR
{  
  // calculate lighting vectors
  half3 V = normalize(In.eyeVec);
  half3 L = normalize(In.lightVec);

  //I have to do this take make it look right - don't know why
  half2 newV = V.xy;
  newV.y = -newV.y;
  
  //offset the texture coords based on the view vector
  //height value is stored in the red channel of compressed normal maps
  half height = tex2D(bumpTex, In.texCoord.xy).r;
  half2 offset = newV * (height * 2.0 - 1.0) * offsetBias;
  half2 newTexCoord = In.texCoord.xy + offset;

  //fetch the diffuse map
  half4 colorMap = tex2D(colorTex, newTexCoord);

  
  // fetch the bump normal from the normal map
  //swizzle the compressed dxt5 format
  half3 normal = tex2D(bumpTex, newTexCoord).wyz * 2.0 - 1.0;
  //generate the z component of the vector
  normal.z = sqrt(1 - normal.x * normal.x - normal.y * normal.y);

  half3 N = normal;
  
  //lighting
  
  //ambient light
  half4 C = ambient*colorMap;
  
  //diffuse light
  C += light1Color * blinn2(N, L, V, colorMap*diffuseColor, specularColor*colorMap.a, shininess);

  return C;
}

/****************************************************/
/********** SAMPLERS ********************************/
/****************************************************/

sampler2D colorTextureSampler = sampler_state
{
	Texture = <colorTexture>;
	MinFilter = Linear;
	MagFilter = Linear;
	MipFilter = Anisotropic;
	AddressU = Wrap;
	AddressV = Wrap;
};

sampler2D normalMapSampler = sampler_state
{
	Texture = <normalMap>;
	MinFilter = Linear;
	MagFilter = Linear;
	MipFilter = Anisotropic;
	AddressU = Wrap;
	AddressV = Wrap;
};

sampler2D CnormalMapSampler = sampler_state
{
	Texture = <CnormalMap>;
	MinFilter = Linear;
	MagFilter = Linear;
	MipFilter = Anisotropic;
	AddressU = Wrap;
	AddressV = Wrap;
};

/****************************************************/
/********** TECHNIQUES ******************************/
/****************************************************/

technique Complete
{ 
	pass envPass 
	{		
	VertexShader = compile vs_1_1 v(wvp,worldI,light1Pos,viewInvTrans,world);
	ZEnable = true;
	ZWriteEnable = true;
	CullMode = CW;
	AlphaBlendEnable = false; 
	PixelShader = compile ps_2_0 f(colorTextureSampler,normalMapSampler,ambient,surfColor,specularColor,shininess,light1Color,offset);
	}
}

technique Compressed
{ 
	pass envPass 
	{		
	VertexShader = compile vs_1_1 v(wvp,worldI,light1Pos,viewInvTrans,world);
	ZEnable = true;
	ZWriteEnable = true;
	CullMode = CW;
	AlphaBlendEnable = false; 
	PixelShader = compile ps_2_0 f2(colorTextureSampler,CnormalMapSampler,ambient,surfColor,specularColor,shininess,light1Color,offset);
	}
} 



This code is one I modified but does not work. I get a "unknown modifier" error. Anyone knows what that means? 3run or fogman?